Animate with Sprite Manager 2

I bought SM2 and want to call the animation through my script (and stop it, too). How can I do that?

If you bought SM2, then have a look at the demo package that comes with it. The demo script gives you good examples of what you're looking for. For example, to call an animation:

var mySprite : PackedSprite;
mySprite.PlayAnim(0);
mySprite.StopAnim();

Drag the sprite you want to call the animation for onto the mySprite variable in the inspector. The argument for the PlayAnim method is an integer that references the animation timeline you set up. You can also use a string here too to reference the name of the animation.

Assets/Scripts/control.js(5,12): BCE0018: The name 'PackedSprite' does not denote a valid type ('not found').

-> that is my problem

Hi Judy,

I did not thought anyone was going to answer this one anymore :)

Thanks for your help, I did manege on my own but I appreciate your help.

Greetings Aaron