home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / eolica.swf / scripts / DefineSprite_293 / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2005-07-26  |  779 b   |  38 lines

  1. function createString()
  2. {
  3.    var tC1X = c1._x;
  4.    var tC1Y = c1._y;
  5.    tC1X += (p2._x - tC1X) * 0.1;
  6.    tC1X += (p1._x - tC1X) * 0.1;
  7.    tC1Y += (p2._y - tC1Y) * 0.1;
  8.    tC1Y += (p1._y - tC1Y) * 0.1;
  9.    tC1Y += 15;
  10.    if(tC1Y > ground._y)
  11.    {
  12.       tC1X = c1._x;
  13.       tC1Y = ground._y;
  14.    }
  15.    c1._x = tC1X;
  16.    c1._y = tC1Y;
  17.    moveByP4 = (p3._x - p4._x) * 0.2;
  18.    p4._x += moveByP4;
  19.    p4._y = p3._y + startDist;
  20.    with(string_holder)
  21.    {
  22.       clear();
  23.       beginFill();
  24.       lineStyle(0.5,16777215,20);
  25.       moveTo(p1._x,p1._y);
  26.       curveTo(c1._x,c1._y,p2._x,p2._y);
  27.       lineTo(p3._x,p3._y);
  28.       lineTo(p4._x,p4._y);
  29.       endFill();
  30.    }
  31. }
  32. this.onEnterFrame = function()
  33. {
  34.    createString();
  35. };
  36. moveByP4 = 0;
  37. startDist = 20;
  38.