This content has been marked as final. Show 3 replies
I tried to do the same thing, eventually after much searching I ran across something called flashVars. Essentially, you can pass values into flex and then do what ever you want with them. I wrapped my .swf file in an .asp page so that I could pass in the userID and ip address.
id="MiscControls" width="362" height="280"
<param name='flashVars' value='myName=<%= Response.Write(Request.ServerVariables("REMOTE_ADDR")) %>&myIP=<%= Response.Write(Request.ServerVariables("LOGON_USER")) %>'/>
<param name="movie" value="MiscControls.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="MiscControls.swf" quality="high" bgcolor="#869ca7"
width="362" height="280" name="MiscControls" align="middle"
You should also check out swfObject which was built to handle flash detection on browser and better support for displaying/placement of flash movies but also has a very nice and easy to use method for passing flashvars. Once they are passed you should be able to call them via actionscript in your swf file. here is more info on this: http://blog.deconcept.com/swfobject/
Thanks for the response. I did come across Flashvars in my searching, but I failed to mention that I would need to load this external swf directly back into the flex application using the SWFLoader. I cannot have an ASP or HTML wrapper. In this case, is Flashvars still applicable? or is there another route you may suggest. Thanks again!