FlashVars In Flash CS4 Actionscript 3
Posted by Lon Hosford on April 2nd, 2009 at 12:06am
Publishing under Flash CS4 will provide the latest HTML wrapper with a boat load of Javascript. At one time a separate Javascript file was generated from the Flash IDE publishing. Now it is all in the HTML document.
The overall process is the same as it has been since first introduced. You need to publish the HTML one time and then turn it off as you need to edit the HTML document for your FlashVars. Dicing in the FlashVars for the new HTML wrapper appears as follows for the FlashVars variables message1 and name:
AC_FL_RunContent Javascript function arguments:
'FlashVars', 'message1=Hello World&name=Alonzo (Lon) Hosford',
'salign', ''
...
Object tag for the no script possibility:
In Flash you extract the Flash vars as follows:
root.loaderInfo.parameters.message1
An elegant why to dump all FlashVars
- for (key in params)
- {
- value = String(params[key]);
- trace ("\t" + key + "\t" + value );
- }
Download completed FlashVars example for CS4 and Actionscript 3
Under Flash
1 Comment for FlashVars In Flash CS4 Actionscript 3
1. ivijuvedy&hellip | August 25th, 2009 at 3:50 am
ivijuvedy…
Denys Drash Frasier …
Leave a Comment for FlashVars In Flash CS4 Actionscript 3
You must be logged in to post a comment.
Trackback this post | Subscribe to the comments via RSS Feed