Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AviationFan

macrumors 6502a
Original poster
Jan 12, 2006
510
0
Cedar Rapids, IA
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:
<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="clsid:D27CDB6E-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>
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:
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);
What am I doing wrong?

Thanks in advance for your help!

- Martin
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.