0

我开发了一个带有嵌入式 swf 的简单 flex 应用程序。基本上 swf 使用 Loadvars 从特定的数据库表中获取数据。好的,当我在 localhost 上测试 flex 应用程序时,它工作正常,嵌入式 swf 使其 sendAndLoad 调用正确。但!当它位于 Web 服务器上时,swf 无法正常工作。我的意思是 sendAndLoad 方法没有返回值。好吧,要说明几点: questionContentLoadVars.img1 保存(返回)来自 php 调用的字符串。此“img1”是仅在放置在 Web 服务器中的 Flex 应用程序中返回的空字符串,否则它会从 php 调用返回正确的值?

当gameplay22.swf 是独立的作品!

当gameplay22.swf 在HTML 页面中有效!

当gameplay22.swf 嵌入Flex 并在LOCALHOST 中执行时就可以了!

但是在网络服务器中,这个嵌入的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"/>
4

0 回答 0