Jump to content
Search Community

Arod2013

Members
  • Posts

    6
  • Joined

  • Last visited

Arod2013's Achievements

0

Reputation

  1. That was my apologies, I was having a discussion while I was typing the post and fudged the forum topic, but you answered my question as needed. I just didn't know how to dispose of each individual swf once its assigned to the LoaderMax instance. Thanks for the help and quick reply! Andrew
  2. Experienced Greensockers, I could use some help. I developed a custom loader off of LoaderMax and SWFLoader. It works, but now I need to program a disposal function. I know the loader itself can use a disposal to clear ALL items within that loader, but is there a way to be able to call each individual swf and dispose. Not sure what use it'll have, but attached is my code. package mil.af.trss367.loader.swfLoader { import com.greensock.events.LoaderEvent; import com.greensock.loading.LoaderMax; import com.greensock.loading.SWFLoader; import com.greensock.loading.display.ContentDisplay; import flash.display.MovieClip; import flash.events.Event; public class SwfLoader extends MovieClip { // Add Path of File into Array 'swf/LessonName.swf' private var urls:Array = ["swf/LessonSWF.swf", "swf/binaryClock.swf "swf/AlertBoxes.swf"]; //Parse all of the urls, creating a LoaderMax that contains the correct type of loaders private var queue:LoaderMax = LoaderMax.parse(urls, {name:"SWFLoader", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}) as LoaderMax; public function SwfLoader() { // Add Lesson SWF's Here with name:Lesson + # queue.append(new SWFLoader(urls[0], {name:"Lesson1"})); queue.append(new SWFLoader(urls[1], {name:"Lesson2"})); queue.append(new SWFLoader(urls[2], {name:"Alerts"})); // Begin Loading queue.load(); } // Tracks Loading Progress private function progressHandler(evt:LoaderEvent):void { trace("Progress: " + evt.target.progress.toFixed(2)); } // Dispatches Event Once Loading is Complete private function completeHandler(evt:LoaderEvent):void { trace(evt.target + " Is Complete!"); // Dispatches Event Listener to Stage When Load is Completed this.dispatchEvent(new Event(Event.COMPLETE)); } // Tracks Errors with Loader or Target private function errorHandler(evt:LoaderEvent):void { trace("Error Occured With " + evt.target + ": " + evt.text); } // Removes All Instances of Loader and Children public function dispose():void { // Call This When You Want To Unload/Dispose of the Loaded SWF } } }
  3. Exactly what I was looking for. Thanks!! You guys rock!
  4. Hey everyone, I have a question in regards to LoaderMax and SWFLoader. I created a multi purpose Loader Class for a project at work (Air Force programmer), and I was wondering if it is possible or how it should be written to be able to load multiple swfs at once? I know how to do it individually and using multiple appends, but can I use an array? Unfortunately I can't post my code, due to it being on my work computer and I apologize in advance.
  5. Answers it perfectly! Thanks for the quick response. Love the platform and keep up the good work!
  6. Hey everyone, I've searched but have come up pretty much empty handed.... Is there a way you can trace the current position of a tween object? I'm messing around in Flash CS6 and using some Timers and Tweens and I would like to see how accurate I can get them, but stuck on tracing the object's current position.
×
×
  • Create New...