Jump to content
Search Community

AS2 staggerTo returns type mismatch

flys3000 test
Moderator Tag

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