mercredi 23 novembre 2016

Convert AS2 Script to AS3 Script

I have a problem to convert as2 script to as3 script I dont know how to begin.. I just learning this 1 month and my lecturer give me this task.. please help me

jumlah = 0;
waktu_muncul = 0;
function buat_tikus() {
 nomor = random(6)+1;
 tikus = attachMovie("tikus", "tikus", 2, {_x:_root["lingkaran"+nomor]._x, _y:_root["lingkaran"+nomor]._y});
 tikus.onEnterFrame = function() {
  waktu_muncul++;
  if (waktu_muncul == 12) {
   this.gotoAndStop(7);
  }
  if (waktu_muncul == 25) {
   removeMovieClip(this);
   buat_tikus();
   waktu_muncul = 0;
  }
  tikus.onPress = function() {
   if (this._currentframe == 1) {
    jumlah += 1;
    this.gotoAndPlay(2);
   }
  };
 };
}
onEnterFrame = function () {
 palu.swapDepths(_root.getNextHighestDepth());
 palu._x = _xmouse;
 palu._y = _ymouse;
};
onMouseDown = function () {
 if (palu._currentframe == 1) {
  palu.gotoAndPlay(2);
 }
};
buat_tikus();

Aucun commentaire:

Enregistrer un commentaire