1 Reply Latest reply on Aug 31, 2010 5:31 AM by Ranpise

    convert code AS2  to  AS3

    jay khatri

      Plz any one convert this code from AS2 to AS3???????reoly me on jay_khatri@ymail.com

       

       

       

       

      #initclip
      function Dot() {
          this.color = new Color(this);
          this.color.setRGB(16775372);
          this._rotation = 150;                        /////////////////rotate of object////////////////
          this._width = 30;                        /////////////////width of object////////////////
          this._height = 30;                            /////////////height of object//////////////
          this._x = 300+Math.random();//*8-0(X vibration type effect)            /////////////X position of object//////////
          this._y = 250+Math.random();//*8-0(Y vibration type effect)            /////////////Y posotion of object///////////   
      }
      Dot.prototype = new MovieClip();
      Object.registerClass("myfirst", Dot);
      Dot.prototype.onEnterFrame = move;
      function move() {
          this.age++;
          this.relage=this.age/12;
          R=255<<16;
          G=(255-(this.relage*126)); if (G<0) G=0; G=G<<8;
          B=(255-(this.relage*1024)); if (B<0) B=0;
          this.color.setRGB(R+G+B);
          this._x -= Math.random()*-2-1.25;
          this._y -=Math.random()*+1.75;
          this._alpha -= 3;
          this._xscale -= 2;
          if (this._alpha<5) {
              this.removeMovieClip();
          }
      }
      #endinitclip