Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to detect when a Swiffy animation has completed?

Do Swiffy animations trigger an event when they're complete? Or is there perhaps a way to grab the current frame vs. total frames?

I tried de-minifying runtime.js as mentioned in another Stack Overflow post, but I can't decipher it.

like image 506
bergie3000 Avatar asked Jul 06 '12 17:07

bergie3000


1 Answers

For anyone who comes across this post, I found a solution. I ended up using a getURL() call at the end of my FLA. It looks like this:

getURL("javascript:animationIsComplete();");

Put whatever you want in the animationIsComplete() function and it will now be triggered at the end of the Swiffy animation.

like image 87
bergie3000 Avatar answered Nov 14 '22 21:11

bergie3000