setAnimation vs switchAnimation

niccosw

  • Posts: 91
Using the "Switch Animation to <animation attribute> for <self>" generates the code: actor.setAnimation("".toString());

According to the API there is another Actor method called switchAnimation.
http://api.stencyl.com/as3/stencyl/api/engine/actor/Actor.html#switchAnimation()

 ??? What's the difference?

Greg

  • *
  • Posts: 1260
Looks like setAnimation just calls into switchAnimation - so there should be no difference.

Jon

  • *
  • Posts: 17524
Apparently, it's never used in our codebase. It might have been a legacy call for compatibility. We should be able to nix it safely, I think.

Does any of your content use it, Greg?

Edit: Wait, it may be related to those auto getters/setters that Flash uses where a=b implicitly calls the setter.

Rob

  • *
  • Posts: 1268
Some on Kong mentioned switch animation for self not working. It's on one of the latest threads.
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

Alexin

  • *
  • Posts: 3132
The block and both methods are working as they should.
"Find the fun"
alexin@stencyl.com