Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
flys3000

AS2 staggerTo returns type mismatch

Recommended Posts

Hi - not sure what I'm doing wrong, but I've got an AS2 script here, and I'm building a sequence of tweens. All is well until I get to staggerTo - I am positive I'm giving it an array as its first property, but it keeps throwing a type mismatch. Here are the important bits: 

var introTl:TimelineLite;
var btnsArr:Array;

function init():Void
{
	// activate TweenLight plugins
	TweenPlugin.activate([AutoAlphaPlugin, ScalePlugin, TintPlugin, RemoveTintPlugin]);
	
	// store the buttons in an array
	btnsArr = new Array(btn0, btn1, btn2);

	// play intro anim
	introAnim();

}

function introAnim():Void
{
	introTl = new TimelineLite({onComplete:onBoardAnim});
	introTl.staggerTo(btnsArr, .5, {autoAlpha:0, scale:150, ease:Back.easeOut}, "-=.3"); //icons	
}

function onBoardAnim():Void
{
	trace ("onboard");
}

 

I've even stripped this out and put it into a new file - same result. I'm sure it's something simple. Any ideas?

 

  • Like 1
Link to post
Share on other sites

D'oh - I just realized it's a TimelineMax method.

 

EDIT: is it?

Link to post
Share on other sites

Ah. I just realized I was missing the stagger parameter (I meant for the "-=.3" to be the position parameter).

 

It's all good now...

  • Like 2
Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×