Jump to content
Search Community

Using onComplete:gotoAndPlay(x)

inorganik test
Moderator Tag

Recommended Posts

I've been toughing it out in AS3 on a recent project, to create a touchscreen interface. To set up the different screens of the interface, I'm using different frames on the timeline. So after a button is pressed, an object is tweened to the corner and then I want the playhead to go to a frame with that menu-item's info on it. So I used this:

 

TweenLite.to(option_A, 1, {x:252, y:163, ease:Expo.easeOut, onComplete:gotoAndStop(2)});

 

However the tween is skipped and it goes to that frame immediately, and I get the error- "TypeError: Error #1009: Cannot access a property or method of a null object reference."

 

Judging by AS3 "improvements" I've seen, I probably need to add a couple ":void"s or "event:EVENT:eVeNt"s in there somewhere, but I have no idea where to begin. Any ideas?

 

Thanks in advance.

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