PDA

View Full Version : timing random stuff



thebigcheese
June 28th, 2003, 02:35 PM
Hi - i created a movie that gets a certain number of nodes from an xml file and places them randomly on the screen.

The only thing is, that it does them at the same time. i want them each to be placed seperatly on the stage, getting faster as the movie progresses.

I have attached the files below, how would i do this.
i want the end result to look something like this:
http://www.ianschragerhotels.com/intro.html
(not the intro with the black bg)

the xml is loacted at:
http://jobs.mindtripstudios.com/launch3/lib/countries.xml

thanks

ahmed
June 28th, 2003, 02:42 PM
use setInterval()... look it up in your AS reference :)

thebigcheese
June 28th, 2003, 02:57 PM
ok - i did that and now they all come seperatly but they dont stay on the stage, how would i get them to stay on the stage.

Also, it does to many, i only want it to do the function a certain amount of times and in order to do this i put it in a for loop like this:


for (i=0; i<5; i++) {
setInterval(printC, i+100);
}

But it doesn't work, it happens more than 5 times.

How would i fix these two things - thanks

thebigcheese
June 28th, 2003, 03:15 PM
i also tried this with do and dow...while but it still didnt work