ilvolgo
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by ilvolgo
-
-
Hello,
I have a simple (maybe?) problem, as long as I am a GS newbie, I hope you can help me solve it.
In my AS3 document class have a function:
public function nextModule(uri):void { while (_contentContainer.numChildren > 0) { _contentContainer.removeChildAt(0); } moduleLoader = new SWFLoader(uri,{ container: _contentContainer, onComplete: moduleIsLoaded, onProgress: moduleIsLoading, onError: errorHandler, estimatedBytes: 50000, width: stage.stageWidth, height: stage.stageHeight - 140, scaleMode: 'proportionalInside', autoDispose: true }); moduleLoader.load(); }
that loads external swf into my "_contentContainer" Sprite.
Then I wrote a simple event listener, "resizeHandler" to help me solve window resize issues:
public function resizeHandler(event:Event):void { _contentContainer.x=0; _contentContainer.y=0; _dock.x=0; _dock.y=0; logo_pop_small.x=stage.stageWidth/2-475; logo_pop_small.y=stage.stageHeight-logo_pop_small.height-40; menu_stripe.x=logo_pop_small.x-2157; menu_stripe.y=logo_pop_small.y+18; _menuContainer.x=logo_pop_small.x+160; _menuContainer.y=logo_pop_small.y+29; full_screen_toggler.x=logo_pop_small.x+935; full_screen_toggler.y=logo_pop_small.y+30; sound_control.x=logo_pop_small.x+843; sound_control.y=logo_pop_small.y+28; } stage.addEventListener(Event.RESIZE, resizeHandler); stage.dispatchEvent(new Event(Event.RESIZE));
My SWFLoader works fine and puts the content where it should be (as stated in "width", "height" and "scaleMode" properties of "moduleLoader"), but obviously, when I resize the browser window, my external swf loaded content is not repositioned :s
Is there any way to recall my SWFLoader repositioning propertier in my resize handler function?
Thank you in advance!
Event resize to SWFLoader content
in Loading (Flash)
Posted
Ok, solved. It was a simple matter of logic, as witnessed by the vagueness of the question. Thanks anyway!