Try changing this line:
switch(event.target.selection.name) {
to this:
switch(e.target.selection.name) {
hth,
Rob
On 17-May-08, at 11:35 AM, rlyn ben wrote:
its giving me 1120 error on switch statement parameters..
"switch(event.target.selection.name) {" what am i missing on the
code?...
import flash.events.Event;
import fl.events.ComponentEvent;
import fl.controls.RadioButtonGroup;
stop();
var gRB:RadioButtonGroup = RadioButtonGroup.getGroup("genderGroup");
gRB.addEventListener(MouseEvent.CLICK, genderHandler);
function genderHandler(e:MouseEvent):void {
switch(event.target.selection.name) {
case "maleRB":
maleRB.value = 1;
break;
case "femaleRB":
femaleRB.value = 0;
break;
//action
}
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders