Event at the last frame of an animation (SOLVED)


(christopf) #1

I was wondering if theres a possibility to add an event to the end of an animation of a spritesheet. i thought about and tried the complete method but i get only errors with it. is there a method for this?


(Ultima2876) #2

Is the callback what you’re referring to? It can be used like so:

public function added(): void
{
  var mySpritemap: Spritemap = new Spritemap(blah);
  mySpritemap.callback = functionToCall;
}

private function functionToCall(): void
{
  //gets called at the end of the animation
}

(christopf) #3

thank you, its works fine.


(Ultima2876) #4

This topic was automatically closed after 2 days. New replies are no longer allowed.