all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

get checkbox value


get checkbox value sasa
5/9/2005 10:55:58 PM
flash actionscript:
hi, i am a new user of action script.
i am trying to get the value of the checkbox how ever i failed.

Below is my code:

on(click){
if(use_surfSelection_cb.selected=true){
trace("checked!");
}
else{
trace("unchecked");
}
}

the output always shows "checked!" even though i already uncheck the
checkbox.
may i know what's wrong wih my code? or i should not use on(click)?

anyhelp will be truely appreciated.
thanks a lot!
Re: get checkbox value bferran NO[at]SPAM pie.xtec.es
5/10/2005 3:14:22 AM
Try changing
if(use_surfSelection_cb.selected=true)
to
if(use_surfSelection_cb.selected==true)

By using = you were assigning a value of true to the comboBox, that is
why its state was always "selected".

Birgit
AddThis Social Bookmark Button