[Flashcoders] am i loaded by another swf?

2012-02-15 Thread Ktu
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 -- Ktu; The information contained in this message may

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread g...@engineeredarts.co.uk
Hi, Can you check if the parent exists, and is there a way to determine if this is the document/main class? Glen Sent from my HTC - Reply message - From: Ktu ktu_fl...@cataclysmicrewind.com To: Flash Coders flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] am i loaded by another

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Henrik Andersson
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

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Ktu
so I could do something like this: public function Main():void { if (stage) { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; init(); } else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event =

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Ktu
sorry now, what if the loader is already in a display list when it runs that first frame? is it still not aware of the stage? On Wed, Feb 15, 2012 at 3:33 PM, Ktu ktu_fl...@cataclysmicrewind.comwrote: so I could do something like this: public function Main():void { if (stage) {

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Henrik Andersson
Ktu skriver: sorry now, what if the loader is already in a display list when it runs that first frame? is it still not aware of the stage? If a movie is loaded by a Loader that is on the display tree of the stage the loaded movie DOES NOT have access to the stage.

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Gerry Beauregard
HTC - Reply message - From: Ktu ktu_fl...@cataclysmicrewind.com To: Flash Coders flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] am i loaded by another swf? Date: Wed, Feb 15, 2012 19:55 Hey List, I'm building a swf, and i want to set the stage.scaleMode and align

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Karl DeSaulniers
: [Flashcoders] am i loaded by another swf? Date: Wed, Feb 15, 2012 19:55 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

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Henrik Andersson
Karl DeSaulniers skriver: Is there no reference in AS3 like AS2 where you can look with _level0 for the top level MC? The equivalent to levels would be the display list of the stage itself. ___ Flashcoders mailing list

Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Karl DeSaulniers
Ah.. ok. Thanks Henrik. Best, Karl On Feb 15, 2012, at 4:32 PM, Henrik Andersson wrote: Karl DeSaulniers skriver: Is there no reference in AS3 like AS2 where you can look with _level0 for the top level MC? The equivalent to levels would be the display list of the stage itself.