When embedding your flash file using the <object> tag add another param called "FlashVars". It should look like this:
<param name="FlashVars" value="variable=5">
And in your <embed> tag add another parameter called "FlashVars" with the same information like this:
<embed FlashVars="variable=5" id="...></embed>
Now these values are available to you in Flash. You can call them just like any other value:
if(_root.variable == 5) {
//do something here
}
FlashVars must be assigned in both the <object> and <embed> tags in order to work on all browsers.
You can add multiple variables by separating them with & like this:
FlashVars="variable1=1&valiable2=2"
Don't quote strings or you'll accidentally terminate the parameter.