티스토리 뷰
-
package {
-
import com.greensock.*;
-
import com.greensock.easing.*;
-
import com.greensock.events.LoaderEvent;
-
import com.greensock.loading.display.core.ProgressDisplayLite;
-
import com.greensock.loading.*;
-
import com.greensock.loading.display.*;
-
-
private var _queue:LoaderMax;
-
private var _progressDisplay:ProgressCircleLite;
-
private var _progress:ProgressDisplayLite;
-
-
public function LoaderMax_Progress():void {
-
var urls:Array = ["imag1.jpg","imag2.jpg","imag3.jpg","imag4.jpg","imag5.jpg","imag6.jpg","imag7.jpg"];
-
_queue = new LoaderMax({name:"childQueue", requireWithRoot:this.root, maxConnections:1, onChildComplete:_childCompleteHandler ,onProgress:_progressHandler});
-
ies like x, y, width, height, etc. The images will also be scaled to fit within the width/height defined.
-
_queue.append( new ImageLoader(urls[i], {container:this,
-
x:(i % 5) * 100,
-
width:100,
-
height:64
-
}));
-
}
-
_queue.prependURLs("assets/mid_size/");
-
_queue.load();
-
-
_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 = 70;
-
_progressDisplay.y = 300;
-
_progressDisplay.addLoader(_queue);
-
-
_progress = new ProgressDisplayLite();
-
_progress.addLoader(_queue);
-
}
-
-
//---- EVENT HANDLERS ----------------------------------------------------------------
-
private function _childCompleteHandler(event:LoaderEvent):void {
-
//trace("loaded " + event.target);
-
}
-
private function _progressHandler(event:LoaderEvent):void {
-
trace("loaded " + _progress.progress);
-
}
-
-
}
-
}
'ActionScript3.0 > LoaderMax' 카테고리의 다른 글
2. LoaderMax 불러온 swf 메소드 호출 (0) | 2011.04.25 |
---|
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday