過去Flash 右鍵點擊 (Right Click), 會看到預設的右鍵選單 (ContextMenu).
現在我們可以去除這個功能, 在Flash Player 11.2 中, 以MouseEvent.RIGHT_CLICK 取代, 更為友善.
請按 [觀看] (需安裝Flash Player 11.2) <FQ才可见> |
若把整個Flash 內容的右鍵功能去除:
stage.addEventListener(MouseEvent.RIGHT_CLICK, function(e:Event){});
若把某MovieClip 的右鍵設定:
function someHandler(e:MouseEvent):void { trace("right click"); } someMovieClip.addEventListener(MouseEvent.RIGHT_CLICK, someHandler);
我們可以利用這功能, 簡單的隱藏她是一個Flash Player. 還可以自建一些右鍵功能, 效果相當理想.
參考資料: http://www.leebrimelow.com/?p=3337