PDA

View Full Version : Basic loadVars problem (mx, php)


Snappah
04-04-2003, 02:54 PM
Hello, first post here, looks like a great forum and site.

I hope somebody can give me some help here. I have used Flash for a couple of years now but it has been almost exclusively for CDs, so I am just now getting around to learning to use Flash in a web environment.

My problem is as follows: I have a php script that outputs news to be included into a dynamic textbox in the flash movie.

Here is the output of that php script:

news=April 3, 2002 This is a test just to see if I can get stuff out of the database.

In the movie I have a textbox which has the var value of 'newsTextBox'.

This is the actionscript I have to try to display the php output into the textbox.


newsGrab = new LoadVars();
newsGrab.load("_news.php");
newsGrab.onLoad = function() {
newsTextBox.text = this.news;
}

Can somebody tell me what I am doing wrong? It never displays in the movie.

Snappah
04-04-2003, 03:56 PM
I solved my own problem. I wasn't referring to the textbox element by the instance name, which was the cause of the problem here. Now it is displaying fine. You have to take baby steps before you can walk, then run, then fly :D

fgf
04-04-2003, 04:25 PM
trace your path(s) if something doesn't work

Most common script error ever i think and that find it pretty quick

fgf