PDA

View Full Version : Display image from variable



dennuzz
March 3rd, 2005, 07:16 AM
I have a bar on my website which displays the last 10 SMS messages that have been sent to the website by the users. [click here (http://62.166.1.57/sms_balk.php)]

The sender's nickname and message are dynamically loaded from a PHP-file. I also want to display the user's picture next to the message. The URL to the picture is sent from the PHP-file, just like the nickname and message, but I don't know how to display that picture in my flash-movie.

So, how do I display a picture in flash when I've only got a dynamically loaded URL?

mpelland
March 3rd, 2005, 08:57 AM
picture_mc.loadMovie(theURLFromPHP);

one issue you might encounter would be that, from what I remember, flash is not supposed to be able to load images from other servers.

dennuzz
March 3rd, 2005, 09:15 AM
Can theURLFromPHP be a variable, 'picURL' for instance? picURL would be the variable that is loaded from the PHP-file..

The PHP-file prints 3 variables to the screen which Flash imports into the movie, like this; &sender=<nickname here>&message=<message here>&picURL=<url here>

picURL will be the variable which contains the URL to the picture. So, correct me if I'm wrong, I create a movieclip and give it this action; picture_mc.loadMovie(picURL);

mpelland
March 3rd, 2005, 09:17 AM
sorry, I guess I didn't really specify. that is exactly what I meant