Skip to main content
Inspiring
May 30, 2016
Question

MouseEvent.MOUSE_UP not dispatched in a StageWebView

  • May 30, 2016
  • 1 reply
  • 644 views

hello,

"stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp)" is not dispatched when I release the left mouse button in a StageWebView on Windows

package{

  import flash.text.TextField;

  import flash.events.Event;

  import flash.display.Sprite;

  import flash.events.MouseEvent;

  import flash.media.StageWebView;

  import flash.geom.Rectangle;

 

  public class Main extends Sprite {

    private var myTextField:TextField = new TextField();

    public function Main() {

      addEventListener(Event.ADDED_TO_STAGE, init);

    }

    private function init(event:Event):void {

      myTextField.border=true;

      myTextField.width=500;

      myTextField.height=50;

      addChild(myTextField);

     

      var webView:StageWebView = new StageWebView();

      webView.stage = this.stage;

      webView.viewPort = new Rectangle( 0, 210, 500, 200 );

      webView.loadURL( "https://www.google.com" );

     

      stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);

    }

    private function onMouseUp(event:MouseEvent):void

    {

      myTextField.appendText("up");

    }

  }

}

MouseEvent.MOUSE_UP work if I release the left mouse button outside the air app but not in a StageWebView

MouseEvent.MOUSE_DOWN doesn't work too

Thanks

This topic has been closed for replies.

1 reply

Community Manager
May 30, 2016

Hi,

What is the AIR sdk version you are using?

Does it happen with latest AIR sdk only?

pol2095Author
Inspiring
May 30, 2016

I tried with Adobe Air SDK 20, the problem occurs whith "new StageWebView()" (Air WebKit embedded) and not with "new StageWebView(true)" (the system's default web engine).

Community Manager
May 31, 2016

Hi,

Can you please log a bug in our bugbase Home

Thanks