Apache flex 如何从flex中的嵌入式swf发出Loadvars sendAndLoad请求

Apache flex 如何从flex中的嵌入式swf发出Loadvars sendAndLoad请求,apache-flex,flash,actionscript-2,loadvars,Apache Flex,Flash,Actionscript 2,Loadvars,我开发了一个带有嵌入式swf的简单flex应用程序。基本上,swf使用Loadvars从特定的数据库表中获取数据。好的,当我在localhost上测试flex应用程序时,它运行良好,嵌入式swf正确地进行了sendAndLoad调用。 但是当它位于web服务器上时,swf无法正常工作。我的意思是sendAndLoad方法没有返回值。 好吧,我想说几点:questionContentLoadVars.img1 holds从php调用返回字符串。此img1仅在web服务器中放置的Flex应用程序中为

我开发了一个带有嵌入式swf的简单flex应用程序。基本上,swf使用Loadvars从特定的数据库表中获取数据。好的,当我在localhost上测试flex应用程序时,它运行良好,嵌入式swf正确地进行了sendAndLoad调用。 但是当它位于web服务器上时,swf无法正常工作。我的意思是sendAndLoad方法没有返回值。 好吧,我想说几点:questionContentLoadVars.img1 holds从php调用返回字符串。此img1仅在web服务器中放置的Flex应用程序中为空返回字符串,否则它将从php调用返回正确的值

当gameplay22.swf是标准的时候,它就可以工作了

当gameplay22.swf在HTML页面中时,它会工作

当gameplay22.swf嵌入FLex并在LOCALHOST works中执行时

但是在web服务器上,这个嵌入式gameplay22.swf不起作用

有什么问题吗

//* here is flash(swf) part of gameplay22.swf file which is embedded in the Flex by SWFLOader(gameplay22.swf)

questionContentLoadVars = new LoadVars();
questionContentLoadVars.onLoad = function(success){
    if (success){
        slidingSvityk_mc.descripTA_mc.description_ta.text = questionContentLoadVars.theContent;
    }
    else  
    {
        slidingSvityk_mc.description_ta.text = "err!";      
    }
};

function loadQuestionData(sectionID){
    var tablename ='questionsgeo';  // database tablename
    //sending variables to the PHP script
    questionContentLoadVars.row = sectionID;
    questionContentLoadVars.tablename = tablename;
    questionContentLoadVars.id_ = "";
    questionContentLoadVars.img1 = "";
    questionContentLoadVars.sendAndLoad("getQuestionRec.php",questionContentLoadVars,"_POST");
};

function showLoadedGalleryImages():Void{
    infphp.text = questionContentLoadVars.img1;

    var img1Bulk:MovieClip = new MovieClip();

    img1Bulk = imgGalleryContainer_mc.img1Bulck_mc.createEmptyMovieClip(img1Bulk, _root.getNextHighestDepth());
    img1Bulk._x = 0;
    img1Bulk._y = 0;    
    image_mcl.loadClip(questionContentLoadVars.img1, img1Bulk);
};


//* And here is Flex part of embedded SWFLOader(gameplay22.swf) component 

<s:SWFLoader includeIn="user" width="1024" height="768" horizontalCenter="0" source="gameplay22.swf" verticalCenter="0"/>

嗨,科坦,我已经把密码放好了。如果你能寻找并提出建议来找到解决方案!1-为什么要使用ActionScript 2?2-您的swf是否已加载或只是其中的数据部分?3-尝试为PHP脚本使用绝对URL,然后可以使用中的Flash Player调试版本来查看是否存在安全错误。实际上,我使用的是AS2,因为它是一种编程语言。我的flash即swf是一个小游戏。我终于找到了答案。问题是嵌入MySWF文件的flex应用程序导致了这种行为。这个flex代码是一个免费下载的例子,所以我已经编写了自己的代码,瞧!谢谢你们的重播!