Sina
A lot of people asked Sina Online sports News SWF Practice, I This is also simple to talk about:
This SWF obtains the variable name through the JavaScript of the webpage, transmits the variable to the SWF file through "Flashvar" in the webpage, so that the SWF obtains the picture address, the picture text description and the link address, as well as the scene size. There are 21 kinds of shading effects in the file, which are covered with the as implementation.
Visible in parsing HTML source files:
<script type=text/javascript>
<!--
var focus_width=370//Scene width
var focus_height=270//Scene height
var text_height=26//Text description high, text not displayed when 0
var swf_height = Focus_height+text_height
var pics= ' Jpg0.jpg|jpg1.jpg|
Jpg2.jpg|jpg3.jpg|
Jpg4.jpg|jpg5.jpg '
var links= ' http://www.flash8.net|http://bbs.flash8.net|
Http://bbs.flash8.net|http://bbs.flash8.net|http://bbs.flash8.net|http://bbs.flash8.net '
var texts= ' This is the first picture I've added | The second one | The third | Fourth picture | fifth Photo | 6th picture '
The above three variables are description picture address, each picture of the link address and description, the number of pictures is also reflected here, the middle with | separated.
document.write (' <object id= "Focus_flash" classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
Codebase= "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
Width= "' + focus_width + '" height= "' + swf_height + '" > ");
document.write (' <param name= "allowscriptaccess" value= "Samedomain" ><param name= "movie" value= "http:// Www.webjx.com/htmldata/2006-03-20/abcde.swf ">
<param name= "Quality" value= "High" ><param name= "bgcolor" "value=" #E7E7E7 ">");
document.write (' <param name= menu ' value= ' false ' ><param name=wmode value= ' opaque ' > ');
document.write (' <param name= "flashvars" value= "pics= ' +pics+ ' &links= ' +links+ ') &texts=
' +texts+ ' &borderwidth= ' +focus_width+ ' &borderheight= ' +focus_height+ ' &textheight= ' +text_height+ ' > ');
document.write (' <embed id= "Focus_flash" src= "http://www.webjx.com/htmldata/2006-03-20/abcde.swf" wmode= "opaque "flashvars=" pics= ' +pics+ ' &links
= ' +links+ ' &texts= ' +texts+ ' &borderwidth= ' +focus_width+ ' &borderheight= ' +focus_height+ ' & textheight=
' +text_height+ ' "menu=" false "bgcolor=" #E7E7E7 "quality=" High "width=" ' + focus_width + ' "height=
"' + focus_height + '" "allowscriptaccess=" Samedomain "type=" Application/x-shockwave-flash "pluginspage=
"Http://www.macromedia.com/go/getflashplayer"/> '); document.write (' </object> ');
--></script> If you want to use this effect, you only need to change the red color above, http://www.webjx.com/htmldata/2006-03-20/abcde.swf is provided in the attachment
Write the code into HTML and it's OK.
Click here to download the source file