KeyframeAnimation replay?

105 views
Skip to first unread message

jomifo

unread,
Sep 14, 2011, 11:02:17 AM9/14/11
to LimeJS HTML5 Game Framework
How do you replay a KeyframeAnimation? Doesn't look like there are
any "Flash-like" methods like gotoAndPlay.

Thanks.

Tõnis

unread,
Sep 14, 2011, 12:24:11 PM9/14/11
to LimeJS HTML5 Game Framework
KeyframeAnimation loops by default. If you don't want the looping you
can call myanim.setLooping(false)

jomifo

unread,
Sep 14, 2011, 12:38:08 PM9/14/11
to LimeJS HTML5 Game Framework
I got that, but what about if it's non-looping, and you want to replay
the animation at a later time after the animation has already played?
This is a common thing to do with event driven animations.

Thanks,
Joe

Tõnis

unread,
Sep 15, 2011, 6:25:32 AM9/15/11
to LimeJS HTML5 Game Framework
You can try.

myanim.currentFrame_=-1;
myanim.play()

black3...@gmail.com

unread,
Dec 20, 2012, 4:03:01 AM12/20/12
to lim...@googlegroups.com, tonis...@gmail.com
It doesn't work properly.
It randomly works when it wants to!
Reply all
Reply to author
Forward
0 new messages