can anyone point out where should i put the wait() in for loop so that when i load the project0.txt it will stop for 5 sec before it load the next txt…
coz i cannnot get it to paused, it will straight away loop to the last txt file…
and in the stage it will only display the last txt file
can someone point me to the right direction? Many Thanks in advance
output:
project1.txt------>vara1=pic1.jpg&vara2=pic2.jpg
project2.txt------>vara1=pic2.jpg&vara2=dolphin.jpg
project3.txt------>vara1=pic1.jpg&vara2=dolphin.jpg
source code:
loadText = new LoadVars();
loadText.load(“project name.txt”);
//passing the var from txt into flash
loadText.onLoad = function() {
count = this.no;
for(i=0; i<count ;i++)
Wait();
{
pro = “project”+*+".txt";
//creating empty movie clip for pic
_root.createEmptyMovieClip(“container”,3);
//loading the txt fill
loadText = new LoadVars();
loadText.load(pro);
trace(pro)
//passing the var from txt into flash
loadText.onLoad = function() {
test1 = this.vara1;
trace(test1)
test2 = this.vara2;
trace(test2)
bgcolor = this.colour;
//load the pic into the stage and set the x and y coordinaties + scale
container.loadMovie(test1);
container._xscale=70 ;
container._yscale=70 ;
container._x=60.7;
container._y=171.3;
//second photo to be loaded in
_root.createEmptyMovieClip(“container2”,30);
container2.loadMovie(test2);
container2._xscale=30 ;
container2._yscale=30;
container2._x=200.7;
container2._y=50.2;
bg.backgroundColor = bgcolor;
}
}
};
//}
function Wait(){
WaitInt = setInterval(Wait,5000);
}
// change to 5000 for 5 sec…*/
// clearInterval(WaitInt); // to use the interval only once