Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to dispatch custom event in flex
    text
    copied!<p>how to dispatch custom event in flex </p> <p>in my main mxml file i have put this code to dispatch this function</p> <pre><code>private var ageVerifyMessage:AgeVerify = new AgeVerify(); public function onAgeVerifyFailed(event:ControlManagerEvent) : void { ageVerifyMessage.visible = true; return; }// end function </code></pre> <p>in controlmanagerevent i have used this code</p> <pre><code>private function getUserDetailsHandler(event:ResultEvent) : void { userDetails = ResponseParser.parseUserDetails(event.result as Object); if (!userDetails || !userDetails.age) { if (_flashVars.birth_date &amp;&amp; _flashVars.birth_date != "" &amp;&amp; _flashVars.birth_date.toString().split("/").length == 3) { reportConnectedUser(); } else { dispatchEvent(new ControlManagerEvent(ControlManagerEvent.onAgeVerifyFailed)); } } else { reportConnectedUser(userDetails.age); } return; }// end function private var _controller:IControlManager; public function initApp() : void { _controller.addEventListener(ControlManagerEvent.onServerStatusChange, onServerStatusChange); _controller.addEventListener(ControlManagerEvent.onSelfCamFailed, onSelfCamFailed); _controller.addEventListener(ControlManagerEvent.onNoCamerasFound, onNoCamerasFound); _controller.addEventListener(ControlManagerEvent.onAgeVerifyFailed, onAgeVerifyFailed); _controller.initController(); return; }// end function &lt;local:AgeVerify horizontalCenter="0" id="ageVerifyMessage1" verticalCenter="0" visible="false"/&gt; </code></pre> <p>i want to ask what i am missing why my customevents not working</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload