Hi,
I'm using LoadVars to retrieve some data from a table using php. When I use
the app from within my Flash environment I am able to retrieve the info, but
once I post the swf to the website nothing happens. I"m posting to the same
remote page. I don't think LoadVars is even firing since the trace in my else
clause is not firing. Any ideas? Thanks.
var reserved = new LoadVars();
reserved.load("http://www.thefatblackpussycat.com/reservations/getReservedTables
.php");
reserved.onLoad = function(success)
{
if (success)
{
txtDate.text = reserved.dte;
lblRoom.text = reserved.room;
....
}
else
{
trace("failed");
}
}
When I load from the ide (using ctl/enter) the appropriate text boxes are
filled in. When I run the swf file on the website, nothing happens.
Ronnie
The Feldkircher - 14 Feb 2007 06:40 GMT
Hi
If your Website and php Target are on different domains then it wont work
unless you setup security to allowdomains.
The Trace function does not work outside of the Flash IDE, it gets ignored by
the Browser.
Hope it helps
MotionMaker - 14 Feb 2007 12:33 GMT
Another possible problem to eliminated is...
Reverse the order of these.
reserved.load("http://www.thefatblackpussycat.com/reservations/getReservedTables
.php");
{
...
}
reserved.onLoad = function(success)
reserved.onLoad = function(success)
{
...
}
reserved.load("http://www.thefatblackpussycat.com/reservations/getReservedTables
.php");
Since the onLoad property is dynamically assigned at run time it is possible
the load method completes before the onLoad property is assigned or at least
progress past the point it uses that property value.