home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Templates / CSS / light_in_space / starfield.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2001-11-21  |  420 b   |  17 lines

  1. if(i < totalstars)
  2. {
  3.    duplicateMovieClip("star","star" + i,16384 + i);
  4.    xposi = centerx - raio / 2 + random(raio);
  5.    setProperty("star" + i, _X, xposi);
  6.    yposi = centery - raio / 2 + random(raio);
  7.    setProperty("star" + i, _Y, yposi);
  8.    xp = xposi - centerx;
  9.    yp = yposi - centery;
  10.    angle = 180 * Math.atan2(yp,xp) / 3.14;
  11.    setProperty("star" + i, _rotation, angle);
  12. }
  13. else
  14. {
  15.    stop();
  16. }
  17.