Flash Button Q

  • Started
  • Last post
  • 2 Responses
  • drbyers

    Does anybody know how to prevent a fast forward button for a video movie clip from going beyond the movie clip's last frame.

    the fast forward button I have now works, but If I hold it down until the end of the movie clip, it starts the movie clip over again.

    any help would be mucho appreciated.

  • ********
    0

    Not entirely sure how you're importing the video but basicaly you want to check for either the current time of the video and compare it to total time or current frame and total frames

  • unfittoprint0

    a fast forward is the result of an interval/onEnterFrame loop that tells the player to advance a a certain number of frames.
    So:

    //n is the number of skipped frames

    //forward function
    forward = function(n){
    if(this._currentframe + n < this._totalframes){
    this.gotoAndStop (this._currentframe + n);
    } else {
    this.gotoAndStop( this._totalframes);
    };
    }

    forwardbutton.onPress = function(){
    MC.onEnterFrame = forward;
    }

    forwardbutton.onRelease = function(){
    delete MC.onEnterFrame;
    }