PDA

View Full Version : Loading external as2 SWF into as3 file issue



Tendouji
July 1st, 2009, 05:35 AM
I have a main flash file coded in AS3. This file acts like a container that loads on different AS2 files depending on user selection. This container file is set to fullscreen mode and the stage is aligned to center if the user screen is too wide.

The problem here is that when it loads the AS2 file, it causes the container stage to align left. I tried loading an external test AS3 SWF and it loads fine. Only when it comes to loading the AS2 files will the stage aligned left.

I suspect is the AS2 files have its stage aligned to left and I don't have access to these AS2 FLA files. I only have the SWFs.

Is there anyway I can control this from the AS3 code? Can anyone help? :bored:

.ral:cr
July 1st, 2009, 05:53 AM
you can align it back to center after the as2 swf is loaded

Tendouji
July 1st, 2009, 06:00 AM
Once the as2 file is loaded, at the event.complete function, i put the code
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP;

But it makes no difference. Or are you suggesting something else?