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
iLoader is a UILoader ComponentCode: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; } }
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.




Reply With Quote