Jump to content

use BeginAnimation to go to a determined frame


Gil
 Share

Recommended Posts

Hello,

I used to go to a specific frame in an animation by launching this command :
scene.beginAnimation(box1, 100, 100, true);

There is now an error saying :
Uncaught TypeError: Cannot read property 'frame' of undefined
 

Is it possible to go to a specific timeframe another way ?
Right now my solution is to be sure that the start and end frames are always differents.
Would be cool to make it work like before if there is anything that could prevent it.

Link to comment
Share on other sites

First, why are you saying true to loop endlessly?  At best, this is going to suck cpu needlessly.  I do not even know what happens should try to add a 2nd animation when this on never ends.

If you are getting an error with 3.1:

  • double check 3.0 behaves correctly then,
  • run with max version of 3.1, and report line number.

The other obvious thing you should do is respect the error.  If it says 'box1' is undefined, then put a window.alert(box1.name + " really exists") on the line before.  Failure to actually accept reality leads directly to sorrow.

Link to comment
Share on other sites

Ok, looks like you may not have an animation which has a start and end being the same.  If you do, the start has 1 added to it, see.

In this RuntimeAnimation class there is also a gotoFrame() method.  I do not use this system, so I do not know how you call this.  I do not even remember even see this class before.  The playground also errors running 3.0.  I also thought playground ran max versions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...