Hi all -
Have a weird situation in Flash CS5 and I'm not sure what the problem is, if
it's a bug, or a corrupted FLA.
Here's the scenario. I have two FLAs -- one "brand new" created by me, a second
given to me by a client.
In the first keyframe I have this in both:
var keyStr:String;
var valueStr:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
for (keyStr in paramObj) {
valueStr = String(paramObj[keyStr]);
trace("\t" + keyStr + ":\t" + valueStr + "\n");
}
I have two identical HTML documents embedding each SWF (separately). In my SWF,
the flashvars (passed in via SWFObject) work fine. In the client's, the
loaderInfo data is completely undefined. Nothing there.
Just to test this out more, I then tried this with both:
var flashvars:Object = {};
addEventListener( Event.ADDED_TO_STAGE, init );
function init( e:Event ):void
{
removeEventListener( Event.ADDED_TO_STAGE, init );
flashvars = stage.loaderInfo.parameters;
var keyStr:String;
for (keyStr in flashvars) {
valueStr = String(flashvars[keyStr]);
trace("\t" + keyStr + ":\t" + valueStr + "\n");
}
In my SWF, the event doesn't fire (which is fine, for it grabs
this.root.loaderInfo as it should). In the client's SWF, the stage event *does*
fire, and then the parameters are avail (through stage).
Any ideas what could be causing this discrepancy? The timelines of both SWFs
are identical, and neither are being loaded into a parent SWF. It feels like
something low-level is going on that I'm not aware of.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders