[Tweener] onComplete Help!

Alejandro Yanaculis ayanaculis at shoclabs.com
Fri Feb 13 10:28:35 PST 2009


 

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,

 

 



 <http://www.shoclabs.com/> 

 <http://www.shoclabs.com> Web Image Solutions
ShocLabs
Alejandro Yanaculis
 <mailto:ayanaculis at shoclabs.com> 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> http://www.shoclabs.com
Skype ID:ayanaculis 

 

	

 <http://www.plaxo.com/signature?src=client_sig_212_1_simple_sig&lang=en>
Want a signature like this?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090213/f6f2f3dd/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/f6f2f3dd/attachment.obj>


More information about the Tweener mailing list