3 Replies Latest reply on Jul 21, 2007 8:25 AM by wackydesigner

    Reverse External SWF

    wackydesigner
      Ok here is my code on the 1st frame inside a movie:

      loadMovieNum("Vines.swf", 1);
      this.createEmptyMovieClip("listenerLevel1", this.getNextHighestDepth());
      listenerLevel1.onEnterFrame = function(){
      _level1._x = 0; _level1._y = 200;
      if(_level1 != undefined) delete listenerLevel1.onEnterFrame;
      };

      It automatically loads up the swf to a certain x,y coordinate, Now when a user clicks on a button, I want the movie to reverse out. Any idea guys?
        • 1. Re: Reverse External SWF
          Level 7
          onButtonPress (however you want to define this):

          listenerLevel1.onEnterFrame=function() {
          if (this._currentframe>1) {
          this._gotoAndStop(this._currentframe--);
          } else {
          this.onEnterFrame=undefined;
          }
          }

          This should make it run sdrawkcab.

          Patrick

          wackydesigner wrote:
          > Ok here is my code on the 1st frame inside a movie:
          >
          > loadMovieNum("Vines.swf", 1);
          > this.createEmptyMovieClip("listenerLevel1", this.getNextHighestDepth());
          > listenerLevel1.onEnterFrame = function(){
          > _level1._x = 0; _level1._y = 200;
          > if(_level1 != undefined) delete listenerLevel1.onEnterFrame;
          > };
          >
          > It automatically loads up the swf into a certain coordinate, Now when a user
          > clicks on a button, I want the movie to reverse out. Any idea guys?
          >

          --
          http://www.baynewmedia.com
          Faster, easier, better...ActionScript development taken to new heights.
          Download the BNMAPI today. You'll wonder how you ever did without it!
          Available for ActionScript 2.0/3.0.
          • 2. Re: Reverse External SWF
            Level 7
            _gotoAndStop can probably just be gotoAndStop :)

            Patrick B wrote:
            > onButtonPress (however you want to define this):
            >
            > listenerLevel1.onEnterFrame=function() {
            > if (this._currentframe>1) {
            > this._gotoAndStop(this._currentframe--);
            > } else {
            > this.onEnterFrame=undefined;
            > }
            > }
            >
            > This should make it run sdrawkcab.
            >
            > Patrick
            >
            > wackydesigner wrote:
            >> Ok here is my code on the 1st frame inside a movie:
            >>
            >> loadMovieNum("Vines.swf", 1);
            >> this.createEmptyMovieClip("listenerLevel1", this.getNextHighestDepth());
            >> listenerLevel1.onEnterFrame = function(){
            >> _level1._x = 0; _level1._y = 200;
            >> if(_level1 != undefined) delete listenerLevel1.onEnterFrame;
            >> };
            >>
            >> It automatically loads up the swf into a certain coordinate, Now when
            >> a user clicks on a button, I want the movie to reverse out. Any idea
            >> guys?
            >>
            >

            --
            http://www.baynewmedia.com
            Faster, easier, better...ActionScript development taken to new heights.
            Download the BNMAPI today. You'll wonder how you ever did without it!
            Available for ActionScript 2.0/3.0.
            • 3. Re: Reverse External SWF
              wackydesigner Level 1
              yay! thx.