It solves the problem of garbled characters and compatibility when HTML transmits parameters to Flash at one time.
This afternoon, I want to use HTML to pass two parameters to Flash. I have encountered errors. Here is a summary:
Error 1:
<Param name = "flashvars" value+'&symc=unit1.mp3 & lrcmc = unit1.lrc '/>
The result is 1.3 and 1.
Error 2:
<Param name = "flashvars" value?encodeuricomponent('&symc=unit1.mp3 & lrcmc = unit1.lrc ')/>
The result is the same as the preceding one.
Later, Gao taught the methods supported by both Chinese and English documents, which are recorded here:
Method 1:
Note 1: & amp;
NOTE 2: This method is only available in IE.
<Param name = "flashvars" value+'&symc=unit1.mp3 & amp; lrcmc = unit1.lrc '/>
<Param name = "flashvars" value+'&symc;.mp3 .mp3 .mp3 & amp; lrcmc = Chinese. lrc '/>
NOTE 3: to make it available in FIREFOX. You need to add the code in the embed label in another way.
<Embed flashvars='&symc= .mp3 .mp3 & amp; lrcmc = Chinese... lrc '.../>
The result is:
Unit1.mp3 and unit1.lrc
Chinese and Chinese. lrc
Method 2:
This is common in IE and Firefox.
Http://www.hds8.com/mp3/SimpleMP3Reader.swf? &Symc=unit1.mp3 & lrcmc = unit1.lrc
Http://www.hds8.com/mp3/SimpleMP3Reader.swf? &Symc= .mp3 .mp3 & lrcmc = Chinese. lrc
The result is unit1.mp3 and unit1.lrc.
The result is:
Unit1.mp3 and unit1.lrc
Chinese and Chinese. lrc
In addition, the receiving data program in as3 is written as follows:
Var flashvars: Object = root. loaderInfo. parameters;
Symc_txt.text = flashvars ["symc"];
Export mc_txt.text = flashvars ["lrcmc"];
Zookeeper