sorry if this question has already been answered but since the new forum style, I can't seem to find it :/
My question is simple:
Thanks in advanceHow do I pass variables to my flash app
for example:
appId = 1234 /or/
autoStart = true
etc...![]()




sorry if this question has already been answered but since the new forum style, I can't seem to find it :/
My question is simple:
Thanks in advanceHow do I pass variables to my flash app
for example:
appId = 1234 /or/
autoStart = true
etc...![]()










If I remember correctly:
- Make a webpage.
- Make a javascript function that returns the appId.
- In the game, call the function, i.e: Call "GetAppID"
- Embed the game into the webpage.
- Put the webpage and the game on a server.
- Run the game from the server. It will not work running from your local computer.


You could also use FlashVars. They can be retrieved with the CommandItem$ expression.




Thanks for the advice Popcorn, this does seem a little complicated for a simple task :/
(Although I could easily do it that way)
What I'm trying to do is shown in a HTML code snippet below
From the example above, if I wanted to be able to get the value of quality in my program, is it possible? Or do I still have to reply on using javascript?HTML Code:<object type="application/x-shockwave-flash" data="flash.swf" width="375" height="64"> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="6.0.65.0" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /> </a> </p> </div> </object>
ie: from the line:
<param name="quality" value="high" />
EDIT: @Jamie, Is what I stated a FlashVar?
Thanks and Regards
Tim Ellis




The FlashVars are passed to the SWF as parameters, yes - check the help (F1) in MMF to see exactly how to use them. It's under the "Features specific to Flash development" page, or some title like that.
If you're passing them from the query string, you can use a bit of PHP to pass them in (or use Javascript, if you don't have PHP installed and/or enjoy doing things in an unnecessarily complex way)






Ah, right on. Thanks Jamie
(and everyone else :P )