Jump to content

passing variables to swf via FlashVars


music_lp90

Recommended Posts

Hi, I need to pass a variable to a swf. I've tried reading tutorials, but I can't seem to get it.Here's the html that passes the value (this will later be php so that it is passing a dynamic value not one that's hard coded in)

<noscript>	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="1200" height="1200" id="planCreator" align="middle">	[b]<param name="FlashVars" value="init=testFile.xml">[/b]    <param name="allowScriptAccess" value="sameDomain" />	<param name="allowFullScreen" value="false" />	<param name="movie" value="planCreator.swf" />    <param name="quality" value="high" /><param name="bgcolor" value="#006633" />    <embed src="planCreator.swf" [b]FlashVars="init=testFile.xml"[/b] quality="high" bgcolor="#006633" width="1200" height="1200" name="planCreator" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />	</object></noscript>

I haven't really seen how to access the variables that are passed, here's how I'm trying to do it:xmlText.text = _root.init;I've also tried var init = _root.init;I just keep getting undefined.Thanks for your help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...