开发者

swfobject and Mouserdown Event

开发者 https://www.devze.com 2023-03-20 12:26 出处:网络
I am trying to find a way to know when a user clicks on a swfobjec开发者_如何转开发t. I tried flashMovie.addEventListener(\"mousedown\", onPlayerMouseDown, false); but it works only on Mac OS and not

I am trying to find a way to know when a user clicks on a swfobjec开发者_如何转开发t.

I tried flashMovie.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");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号