0

swf が埋め込まれたシンプルなフレックスアプリを開発しました。基本的に、swf は Loadvars を使用して特定のデータベース テーブルからデータを取得します。OK、localhost でフレックス アプリをテストしたところ、問題なく動作し、埋め込まれた swf は sendAndLoad 呼び出しを正しく行いました。しかし!Web サーバー上にある場合、swf は正しく機能しません。sendAndLoad メソッドによって返される値がないことを意味しました。さて、いくつかのポイントを作るために: questionContentLoadVars.img1 は、php 呼び出しからの文字列を保持 (返す) します。この「img1」は、Web サーバーに配置された Flex アプリでのみ返される空の文字列です。それ以外の場合は、php 呼び出しから正しい値を返しますか?

gameplay22.swf がスタンドアロンの場合に動作します!

gameplay22.swf が HTML ページにある場合に機能します。

gameplay22.swf が FLex に埋め込まれ、LOCALHOST で実行されると動作します!

しかし、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"/>
4

0 に答える 0