Jump to content
Search Community

timline lite trigger sequence [SOLVED]

ggalan test
Moderator Tag

Recommended Posts

im using timlineLite w/ AS2, and want to control the trigger time of each of the box's action. currently the timeline is set to duration, can anyone help out with syntax on any other options please

 

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

var timeline:TimelineLite = new TimelineLite();
timeline.append( new TweenLite(box1, 1, {_x:"-100", ease:Elastic.easeOut}) );
timeline.append( new TweenLite(box2, 1, {_rotation:360}) );
timeline.append( new TweenLite(box3, 1, {_x:"100", ease:Elastic.easeOut}) );

timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}), timeline.duration);

Link to comment
Share on other sites

yes, so where do i write that?

if i wanted to fire off each of the box's tweens .3 secoonds apart

 

timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}), timeline.duration);

Link to comment
Share on other sites

Either of these would work:

 

timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}, 0.3), timeline.duration);

-or-

timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}), timeline.duration, TweenAlign.START, 0.3);

 

Documentation: http://www.greensock.com/as/docs/tween/

Link to comment
Share on other sites

these tweens start in series one followed after the completion of the previous. how could you control the timing so that the second one starts while the first box is in motion? i see the 0.3 added but it didnt do anything to my swf

 

timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}, 0.3), timeline.duration);

Link to comment
Share on other sites

my fault, i meant the timing on these three

timeline.append( new TweenLite(box1, 1, {_x:"-100", ease:Elastic.easeOut}) );
timeline.append( new TweenLite(box2, 1, {_rotation:360}) );
timeline.append( new TweenLite(box3, 1, {_x:"100", ease:Elastic.easeOut}) );

 

from this line of code

timeline.insertMultiple( TweenMax.allTo([box1, box2, box3], 1, {tint:0x90E500, _xscale:20, _yscale:20}, .5), timeline.duration );

Link to comment
Share on other sites

append() has a 2nd parameter called "offset" which allows you to offset the insertion point by any amount. A negative value would cause it to overlap with the end of the timeline by that amount, or a positive value would cause there to be a gap between the end of the timeline and the new tween that's being inserted. You can also use insert() to specify a precise time at which you want the tween inserted.

 

//insert tween at exactly 1.5 seconds into the timeline
myTimeline.insert(new TweenLite(mc, 1, {x:100}), 1.5);

//append it to the end, but overlap it by 0.5 seconds
myTimeline.append(new TweenLite(mc, 1, {x:100}), -0.5);

 

Documentation: http://www.greensock.com/as/docs/tween/

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