Jump to content
Search Community

Search the Community

Showing results for tags 'loaderevent'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website



Company Website



Found 1 result

  1. Hello everyone, I've been spending the last few hours trying to display the loading progress of an image. Quick rundown of the project: I have a Controller FLA with a base class, this file constructs my course engine and all files associated with it. This engine contains many layers(Page, Overlay, Interface, etc) each is a separate swf file with a base class. One of the layers, IDLayer, loads images into it. On the loading progress the IDLayer sends the loading event data to the Controller so it can display the progress on the Overlay Layer. When running the program from Flash, the data traces out correctly and the progress is between 0 and 1. When I try to run the program from my hosting site it only traces out 0. Any help would be appreciated, thanks. Load Image Calls: private function displayImages($obj:Object):void { trace("[IDLayer >> displayImages]"); clearHolders(); LoaderQueue.LoadImg(_IMG_FOLDER+$obj._partImg,_imgHolder,false,"png","default",positionImage); //Load Part Image LoaderQueue.LoadImg(_IMG_FOLDER+$obj._locImg,_locHolder,false,"png","default",positionImage,updateImageProgress); //Load Location Image } Progress Handlers: private function updateImageProgress($le:LoaderEvent){ trace("[IDLayer >> updateImageProgress]"); //trace("\t",$le.target.progress); //ExternalInterface.call("alert", "IDLayer >> Loading Progress: " + $le.target.progress); Controller._this.UpdateImageLoadProgress($le); } private function positionImage($le:LoaderEvent):void { if((_IMG_FOLDER + _curPart._locImg) == $le.target.name){ //ExternalInterface.call("alert", "IDLayer IMAGE LOAD COMPLETE >> Loading Progress: " + $le.target.progress); Controller._this.UpdateImageLoadProgress($le); } var loadedImg:Object = $le.target.content; loadedImg.x = 0; loadedImg.y = 0; } LoaderQueue ImageLoader: public static function LoadImg($name:String, $cont:MovieClip, $local:Boolean=true, $ext:String="png", $process:String="default", $cb:Function=null, ...$phand):void { trace("[LoaderQueue >> LoadImg]"); var imgLoader:ImageLoader; var lhandler:LoaderHandler; var pHandler:Function; var cHandler:Function = $cb; var fext:String = $ext; var fname:String = $name; var ftype:String = "img"; var local:Boolean = $local; var process:String = $process; var container:MovieClip = $cont; ($phand[0]) ? pHandler = $phand[0] : pHandler = progressHandler; switch (local) { case true: imgLoader = new ImageLoader("../../../"+__BASE+__IMG_DIR+fname+"."+fext, {name:fname, x:10, y:10, container:container, scaleMode:"proportionalInside", onProgress:pHandler, onComplete:cHandler}); _imgQueue.append(imgLoader); break; case false: imgLoader = new ImageLoader(__ROOT+__BASE+__IMG_DIR+fname+"."+fext, {name:fname, x:10, y:10, container:container, scaleMode:"proportionalInside", onProgress:pHandler, onComplete:cHandler}); _imgQueue.append(imgLoader); break; } } Controller Handler: public function UpdateImageLoadProgress($le:LoaderEvent):void { //trace("[Controller >> UpdateImageLoadProgress]"); //trace("\t",$le.target.progress); var curProg:Number = Math.ceil($le.target.progress * 100); if (_overlayLayer.replay_overlay.currentLabel != 'loading') { _overlayLayer.replay_overlay.gotoAndStop('loading'); } //trace("\t***Loading Progress: "+curProg); _overlayLayer.replay_overlay.loadingBox_mc.pageName_dtf.text = "Loading Image(s)"; !_overlayLayer._showOverlay ? _overlayLayer._showOverlay = true : null; //ExternalInterface.call("alert", "Loading Progress: " + $le.target.progress); _overlayLayer.replay_overlay.loadingBox_mc.loaded_dtf.text = (curProg + "%"); //trace("\t***replay_overlay.loadingBox_mc.loaded_dtf.text:", _overlayLayer.replay_overlay.loadingBox_mc.loaded_dtf.text); (curProg >= 100) ? _overlayLayer._showOverlay = false : null; }
  • Create New...