;

PDA

Click to See Complete Forum and Search --> : Why yes, another question. Help please


-Mystikal
08-25-2005, 03:06 PM
Im trying to create a flash that were you check a checkbox and then click
enter and text gets displayed in a text box. but i have a problem now... this
is my script for when you hit enter:

1 on (release) {
2
3 if(checkbox1 == ""){
4 txt1 = "(text here)"
5 } else if (checkbox == ""){
6 txt1 = "(text here)"
7 }
8 }

As you most likely noticed, on line 3 and 5 the if checkbox == is empty. This
is because i dont know what to put in. Like if checkbox == "checked" then it
displays text.

So if you can explain pls do... and if you have time write an example script
thanks.

Cheers, Mystikal :cool: :cow:

w.brants
08-25-2005, 03:41 PM
Here's a simple example.
Create a new movie with a textfield named txt1 and a checkbox.
Set the following code for onChange (checkbox > behavior):
if (this.getValue()){
_root.txt1.text = 'checked';
} else {
_root.txt1.text = 'unchecked';
}

this.getValue();

gets the state of the checkbox. True means checked and false means not checked.

-Mystikal
08-25-2005, 04:20 PM
Thanks again lol.
this is like your second time helping?
w/e it works
thanks a bunch... again