Hello
I am trying to pass some variables to an array.
If you have any idea please help.
Code:
function Picture (picName, link, picColor, description) {
this.picName = picName;
this.picLink = link;
this.picColor = picColor;
this.description = description;
}
pics = new Array();
myData = new LoadVars()
myData.load("flash_used_cars.php")
myData.onLoad = function(success){
if(success){
for (var k = 0; k<myData.total; k++) {
text1 = myData["model"+k];
text2 = myData["date"+k];
link = myData["path"+i];
pics[k] = new Picture(text1, link, 0xFF9999, text2);
}
} else mess.text = 'error';
}
for (var i = 0; i<pics.length; i++) {
newCell(i, pics[i]);
}