dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Playing a movie clip backwards

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Posts
    185
    How can I play a movie clip, that has already been played in the scene, in backwards?
    I think I will need an sort of a engine using the properties " _root.movieclip._currentframe; ", no?

    Can anyone help me out here?
    Thanks in advance!


  2. #2
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    I have this on an empty movieclip, inside the movieclip that I want to have played backwards.

    Code:
    onClipEvent (enterFrame) {
        if (_parent.rewind==true) {
            _parent.prevFrame();
            if (_parent._currentFrame==1) {
                _parent.rewind=false;
            }
        }
    }
    The movieclip that this resides in has an onClipEvent(load) setting this.rewind=false;

    Anytime I want the clip to play backwards, I just set it's rewind property to true and the embedded "rewind" clip does the rest.

    Good Luck!

  3. #3
    aka Catcherman
    Join Date
    Nov 2000
    Posts
    88
    Can you show the code you would use for the parent movie clip and for a button that would change the rewind value to true?

  4. #4
    aka Catcherman
    Join Date
    Nov 2000
    Posts
    88
    I think I've figured it out. The code for the parent movie clip would look like this:

    Code:
    onClipEvent (load) {
    	this.rewind = false;
    }
    And the buttom that would control the rewind might look like this:

    Code:
    on (release) {
        ball.rewind = true;
    }
    But I have a new question. How would you code a second button that would make the MC play forward again from its current position?

  5. #5
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    The clip that I want to play backwards: _root.mainClip

    _root.mainClip has an
    Code:
    onClipEvent(load){
         this.rewind=false;
    }
    inside of mainClip is an empty movie clip with the code from above:

    Code:
    onClipEvent (enterFrame) {
        if (_parent.rewind==true) {
            _parent.prevFrame();
            if (_parent._currentFrame==1) {
                _parent.rewind=false;
            }
        }
    }
    A button to set _root.mainClip moving backwards:
    Code:
    on(release){
         _root.mainClip.rewind=true;
    }

    I see you figured it out, I was previewing my reply and your new one showed up.

    So now your new question is how do I make a movieclip play?!?! ;P

    I think what you are asking about is if the clip is in the process of rewinding how to make it go forward again, correct?


    Code:
    on(release){
         _root.mainClip.rewind=false;
         _root.mainClip.play();
    }







  6. #6
    aka Catcherman
    Join Date
    Nov 2000
    Posts
    88
    Awesome, Antibody. Thanks for your help.

    Now, if I could just get some help on my other thread...

  7. #7
    Senior Member
    Join Date
    Nov 2000
    Posts
    185

    THANKS!

    Antibody, YOU ROCK!
    Thanks a lot, brother! )

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