Jump to content
Search Community

new to greensock - onComplete issue

michaelkelly333 test
Moderator Tag

Recommended Posts

Hi,

 

I'm fairly new to greensocks and am trying to get this onComplete to work.

The trace fires but it doesn't wait till after the delay.

 

import com.greensock.*;

import com.greensock.easing.*;

 

traceMe = function () {

trace("wasssup");

};

 

TweenMax.to(sq.ball,1,{delay:1, _y:171, ease:Back.easeIn, onComplete:traceMe()});

 

I'm not sure what is exactly wrong - any help would be appreciated!

 

Thanks

Link to comment
Share on other sites

hey michael,

 

change

 

TweenMax.to(sq.ball,1,{delay:1, _y:171, ease:Back.easeIn, onComplete:traceMe()});

 

to

 

TweenMax.to(sq.ball,1,{delay:1, _y:171, ease:Back.easeIn, onComplete:traceMe});

 

ditch the ()

 

should work.

 

Carl

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