Jump to content
GreenSock

Slayer01

TimeLine animation

Recommended Posts

Hi I just bought the the Shockingly Green version and I have a little problem with animating a timeline object.

 

This works very well in the begining but I want to set the alpha of the object to zero when it is done animating but alas it won't work! WHY

 

Can some one please help me.

_timeLine.insertMultiple(TweenMax.allFrom(_vadVetDuOm.textFields, 2.5, {blurFilter:{blurX:20}, x:"-200", alpha:0, ease:Quad.easeIn}, 1));
_vadVetDuOm.x = 5;
_vadVetDuOm.y = 100;
addChild(_vadVetDuOm);
Link to comment
Share on other sites

First of all, thanks for being "Shockingly Green"!

 

I noticed you're doing an "allFrom()" tween which means that you're defining the beginning alpha value to be 0 and it will tween to whatever it currently is (probably 1). Are you trying to go the other way maybe? Or did you want the alpha to go from 0 to 1 and then suddenly jump to 0? Please provide a few more details about the effect you're going for and we'll do our best to help. 

 

Side note: it looks like you're using v11 syntax, but I'd highly recommend updating to v12 which offers some convenience methods directly on the timeline classes, so you could do _timeLine.staggerFrom(....) instead of having to nest things like _timeLine.insertMultiple( TweenMax.allFrom(...) ); The old syntax still works - I just think you'll find the new syntax to be more concise and easier to read. http://www.greensock.com/v12/

Link to comment
Share on other sites

The effect I want is that I want to start an text animation from outside the screen area

 

my textfield should fly in from the left to the middle, delay for 2 seconds and then then fly out on the right

 

deleay 1 second and then have another textfield fly in from the right to the middle, delay for 2 seconds and then fly out on the left

Link to comment
Share on other sites

The v12 syntax is consistent across the JS, AS3, and AS2 flavors. So yes, you can use it in AS3. 

 

It sounds like you meant to do something like this:

var tl:TimelineLite = new TimelineLite();
var text:Array = [mc1, mc2, mc3];
var slideDuration:Number = 1;
var delay:Number = 2;
for (var i:int = 0; i < text.length; i++) {
	tl.from(text[i], slideDuration, {x:"-=200", alpha:0, blurFilter:{blurX:20}}, ((i == 0) ? 0 : "+=1"));
	tl.to(text[i], slideDuration, {x:"+=200", alpha:0, blurFilter:{blurX:20}, ease:Quad.easeIn}, "+=" + delay);
}

Right?

  • Like 1
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.
×