0

I've developed a simple flex app with embedded swf. Basically swf use Loadvars to get data from particular database table. Ok, when I tested the flex app on localhost it is works fine and embedded swf make its sendAndLoad calls correctly. But! When it is located on the web server swf not work correctly. I meant there is not returned values by sendAndLoad method. Well, to make some points: questionContentLoadVars.img1 holds(return) the string from php call. This "img1" is an empty returned string only in Flex app placed in the web server otherwise it returns correct value from php call?

When gameplay22.swf is standallone works!

When gameplay22.swf is in HTML page works!

When gameplay22.swf is embedded in FLex and executed in LOCALHOST works!

But in the web server this embedded gameplay22.swf doesn`t works!

What is the problem with it?

//* 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"/>
olav
  • 1
  • 1
  • Hi , Ketan i've placed my code already. If u can look and make suggestion to find the solution! – olav Mar 31 '15 at 14:57
  • 1 - Why you are using ActionScript 2 ? 2 - Is your swf is loaded or just the data part of it ? 3 - Try to use an absolute URL for your PHP script ( like http://www.example.com/script.php ), and then you can use a Flash Player debug version from [here](https://www.adobe.com/support/flashplayer/downloads.html) to see if you have a security error. – akmozo Apr 01 '15 at 04:12
  • Actually, I'm using AS2 cause it is a programming language. My flash i.e swf is a small game. – olav Apr 01 '15 at 04:54
  • I find the answer finally. The problem is that flex app who embed the my swf file is causing this behavior . This flex code is a free downloading example so i`ve coded my own and voila ! Thanks for the replay guys! – olav Apr 01 '15 at 04:58

0 Answers0