I want to build an application with Flash CS5 that will use an API that returns responces in JSON. How can i do it in Flash?
Another question that can go开发者_如何转开发 in this thread is... How can i use an AJAX API like Google's transliteration with Flash?
as3corelib features a JSON de-/encoder: http://github.com/mikechambers/as3corelib/tree/master/src/com/adobe/serialization/json/
Regarding Google transliteration API, you should be able to get something going by using the External Interface class.
ExternalInterface can manage back & forth calls between Javascript & AS3, so you should be able to send some text content from Flash and get the translation in return.
Now, handling the translation display may not be as straightforward within Flash as it is with HTML, but that's another issue. Try it and please let us know!
精彩评论