onLoad event assignment should precede the load method.
var getDate:LoadVars = new LoadVars();
getDate.onLoad = function() {
theDate_txt.text = this.theDate;
};
getDate.load("http://localhost/phpflash/date.php");
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "the Fusion project" <webforumsuser@macromedia.com> wrote in message
news:dlg914$5qf$1@forums.macromedia.com...
Hey everyone,
I'm trying to test out integrating PHP with Flash by creating a Flash
document
that simply states the current date (information which is transferred from a
PHP document). My flash file just contains one dynamic text box with the
instance name "theDate_txt." The actions under the actions layer has the
following actionscript:
var dateDisplay:TextFormat = new TextFormat();
dateDisplay.font = "Georgia,Times,_serif";
theDate_txt.setNewTextFormat(dateDisplay);
theDate_txt.autosize = "left";
var getDate:LoadVars = new LoadVars();
getDate.load("http://localhost/phpflash/date.php");
getDate.onLoad = function() {
theDate_txt.text = this.theDate;
};
The "date.php" file has the following and is placed properly in the
phpflash
folder...
<?php
echo 'theDate='.urlencode(date('l, F jS, Y'));
?>
When I test the flash movie, no date comes up and it's simply blank. What
am I
doing wrong?