Difference between revisions of "Logo.as"
From Organic Design wiki
m |
m |
||
| Line 17: | Line 17: | ||
ball._x += _root.vx; | ball._x += _root.vx; | ||
ball._y += _root.vy; | ball._y += _root.vy; | ||
| − | if ( | + | _root._vy += 0.1; |
| + | if ( _root.vy > 10 ) _root.vy = 10; | ||
if ( ball._x < 0 ) { ball._x = 0; _root.vx = 1; } | if ( ball._x < 0 ) { ball._x = 0; _root.vx = 1; } | ||
if ( ball._x > 200 ) { ball._x = 200; _root.vx = -1; } | if ( ball._x > 200 ) { ball._x = 200; _root.vx = -1; } | ||
if ( ball._y > 200 ) { _root.vy = -10; ball._y = 200; } | if ( ball._y > 200 ) { _root.vy = -10; ball._y = 200; } | ||
} | } | ||
Revision as of 07:26, 16 March 2006
createTextField( 'rc', 1, 0, 0, 50, 50 ); with (rc) {
selectable = false; _quality = 'BEST'; border = false; multiline = true; wordWrap = false; text = 'testing'; }
attachMovie( 'xmlwiki', 'test', 3 ); attachMovie( 'ball', 'ball', 4 ); ball._x = ball._y = 50; ball._xscale = ball._yscale = 50;
function reduce() { ball._x += _root.vx; ball._y += _root.vy; _root._vy += 0.1; if ( _root.vy > 10 ) _root.vy = 10; if ( ball._x < 0 ) { ball._x = 0; _root.vx = 1; } if ( ball._x > 200 ) { ball._x = 200; _root.vx = -1; } if ( ball._y > 200 ) { _root.vy = -10; ball._y = 200; } }



