5 Replies Latest reply on Jan 8, 2008 1:14 PM by Wolfgang Herold

    timer - actions help, please

    bS_nickname
      Hello all - personally I am having a very bad day! I have been working on a timer solution for a project that's due now and I can't seem to get it to work correctly. Does someone have a working solution that they would want to share with me?

      All I need is a simple timer that starts on a frame, counts to certain time(s) that I can call other actions to happen at those times - then clears itself when going to a new frame or button down.

      My personal life is struggling at the moment and I can’t think clearly

      Please -
        • 1. Re: timer - actions help, please
          Level 7

          "bS_nickname" <webforumsuser@macromedia.com> wrote in message
          news:fltn8d$7jq$1@forums.macromedia.com...
          > Hello all - personally I am having a very bad day! I have been
          > working on a
          > timer solution for a project that's due now and I can't seem to get
          > it to work
          > correctly. Does someone have a working solution that they would want
          > to share
          > with me?
          >
          > All I need is a simple timer that starts on a frame, counts to
          > certain time(s)
          > that I can call other actions to happen at those times - then clears
          > itself
          > when going to a new frame or button down.
          >
          > My personal life is struggling at the moment and I can?t think
          > clearly
          >
          > Please -
          >

          http://www.mediamacros.com/item/item-930757024/

          you're welcome


          • 3. Re: timer - actions help, please
            bS_nickname Level 1
            richard - I am sorry for being a pain, but no joy in using this script as is - would you be willing to help me out directly? I just need to get past this -
            • 4. Re: timer - actions help, please
              Level 7

              "bS_nickname" <webforumsuser@macromedia.com> wrote in message
              news:flujgd$84f$1@forums.macromedia.com...
              > richard - I am sorry for being a pain, but no joy in using this
              > script as is - would you be willing to help me out directly? I just
              > need to get past this -
              >

              There are about 5 timer scripts on that site... maybe another one will
              work?
              I am off to bed now... 3 AM here. Maybe tomorrow?

              Richard.


              • 5. Re: timer - actions help, please
                Wolfgang Herold Level 2
                Easy.

                to create a time use this:

                new timeout("Timer name",3000 , #timer_handler)
                -- "´Timer name" name of the timer in the timeoutlist
                -- 3000 stands for 3000 miliseconds
                -- #timer_handle -- name of the handler to be called after timeout,
                -- e.g. located in a moviescript

                -- handler to be called

                on timer_handler
                do something
                end

                -- clear any timer

                on clear_timer t_name
                a = _movie.timeoutList.getpos(timeout(t_name))
                if a > 0 then _movie.timeoutList[a].forget()
                end

                thats all folks, and sleep well LOOP

                regards
                Wolfgang