A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Forward/Reverse control

  1. #1
    Senior Member
    Join Date
    Oct 2000
    Location
    Long Island, NY
    Posts
    134

    Forward/Reverse control

    OK I have two sites in which I need to do this:
    Site #1
    I have a flash file that has an arrow pointing left and an arrow pointing right. I need them to control a MC so that if you mouse over the left arrow it plays the MC backwards and it stops when you mouse out. I also need it to play forward when you mouse over the right arrow and also stop when you mouse out.

    Site #2
    I need to do the same thing only with a slider rather than arrows. This will go frame by frame stopping each time the slider is drag in whichever direction.

    If someone could help me with this it would be greatly appreciated!

    -= Bill =-
    P.S.: This is what the alphabet would look like without Q and R.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Maybe working with this one (your second request) you can get the first one going...

    This is not my file... Can't remember who posted it, but credit goes to him not to me...
    Last edited by oldnewbie; 12-03-2004 at 01:13 AM.

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Location
    Long Island, NY
    Posts
    134
    Thanks.... I'll try it

    -= Bill =-
    P.S.: This is what the alphabet would look like without Q and R.

  4. #4
    Senior Member
    Join Date
    Oct 2000
    Location
    Long Island, NY
    Posts
    134
    Thanks That'll help me with my second request! The only problem is I can't figure out how to implement that into the first request. There has to be an easier way to do that for the first site.
    -= Bill =-
    P.S.: This is what the alphabet would look like without Q and R.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Something as simple as...

    on(rollOver){
    _root.my_clip.nextFrame(); //forward
    }

    on(rollOver){
    _root.my_clip.prevFrame(); //backward
    }

  6. #6
    Senior Member
    Join Date
    Oct 2000
    Location
    Long Island, NY
    Posts
    134
    Yes but will that keep playing as long as I keep my mouse over it? or will it stop only so i have to mouse out and mouse over again to keep going.
    I need it to keep playing, and then stop when you mouse out.
    -= Bill =-
    Last edited by greendog; 10-06-2004 at 02:11 PM.
    P.S.: This is what the alphabet would look like without Q and R.

  7. #7
    Senior Member
    Join Date
    Oct 2000
    Location
    Long Island, NY
    Posts
    134
    I guess what I'm asking is how do I get the movie to play backwards when you mouse over the left arrow.

    -= Bill =-
    P.S.: This is what the alphabet would look like without Q and R.

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Then use something like this...
    define the following function on your first frame...
    code:

    this.onEnterFrame = function(){
    if(backward){
    this.prevFrame();
    }
    if(forward){
    this.nextFrame();
    }
    };



    And your arrow buttons add this...
    code:

    //left arrow...

    on(rollOver){
    backward = true;
    }

    on(rollOut){
    backward = false;
    }

    //right arrow

    on(rollOver){
    forward= true;
    }

    on(rollOut){
    forward= false;
    }


  9. #9
    Senior Member
    Join Date
    Oct 2000
    Location
    Long Island, NY
    Posts
    134
    Just wanted to say thanks.....got it running the way I wanted to!
    http://www.hdr-designs.com/test/wood/
    Check it out!

    -= Bill =-
    P.S.: This is what the alphabet would look like without Q and R.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center