ang = 1500 * Math.sin( 7 * time );
for( Shape shape : layer.children ) {
Sprite sprite = shape.toSprite();
oldSprite.directTo( sprite );
oldSprite.angle += perSecond( ang ) + Service.random( -45, 45 );
sprite.moveForward();
oldSprite = sprite;
}
if( save.wasPressed() ) layer.saveToFile( "sprites.lw" );
if( load.wasPressed() ) layer = (Layer) Obj.loadFromFile( "sprites.lw" );