Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

krazl

Members
  • Posts

    11
  • Joined

  • Last visited

krazl's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hahaha... my bad because expecting future
  2. Hope this will help viewtopic.php?f=6&t=5517
  3. I've this, _scene_MainMenu = new scene_MainMenu(); _progressDisplay = new ProgressCircleLite({radius:26, thickness:4, trackColor:0xFFFFFF, trackAlpha:0.25, trackThickness:4, autoTransition:false, smoothProgress:0}); this.addChild(_progressDisplay); _progressDisplay.mouseEnabled = false; _progressDisplay.x = stage.stageWidth / 2; _progressDisplay.y = stage.stageHeight / 2 + 100; _progressDisplay.addLoader(_scene_MainMenu ); Is there any method using "ProgressCircleLite" to load external class "scene_MainMenu"
  4. I think something is wrong with your concept. Try this instead:- public var tmpXML:XML; private var tmp_name_Attributes:Array = new Array(); private var name_Attributes:XML = new XML(); private var tmpXML_Attributes:XMLList = new XMLList(); public function ConstructurNamePutHere() { loader = new XMLLoader("UrXMLFileName.xml", {name:"whatEverNameHere_xml", onComplete:completeHandler, estimatedBytes:5000}); loader.load(); } public function completeHandler(event:LoaderEvent):void { tmpXML = new XML(LoaderMax.getContent("whatEverNameHere_xml")); var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler_SWF, onError:errorHandler}); tmpXML_Attributes = tmpXML.LoaderMax.BottomPanel.SWFLoader.attribute("ButtonInstanceName"); i = 0; j = 0; for each (name_Attributes in tmpXML_Attributes) { //trace("name_Attributes: " + String(name_Attributes)); tmp_name_Attributes[i] = String(name_Attributes); i++; } var tmpXML_URL_Attributes:XMLList = tmpXML.LoaderMax.SWFLoader.attribute("url"); for each (var url_Attributes:XML in tmpXML_URL_Attributes) { queue.append( new SWFLoader( String(url_Attributes), { name:String(tmp_name_Attributes[j]) } ) ); j++; } queue.load(); } public function completeHandler_SWF(event:LoaderEvent):void { //trace(event.target + " is complete!"); } To retrieve the content public function retrieve_Content(tmpStr:String):Object { return LoaderMax.getContent(tmpStr); } here your xml example <?xml version = "1.0" encoding = "utf-8" ?> CHILDCONTENTHERE CHILDCONTENTHERE
  5. i don't have problem loading multiple swf (in my case i load 20 swf). Maybe u want to share ur source code? private static var loaderName:String = "MainMenu"; private static var _sound_Music1:String = "sound_Music1"; public function scene_MainMenu() { //var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue.append( new SWFLoader("resources/MainMenu.swf", { name:loaderName } ) ); queue.append( new MP3Loader("resources/music1.mp3", {name:_sound_Music1, autoPlay:false}) ); queue.load(); } private function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = LoaderMax.getContent(loaderName); addChild(image); image.addEventListener(MouseEvent.CLICK, onButtonClick); aDynamicObject_Sound[string(_sound_Music1)] = new Sound(); aDynamicObject_Sound[string(_sound_Music1)] = Sound(retrieve_Content(_sound_Music1)); aDynamicObject_SoundChannel[string(_sound_Music1)] = new SoundChannel(); aDynamicObject_SoundChannel[string(_sound_Music1)] = aDynamicObject_Sound[string(_sound_Music1)].play(0, 2); var _event:Event = new CustomEvent(Event.COMPLETE); dispatchEvent(_event); } public function retrieve_Content(tmpStr:String):Object { return LoaderMax.getContent(tmpStr); }
  6. maybe by monitoring (start application FrameRate) vs (Flash frame rate during animation) wil give u better idea what really happen. perhaps GPU vs CPU problems?
  7. a huge memory free after i implement this method. public function CustomEvent(type:String, data:* = null) { this.data= data; super(type); } override public function clone():Event { return this; } private function completeHandler(event:LoaderEvent):void { var _event:Event = new CustomEvent(Event.COMPLETE); dispatchEvent(_event); } _scene_xmlLoader.addEventListener(Event.COMPLETE, onAsset_scene_xmlLoader_Complete, false, 0, true); private function onAsset_scene_xmlLoader_Complete(event:CustomEvent):void { _scene_xmlLoader.removeEventListener(Event.COMPLETE, onAsset_scene_xmlLoader_Complete, false); } I suspect "override public function clone():Event " doing the trick .. Btw I love GreenSock classes
  8. I suggest u visit here :- http://www.krazl.com/blog/index.php/pag ... developer/
  9. Have u try using TimelineLite? http://www.greensock.com/timelinelite/
  10. this also will do the trick: consider "top_icon" is your child var image:ContentDisplay = LoaderMax.getContent(loaderName); var mcLoaded_topIcon:MovieClip = MovieClip( (image.rawContent).top_icon );
  11. Ive try this method: _scene_MainMenu = new scene_MainMenu(); queue.unload(); //this is loaderMax queue removeChild(_scene_MainMenu); _scene_MainMenu = null; System.gc(); but yet not all memory being free. any idea's?
×