Flash as: How to Use flashvars to transmit Parameters

Source: Internet
Author: User

IE:
<Param name = "movie" value00000000test.swf "/>
<Param name = "quality" value = "high"/>
<Param name = "flashvars" value = "STR = flashpixy"/>
<Param name = "menu" value = "false"/>
<Embed
Src00000000test.swf"
Quality = "high"
Pluginspage = "http://www.macromedia.com/go/getflashplayer"
Type = "application/X-Shockwave-Flash"
Width = "550 ″
Height = "400"/>
Firfox:

<Param name = "movie" value00000000test.swf "/>
<Param name = "quality" value = "high"/>
<Param name = "flashvars" value = "youurl = 123"/>
<Param name = "menu" value = "false"/>
<Embed
Flashvars = "STR = flashpixy"
Src00000000test.swf"
Quality = "high"
Pluginspage = "http://www.macromedia.com/go/getflashplayer"
Type = "application/X-Shockwave-Flash"
Width = "550 ″
Height = "400"/>

Note that the locations added to these two browsers are different. But for insurance, it is best to add them, and it is not in the way. Because of the ieupgrade, if Flash is released (Press F12) in a previous version, there will be a virtual box around flash. Only after clicking it can flash get the focus, however, the current flash release directly solves this problem and generates an ac_runactivecontent.js file. Therefore, to pass parameters through flashvars, remember to modify it here:

If (ac_fl_runcontent = 0 ){
Alert ("this page requires ac_runactivecontent.js .");
} Else {
Ac_fl_runcontent (
'Codebase', 'HTTP: // download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab?version=9,0, 0, 0 ′,
'Width', '123 ′,
'Height', '000000 ′,
'Src', 'test ',
'Quality', 'high ',
'Pluginspage', 'HTTP: // www.macromedia.com/go/getflashplayer ',
'Alipay', 'middle ',
'Play', 'true ',
'Login', 'true ',
'Scale', 'showall ',
'Wmode', 'window ',
'Devicefont ', 'false ',
'Id', 'test ',
'Bgcolor', '# ffff ',
'Name', 'test ',
'Menu ', 'false ',
'Allowfullscreen ', 'false ',
'AllowScriptAccess', 'sample ',
'Movie ', 'test ',
'Flashvars', 'str = flashpixy ',

'Salign ',"
); // End AC code
}

//

In as3, flash uses root. loaderinfo. Parameters // or stage. loaderinfo. parameters to obtain the passed parameters.

In Flex 2, the passed parameters are obtained through: application. application. parameters.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.