1

次のコードを使用して、データを含む POST リクエストを別のドメインに送信しようとしています:

_snapshot_id = 1369022400;
var urlRequest:URLRequest = new URLRequest("https://fuzzykittens/radar");
urlRequest.method = URLRequestMethod.POST;
urlRequest.contentType = "application/x-www-form-urlencoded";

//set variables for post
var postVars:URLVariables = new URLVariables();
postVars.snapshot = String(_snapshot_id);
urlRequest.data = postVars;

//initialize weather proccess request
weatherProcRequest = new URLLoader(urlRequest);

weatherProcRequest.addEventListener(Event.COMPLETE,
    weatherProcRequest_CompleteHandler);
weatherProcRequest.addEventListener(IOErrorEvent.IO_ERROR,
    weatherProcRequest_ErrorHandler);
weatherProcRequest.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    weatherProcRequest_ErrorHandler);

weatherProcRequest.load(urlRequest);

HTML ラッパーを使用するようにフレックス コンパイラを設定すると、リクエストが機能します。ラッパーを使用しない場合、リクエストは io エラー #2032 をスローします。スナップショットIDを送信していないと思いますが、理由はわかりません。

html ラッパーでデバッグしたときにリクエストがデータを送信し、html ラッパーの外でデバッグしたときにデータを送信できない明らかな理由はありますか?

fuzzykittens には crossdomain.xml があり、

<allow-access-from domain="*" secure="false"/>
4

1 に答える 1