1 Reply Latest reply on Jun 19, 2009 6:21 AM by kglad

    Variable wont change

    screenaddict

      I am attempting to make a remoddled clone of the game at http://62.212.67.28/games2/game/7548.swf

      so far i have some blobs that slowly move down through a door, then when they're off the screen they jump back above the screen to come back down.

      my problem is that the door is user controlled using this code on a butten:

       

      on (release) {
      if (door1.state=true) {
        door1.closeit();
      } else {
        door1.openit();
      }
      }

       

      this code works perfictly but the blobs are ment to stop when the door closes, they use this code:

       

      onClipEvent (enterFrame) {
      if (door1.state=true) {
        _y++;
      } else {
       
      }
        if (_Y > 400) {
        _y = -5
      }
      }

      if required the code for the door is this when open:

       

      state = true;
      stop();
      closeit = function () {
      play();
      };

      and when closed:

       

      state = false;
      stop();
      openit = function () {
      play();
      };

      and at the last frame when the door has closed again:

       

      gotoAndStop(1);

       

      btw when i tried attaching the file it gave me the error The content type of this attachment is not allowed.

      thanks for the help,

      screenaddict