Looping scenes to go from first frame to last frame and rollover button play

I’m trying to figure out:

a) how to loop a scene to go from the first frame to the last to the second last etc

WHILE

b) having the scene play either forwards or backwards (as above) while the user has their mouse over a button but making the scene pause when the users mouse isn’t over the button.

can anyone help me???

do you mean you want it to play backwards? Or just go to the last frame, cuz thats easy… gotoAndplay(*);

  • = scene number

Or just search the forum!
But here…

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=21642&highlight=playing+a+movie+backwards

hmm… not entierly sure what you want here.

am I right in thinking that you want the movie is to play start to finish when it reaches the end it plays backwards, when it reaches the start it plays forwards again and so on? But this is only to play if the user has the mouse over a button?

if this is what you want then you can do it like this:

in your button:


on(rollOver) {
      _root.Playing = true;
}

on(rollOut) {
      _root.Playing = false;
}

then put this code in the first frame of your _root timeline (mx only let me know if you need a flash5 version):


Reverse = false;

this.onEnterFrame = function() {
      if(Playing) {
            if(!Reverse) {
                  gotoAndStop(_currentframe + 1);
            }else {
                  gotoAndStop(_currentframe - 1);
            }
      }
}

finally in the last frame of your movie put this:


Reverse = true;