Jump to content

change animation name


Recommended Posts



I would like to change the name of the animation dynamically.

Something like 

var animation = sprite.animations.getAnimation("Name1");...some code...animation.name = "Name2";

The name property is changed like expected but i still can't do sprite.animations.getAnimation("Name2"). I see that the names are stored as a hash with the old name as a key. Is there a way to change the name or do I have to write my own getAnimation function or rehash to the new name?



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.

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.


  • Recently Browsing   0 members

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