1 Reply Latest reply on May 24, 2007 12:18 PM by Taidaishar

    Help with resetting movie

      Hello all,

      I'm new here and just recently I've started training on flash. I've got a movie up and running that may be introduced into a new site that my company is working on, but I can't figure out why this keeps happening. I have 4 buttons at the bottom of 300x300 box. Each button has an "onRollOver" event attached to it that sends the playhead to another frame. The button on the bottom right works most of the time, but there are occasions that when rolling in and out in different patterns, it sends my movie back to the beginning. Now while I'd rather it didn't go back to the beginning at all, there are times that it even alters the way my movie plays when it resets it such as preventing something from fading in that was fading in previously.

      I'd love to attach the fla file, but I'm not sure how. I'll attach the code that is contained in the 4 frames that each button links to.... be gentle if I've done something in a roundabout way.... I'm pretty new at actionscript...

      Basically, the movie opens up with 4 different backgrounds fading in and out using a setInterval command with "5000" as the interval. Each background has dynamic text (updated using 4 text files) and a picture that appears with it (this is just a mock up, so the pictures are crap). There are 4 buttons at the bottom that are there throughout the entirety of the movie. Now, when a button is rolled over, it then links to these other frames and STOPS the interval fading and only moves between frames through the rollover options. Frames 50-54 are the fading frames and frames 70-73 are the rollover frames.

      I've attached the code for 70-73, and the sample from frame 53 will be basically the same for all of frames 50-54 except for a few different instance names and such (I actually labeled it frames 50-55 below but it only goes through 54).

      I would be very appreciative of any suggestions specifically on why it might be doing this. Any other suggestions on how to clean up my code, or something that could condense the amount of code I'm using would be welcomed also, but most importantly I'd like to figure out the problem at hand.

      Thanks for everything guys.

      EDIT: I'm using flash professional 8 and AS2
      EDIT #2: Sorry, I don't comment or use any kind of documentation in my work very often.
        • 1. Re: Help with resetting movie
          Taidaishar Level 1
          Nevermind this. I fixed the problem. It seemed that my rollover wasn't working the way I intended. For example, in case someone wants to know, the button that linked me to frame 71 wasn't working IN frame 71. I left the coding out intentionally so it wouldn't do anything in the frame that it linked to, but that was apparently the wrong thing to do. Now, I've added an "onRollOver" event to each frame referring to it's own button basically saying "onRollOver" - "stop();"

          To explain a little better, my "announcements" button takes me to frame 70 when I rollover it, but when I'm on 70 and I rolled over it it kept jumping me to 71 and then I'd rollover it again and it would jump me back to 70. Thus the reason the last button (in the last frame of my movie) was resetting my movie. It was jumping to the next frame which was nonexistant, so it was looping. I fixed it by making each button issue a stop command when already on the frame it referred to.

          Hope that was a little clearer than it sounded when I was typing it.