开发者

swfobject and Mouserdown Event

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜