Weiter zu Netlog

noch Sekunden

Developer / Documentation / OpenSocial tutorial: Flash and OpenSocial

Introduction

In this article we look at converting a Flash app to an OpenSocial app. This is generally straightforward, as you can easily embed a flash object right within the gadget XML spec. In fact a step-by-step approach, as we are merely tying together concepts from the previous tutorials (most importantly OpenSocial JS API) - and ActionScript is outside of the scope of this documentation.

Components needed

To turn a Flash application in an OpenSocial application (or 'gadget') you need the following ingredients:

  • An XML spec file - the 'skeleton' of every app which can hold regular HTML and JS. (What is this?)
  • The ActionScript 3.0 ExternalInterface class, to interface with JS functions from within your flash app.
  • The Gadgets.flash function to embed Flash content in gadgets.
  • And of course, all the other goodies of the OpenSocial JS API to add some social sauce to your application.
  • makeRequest to make calls to your own server.

Read about these if you want to take this approach:
gadgets.embedFlash - Calling JS from within a Flash movie - The OpenSocial JS API -