Please note that the flash stage is completely empty and no component need be placed on the stage.
The Flash code:
- Code: Select all
path = "http://localhost/xampp"; //declare path to php files
var mystr:String;
var lv = new LoadVars();
lv.sendToPHP = "hello php";
lv.onLoad = function(success){
if(success){
trace("Value from php: "+this.fromPHP);
mystr= this.fromPHP;
}
}
trace("mystr= "+mystr);
lv.sendAndLoad(path+"helloFlash.php",lv,"GET");
The PHP code:
- Code: Select all
<?php
if ($_GET["sendToPHP"] == "hello php")
{
echo "fromPHP=hello flash";
}
?>

