flex Function使用

ViewerContainer.addEventListener(AppEvent.DATA_CREATE_INFOWIDGET, onInfowidgetRequest);
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.DATA_CREATE_INFOWIDGET, data, infoReady));
      
       private var m_infoWidgetCallback:Function;
       private function onInfowidgetRequest(event:AppEvent){
             m_infoWidgetCallback =  event.callback;//m_infoWidgetCallback 值为这个函数  infoReady
          m_infoWidgetCallback(new AppEvent(AppEvent.DATA_CREATE_INFOWIDGET, _infoData));//去执行其它类的这个infoRedy函数
           }
     
    private function infoReady(event:AppEvent){...};

 

你可能感兴趣的:(flex,Function使用,flex)