Use the increment operator with while loop
package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var total = 2; var i = 0; while (i < 15) { total = total * 2; i++; } } } }