How to compile a fla file which need some param from html
In html file, I add params like this:
<param name="FlashVars" value="myVar=1" />
In fla file,I load the param like this:
here comes the problem, each time I compile the file, the swf file is reporting errors because of url is null.
so how can I do this right?
When reading in the property from stage.loaderInfo.parameters, simply set a default value as a fallback so it will work in testing.
var something = stage.loaderInfo.parameters.myVar || 1;
When myVar evaluates to false, it will pick up the default instead.