I am wondering if I can call a PHP script from AS3 and have it recognize only the vars that are echoed out. For example.
My PHP Script called GetMyVars.php
<?
Some code...
more code..
// I want to get these vars below into flash as3
echo "$MyVars"
echo "$MoreVars"
?>
Flash AS3 Script Calling GetMyVars.php
var fl_TextLoader:URLLoader = new URLLoader();
var fl_TextURLRequest:URLRequest = new URLRequest("GetMyVars.php");
fl_TextLoader.addEventListener(Event.COMPLETE, fl_CompleteHandler);
function fl_CompleteHandler(event:Event):void
{
var textData:String = new String(fl_TextLoader.data);
trace(fl_TextLoader.MyVars); /// I want this var in Flash
trace(fl_TextLoader.MoreVars); /// and this one too. :)
}
fl_TextLoader.load(fl_TextURLRequest);
Or what is the best way to do this. In short what I want to do is have a folder full of images. I want php to read those images and break them into arrays. Then I want to be able to have flash get the file names into an array and load the images fading on top of each other. Maybe there is an easier way to do this. Thanks for your kind help.