A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: true or false?

  1. #1
    ask me one on fish..not flash
    Join Date
    Oct 2002
    Location
    southern u.k.
    Posts
    495

    true or false?

    hi guys,

    i am trying to "trap" the value of a checkbox. (true or false)

    i know the value is changing, as i have used the debugger and it works fine, i.e. it changes the value as it should.

    i now want to use that value to validate a form. here is my code for the submit button

    ----------------------------------------------
    on (release) {
    if (termsread != "true") {
    gotoAndPlay("tickerror");
    stop();
    } else {
    gotoAndPlay("truetest");
    }
    }
    ----------------------------------------------

    termsread is changing from true to false correctly. but it always goes to the tickerror frame and never to the truetest frame!!

    any ideas?

    gary
    I bought a Ouija board. The pointer spelled out 'You don't actually believe in this crap, do you

  2. #2
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    I would test against the bool true instead of the string "true".

    if (termsread != true) {
    ....

    /Mirandir

  3. #3
    ask me one on fish..not flash
    Join Date
    Oct 2002
    Location
    southern u.k.
    Posts
    495
    see, its always the simple things that stop us eh!

    many thanx mirandir

    gary
    I bought a Ouija board. The pointer spelled out 'You don't actually believe in this crap, do you

  4. #4
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Yeah I know the feeling! It's really easy to get "homeblind", not seeing those easy bugs sitting right under your nose with a neon-sign on them.

    And You waqn't to blow your head of if some non-programmer comes around and spots the problem in two secs!

    /Mirandir

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