Clark
06-16-2005, 11:17 PM
Hi all,
I'm having diffculty in calling a variable in PHP that will contain <img src='logo.jpg'> and then load the variable through actionscript and put it in a dynamic text box that is HTML rendered and to show the logo.
If I put it through actionscript as (with the textbox having an instance name of 'logo_txt'....
logo_txt.html = true;
logo_txt.text = '<img src='logo.jpg'>;
I open this in the browser and it works so the image is in the correct form.
So then I've tried it through PHP such as
<?php
$logo= "<img src='logo.jpg'>";
print '&logo='.$thedate;
?>
and the use
//Creat LoadVars instance to retrieve date from PHP script
var getDate:LoadVars = new LoadVars();
//load IMG from PHP
getIMG.load("test.php");
//assign theDate property of the LoadVars instance to text field
getIMG.onLoad = function() {
logo_txt.html = true;
logo_txt.text = this.logo;
};
So I open the swf in a browser to test it but logo only the <img scr='logo.jpg'> is printed. If I open the php file it shows the image with &logo= to the left.
Any ideas?! I've tried to get around it so many ways.
I've tried it through a .txt file that is rendered as HTML as bold etc works in there. But then nothing is shown the IMG tag isn't seen and no image.
HELP!
Cheers,
Clark
I'm having diffculty in calling a variable in PHP that will contain <img src='logo.jpg'> and then load the variable through actionscript and put it in a dynamic text box that is HTML rendered and to show the logo.
If I put it through actionscript as (with the textbox having an instance name of 'logo_txt'....
logo_txt.html = true;
logo_txt.text = '<img src='logo.jpg'>;
I open this in the browser and it works so the image is in the correct form.
So then I've tried it through PHP such as
<?php
$logo= "<img src='logo.jpg'>";
print '&logo='.$thedate;
?>
and the use
//Creat LoadVars instance to retrieve date from PHP script
var getDate:LoadVars = new LoadVars();
//load IMG from PHP
getIMG.load("test.php");
//assign theDate property of the LoadVars instance to text field
getIMG.onLoad = function() {
logo_txt.html = true;
logo_txt.text = this.logo;
};
So I open the swf in a browser to test it but logo only the <img scr='logo.jpg'> is printed. If I open the php file it shows the image with &logo= to the left.
Any ideas?! I've tried to get around it so many ways.
I've tried it through a .txt file that is rendered as HTML as bold etc works in there. But then nothing is shown the IMG tag isn't seen and no image.
HELP!
Cheers,
Clark