public class Main extends Sprite{ public function Main(){ var sum:Number = 0; while (sum < 100) { trace(sum + " - not there yet."); var random:Number = Math.ceil(Math.random() * 10); sum += random; } trace(sum + " - surpassed 100. END"); } } }
Related Scripts with Example Source Code in same category :