5 Replies Latest reply on Dec 26, 2016 2:54 PM by kglad

    Help with AS1 to AS2 Conversion

    GaussianFracture Level 1

      Hello.

       

      I have a flash file that was saved with flash5 to work on AS1. I need it to get it working with Flash8 and AS2, but when I change the publish settings to Flash8 it doesn't work. Can you help me get it working for AS2 ?

       

      I'm posting the scripts below :

       

       

       

      MovieClip.prototype.move = function (centerx, centery, inertia, k) { x = -this._x+centerx;y = -this._y+centery;xp = xp*inertia+x*k;yp = yp*inertia+y*k;_x += xp;_y += yp;};

       

      1. onClipEvent (enterFrame) {
      2.     // We define the reference point
      3.     centerx = _root.Target._x;
      4.     centery = _root.Target._y+50;
      5.     // temporary variables used to calculate
      6.     // the speed of the mass
      7.     x0 = this._x;
      8.     y0 = this._y;
      9. }
      10. onClipEvent (enterFrame) {
      11.     if (pressing) {
      12.         startDrag(this, true);
      13.         xp = this._x-x0;
      14.         yp = this._y-y0;
      15.         x0 = this._x;