Hello.
In this script i am loading variables from a text file which point to external .swf files, then bringing them into flash movieclips but my code doesnt work.
The variables are being loaded fine but for some reason they arent passing them to the movie clips to show the banners.
Anyone can see something wrong with my code? I can provide files if necessary.
Thanks Mucho
[AS]
myData = new LoadVars();
//check if the text file has loaded successfully
percentLoaded = myData.getBytesLoaded();
myData.onLoad = function (success){
if (success) {
//trace(myData.textBox);
gotoAndPlay(_currentFrame+1);
}else{
stop();
}
}
myData.load(“banners.txt”);
//create empty clips in the mainButtons container for the banners
_root.mainButtons.createEmptyMovieClip(“banner1”, 2);
_root.mainButtons.createEmptyMovieClip(“banner2”, 3);
_root.mainButtons.createEmptyMovieClip(“banner3”, 4);
//fill the created clips with images from the variables in the text file
loadMovie(myData.image1, “_root.mainButtons.banner1”);
loadMovie(myData.image2, “_root.mainButtons.banner2”);
loadMovie(myData.image1, “_root.mainButtons.banner3”);
//reposition the clips so they are 90 pixels apart
_root.mainButtons.banner1._x=0;
_root.mainButtons.banner1._y=0;
_root.mainButtons.banner2._x=0;
_root.mainButtons.banner2._y=90;
_root.mainButtons.banner3._x=0;
_root.mainButtons.banner3._y=180;
//function to pause time
function timeStop(x){
time=x;
function playNext() {
clearInterval(hold);
gotoAndPlay(_currentframe+1);
}
hold = setInterval(playNext, time);
stop();
}
[/AS]