dispatch

949 단어
ViewerContainer.getInstance().addEventListener("LoadedOver", function(evt:Event):void
{
ViewerContainer.getInstance().dispatchEvent(new AppEvent("SetData", obj));
});
ViewerContainer.getInstance().widgetManager.loadWidgetByName("TabWidget");


2.

ViewerContainer.getInstance().addEventListener("SetData", function(evt:AppEvent):void
{
str=evt.data.type;
sql=evt.data.str;
});
ViewerContainer.getInstance().dispatchEvent(new Event("LoadedOver"));

 3、
AppEvent.addListener(AppEvent.WIDGET_STATE_CHANGED, widgetStateChangedHandler);
 
private function widgetStateChangedHandler(event:AppEvent):void { var data:Object = event.data;
}
 
AppEvent.dispatch(AppEvent.WIDGET_RUN, data.id);
 
 

좋은 웹페이지 즐겨찾기