Click to See Complete Forum and Search --> : Flash interact with js


tekboy
08-13-2008, 01:10 PM
Hi anyone know how to do this
i have a small flash movie demo animation for a product and a js to do news scroll they are seperate files
just want to know how to make them interact with each other,
i like to have flash after finish play or when user click on stop will trigger the js script to play, thanks

goofball
08-14-2008, 10:58 AM
Flash can use ActionScript to issue JavaScript commands like this:
getURL("javascript:alert('replace alert with your JS function')");


Just put that in the final keyframe of your animation, or attach it to a button:
on(release) {
getURL("javascript:alert('replace alert with your JS function')");
}
and replace "javascrip:alert()" with whatever your JavaScript function call is: "javascript:startNewsScroll()"

Hope this helps!