1 Reply Latest reply on Jun 26, 2007 6:57 AM by _EnergiE_

    Elasticity: help with converting Flash 5 code to Flash 8


      because I have to make a flash menu with elasticity effect I came upon this tutorial: http://www.kirupa.com/developer/actionscript/spring.htm
      All OK but the code there works only with Flash 5. I somehow managed to concoct code that works for Flash 6 but still I didn't come even close to a code working in Flash 8. I'm using Actionscript only from version 7, I do not know anything about Flash 5 and 6. So please, the more experienced guys, help me!!

      The code I concocted is:
      MovieClip.prototype.move = function (centerx, centery, inertia, k) {
      this.x = -this._x+centerx;
      this.y = -this._y+centery;
      this.xp = this.xp*inertia+this.x*k;
      this.yp = this.yp*inertia+this.y*k;
      this._x += this.xp;
      this._y += this.yp;
      onEnterFrame=function() {
      this.move (_root._xmouse,_root._ymouse,0.9,0.1) ;

      This whole code is on the timeline of the MC being moved.
      So now the only thing I need is to make this code work for Flash 8
      Please, help