0

我想找到一種方法來知道用戶何時點擊swfobject。
我試過flashMovie.addEventListener("mousedown", onPlayerMouseDown, false);,但它只適用於Mac OS,而不適用於Windows/Linux。swfobject和Mouserdown事件

任何想法?

回答

0

如果您有機會獲得Flash源可以將監聽器添加到舞臺,然後讓ExternalInterface調用回你的javascript:

stage.addEventListener(MouseEvent.MOUSEDOWN,MoseDownHandler); 

function mouseDownHandler(evt:MouseEvent):void 
{ 
    if(ExternalInterface.available) ExternalInterface.call("someJavascriptFunction"); 
}