8 Replies Latest reply on Oct 1, 2010 7:59 AM by kglad

    help with repeating frame delay

    tinathpot

      I have this movie in which basically a screen is supposed to come on, hold for 15 seconds, move to the next one, (a little bit of tween in between) hold for 15 seconds, move to the next one, etc. But the whole time there is also a button which enables the viewer to go to the next screen before the 15 seconds have elapsed.

       

      My initial solution for this was to just put in a lot of frames to make them last 15 seconds, but with many such instances repeating it becomes really hard for me to navigate the flash timeline.

       

      So I've found several scripts that would allow me to pause a frame, but they all have the same bug. For example, a frame action like this:

       

       

      stop();
      function wait() {
      play();
      clearInterval(myInterval);
      }
      myInterval = setInterval(wait, 15000);

       

       

      It works fine the first time, and works fine if you don't touch the "play" button, but if you click it a few times, after a few times the screens no longer wait 15 seconds to move on, but start moving at random intervals.

       

      I found that script (and several similar ones which behave the same way) in some forum somewhere, but I noticed the posts were all very old. I haven't been able to find if newer action scripts and flash players support some better tricks to do this?

       

      Anyone know a workaround, some way to get all those frames to pause in their own time without their intervals piling up and messing each other up? Maybe some action to put into the "play" button? Or into the frame?

       

      Anything other than inserting endless amounts of identical frames into the timeline.

       

      Here's my flash file if you'd like to take a look. It's very basic, I admit I'm not very avid in flash. It's Flash8:

      https://www.yousendit.com/download/WTNMeEVRTXYzeUkwTVE9PQ

       

      and the swf:

      https://www.yousendit.com/download/WTNMeEVTTk04aU0wTVE9PQ

       

       

      I'll really appreciate every help. Even if i need newer flash, all advice welcome.