|
Adobe Flash Actionscript Flex Examples
|
|
|
|
|
|
FlashVars Basic Hello World Example
JavaScript and the latest version of the Adobe Flash Player are required. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here. This is a basic example of sending variables to a Flash movie from the OBJECT PARAM tag and AC_FL_RunContent Javascript function. For the latest HTML you need to place the variables in twice. Once for the AC_FL_RunContent Javascript function and once for the OBJECT tag. The variables are message1 and name. Here is a snippet of the tags for Actionscript 3. AC_FL_RunContent Javascript function: 'movie', 'FlashVarsEx02', 'FlashVars', 'message1=Hello World&name=Alonzo (Lon) Hosford', 'salign', '' Object tag: <param name="flashvars" value="message1=Hello World&name=Alonzo (Lon) Hosford" /> These variables are then available via the root.loaderInfo.parameters object in Flash. The example shows the variables in a TextField and if you use Control Test Movie in the Flash IDE they are also displayed. This all happened when you loaded this page. Take care not to select HTML checkbox in publish settings to create FlashVarsEx01.html as the download HTML file was changed manually to include the FlashVars part of the OBJECT and EMBED tag.
All source files for Flash CS4: Download
|
|
|
|
|
|
|
|