8 messages in com.googlegroups.opensocial-api[OpenSocial] Re: Making An OpenSocial...
FromSent OnAttachments
gordon17 Jul 2008 10:52 
Davi Sáránszky Mesquita17 Jul 2008 10:54 
Tushar Vaghela18 Jul 2008 01:06 
davew21 Jul 2008 16:21 
justin kruger21 Jul 2008 16:53 
davew21 Jul 2008 19:33 
justin kruger22 Jul 2008 08:46 
Aakash Bapna22 Jul 2008 15:36 
Subject:[OpenSocial] Re: Making An OpenSocial Flash-Based Application
From:justin kruger (just@gmail.com)
Date:07/21/2008 04:53:34 PM
List:com.googlegroups.opensocial-api

do you have more information on uploading the flash file to mysapce, we have yet to get our myspace opensocial app working. i am wondering if that is part of the problem, because we are using swfobject to load our flash.

On Mon, Jul 21, 2008 at 4:22 PM, davew <dave@gmail.com> wrote:

hi Gordon,

Honestly I've found that using a combination of javascript and Flash is the best way to go.

The benefits of going javascript + Flash (using the ExternalInterface) are:

[1] By using a combination of javascript + Flash you can take advantage of things like container prefetching. In javascript, if your application always requests the viewer and owner information then the containers will typically prefetch that data and make it available to your app straight away. It's a good thing to take advantage of because it helps your app load faster. Obviously if you used pure Flash then there's no way to take advantage of prefetching of data, and you'll have to make a REST call every time your app loads. (You can read about prefetching here:
http://code.google.com/apis/orkut/articles/latency.html#prefetch)

[2] There's a lot of great javascript examples out there that you might want to make use of. It's very easy to grab a bunch of code from, say Lane and Jason's opensocial articles, and wrap them in a function that you can call via the Flash ExternalInterface.

[3] So far, when a container releases container specific extensions, they typically release them as a javascript api first. If you use pure Flash it's unlikely you'd have access to the api. However, by using the ExternalInterface + javascript you can call those javascript container extensions just like everyone else. An example is myspace's postTo - you can call it from javascript, you can't call it via REST.

There's an example of how to create a Flash app here using SWFObject + getProxyUrl: http://groups.google.com/group/opensocial-orkut/browse_thread/thread/833621ff612de633/3ee014db88235f4b?lnk=gst Things are slightly different on myspace (you can upload your swf file to their servers and then reference that url instead of using getProxyUrl). For the ExternalInterface part - simply call ExternalInterface.call(javascript_method_name, params); where javascript_method_name is a function to update app data, or send a notification, etc.

On Jul 17, 10:52 am, gordon <ghem@gmail.com> wrote:

Can someone please explain the process of making a flash application based on the Opensocial API? It seems that none of the social networks have the REST api implemented and are all geared towards javascript widgets. Am I going to have to put the object/embed markup inside the module content and then use ExternalInterface to call the opensocial javascript methods? Is that even allowed? Is there a better way?

Any help would be greatly appreciated. -Gordon

"If you are successful, it is because somewhere, sometime, someone gave you a life or an idea that started you in the right direction. Remember also that you are indebted to life until you help some less fortunate person, just as you were helped." --Melinda Gates