8 messages in com.googlegroups.opensocial-api[OpenSocial] Re: Making An OpenSocial...| From | Sent On | Attachments |
|---|---|---|
| gordon | 17 Jul 2008 10:52 | |
| Davi Sáránszky Mesquita | 17 Jul 2008 10:54 | |
| Tushar Vaghela | 18 Jul 2008 01:06 | |
| davew | 21 Jul 2008 16:21 | |
| justin kruger | 21 Jul 2008 16:53 | |
| davew | 21 Jul 2008 19:33 | |
| justin kruger | 22 Jul 2008 08:46 | |
| Aakash Bapna | 22 Jul 2008 15:36 |
| Subject: | [OpenSocial] Re: Making An OpenSocial Flash-Based Application![]() |
|---|---|
| From: | davew (dave...@gmail.com) |
| Date: | 07/21/2008 07:33:26 PM |
| List: | com.googlegroups.opensocial-api |
Justin,
Myspace is different - I still don't think they support getProxyUrl. The best way is to use the html/javascript method, then, on the same tab in the My Apps, upload an swf file to myspace's servers. Then get the url for the swf and then use that with SWFObject. If it doesn't initially work with SWFObject being a separate js file, then inline the script. (I forget if MySpace is still blocking external js files, or if they are letting some go through now..)
Dave
On Jul 21, 4:53 pm, "justin kruger" <just...@gmail.com> wrote:
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/... 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.
-Dave
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
--
-- Justin Krugerhttp://jDavid.net jDav...@gmail.com
"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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" group.
To post to this group, send email to open...@googlegroups.com
To unsubscribe from this group, send email to
open...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---




