5 Replies Latest reply on May 22, 2006 4:27 PM by Newsgroup_User

    sendAndLoad problem 

    joraia
      So it's work when i strat it from Flash as "CRL + ENTER" but when i start it from html from my appache it won't to work .I need help
        • 1. Re: sendAndLoad problem
          Level 7
          When running from Apache do you have http:// in the url browser line?

          --
          Lon Hosford
          www.lonhosford.com
          May many happy bits flow your way!
          "joraia" <webforumsuser@macromedia.com> wrote in message
          news:e3f6c3$rst$1@forums.macromedia.com...
          So it's work when i strat it from Flash as "CRL + ENTER" but when i start it
          from html from my appache it won't to work .I need help

          var loadVar_hash:LoadVars = new LoadVars();
          loadVar_hash.onLoad = function(success:Boolean) {
          if (success) {
          user_hash = loadVar_hash.user_hash;
          var1 = user_hash;
          }
          };

          loadVar_hash.sendAndLoad(" http://domain.com/videos/get_profile_hash.asp?user_id=
          56317", loadVar_hash, "POST");


          • 2. Re: sendAndLoad problem
            TheCosmonaut Level 1
            I'm having the same issues doing my tell a friend script. I have a PHP posted on my server. The PHP uses $_RECEIVER to process the variables sent by Flash. Here's the results of my tests:

            1. If I pass the variables to the PHP file in the URL, the PHP executes successfully and I receive an email.
            2. If I pass the variables to the PHP file using the Flash file while testing locally (CTRL+ENTER), the PHP executes successfully and I receive an email.
            3. If I pass the variables to the PHP file using the Flash file posted on the server, the PHP does NOT execute successfully and I do not receive an email.

            I've never heard of this kind of thing happening before. Anyone have any ideas?

            --eric
            • 3. Re: sendAndLoad problem
              Level 7
              I only use $_REQUEST for PHP.
              >the PHP does NOT execute successfully and I do not receive an email.
              What does "NOT execute successfully" mean? Do you have an error message?
              Does the PHP script work from a normal HTML form running from the server?
              Is the server script in the same domain as the Flash movie?

              Flash really only sends data to a server script, so the problem appears to
              be more connecting to the script, the script, the data send to the script
              and such.

              --
              Lon Hosford
              www.lonhosford.com
              May many happy bits flow your way!
              "TheCosmonaut" <webforumsuser@macromedia.com> wrote in message
              news:e4l5cb$ssb$1@forums.macromedia.com...
              I'm having the same issues doing my tell a friend script. I have a PHP
              posted
              on my server. The PHP uses $_RECEIVER to process the variables sent by
              Flash.
              Here's the results of my tests:

              1. If I pass the variables to the PHP file in the URL, the PHP executes
              successfully and I receive an email.
              2. If I pass the variables to the PHP file using the Flash file while
              testing
              locally (CTRL+ENTER), the PHP executes successfully and I receive an email.
              3. If I pass the variables to the PHP file using the Flash file posted on
              the
              server, the PHP does NOT execute successfully and I do not receive an email.

              I've never heard of this kind of thing happening before. Anyone have any
              ideas?

              --eric


              • 4. sendAndLoad problem 
                TheCosmonaut Level 1
                Well, it's hard for me to see what's happening with the PHP because sendAndLoad is not getURL and therefore I don't get to see what the PHP is returning. However, the PHP does work (echoes "success" and sends an email) from a regular HTML form. Both the script and the PHP are in the same domain. But I see what you're getting at: the security sandbox restrictions with sendAndLoad.

                I added the following code to the script and everything started working like a charm:

                //set security to allow fx domain
                System.security.allowDomain("liveserver.com");
                System.security.allowDomain("developmentserver.net");
                System.security.allowInsecureDomain("*");


                Works for me
                • 5. Re: sendAndLoad problem
                  Level 7
                  Great. If work go with it. I suspect there is something in the script or PHP
                  headers that also points to another domain that is causing this need. But if
                  it work - it works.

                  --
                  Lon Hosford
                  www.lonhosford.com
                  May many happy bits flow your way!
                  "TheCosmonaut" <webforumsuser@macromedia.com> wrote in message
                  news:e4sqi4$9qf$1@forums.macromedia.com...
                  Well, it's hard for me to see what's happening with the PHP because
                  sendAndLoad
                  is not getURL and therefore I don't get to see what the PHP is returning.
                  However, the PHP does work (echoes "success" and sends an email) from a
                  regular
                  HTML form. Both the script and the PHP are in the same domain. But I see
                  what
                  you're getting at: the security sandbox restrictions with sendAndLoad.

                  I added the following code to the script and everything started working
                  like a
                  charm:

                  [Q//set security to allow fx domain
                  System.security.allowDomain("liveserver.com");
                  System.security.allowDomain("developmentserver.net");
                  System.security.allowInsecureDomain("*");<hr></blockquote>

                  Works for me