2 Replies Latest reply on May 16, 2007 7:42 AM by MotionMaker

    password protection actionscript

    blackbeltjones80 Level 1
      i have create a password protection for a site and i am experiencing a problem with the button;

      **Error** Scene=Scene 1, layer=text, frame=1:Line 2: Statement must appear within on handler
      ok_btn.onPress = function() {

      forgive me, i am new to this so it is probably something obvious! the button code is:

      ok_btn.onPress = function() {

      if (_root.thePassword.text == _root.secretcode) {

      _root.gotoAndStop(3);

      } else {

      _root.gotoAndStop(2);

      }

      }