我想在AIR 2.7中引入的LocationChangeEvent.LOCATION_CHANGE事件中执行我的操作,但此事件未被调度。我的示例代码如下所示。如果我做错了,请帮助我。
protected function button1_clickHandler(event:MouseEvent):void {
this.page.location = "http://www.google.co.in";
}
protected function locationChanging(event:LocationChangeEvent):void {
trace("location Changing");
}
protected function page_creationCompleteHandler(event:FlexEvent):void {
this.page.htmlLoader.addEventListener(LocationChangeEvent.LOCATION_CHANGING, locationChanging, false, 10, false);
}
<mx:HTML id="page" width="100%" height="100%" creationComplete="page_creationCompleteHandler(event)"/>
答案 0 :(得分:0)
我已经弄清楚为什么locationChanging事件没有调度。我做了一些事情让它发挥作用。