BTW if all you want to do is temporarily disable the button, you might want to leave the event listener and just make the visible property false instead... kinda depends on the circumstances. removing the listener is good garbage collection though!

sebastian.

Lord, Susan, CTR, DSS wrote:
DOH!  I had a type-O.  Thanks!  "Error between seat and keyboard"  LOL!

Thanks!



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Monday, September 08, 2008 11:16 AM
To: Flash Coders List
Subject: RE: [Flashcoders] Coding question...

for (i = 0; i < aRadioButtons.length; i++) {
        aRadioButtons[i].removeEventListener(MouseEvent.CLICK,
buttonClicked);
        aSelected[i].removeEventListener(MouseEvent.CLICK,
buttonClicked);
}

Should do the trick.  It doesn't?

By the way, what is the difference between the aRadioButtons array and
the aSelected array? Jason Merrill Bank of America Enterprise Technology & Global Risk L&LD Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community
Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal Innovative Learning Blog & subscribe.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lord,
Susan, CTR, DSS
Sent: Monday, September 08, 2008 10:34 AM
To: Flash Coders List
Subject: [Flashcoders] Coding question...

Hi there,

I was wondering if there was an easy way to inactivate buttons.  I
activate a series of buttons in an array using the following:

for (i = 0; i < aRadioButtons.length; i++) {
        trace(aRadioButtons[i].name);
        aRadioButtons[i].addEventListener(MouseEvent.CLICK,
buttonClicked);
        aSelected[i].addEventListener(MouseEvent.CLICK, buttonClicked);
}

I know there is a way to inactivate the listener, but cannot remember
for the life of me how to do it.

Any pointers you could provide are appreciated!

Thanks,
Susan

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to