A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Tween Problems - MAD here..

Hybrid View

  1. #1
    Senior Member
    Join Date
    Feb 2005
    Posts
    172

    Angry Tween Problems - MAD here..

    Here is a site I'm working on; however, there are tweening problems with the loading bar. www.hayaladam.com/hayaladam.htm
    Just go into the first folder and select a file named "image.." there

    Well play wit it some time, you'll see that it'll start to have problems a little time later.

    Here is the code that runs when you click on a picture item

    Code:
    	if (e.item.data.name() == "item") {
    		//use the @url attribute from the item´s data property to get the url
    		var iurl:String = e.item.data.@url;
    		this.workBar.worker.workName.text = e.item.data.@name;
    
    		var myLoaderTween:Tween = new Tween(loaderPB.loaderPB_in, "y", Strong.easeOut, loaderPB.loaderPB_in.y, (stage.stageHeight-loaderPB.y)/2, 3, true);
    
    		
    
    		myLoaderTween.addEventListener(TweenEvent.MOTION_FINISH, barUp);
    
    		function barUp(event:Event):void {
    			imageLoader.iLoader.autoLoad = false;
    			imageLoader.iLoader.source = iurl;
    			imageLoader.iLoader.scaleContent = true;
    			imageLoader.iLoader.load();
    			loaderPB.loaderPB_in.bar_pb.source=imageLoader.iLoader;
    			imageLoader.iLoader.addEventListener(Event.COMPLETE,iLoadingComplete);
    		}
    
    		
    		function iLoadingComplete($event:Event):void {
    			var myLoaderTween2:Tween = new Tween(loaderPB.loaderPB_in, "y", Strong.easeIn, loaderPB.loaderPB_in.y, -60, 3, true);
    			
    
    			
    			var myworkNameTween:Tween = new Tween(workBar.worker, "y", Strong.easeOut, 0, -120, 0.7, true);
    
    
    			workBar.worker.closeButton.addEventListener(MouseEvent.CLICK, closeImage);
    			nonClick.visible = true;
    			imageLoader.visible = true;
    
    
    
    
    		}
    	}
    iLoader is a UILoader Component
    imageLoader is a movieclip
    loaderPB.loaderPB_in.bar_pb is a ProgressBar Component, and the parents are movieclips

    I guess there is a problem with my tween loops. What I want to do exactly, is to see the loading bar go up to 100% first, then see the image in my loader.

    I hope someone can solve out this problem.
    Last edited by UNDREAM; 05-19-2008 at 10:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center