[Tweener] got it

Mike Lohrman mikelohrman at yahoo.com
Fri May 29 07:55:11 PDT 2009


Sometimes all it takes is to ask for help to figure it out on your own. event.target was LoaderInfo, not Loader, so alpha wasn't a property and it wasn't working. I ended up using event.target.content.parent to reference the loader. event.target.content was working for changing the frame, and I was confused why that was working. After some tracing, I realized event.target.content was referencing the loaded swf main timeline. At that point I traced the parent of that and found the loader.


*************************
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
*************************



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090529/3474fa7e/attachment.htm>


More information about the Tweener mailing list