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

  1. speed = -15;
  2. dx = _X - s._x;
  3. dy = _Y - s._y;
  4. ang = math.atan2(dy,dx);
  5. xs = speed * math.cos(ang);
  6. ys = speed * math.sin(ang);
  7. _rotation = deg(ang);
  8. onenterframe = function()
  9. {
  10.    _X = _X + xs;
  11.    _Y = _Y + ys;
  12.    if(cekhite())
  13.    {
  14.       r.ebul.removevalue(_name);
  15.       this.removeMovieClip();
  16.    }
  17.    if(_X < -30 or _Y < -30 or _Y > 430)
  18.    {
  19.       r.ebul.removevalue(_name);
  20.       this.removeMovieClip();
  21.    }
  22. };
  23.