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

后端 未结 3 1370
囚心锁ツ
囚心锁ツ 2021-02-10 00:57

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 men

3条回答
  •  情书的邮戳
    2021-02-10 01:13

    In case anyone else stumbles across this question and is working with ActionScript 3 - the top answer will not work for them, as the getURL() function is only available in ActionScript 2 and earlier versions.

    Use the following for ActionScript 3:

    navigateToURL(new URLRequest("javascript:your_function()"), "_self");
    

    Add that as an action to the final frame of your animation in Flash and then convert it using Swiffy. You can then take the output from Swiffy and work it into a webpage. Just make sure you define your JavaScript function somewhere in the source of the page that displays the Swiffy animation.

提交回复
热议问题