3 Replies Latest reply on Jul 9, 2006 7:05 PM by Craig Grummitt

    conversion from v5 to v8 ?? any help ?? very simple

    costin
      hi everyone

      I have found I code that I need to use it on my website. Unfortunately this script is version 5 and if I export the movie as v5 then every thing is ok. if I export ti as flash v8 the script dosen't work. can anyone tell me how should be changed to work ??

      /// the flash can contain one frame only with this code

      Movieclip.prototype.elasticScale = function(target, accel, convert) {
      xScale = xScale * accel + (target - this._xscale) * convert
      yScale = yScale * accel + (target - this._yscale) * convert
      this._xscale += xScale
      this._yscale += yScale
      }

      // end --->

      // this code is atached to an movieclip named as you whant

      onClipEvent (enterFrame) {
      if (this.hitTest(_root._xmouse,_root._ymouse,true)) {
      elasticScale(150, 0.9, 0.1)
      } else {
      elasticScale(100, 0.9, 0.1)
      }
      }

      //


      thank you very much !