home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / Titans / cyborg.swf / scripts / DefineSprite_161 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-01-05  |  463 b   |  33 lines

  1. xmin = 140;
  2. xmax = 550;
  3. onenterframe = function()
  4. {
  5.    nx = r._xmouse;
  6.    if(nx < xmin)
  7.    {
  8.       nx = xmin;
  9.    }
  10.    if(nx > xmax)
  11.    {
  12.       nx = xmax;
  13.    }
  14.    oldx = c._x;
  15.    oldy = c._y;
  16.    c._x = nx + (c._x - nx) / 1.2;
  17.    r.cbx = c._x - 50;
  18.    r.diff = 0.1 * (280 - c._x);
  19.    if(r.hit)
  20.    {
  21.       gotoAndPlay(5);
  22.    }
  23. };
  24. onmousedown = function()
  25. {
  26.    r.autofire = 1;
  27. };
  28. onmouseup = function()
  29. {
  30.    r.autofire = 0;
  31. };
  32. stop();
  33.