# What is wrong with my loadVars coding?

**URL:** <https://forum.kirupa.com/t/what-is-wrong-with-my-loadvars-coding/94656>\
**Category:** Uncategorized\
**Created:** [November 15, 2003, 1:23am UTC](https://forum.kirupa.com/t/what-is-wrong-with-my-loadvars-coding/94656 "2003-11-15T01:23:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BadBadNeil](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@BadBadNeil](https://forum.kirupa.com/u/BadBadNeil)\
**Post date:** [November 15, 2003, 1:23am UTC](https://forum.kirupa.com/t/what-is-wrong-with-my-loadvars-coding/94656/1 "2003-11-15T01:23:29Z")

</div>

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]
