My flash works fine when I run it in the flash player, but does not work in the web browser… The yourName field is always undefined when I run it in the browser.
this is my AS
// for select query
var select_lv:LoadVars = new LoadVars();
// create a string to show where to access the PHP script
var filepath:String;
if (_url.indexOf(“http”) != 0) filepath = “http://localhost/tutorial/”;
else filepath = “…/test/”;
select_lv.onLoad = function(ok:Boolean) {
yourName=this[“nickname”];
}
select_lv.sendAndLoad(filepath + “getscores.php”, select_lv, “GET”);
and my php is just
<?php
echo ‘&nickname=bob&’;
?>
When I tried to preview the flash file locally in firefox I get a pop up saying:
adobe flash player has stopped a potentially unsafe operation.
The following local application on your computer or network:
blabla.swf
is trying to communicate with this Internet-enabled location:
my ip address
to let this application communicate with the Internet, click settings.
You must restart the application after changing the settings.
I am going to assume facebook is probably trying to block the same action
Can you guys send me a link or tutorial as to how I can get flash to interact with the variables in php?