If someone else comes across this issue and works with ActionScript 3, the main answer will not work for them, since the getURL () function is available only in ActionScript 2 and earlier.
Use the following for ActionScript 3:
navigateToURL(new URLRequest("javascript:your_function()"), "_self");
Add this as an action to the final frame of your animation in Flash, and then convert it using Swiffy. You can then output from Swiffy and execute it on a web page. Just make sure you define your JavaScript function somewhere in the source of the page displaying the Swiffy animation.
source
share