Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hi,
What is the AIR sdk version you are using?
Does it happen with latest AIR sdk only?
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi,
I tried with both StageWebView() false and true and the result is same that events are not send to stage.
Did you see any documentation that says the events should be sent to the stage?
I think the behavior is as designed.
Thanks
Copy link to clipboard
Copied
StageWebView should not fire any as3 mouse events