I'm working on a site, for kids, which has a small avatar in the corner that talks. The avatar is a flash file and the plan is to determine what it says through a mix of javascript and ajax.
Unfortunately when I make the flash file play an Mp3 file through JavaScript, I can't seem to stop the sound.. so when I keep clicking on a link which causes it to talk, I hear the sound repeated x times.
The odd thing is, when I attach the very same code to a button in flash, there seems to be no such limitation.
It seems as if it won't store anything in global variables when calling from JavaScript.
Any idea what's going on here?
Disclaimer: I'm completely new when it comes to AS3 (and so far, I'm really hating it)