Solved

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

Posted on 2008-11-01
1
515 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The viewer will learn how to dynamically set the form action using jQuery.
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now