Jump to content
Search Community

1159

Members
  • Posts

    6
  • Joined

  • Last visited

1159's Achievements

0

Reputation

  1. .... aaaand right you are, i kept going over it and over, i was assigning the loaders to the display object instead of movieclips. got it working now. Once again, really great work you've done, saved my project and hours of insanity... cheers!
  2. my guess is that it's in the "container" that im specifying to place them all on stage when i just used separate loaders, but in this case, its only specified on the .prepend SWF this is what i had in the code but ended up with all of them on stage and playing LoaderMax.activate([sWFLoader]); queue = LoaderMax.parse(["SWF/SceneNorthPole.swf","SWF/ScenePostOffice.swf"], {maxConnections:1}, {autoPlay:false}); queue.prepend( new SWFLoader("SWF/SceneBedroom.swf", {container:this, onInit:initHandler, autoPlay:true}) ); queue.load(); private function initHandler(event:LoaderEvent):void { _scene0 = _loader.content; _scene0.alpha = 0; _scene0.addEventListener("load adventure", loadMain); TweenLite.to(_scene0, 1, {alpha:1}); trace(event.target + " is complete!"); }
  3. yes, it makes perfect sense, however, once its done loading, it places all the SWFs into DisplayObject, whereas i want it to place the first one on stage, store the others for future use(and not play them until a certain even). i have the event system set up that will trigger play for each of those later on... what am i missing?
  4. hello again it seems that i have found the problem: dispatchEvent(new Event("my event", true)); *bubbling must be set to "true"; this.addEventListener("my event", handleEvent, false, 0, true); *must be set in the constructor so yes, you were right, the listener cannot be added to contentLoaderInfo. ALSO, i have checked out LoaderMax and - what a great piece of work. already tested and working. one thing a little hazy though, how does the prioritizing work? i know it can be done, i have 12 SWFs that i want loaded in a specific order one-after-the-other? any quick thoughtS? many thanks! cheers, serge.
  5. Ah, my apologies for not looking around enough. i will go through the Loader Max documentation and see if i can get it to work. And i see what you are saying with the Loader class so thank you so much for clearing that up. im hoping to get it to work without bugging you again (this time with LoaderMax) so we'll see. thanks again! serge.
  6. Hey there, i've been searching the net and slowly ripping my hair out for days for this exact situation. i have a main SWF that loads another SWF(a scene). once a certain button is clicked in the scene SWF, i need the parent SWF to do an action . which is exactly what this thread is about. However, i have followed all of the steps (i want to achieve this through events rather than parent.parent path) i can fire off a custom event inside the scene SWF, listen for it and catch it no problem. but i CANNOT get the main SWF to listen to the event and catch it. i cant even access the function in the parent SWF through the parent.parent path i even created a custom event and still nothing seems to work. i've also tried: MovieClip(_loader.content).addEventListener("my event", eventHandler); - where "my event" is fired from the scene SWF once a button is clicked: dispatchEvent(new Event("my event")); - and that got me nowhere this is what my Container class looks like (the parent) public class Container extends MovieClip { private var _loader:Loader; private var _loading:Loader_MC; private var _path:String = "SWF/Scene.swf"; public function Container() { startLoad(); } private function startLoad():void { _loader = new Loader(); _loader.load(new URLRequest(_path)); _loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showLoading); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); } private function showLoading(e:ProgressEvent):void { _loading = new Loader_MC(); _loading.x = stage.stageWidth * 0.5; _loading.y = stage.stageHeight * 0.5; addChild(_loading); } private function loadComplete(e:Event):void { removeChild(_loading); _loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, showLoading); _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, startLoad); addChild(_loader); MovieClip(_loader.content).addEventListener(ResponseEvent.CONTROL_SCENE, eventHandler, false, 0, true); } private function eventHandler(e:ResponseEvent):void { trace("heard the event!!!!!"); } } please shed some light on this. i am at a loss. i know its something small... much appreciated! Serge.
×
×
  • Create New...