Are browser unable to interact with flash in some way similar to this?
jQuery(document).on('click','embed',function(){
alert('clicked');
});
Are browser unable to interact with flash in some way similar to this?
jQuery(document).on('click','embed',function(){
alert('clicked');
});
I don't know how to do that with normal ways but i've a weird idea(it's better you wait for real answers instead of my answer)
You can create "commandID" integer variable in your document which starts with value is 0, Then you can set it +1 for every command on your browser interface like button click or something else and you can store the "commandType" as another string variable in your document for command type ("play", "stop", "exit" etc..)
And you can create & store another "commandID" integer variable in your flash which starts with value is 0 too.
So, you can use flash's ExternalInterface class to check for difference(periodic check like per second) of "commandID" value, if the commandID value which in document is bigger than the commandID value which in flash then you can get there is a click on document? so you can get the command by using ExternalInterface to reach "commandType" variable to be executed in action script with your wish.
And then you can set the commandID value which is in flash to the value of which in document to be sure function is not running more then 1 time per command.
EDIT: I think you can find your real answer here: Javascript call AS3 function