Simulation (QQ) Magic Expression on the Web Page

xiaoxiao2021-03-06  19

Using layer (DIV) and embedd Flash, the relevant properties are used to simulate the effect of magic expressions. (Ie, playing the swiff on the transparent background, you can see "Magic Expression" in QQ newer version Function). Because it is analog implementation in the web page, of course, you will close your browser or minimize your browser, and the magic expression of the simulated implementation will be "no" along with the web page.

I wrote a simple example with JS, and the demo page (DEMO) is submitted:

http://exp.univchina.org/univs/sjtu/tomato/simulatemagicface/tomato.html

Simply pay attention to the main attention to two places: First, in the code embedded in the flash, you need to set the parameters to make flash background transparency, , the second is to Put Flash into a dedicated layer, then the control layer can be displayed in the appropriate location. Of course, you can have two options, one is the code that is dynamically written to the Flash, the other is the dynamic control layer display attribute Nice, is it visible.

The JS code used in Demo is as follows:

1. Method for initialization and arrangement of the emoction;

function Ini () {var left; var top; var screenWidth = screen.availWidth; var screenHeight = screen.availHeight; left = (screenWidth-500) / 2; top = (screenHeight-500) / 2; var imgPath; document. Write (" Click the icon to view the corresponding magic expressions
"); for (i = 1; i <= 320; i ) { IF (i <100) {IF (i <10) {imgpath = "magicface // images // mf_00" i ". GIF";} else {imgpath = " i ". GIF ";}} else {imgpath =" MAGICFACE // images // mf _ " i ". gif ";} Document.write (" ");}}

2. Method for displaying magic expressions ShowmagicFace;

Function showmagicface (id, _left, _top, _width, _height) {INI (); var _path; if (id <100) {i (id <10) {_Path = "MagicFace // Flash // mf_00" ID ". SWF ";} else {_Path =" Magicface // Flash // mf_0 " ID ". SWF ";}} else {_Path =" MAGICFACE / / FLASH / / MF _ " ID ". SWF ";} Document.write ("

" _PATH " / "wmode = /" transparent / "quality = /" high / "pluginspage = /" http://www.macromedia.com/go/getflashplayer / "type = /" Application / X-ShockWave-Flash / "width = /" " _ width " / "height = /" " _Height "/"> "); var over = setTimeout (" location.href = 'tomato.html' ", 5000);} then only need to do ini when loading () Can be initialized.

Because Demo does not involve background programs, interested friends can directly view the HTML page source code. Welcome to reprint and use, please keep copyright information. [The SWF file in Demo comes from the network, this statement] Author Blog:

http://blog.9cbs.net/crazytomato/

related articles

On the web page Simulation (QQ) Magic Expression Flashers: Just A Bunch of CopyCats? ? ? ? ? ? The version of the assembly is controlled [next] The version of the assembly is controlled [on] Remove the annoying automatic pop-up page

Comments on this article

9CBS User (2005-03-21) Professional .NET Software Crack My Computer Graduation SOHO Professional Crack all kinds of .NET Software, Control Keywords: 1, Software Crack 2, Dontnet Crack 3, .NET Crack 4, Reverse Engineering ( Reverse engineering) 5, .NET control breaks the component 6, encrypt enough to crack 7, software protection business 8, payment 9, system plan large MIS, OA system 10, website background programming coding (ASP.NET, ASP, JSP) 11, system optimization contact QQ: 328754226 Email: dotNetsoho@126.com

转载请注明原文地址:https://www.9cbs.com/read-42687.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.040, SQL: 9