PDA

View Full Version : accessing array data


Burn
01-06-2002, 08:10 PM
hi there,

I'm trying to load data from a database(mysql) into Flash using PHP. My string looks like this:

&tickerText=1st line|2nd line|3rd testline&EOF=1 (obviously its for a ticker :D)

Flash looks like this:

1st Frame:
loadVariablesNum ("ndc_ticker.php", 0, "GET");

2nd Frame:
empty

3rd Frame:
if (EOF != "1") {
gotoAndPlay (2);
} else {
gotoAndPlay (4);
}

4th Frame:
tickerTextArray = new Array();
tickerTextArray = tickerText.split("|");

I have a dynamic textfield which is supposed to display the tickerTextArray[number] but its always empty. I'm pretty new with Flash and database content, I'm more on the PHP site but since there is no cool way to make a descent ticker I need Flash to do this...

Anybody who can explain to me, how I can access the tickerTextArray? In PHP it would be something like tickerTextArray[0] but that doesn't seem to work...

thnx in advance!

/burn

Burn
01-06-2002, 08:35 PM
hey, I just figured my mistake... I was trying to rename the dynamic textfield dynamically, and I think Flash is not able to do that...

Now I assign the arrayvalue to the textfield and it works :D

thnx anyway

/burn