I’m working on a site that has dynamically loaded text menu loaded with the following action:
myData = new LoadVars();
myData.load(“menu/menu01.txt”);
myData.ref = this;
myData.onLoad = function(succes) {
if (succes) {
for (var i = 0; i<this.cant; i++) {
this.ref[“title_txt”+i].htmlText = this[“Title”+i];
this.ref[“link”+i].htmlText = this[“link”+i];
}
} else {
trace(“Error loading data”);
}
};
which loads this text from menu/menu01.txt:
Title0=TITLE HERE &link0=FIRST LINK&link1=SECOND LINK&link2=&link3=&link4=&link5=&link6=&link7=&link8=&link9=&link10=&link11=&link 12=&link13=&link14=&cant=15
what i would like to know, since this is new to me, is can i have a button instance on the stage under each variable from menu01.txt, and set the buttons to _visible=true; or _visible=false; depending on wether or not there was text loaded in the dynamic text field? also, how can i get flash to recognize wether or not text was loaded or not loaded if the var is empty?