1 Reply Latest reply on Jun 27, 2008 11:26 PM by VarioPegged

    The Five Second Pause

    BudHud Level 1
      I hit button one, and it takes me to this private function. In which I am trying to large size button two, keep it popped for a few seconds, and then return it to normal size. Obviously I’m new to Flex 2. I tried setInternal and setTimeOut but just could not get it. So I went to the loop. The only problem here, the code runs through one loop and then the other, and I get the “Go For It” but I don’t get the “Let’s Have Fun”. Is there way to make this work? If not, do you have any suggestions?


      do {
      snumb = snumb + 1
      txt = "Code Lives."
      } while (snumb < 900000000)

      do {
      numb = numb + 1
      stxt = "Why Not."
      } while (numb < 900000000)

      if(txt == "Code Lives.") {

      this.button0.y = 25
      this.button0.x = 18
      this.button0.width = 70
      this.button0.height = 22
      rte.text = "Let's Have Fun."

      }

      if(stxt == "Why Not.") {

      this.button0.y = 22
      this.button0.x = 15
      this.button0.width = 90
      this.button0.height = 30
      rte.text = "Go For It."

      }

      Thanks,

      BudHud
        • 1. Re: The Five Second Pause
          VarioPegged Level 2
          You can use the Timer class to take actions at specific intervals or after a certain length of time has elapsed. Here's a simple example I put together for you. You'll note that the timer event is fired once every second (1000 milliseconds) and continues for 5 repetitions, thus for 5 seconds total elapsed time.

          TS