Skip to main content
Inspiring
mai 30, 2016 6:19 AM UTC
Question

MouseEvent.MOUSE_UP not dispatched in a StageWebView

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

Ce sujet a été fermé aux réponses.

5 commentaires

Participating Frequently
mai 30, 2016 6:47 AM UTC

Hi,

What is the AIR sdk version you are using?

Does it happen with latest AIR sdk only?

Traduire
pol2095Auteur
Inspiring
mai 30, 2016 5:23 PM UTC

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).

Traduire
Participating Frequently
mai 31, 2016 4:50 AM UTC

Hi,

Can you please log a bug in our bugbase Home

Thanks

Traduire