PDA

View Full Version : How can i retrieve server-side code to flash


shendel101
07-09-2007, 09:06 AM
hello guys, im just to buil my data driven application im still newbie.. can anyone help with get var from php code to flash.. Im using LoadVars here is my code..

var lvFile:LoadVars = new LoadVars();

lvFile.load = function(bSuccess:Boolean){
if (bSuccess){
trace(lvFile.name1);
trace("loaded");
}
else{
trace("not loaded!!!!");
}
}
lvFile.load("http://localhost/web/final_website/Flash/test.php");



and here is my php code..

<?php
$name1 = "Its me!";
echo $name1;
?>

Im having undefined in my output panel in flash.. Can anyone help how to do it right? thanks guys for the help...

Flash Gordon
07-09-2007, 09:24 AM
echo "&name1=$name1";

shendel101
07-10-2007, 03:06 AM
thanks men.. you're great!

Flash Gordon
07-10-2007, 03:17 AM
cheers
:)