« Web Designingにのったよー! | メイン | Emacsのキーバインド鬼軍曹 »

MacのFirefox3でFlashフルスクリーンにするとMouseEventが取得できない

del.icio.us it!   hatena bookmark
※注意
どうも環境によるみたいっす。詳しいことはまだよくわかってません。

なんてこったい><


MacのFirefox3にてFlashをフルスクリーンにすると、マウスイベントがうまく取得できなくなるっぽいです。
ほかの環境はあまり試してないので皆さん試してみてください。

クリックしたりすると一瞬いろいろなイベントが取得できるけど、すぐにだめになる。
右クリックで画質変更するとなぜかイベントがくる。。。そのあと一度でもどこかをクリックするとまた イベントがこなくなる。
クリックイベントの直後はイベント取得できるっぽいので、ボタンのクリックの処理は大丈夫そうですが、その他はダメな感じです。

■追記 2008.6.19 17:00
Mac のFirefoxでちゃんとイベントとれてる環境もあるみたい
今の環境書いておく
  • Firefox/3.0 (lzyc)
  • Flash Player 9,0,124,0 Debug
  • Mac OSX 10.4.11

■追記 2008.6.19 19:50
もしかしてこれかなー

Bug 435868 – Flash mouse input is partially blocked when in full screen (fullscreen) display state
https://bugzilla.mozilla.org/show_bug.cgi?id=435868

検証用
上のボタンでフルスクリーンきりかえできます。したのオブジェクトにmouseOverとmouseOut,clickでテキストが入れ替わります。 traceには他のイベントも出してます。
このコンテンツには最新のFlashPlayerが必要です


そーす
package {

    import flash.display.*;
    import flash.events.*;
    import flash.text.*;

    [SWF(width="300", height="300", frameRate="24", backgroundColor="#000000")]    
    public class FullscreenFx3Test extends Sprite {

        private var fullscreen_btn:Sprite;
        private var testText:TextField;

        private var testSp:Sprite;
        
        function FullscreenFx3Test() {
            
            createButton();

            trace(" --------------- start FullscreenFx3Test ---------------");
            trace(" いろいろ出力します ")
            
            fullscreen_btn.addEventListener(MouseEvent.CLICK,
                                            function(e:MouseEvent):void {
                
                if (stage.displayState == StageDisplayState.NORMAL) {
                    stage.displayState = StageDisplayState.FULL_SCREEN;
                } else {
                    stage.displayState = StageDisplayState.NORMAL;
                }
                testText.text = "";
                
            });


            eventCheckInit()
        }


        private function eventCheckInit():void {
            
            testSp.addEventListener(MouseEvent.MOUSE_OVER,
                                            function(e:MouseEvent):void {
                trace("mouse over");
                testText.text = e.type;
            });

            testSp.addEventListener(MouseEvent.MOUSE_OUT,
                                            function(e:MouseEvent):void {
                trace("mouse out");
                testText.text = e.type;
            });
            
            testSp.addEventListener(MouseEvent.CLICK,
                                            function(e:MouseEvent):void {
                trace("mouse click");
                testText.text = e.type;
            });

            var events:Array = [MouseEvent.CLICK,
                                MouseEvent.DOUBLE_CLICK,
                                MouseEvent.MOUSE_DOWN,
                                MouseEvent.MOUSE_MOVE,
                                MouseEvent.MOUSE_OUT,
                                MouseEvent.MOUSE_OVER,
                                MouseEvent.MOUSE_UP,
                                MouseEvent.ROLL_OUT,
                                MouseEvent.ROLL_OVER];
            var i:uint;
            var l:uint = events.length;
            for(i=0; i<l; i++) {
                testSp.addEventListener(events[i],
                                        function(e:MouseEvent):void {
                    trace(stage.displayState , e.type);
                });
            }
            
        }


        private function createButton():void {
            
            // fullscreen_btn
            fullscreen_btn = new Sprite();
            var g:Graphics = fullscreen_btn.graphics;
            g.beginFill(0xffffff);
            g.lineStyle(1, 0x999999);
            g.drawRect(0, 0, 200, 40);
            g.endFill();
            fullscreen_btn.x = 300/2  -fullscreen_btn.width/2;
            fullscreen_btn.y = 100/2 - fullscreen_btn.height/2;
            addChild(fullscreen_btn);
            fullscreen_btn.buttonMode = true;
            fullscreen_btn.mouseChildren = false;
            var ftxt:TextField = new TextField();
            ftxt.autoSize = TextFieldAutoSize.LEFT;
            ftxt.text = "Toggle FullScreen";
            ftxt.setTextFormat(new TextFormat("_ゴシック", 15));
            ftxt.x = 30;
            fullscreen_btn.addChild(ftxt);            


            // testObject
            testSp = new Sprite();
            g = testSp.graphics;
            g.beginFill(0xaaaaaa);
            g.lineStyle(1, 0x999999);
            g.drawRect(0, 0, 200, 200);
            g.endFill();
            testSp.x = 300/2  -testSp.width/2;
            testSp.y = 80;
            addChild(testSp);
            testSp.buttonMode = true;
            testSp.mouseChildren = false;

            testText = new TextField();
            testText.autoSize = TextFieldAutoSize.LEFT;
            testText.text = "";
            testText.defaultTextFormat = new TextFormat("_ゴシック", 15);
            testText.x = 50;
            testSp.addChild(testText);            
            //testText.visible = false;
            
        }
    }
}


Flash Math & Physics Design:ActionScript 3.0による数学・物理学表現[入門編] 集合知プログラミング ビジュアライジング・データ —Processingによる情報視覚化手法 御岳百草丸 1200T

トラックバック

このエントリーのトラックバックURL:
http://un-q.net/mt-tb.cgi/324

コメントを投稿

書いたよ!