Flash: movie clip animation

  • Started
  • Last post
  • 1 Response
  • 67nj

    let's say i have a movie clip animation and i would like to use it also reversed.
    i know i can if i duplicate the clip and reverse its frames, but i also increase too much the size of the swf...daes anyone know if i can do it with actionscript without duplicate the clip?

  • unfittoprint0

    you can try this.

    //create a copy
    myMovie.duplicateMovieClip("myMo...

    //go to lastframe
    myMovie2.gotoAndStop(myMovie2._t...

    //create a 'rewind' function
    function reverse() {
    myMovie2.onEnterFrame = function(){
    this.gotoAndStop(this._currentfr...
    if (this._currentframe == 1){
    this.gotoAndStop(1);
    delete this.onEnterFrame;
    }

    //now you just have to call the
    //reverse function when desired
    // like this:

    reverse();

    stop();