I'm an actionscript novice so I hope I'm missing something simple here. In a nutshell, I have a for loop updating a dynamic text element but it seems to iterate so fast that only the last item in the loop is updating the text. I'd like the dynamic text element to be updated with EACH item in the loop, not just the last.
I have a single frame movie where I create a simple array of strings from an external text file:
_global.i = 0;
_global.numplaces = 0;
_global.PlacesArray = new Array();
loadedText = new LoadVars();
loadedText.onLoad = function() {
filecontents = this.places;
_global.PlacesArray = filecontents.split(";"); //parse the file string
_global.numplaces = _global.PlacesArray.length-1;
};
loadedText.load("listofplaces.txt");
In a nested movie ("places"), I have a for loop:
for (_global.i=0; _global.i<_global.numplaces; _global.i++) {
trace("global i is "+_global.i);
trace(_global.PlacesArray[_global.i]);
CityState.place.htmlText = _global.PlacesArray[_global.i];
}
The traces work fine and show that the for loop is iterating properly. However the place.htmlText
dynamic text in a movie nested one level down (for tweening purposes) that I'd like the loop to update is only updating with the last item in the array.