Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Standalone player displays differently than browser

Status
Not open for further replies.

drewson

MIS
Jun 3, 2003
50
US
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:
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!
 
are you using netscape?

if so have you tested the file on other browsers ?
 
It works neither in Netscape 7 or Internet Explorer 6, both with the latest Flash plugins.
 
I've found the issue...

The split("\r\n") should be split("\n").

Also, I moved the duplication of the movieclips to another frame, and made sure that the text file was completely loaded before populating the new movie clips.

Then it works correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top