0

私はすでに iOS で Parse.com を使用していますが、これは素晴らしいことです。サードパーティの actionscript/parse API も知っていますが、それは AIR でしか機能しません。

私の質問は、解析 API を Flash Web ゲームで動作させるにはどうすればよいかということです。(つまり、Flashプレーヤーを使用しています)。

Parse.com REST API を使用する PHP Parse API もありますが、それはオプションでしょうか? それとも、解析 API で動作しない Flash プレーヤーに関する何かがありますか?

4

3 に答える 3

1

parse rest API で動作しない Flash はありません。php から API を呼び出すことができる場合は、as3、c++、.net、または klingon から呼び出すことができます。

于 2012-12-06T05:50:10.660 に答える
0

Parse サーバーへの有効な REST 呼び出しを実行する方法を見つけました

public function runParseCloudFunction(cloudFunctionName:String):void 
        {             
            if (parseRequestor != null){
                return;
            }           

            //Create the HTTP request object 
            var request:URLRequest = new URLRequest( "https://api.parse.com/1/functions/" + cloudFunctionName ); 
            request.method = URLRequestMethod.POST; 

            // Create Parse headers
            var headerAppID:URLRequestHeader = new URLRequestHeader("X-Parse-Application-Id", MY_PARSE_APP_ID);
            var headerRestKey:URLRequestHeader = new URLRequestHeader("X-Parse-REST-API-Key", MY_PARSE_REST_KEY);
            var headerContentType:URLRequestHeader = new URLRequestHeader("Content-Type", "application/json");
            request.requestHeaders.push(headerAppID);
            request.requestHeaders.push(headerRestKey);
            request.requestHeaders.push(headerContentType);

            //Add the URL variables, json encoded format (OPTIONAL)             
            request.data = '{"param1":"sample1","param2":"sample2","param3":"sample3"}';

            //Initiate the transaction 
            parseRequestor = new URLLoader(); 
            //requestor.dataFormat = URLLoaderDataFormat.TEXT;          
            parseRequestor.addEventListener( Event.COMPLETE, callParseCloudFunctionCompleted ); 
            parseRequestor.addEventListener( IOErrorEvent.IO_ERROR, callParseCloudFunctionError ); 
            parseRequestor.addEventListener( SecurityErrorEvent.SECURITY_ERROR, callParseCloudFunctionError ); 
            parseRequestor.addEventListener( HTTPStatusEvent.HTTP_STATUS, callParseStatusHandler);
            parseRequestor.load( request ); 
        }

クラウド解析 API バージョン1.3.2でテスト済み

それが役に立てば幸い!!

于 2015-04-15T12:50:59.637 に答える
0

あなたがPOSTでデータ/変数を送信していない限り、フラッシュプレーヤーはヘッダーを使用できません。フラッシュプレーヤーで解析を使用したい場合は、カスタムのflash.net.URLLoaderが必要です。これは私が見つけたものですが、何らかの理由でそうではありません新しいバージョンのフラッシュ プレーヤーでは動作しません。リンクは次のとおりですhttp://www.abdulqabiz.com/blog/archives/2006/03/03/http-authentication-for-httpget-requests-using-actionscript-3/

于 2013-08-14T04:31:50.273 に答える