0 Replies Latest reply on Mar 31, 2015 2:28 AM by valopaint

    How to make a Loadvars sendAndLoad request from embedded swf in flex


      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;




          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"/>