Jump to content
Search Community

Multiple tweening events

Popinjay test
Moderator Tag

Recommended Posts

Hello everybody,

 

I am completely new to using TweenMax.

 

I had been working on a program for quite some time. As it is nearly completion I decided to switch over because, even though my game doesn't use that many tweens, problems were garbage collections and other difficulties were just complicating matters.

 

At any rate, I was wondering if it is possible to set up a tween to look for two events instead of just one. This line doesn't seem to work for me:

 

TweenMax.to(gameBoard.hSpinFrameX, .5, {shortRotation:{rotationZ:0}, shortRotation:{rotationX:0},shortRotation:{rotationY:0}, onComplete:finishOverhead, onUpdate:gameBoard.updateBoard, onUpdateParams:true})

 

Sorry if this is too newb a question.

 

Poppin

Link to comment
Share on other sites

Hi.

 

Welcome to the forums.

 

There aren't any questions that are too newb;)

 

It appears the onUpdateParams is not formatted properly. You need to pass in the params using an array (even if it is only 1 param).

 

try this:

 

TweenMax.to(gameBoard.hSpinFrameX, .5, {shortRotation:{rotationZ:0}, shortRotation:{rotationX:0},shortRotation:{rotationY:0}, onComplete:finishOverhead, onUpdate:gameBoard.updateBoard, onUpdateParams:[true]})

 

if that doesn't work please provide more details regarding what exactly isn't working.

 

thanks

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