Flash Play | tips | Web page
A little trick to play code on a Web page flash
A lot of web pages are inserted flash playback code, this is not only for the diversity of page elements, but also to reflect the needs of the content. Most of the time, we have the problem of using Flash script to read different audio sources or video feeds as needed, so how do we achieve this? Here we use the rewrite <object> tag code to implement.
A typical flash player source code often has such a statement:
<param name= "movie" value= "http://mydomin/example.swf"/>
Here we can modify the value to Value= "Http://mydomin/example.swf?videoSource=http://mydomin/video/songs/1.mp3"
This means that example.swf will call Http://mydomin/video/songs/1.mp3 such an audio source (or, of course, video). In this way, your flash can get the VideoSource variable value _root.videosource= "Http://mydomin/video/songs/1.mp3" in _root.
Here is an example:
After using DW to insert a SWF with the name MEDIAFLA, add the parameter "? Sourceurl=music1.mp3" after the SWF path, as follows:
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=7,0,19,0 "width=" height= ">"
<param name= "movie" value= "Mediafla.swf?sourceurl=http://mydomin/music1.mp3"/>
<param name= "Quality" value= "High"/>
<embed src= "One" quality= "High" pluginspage= "Http://www.macromedia.com/go/getflashplayer" type= "application/" X-shockwave-flash "width=" height= "></embed>"
</object>
In this way, when you make flash, you can use the _root.sourceurl in the script to get the variable value "Http://mydomin/music1.mp3" to read the audio source.