home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / dragon.swf / scripts / DefineSprite_165_ammo_box_ice / frame_1 / DoAction.as
Encoding:
Text File  |  2008-09-12  |  831 b   |  45 lines

  1. function step()
  2. {
  3.    _xscale = _yscale = scale;
  4.    if(_Y > orig_y)
  5.    {
  6.       vy -= 0.1;
  7.    }
  8.    if(_Y <= orig_y)
  9.    {
  10.       vy += 0.1;
  11.    }
  12.    if(timer-- < 0)
  13.    {
  14.       scale *= 0.8;
  15.    }
  16.    else if(scale < 100)
  17.    {
  18.       scale *= 1.1;
  19.    }
  20.    if(scale < 10)
  21.    {
  22.       destroy();
  23.    }
  24.    if(_parent._parent.dragon_head.hitTest(_X,_Y,0))
  25.    {
  26.       var _loc3_ = 15;
  27.       _parent._parent.deltaIceAmmo(15);
  28.       var _loc2_ = _parent._parent.addObj("ammo_text_ice",_parent._parent.score_layer,_parent._parent.getNextScoreLevel());
  29.       _loc2_.val = "ice +15";
  30.       _loc2_._x = _X;
  31.       _loc2_._y = _Y;
  32.       _parent._parent.playSound("ammo.wav");
  33.       destroy();
  34.    }
  35.    _Y = _Y + vy;
  36. }
  37. function destroy()
  38. {
  39.    this.unloadMovie();
  40. }
  41. timer = 1000;
  42. vy = -1;
  43. orig_y = _Y;
  44. scale = 11;
  45.