[Tweener] onComplete Help!

Mike Lohrman mikelohrman at yahoo.com
Fri Feb 13 11:05:51 PST 2009


You might want to post the nextStep function or us. One thing I do when debugging problems is put a bunch of trace statements in places to see where the hangup occurs. Put one in the nextStep function and see if it is actually firing.




________________________________
From: Alejandro Yanaculis <ayanaculis at shoclabs.com>
To: tweener at lists.caurinauebi.com
Sent: Friday, February 13, 2009 12:28:35 PM
Subject: Re: [Tweener] onComplete Help!

 
 
I have been using tweener for a while now,
but it’s the first time I’ve encountered this problem:
 
I have the following as2 code that fades
the preloader after it has finished loading an external swf :
 
stop();
import caurina.transitions.Tweener;
nextStep = function () {
               
gotoAndPlay("content");
};
loadMovie(this.sectionToLoad+".swf",
this.loadMC);
//preloader
mainLoader.onEnterFrame = function() {
               
if (!loaded && loadMC._url != _root._url) {
                              
total = loadMC.getBytesTotal();
                              
loadedMC = loadMC.getBytesLoaded();
                              
percent = int(loadedMC/total*100);
                              
mainLoader.Text = percent+"%";
                              
mainLoader.gotoAndPlay(percent);
                              
if (loadMC.getBytesLoaded() == loadMC.getBytesTotal()) {
                                              
delete onEnterFrame;
                                               Tweener.addTween(mainLoader,{_alpha:0,
time:1, transition:"easeOutQuint", onComplete:nextStep});
                              
}
               
}
};
 
The problem is that the preloader actually
fades out when the loading is complete, but the nextStep function (which makes the main timeline
jump to frame “content”) is not executed once the tween is complete.
 
I’ve tried everything I could think of, so any help would be appreciated.
 
Thanks,
 
 
 
Web Image Solutions
ShocLabs
Alejandro Yanaculis
ayanaculis at shoclabs.com
Esparza Oteo 14 - 3er piso
Guadalupe Inn, 04530
México D.F.
tel: +52 +55 5661 4323
fax: +52 +55 5661 4323
mobile: +52 +55 2756 6588
http://www.shoclabs.com
Skype ID:ayanaculis    
 
Want a signature like this? 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090213/caba188f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 1508 bytes
Desc: not available
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090213/caba188f/attachment.obj>


More information about the Tweener mailing list