home *** CD-ROM | disk | FTP | other *** search
/ One Click 21 (Special) / OC021.iso / Juegos / miniscrapercaper / miniscrapercaper.swf / scripts / DefineSprite_60 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-02-02  |  622 b   |  38 lines

  1. function fReset()
  2. {
  3.    pScale = random(80) + 20;
  4.    _xscale = pScale;
  5.    _yscale = pScale + (random(30) - 15);
  6.    pSpeed = pScale / 70;
  7.    if(random(2) == 1)
  8.    {
  9.       _xscale = _xscale * -1;
  10.    }
  11.    if(random(2) == 1)
  12.    {
  13.       _yscale = _yscale * -1;
  14.    }
  15. }
  16. pScale = random(80) + 20;
  17. _xscale = pScale;
  18. _yscale = pScale + (random(30) - 15);
  19. pSpeed = pScale / 70;
  20. if(random(2) == 1)
  21. {
  22.    _xscale = _xscale * -1;
  23. }
  24. if(random(2) == 1)
  25. {
  26.    _yscale = _yscale * -1;
  27. }
  28. onEnterFrame = function()
  29. {
  30.    _X = _X - pSpeed;
  31.    if(_X < -100)
  32.    {
  33.       _X = 650;
  34.       fReset();
  35.    }
  36. };
  37. stop();
  38.