A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Ok, how about toggle checkboxes?

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702

    Ok, how about toggle checkboxes?

    Well, my brain is fried with trying to get this combobox stuff to work so, what would I have to do to have several checkboxes that share the same variable.

    For example:

    Poll: Who is your favorite actor?
    Let's assign the variable "actor" to the checkbox.

    box1 = Joe
    box2 = Mike
    box3 = Robert

    BTW, it needs to make sure that ONLY one of the options are selectable. So if the user selects, Joe and tries to select Mike, Joe will turn off and Mike will now be selected.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    Nevermind, I think I just found an example from Chris...I don't understand it yet, but I see that the AS works. So, let me just ask this, what does || mean? Or or And? and does this all have to be on the same line?

    code:
    if (first.text == "" || last.text == "" || address.text == "");

    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  3. #3
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    if (first.text == "" || last.text == "" || address.text == "");
    //if any of the values equal whatever....do something...

    || = OR

    if (first.text == "" && last.text == "" && address.text == "");
    //if ALL of the values equal whatever....do something....

    && = AND

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    Thank you....Again.

    BTW, I finally figured out what the heck it was that was happening in the example you sent me with the two check boxes... I can't believe I missed that you were turning off the other checkbox when the other checkbox onChange and that onChange it would write text into a field.

    So, now I've got that working...My plan is almost complete.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  5. #5
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Good deal. Drop me a line when it's done.

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