Actionscript 3 如何让parse.com与Flash Player一起工作?

Actionscript 3 如何让parse.com与Flash Player一起工作?,actionscript-3,flash,parse-platform,Actionscript 3,Flash,Parse Platform,我已经在iOS上使用了Parse.com,这很好,我也知道第三方actionscript/Parse API,但这只适用于AIR 所以我的问题是,如何让解析API与Flash web游戏一起工作?(我和Flash播放器在一起) 还有一个PHP解析API,我相信它使用Parse.com REST API,这是一个选项吗?或者Flash播放器有什么东西不能与parse API一起使用?Flash没有什么东西不能与parse rest API一起使用。如果你可以从PHP调用API,你可以从AS3、C+

我已经在iOS上使用了Parse.com,这很好,我也知道第三方actionscript/Parse API,但这只适用于AIR

所以我的问题是,如何让解析API与Flash web游戏一起工作?(我和Flash播放器在一起)


还有一个PHP解析API,我相信它使用Parse.com REST API,这是一个选项吗?或者Flash播放器有什么东西不能与parse API一起使用?

Flash没有什么东西不能与parse rest API一起使用。如果你可以从PHP调用API,你可以从AS3、C++、.NET或KLinux中调用它。p> flash player不能使用header,除非您是POST,并且正在发送数据/变量,如果您想在flash player中使用parse,您需要一个自定义的flash.net.urloader,这是我找到的一个,但由于某些原因,它在新版本的flash player中不起作用,下面是链接

我找到了一种执行working 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


希望能有帮助

这是指向第三方API的链接,如果向下滚动,您应该会看到其中显示“注意,Flash Player不允许修改HTTP身份验证头,因此此库仅使用AIR工作。我已在桌面和移动应用程序上对其进行了测试。”好的,那么你的意思是只使用Flash播放器中的PHP API?你可以用Flash来做auth头,只是不能用标准组件。菲尔,如果你需要这样的课程,我会给你发电子邮件。是否自定义标题、完整restful放置、删除等,谢谢,仍然感到困惑:),所以您的类可以直接从Flash播放器工作到Parse.com REST API?或者它是通过PHP实现的?这里有一个指向一个开源类库的链接,该类库的功能与我正在做的类似。它说它取代了Flex HTTPService组件,但我查看了它的代码,它是用纯as3编写的,我看不到它依赖于Flex。