Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

746 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

13 Experts available now in Live!

Get 1:1 Help Now