This should be easy, I must be really blind to not see it. Hopefully someone here can point me the right way.
I don't know Flash very well at all, just know traditional programming. So I have Flash CS3, and I am trying to pass the name of an FLV flash video file from HTML code to the flash video player, such that I need just one flash movie that I can run with any number of FLVs.
Here's what I'm trying to do. First, the HTML:
Thanks in advance for your help!
- Martin
I don't know Flash very well at all, just know traditional programming. So I have Flash CS3, and I am trying to pass the name of an FLV flash video file from HTML code to the flash video player, such that I need just one flash movie that I can run with any number of FLVs.
Here's what I'm trying to do. First, the HTML:
And now the flash ActionScript code. I was trying to see what was going on, so I created a textfield and assigned it the passed filename. Problem is, when it runs, it only shows the "Start 2" test string, not the one I was hoping to assign from the variables:<p>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','640','height','398','title','Video','src','viewvideo?videofile=test','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','viewvideo?videofile=test' ); //end AC code
</script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="640" height="398" title="Video">
<param name="movie" value="viewvideo.swf?videofile=test" />
<param name="quality" value="high" />
<embed src="viewvideo.swf?videofile=test" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="640" height="398"></embed>
</object></noscript>
</p>
What am I doing wrong?function loaderComplete(myEvent:Event)
{
textfield.text = "Start 2"; // debug code
var flashVars=this.loaderInfo.parameters;
textfield.text=flashVars.videofile;
}
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
Thanks in advance for your help!
- Martin