A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Why yes, another question. Help please

  1. #1
    Member
    Join Date
    Aug 2005
    Location
    Canada, Ontario.
    Posts
    42

    Why yes, another question. Help please

    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

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    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):
    Code:
    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.

  3. #3
    Member
    Join Date
    Aug 2005
    Location
    Canada, Ontario.
    Posts
    42

    Blah blah blah

    Thanks again lol.
    this is like your second time helping?
    w/e it works
    thanks a bunch... again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center