Solved

actionscript loadvars sendandload, will not work from any Browser, but will work from Flash 8 Test Movie

Posted on 2008-11-01
1
516 Views
Last Modified: 2013-11-11
Have seen this problem's description elsewhere but the solutions do not work for me.

There is nothing happenning in the apache log therefore guess it is some sort of security violation but could be wrong.

Have tried System.security.allowDomain ("*"); to no avail.

Code looks something like this ..

public function sendEmail () {
            var cgiURL = "http://www.zzzzzzzzzzzzzzzzz.com/cgi-sys/FormMail.cgi";
            trace ("x" + this.dataOut.contentType);
            this.dataIn.onLoad = function (success:Boolean):Void  {
                  trace ("no Error loading content.");
            };
            this.dataIn.onData = function (src:String) {
                        // Just hijacking this text field to display the results ..
                  _root.emailH.page.addressArea.text = src;
            };
            this.dataIn.onHTTPStatus = function (httpStatus:Number) {
                  this.httpStatus = httpStatus;
                  if (httpStatus < 100) {
                        this.httpStatusType = "flashError";
                  } else if (httpStatus < 200) {
                        this.httpStatusType = "informational";
                  } else if (httpStatus < 300) {
                        this.httpStatusType = "successful";
                  } else if (httpStatus < 400) {
                        this.httpStatusType = "redirection";
                  } else if (httpStatus < 500) {
                        this.httpStatusType = "clientError";
                  } else if (httpStatus < 600) {
                        this.httpStatusType = "serverError";
                  }
                       // Just hijacking this to display the results ..
                  _root.emailH.page.messageArea.text = this.httpStatus + " - " + this.httpStatusType;
            };
            this.setDataOut ();
            this.dataOut.contentType = "application/x-www-form-urlencoded";
            this.dataOut.sendAndLoad (cgiURL, this.dataIn, "POST");
            trace ("x" + this.dataOut.contentType);
      }  

It works from flash test movie but not from any browser and  returns no status codes (or text) ..

Thanks, ChrisColeman.
0
Comment
Question by:ChrisColeman
1 Comment
 

Accepted Solution

by:
ChrisColeman earned 0 total points
ID: 22857487
Ok, I solved it myself ..

The local sandbox allowed cross domain access to the cgi script.

The local server did not.

When installed in the same domain as the cgi script, all works ok ..

Many Thanks,

ChrisColeman.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question