在Action Script 2.0中加载PHP

时间:2011-11-25 18:52:57

标签: php flash actionscript actionscript-2

好的,我为我的网站创建了一个flash寄存器,非常简单。

这是主要代码:

var LoadRegisterVaribles:LoadVars = new LoadVars();
LoadRegisterVaribles.onData = function(Varibles:String) {
    error_mc.error_txt.text = Varibles;
};
LoadRegisterVaribles.load(
    "http://216.120.248.106/register/register.php?username=" + Username_mc.name_txt.text +
    "&password=" + Password_mc.pass_txt.text +
    "&email=" + Email_mc.email_txt.text + 
    "&color=" + _root.color_txt.text + "");

它的作用是加载register.php并在花哨的Flash GUI中添加扩展名。

完美地运作;但是当我将其上传到我的网站http://216.120.248.106/或www.spuffle.in时,它无法连接。 我有crossdomains.xml,允许(*)在每个目录中都有,但不起作用,交叉域适用于我网站上的其他内容,因此它们配置正确。 我还有Security.AllowDomains

Security.allowDomain('spuffle.in'); 
Security.allowDomain('spuffle.me'); 
Security.allowDomain('spuffle.us'); 
Security.allowDomain('play.spuffle.me');
Security.allowDomain('play.spuffle.in');
Security.allowDomain('play.spuffle.us');
Security.allowDomain('spuffle.me/play/');
Security.allowDomain('spuffle.in/play/');
Security.allowDomain('spuffle.us/play/');
Security.allowDomain('www.spuffle.in'); 
Security.allowDomain('www.spuffle.me'); 
Security.allowDomain('www.spuffle.us'); 
Security.allowDomain('www.spuffle.me/play/');
Security.allowDomain('www.spuffle.in/play/');
Security.allowDomain('www.spuffle.us/play/');
Security.allowDomain('media.spuffle.in/media/'); 
Security.allowDomain('media.spuffle.me/media/'); 
Security.allowDomain('media.spuffle.us/media/'); 
Security.allowDomain('www.spuffle.in/media/'); 
Security.allowDomain('www.spuffle.me/media/'); 
Security.allowDomain('www.spuffle.us/media/'); 
Security.allowDomain('*.spuffle.in/*/'); 
Security.allowDomain('*.spuffle.me/*/'); 
Security.allowDomain('*.spuffle.us/*/'); 
Security.allowDomain('216.120.248.106'); 
Security.allowDomain('216.120.248.106/register/'); 
Security.allowDomain('216.120.248.106/register/Pages/'); 
Security.allowDomain('216.120.248.106/register/register.php');

我该怎么办?

1 个答案:

答案 0 :(得分:0)

在HTML页面上嵌入SWF时,请尝试设置allownetworking参数:http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS1EFE2EDA-026D-4d14-864E-79DFD56F87C6.html