On 21-apr-2006, at 23:49, elibol wrote:
I think the best way to implement this would be to have a
RadioGroup class
that would instantiate through static functions of the RadioButton
class. A
static variable of the RadioGroup class would manage RadioGroup
instances,
it would add and remove RadioGroup instances through a static API.
A static
function of the RadioButton would take the RadioButton instances
radioGroupID property and check if it exists, if it does it would
add the
instance to the radio group, if not it would instantiate a new
radio group.
Each radio button would have an instance of the radio group they
belonged
to, when they were selected, they would just call a select() style
function
of their own radio group and submit their index/id to be activated.
You
should handle activation and deactivation of radio buttons from the
radio
group class.
You should also implement a die() method which derefrences radio
buttons
from radio groups so that radio group instances are destroyed when
they no
longer contain any radio buttons.
Hope this helps,
Yeo, will try that, I just hoped there is a way to determine the
siblings at runtime and avoid the whole referencing-dereferencing-
registration-callbacks thing. Hope that will be possible with AS3.
Attaching callbacks to the group instead of the buttons is a n
interesting idea though.
--
Julian 'Julik' Tarkhanov
please send all personal mail to
me at julik.nl
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com