repalce that click event with another click event based off of an if
statment. Here is my code for that if statement.
public function StatusModcheckStatusQryResult(result){
if (result.status == 'Pending'){
ClosingDisplayModcloseResQry(result.fileNum);
}
else if (result.status == 'Closed'){
ClosingDisplayModdisplayClosingQry(result.fileNum);
button1.label = "Exit";
button2.label = "Print";
button1.addEventListener(MouseEvent.CLICK, closeState);
}
}
--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> myButton.addEventListener(MouseEvent.CLICK, doThisFunction);
>
> Note that there are no parens on doThisFunction. You are passing a
reference-to-this-handler to addEventListener(), not calling the handler.
>
> - Gordon
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Jeremy Rottman
> Sent: Tuesday, May 23, 2006 2:03 PM
> To: [email protected]
> Subject: [flexcoders] Chaning the click event on a button
>
> Is it possible to change the click event on a button through
> actionscript. IE something like this.
>
> myButton.click = doThisFunction();
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

