PDA

View Full Version : Can anyone help with loadMovie call from a database



neiro
November 29th, 2004, 06:29 PM
Hello,

I am calling a text string from a databse using flash remoting and trying to put it into the loadMovie action. This is how I am the results from the database call.

getComments_Result = function (newsID) {
attachMovie("comments", "comments", 100);
comments._x = 400;
comments._y = 150;
comments.newstxt.text = newsID.getItemAt(0).newstxt
comments.newsimage.text = newsID.getItemAt(0).newsimage
comments.newspic.loadMovie(""+newsimage+"");
trace(newsimage)
};

Using the Net Debugger I can see that it is pulling the information from the database for newsimage, but when I trace "newsimage" I get undefined. It seems like it is getting lost when it moves to the next line.

Does anyone know how I can get this to work?

Thanks,

Chad

neiro
November 30th, 2004, 12:05 AM
BUMP BUMP

icio
November 30th, 2004, 11:15 AM
comments.newspic.loadMovie(""+newsimage+"");
you'd just need to put:
comments.newspic.loadMovie(newsimage);

maybe this is your problem?

neiro
November 30th, 2004, 06:48 PM
Tried that.

When I trace newsimage I get undefined and I cant figure out why.

neiro
November 30th, 2004, 10:07 PM
What I am trying to do is take the string of text that comes from the database for the field newsimage and put it in the loadMovie action like this.

loadMovie(newsimage);

I am doing this right now and it isnt working. I can see through the netdebugger that the string of text from newsimage is being pulled from the database properly but I just cant get the loadMovie command to work.

neiro
December 1st, 2004, 10:17 AM
bump bump

The Brown Cow
December 1st, 2004, 11:15 AM
It doesn't look like you're storing newsimage under that name. You're just plugging it into a textbox.

Try this...

getComments_Result = function (newsID) {
attachMovie("comments", "comments", 100);
comments._x = 400;
comments._y = 150;
comments.newstxt.text = newsID.getItemAt(0).newstxt
var newsimage = newsID.getItemAt(0).newsimage
comments.newsimage.text = newsimage
comments.newspic.loadMovie(newsimage);
trace(newsimage)
};

neiro
December 3rd, 2004, 04:45 PM
Thanks man,

That worked.

Thats all I needed. Now I can finsih this site. Sweeeettttt.


Thanks,

chad