I'm working on a press release movie, and I've coded the page to load headlines from a text file. They are all neatly displayed in separate dynamic text boxes when I view the code in the standalone Flash player, but when I view it in the browser, all except the last one loaded disappears.
My code to load and create the dynamic text boxes is as follows:
Thanks!
My code to load and create the dynamic text boxes is as follows:
Code:
stop();
pressrel = new loadvars();
pressrel.onload = function(){
news = pressrel.newsvar.split("\r\n");
if (news[news.length - 1] == ""){
arraymax = news.length - 2;
}else{
arraymax = news.length - 1;
}
for(i = arraymax; i >= 0; i--){
news[i] = news[i].split(",,")
}
//populate first news releases
releasetext0.releasetitle.text = news[arraymax][2];
releasetext0.newsfile = news[arraymax][0];
j = 1;
for (i = arraymax - 1; i >= 0; i--){
duplicateMovieClip("releasetext0", "releasetext" + j, j+100);
_parent.releases["releasetext" + j].releasetitle.text = news[i][2];
bounds = getBounds("releasetext" + j);
_parent.releases["releasetext" + j]._y = bounds.yMax;
_parent.releases["releasetext" + j].newsfile = news[i][0];
j++;
}
_parent._parent.refreshPane();
}
pressrel.load("news/newsindex.txt");
Thanks!