I want to use HTML to pass two parameters to flash this afternoon, and I've been encountering an error. Here's a summary:
Error One:
| The code is as follows |
Copy Code |
| <param name= "flashvars" value= ' &SYMC=UNIT1.MP3&LRCMC=UNIT1.LRC '/> |
In this way, the results are 1.3 and 1.
Error Two:
| The code is as follows |
Copy Code |
| <param name= "Flashvars" value=encodeuricomponent (' &SYMC=UNIT1.MP3&LRCMC=UNIT1.LRC ')/> |
The results are the same as above.
Later, the high man taught both English and Chinese to support the method, recorded here:
Method One: (note is &)
| The code is as follows |
Copy Code |
<param name= "flashvars" value= ' &SYMC=UNIT1.MP3&LRCMC=UNIT1.LRC '/>
<param name= "flashvars" value= ' &symc= Chinese. mp3&lrcmc= the Chinese. LRC '/> |
The results obtained are:
Unit1.mp3 and UNIT1.LRC
Chinese, MP3 and Chinese. LRC
Method Two:
| The code is as follows |
Copy Code |
Http://www.111cn.net/mp3/SimpleMP3Reader.swf?&symc=unit1.mp3&lrcmc=unit1.lrc
http://www.111cn.net/mp3/SimpleMP3Reader.swf?&symc= Chinese. mp3&lrcmc= Chinese. LRC |
The result is Unit1.mp3 and UNIT1.LRC.
The results obtained are:
Unit1.mp3 and UNIT1.LRC
Chinese, MP3 and Chinese. LRC
In addition, the receiving data program in AS3 is written in this way:
var flashvars:object = root.loaderInfo.parameters;
symc_txt.text=flashvars["SYMC"];
rjmc_txt.text=flashvars["LRCMC"];