Difference between revisions of "Logo.as"
From Organic Design wiki
m |
m |
||
Line 14: | Line 14: | ||
ball._xscale = ball._yscale = 50; | ball._xscale = ball._yscale = 50; | ||
− | _root.vx = | + | _root.vx = 1.0; |
_root.vy = 0.0; | _root.vy = 0.0; | ||
_root.x = 0.0; | _root.x = 0.0; | ||
Line 24: | Line 24: | ||
_root.vy += 0.1; | _root.vy += 0.1; | ||
if ( _root.vy > 10 ) _root.vy = 10.0; | if ( _root.vy > 10 ) _root.vy = 10.0; | ||
− | if ( _root.x < 0 ) { _root.x = 0; _root.vx = 1; } | + | if ( _root.x < 0 ) { _root.x = 0; _root.vx = 1.0; } |
− | if ( _root.x > 200 ) { _root.x = 200; _root.vx = -1; } | + | if ( _root.x > 200 ) { _root.x = 200.0; _root.vx = -1.0; } |
− | if ( _root.y > 200 ) { _root.vy = -10; _root.y = 200; } | + | if ( _root.y > 200 ) { _root.vy = -10.0; _root.y = 200.0; } |
ball._x = _root.x; | ball._x = _root.x; | ||
ball._y = _root.y; | ball._y = _root.y; | ||
} | } |
Revision as of 07:31, 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;
_root.vx = 1.0; _root.vy = 0.0; _root.x = 0.0; _root.y = 0.0;
function reduce() { _root.x += _root.vx; _root.y += _root.vy; _root.vy += 0.1; if ( _root.vy > 10 ) _root.vy = 10.0; if ( _root.x < 0 ) { _root.x = 0; _root.vx = 1.0; } if ( _root.x > 200 ) { _root.x = 200.0; _root.vx = -1.0; } if ( _root.y > 200 ) { _root.vy = -10.0; _root.y = 200.0; } ball._x = _root.x; ball._y = _root.y; }