Jump to content
Search Community

Help with TimelineLite Syntax

CantinaDan test
Moderator Tag

Recommended Posts

I've got a bunch of movieclips on the stage in different positions. I'd like to have them all jump at the same time and the same relative distance. I came up with this code but "target" is an undefined property. Could someone help me out? Thanks much.

 

var timeline:TimelineLite = new TimelineLite();
timeline.insertMultiple( TweenMax.allTo([type1_mc, type2_mc, type3_mc, type4_mc, type5_mc, type6_mc, type7_mc, type8_mc], 1, {delay:6, y:target.y + 10}), timeline.duration );

Link to comment
Share on other sites

Ah, got it by reading through some of the other threads. So if you put a value in quotes it becomes relative to the objects current position?

 

New code:

var timeline:TimelineLite = new TimelineLite();
timeline.insertMultiple( TweenMax.allTo([type1_mc, type2_mc, type3_mc, type4_mc, type5_mc, type6_mc, type7_mc, type8_mc], 1, {delay:6, y:"-50"}), timeline.duration );

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