
Originally Posted by
ThaLIkz
doesen't anyone knows?

Yes someone knows, first off it appears you are using Flash MX, but you are using Flash 5 script in the form of getTimer to cycle your array. I did it slightly different and I don't get the numbers you do. I use Flash MX's setInterval to run a function every 5 seconds that shows and item from the array. If the counter variable reaches the length of the array - 1 it resets to 0 or else it increments by one.
Code:
System.useCodepage = true;
myArray = [];
myURL = "http://members.lycos.nl/amstelonline/getdata.php";
format = new TextFormat();
testo.html = true;
function formatText(textBox,ita,siz,Bold,colour){
format.italic = ita;
format.size = siz;
format.bold = Bold;
format.font = "Verdana";
format.align = "center";
format.color = colour;
textBox.setTextFormat(format);
}
testo.text = "Loading news...";
formatText(testo,false,12,true, 0x000000);
temp = new LoadVars();
temp.load(myURL);
temp.onLoad = function(){
for(var a in this){
if(a != "onLoad" ){
myArray.push(this[a]);
}
}
showItem();
};
cnt = 0;
function showItem() {
trace ("Showing item");
testo.htmlText = myArray[cnt];
formatText(testo,false,12,true, 0x000000);
if(cnt == (myArray.length-1)) {
cnt = 0;
}
else {
cnt++;
}
}
myInterval = setInterval(showItem, 5000);
Bookmarks