[Tweener] tryign to alpha tween a loader after its done loading aswf...

Graeme Blackwood grayhammy at hotmail.com
Fri May 29 07:47:09 PDT 2009


If I am not mistaken, you should load your external file into a movieclip, which already has it's alpha value set to 0.  Then animate the alpha value of this parent clip up.

There may be a better way to do it, but this is how I do.

G


From: Mike Lohrman 
Sent: Friday, May 29, 2009 3:44 PM
To: Tweener Mailing List 
Subject: [Tweener] tryign to alpha tween a loader after its done loading aswf...


This is basically how I have this set up...


loader_0.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoadComplete);

function imgLoadComplete(event:Event) :void {
        Tweener.addTween(event.target.content, {alpha: 1, time: 1, onComplete: function() {event.target.content.gotoAndPlay(2);}});
}


What happens is when the loader is done loading, it should fade the movie in, then onComplete play frame 2. It won't fade in, but it does play frame 2 correctly. If I replace the first "event.target.content" with "loader_0", it works fine. Is there any way to reference the loader from the event? Thanks!

Mike





--------------------------------------------------------------------------------


_______________________________________________
Tweener mailing list
Tweener at lists.caurinauebi.com
http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090529/228e49bf/attachment.htm>


More information about the Tweener mailing list