How to repeat a for loop?

Hey all,

as you can probably tell by my post count, i am new! :smiley: // lo to all! I have been registered here for while and i always check out what peeps are saying here with little time to post. Loving the tutorials as well… very nice!

However my knowledge of AS is weak, i have kinda started form the back in as well - as i know a few people that code a lot and look at their source - whilst myself i studied music at uni etc…

anyway cutting to the chase, i need some advice and was wondering if someone could spare a mo to briefly explain what i should do here…


for (i=0; i<7; i++) {

	this["bubble"+i]._x = 0;
	this["bubble"+i]._y = 0;
	this["bubble"+i]._xscale = 0;
	this["bubble"+i]._yscale = 0;
	this["bubble"+i]._alpha = 100;

	this.randomVarX = random(80)+50;
	this.randomVarY = random(20)-80;
	
		this["bubble"+i].alphaTo(0, 5, "easeOutQuad", 0);
		this["bubble"+i].scaleTo(100, 1, "easeOutQuad", 0);
		this["bubble"+i].slideTo(randomVarX, randomVarY, 2, "easeOutQuad", 0);
}

I am using Laco code to move my sweet bubbles around, however after the last one has reached an alpha level of about 10 i would like the loop to repeat the for loop. Basic stuff i am sure? Was considering a callback from the last line of laco, or placing an if statement to call an action.

any help is appreciated!

Løque