Within a Adobe Flash application, or in this case Xcelsius, you can bind variables that are utilized through out the application during runtime. The benefit of Flash variables within an Xcelsius generated SWF is an ability to push values into the model when embedded inside of a HTML page. In most use cases, you would want to use Flash Variables to push global session variables that you may want to consume and re-use. Examples include: Session tokens, user IDs, and parameters passed from other embedded scripts or controls.

First we will define a variable within Xcelsius.
For Xcelsius 4.5
1. Once Xcelsius is loaded, go to File>Export Settings.
2. Click on the “Define Variables” button.
3. Define your variable name and bind it to a cell. In this case, I named my value sessionID.

4. Generate your SWF.
Now your SWF file is configured to consume a Flash variable

For Xcelsius 2008
1. Open the Data Manager, Data>Connections.
2. Click on the “Add” button. Then select Flash Variables.
3. Add a new variable
3. Define your variable name and bind it to a cell. In this case, I named my value sessionID.
4. Generate your SWF.

There are two ways to push the variable into the SWF.

1. The Adobe Flash player enables a SWF to consume data directly from the HTML for which it is loaded. In a scenario where you are dynamically generating your HTML page, you can pass variables into the SWF on load. You can also use Javascript to dynamically change the variables during runtime, enabling other HTML embedded controls to pass data into the SWF without reloading the HTML page. An HTML nested flash variable would look something like this within an OBJECT tag:

2. The Adobe Flash player also enables a SWF to consume data directly from defined parameters within a browser or path for which it is loaded. This works great for passing parameters from one SWF to another if they are loaded on separate HTML pages.

You can try the example below by entering a value, then launching another HMTL page where we consume the variable. You will be launching a URL that looks something like this:
http://ryangoodman.net/blog/flashvar.swf?sessionID=test

All rights reserved Goodman Group LLC