Jump to content
Search Community

AS2: Delay question

timaging test
Moderator Tag

Recommended Posts

Hi,

 

so, I've got my code set up, and it appears I should be able to use delay, but everything is coming in at once:

import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;

TweenPlugin.activate([MotionBlurPlugin]);

logo.alpha=0

quoteButton.alpha=0

TweenMax.to(logo, 1, {_motionBlur:true, _x:98, _alpha:1});
TweenMax.to(text01, 1, {_motionBlur:true, _x:8, _alpha:1});
TweenMax.to(text01, 2, {_alpha:0, _delay:6});
TweenMax.to(text02, 1, {_motionBlur:true, _x:8, _alpha:1, _delay:6});
TweenMax.to(text02, 2, {_alpha:0, _delay:10});
TweenMax.to(text03, 1, {_motionBlur:true, _x:8, _alpha:1, _delay:10});

TweenMax.to(quoteButton, 1, {_y:"10", _alpha:1, _delay:11});

 

Is there something I'm missing?

 

Thanks,

Dave

Link to comment
Share on other sites

Also, I now see that motionBlur isn't working. Do I need to purchase RG for AS2 as well?

No no, there aren't different memberships for AS2/AS3 - as long as you're "Really Green" you should definitely have that MotionBlurPlugin. I bet you just forgot to download it from your GreenSock account or something. https://www.greensock.com/account/ - and make sure that the MotionBlurPlugin.as file is in the com/greensock/plugins/ directory that's in the same place as your FLA when you publish it. And you did activate it, right? Your code indicates that you did (just making sure).

Link to comment
Share on other sites

ok, I see now that there is an AS2 setup in the RG folder... thanks, but now that I put that in, the text isn't showing up...

 

see file attached. You can see that the logo blurs and the text doesn't even show. If I change it to TweenMax, it shows for some reason, but the logo is TweenLite, so that doesn't make sense to me. Do I need to break apart the text to use TweenLite?

 

sorry about this!

Link to comment
Share on other sites

Your tweens are overwriting each other. By default, TweenLite uses the ALL_IMMEDIATE mode of overwriting whereas TweenMax uses AUTO which analyzes each tween of the same object and overwrites only the individual overlapping properties of concurrent tweens of the same object. ALL_IMMEDIATE overwrites all other tweens of the same object regardless of whether or not any properties overlap. This is the fastest mode and is really useful for a lot of scenarios like button rollovers/rollouts and it keeps the file size about 1k lower. All you need to do to make TweenLite use AUTO mode is to init OverwriteManager like:

 

OverwriteManager.init();

 

For more details, see http://www.greensock.com/overwritemanager/

 

But again, adding that one line of code should fix your animation.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...