Ktu skriver:
> Hey List,
> 
> I'm building a swf, and i want to set the stage.scaleMode and align ONLY IF
> my swf is the top level swf, and was not loaded by another swf.
> 
> anyone know how to find out if a swf was loaded by another swf?
> 
> need more info?
> 
> thanks
> 

You can't know in the general case, but here is a good enough guess:

function isFirstMovie():Boolean {
return stage && root==stage.getChildAt(1);
}

There is however one specific case where you can know: During the
construction of the first frame (that includes the document class
constructor). Check if you are on the stage during that. Only the first
loaded movie will be, any subsequently loaded movies will not be.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to