PDA

View Full Version : Loop function



mitja2
September 28th, 2004, 06:51 AM
Is there any way to do this code with less lines - with usage of WHILE or FOR or some other LOOP function.

progBar1._xscale=0;
progBar2._xscale=0;
progBar3._xscale=0;
progBar4._xscale=0;
progBar5._xscale=0;
progBar6._xscale=0;
progBar7._xscale=0;
progBar8._xscale=0;
progBar9._xscale=0;
progBar10._xscale=0;

All there is changing is progbar number in name.
Any ideas?

2nd day
September 28th, 2004, 09:06 AM
you the following actions:
[code]
for(i=0; i<11; i++){
_root["progBar"+i]._xscale = 0;
}