swfobject and Mouserdown Event
I am trying to find a way to know when a user clicks on a swfobjec开发者_如何转开发t.
I triedflashMovie.addEventListener("mousedown", onPlayerMouseDown, false);
but it works only on Mac OS and not on Windows/Linux.
Any ideas?
If you have access to the Flash source you can add a listener to the stage and then make an ExternalInterface call back to your javascript:
stage.addEventListener(MouseEvent.MOUSEDOWN,MoseDownHandler);
function mouseDownHandler(evt:MouseEvent):void
{
if(ExternalInterface.available) ExternalInterface.call("someJavascriptFunction");
}
精彩评论