Latest Entries

FBFlashBridge: v0.1

0.1. That’s right. A new version. There won’t be a 0.2 or so but it looks nice, don’t you think?

Anyway, I threw away the old library (http://www.wellconsidered.be/blog/2009/01/04/facebook-connect-to-actionscript-3/ all comments are closed now) and reworked the idea of a library and choose an implementation more based on Javascript and less on Flash. More on generic output instead of nicely formatting everything.

This is how a common request will happen now:

  • you call a Javascript specific function (the ones that are implemented in the lirbary) from Flash
  • Javascript sends the request to Facebook
  • Facebook returns result as described in their API (so they are subject to change if Facebook decides to)
  • Javascript captures response and sends it as a native Flash object/array to Flash
  • all the parsing is done by you in Flash

Why did I simplified it so much?

Well, first of all there is a very extensive official library from Adobe itself which does everything you need. It is kind of useless to maintain an obsolete library. That one is very obvious, isn’t it?

Secondly, I find the quite dangerous to support a third party interface on two levels: Javascript and Flash. So I didn’t do any Flash implementation, except for the calls to Javascript.

Lastly, the library is now, more than before, perfectly useable in an HTML / Javascript application. I gave it an as3 touch so you can easily work with eventlisteners and more.

Code examples

Also available on Gist

Javascript startup

Flash setup

Documentation

You can find a generated jsdocs at http://fbflashbridge.wellconsidered.be/docs/. The sample application at http://fbflashbridge.wellconsidered.be/ will show you how requests are given to Flash and thus how you need to parse them accordingly.

Facebook Connect & OpenSocial: Libraries

From time to time I tend to release some code we produce at Proximity BBDO. Most of the time they are related to implementations of existing code libraries: wrappers for Javascript frameworks like Facebook Connect and OpenSocial. There have been a lot of questions lately about the whereabouts of the libraries, so here’s an overview.

Note: I know I’m mixing git and svn, but the reason is that we use svn at Proximity BBDO and I use git at home, so the libraries are on svn and the examples and javascript/html files are on git. Sounds stupid, but I think you should learn both VCS technologies anyway :)

Actionscript 3 – Facebook Connect Flash Bridge

A Javascript to Flash bridge to connect to Facebook through the Facebook Connect library. Some examples using the library can be found at http://www.thefwa.com/50million/ and various campaigns we produce at Proximity BBDO (Belgacom, Pepsi, Cecemel, …).
There is a refactor in the work. Stay tuned!
Work example at http://stream.microsite.be/cecemel
The Actionscript 3 library at
http://code.google.com/p/as3fbflashbridge/
The Javascript + HTML files at
http://github.com/pierot/fbflashbridge/tree/master

Actionscript 3 – OpenSocial Flash Bridge

Applications deployed on a social platform implementing OpenSocial (like Netlog, Orkut and MySpace) can use this Javascript / AS3 library to connect to all some of the features of OpenSocial in a Flash website.
Work example can be found at http://stream.microsite.be/dev/netlog/osflashbridge.xml (you need to run this in an OpenSocial sandbox).
The Actionscript 3 library at http://code.google.com/p/as3osflashbridge/
The Javascript + HTML files at http://github.com/pierot/osflashbridge/tree/master

Actionscript 3 – Google Friend Connect Flash Bridge

Based on the OpenSocial Flash Bridge, the Google Friend Connect Flash Bridge leverages the login capabilities of Google Friend Connect for Flash websites. You need the OpenSocial Flash Bridge to use this one.
Work example can be found at http://stream.microsite.be/dev/as3googlefriendconnect/
The Actionscript 3 library at http://code.google.com/p/as3googlefriendconnect/

Actionscript 3 JayRock Wrapper

Very small project which connects to a JayRock service built in .NET.
More info on JayRock: http://jayrock.berlios.de/
The Actionscript 3 library at http://code.google.com/p/as3jayrock/

Adobe and Facebook, Connect

Adobe and Facebook have connected since last week. Adobe has picked up an open source Actionscript 3 library from Google Code and reworked it to an official Adobe library for Flash applications on Facebook. Since there are 10.000+ applications on Facebook and countless of them are made in Flash, the developer base who benefit from this is huge. Which is great of course.

The library supports Facebook Connect as well, so, people developing for the Facebook platform can easily reuse there code if they want to incorporate Facebook Connect for external use. It works kind of the same as my implementation: using a small javascript side and fully implemented actionscript part.
I would encourage you to start using the officially supported library as it is … supported and fully implemented :)

Have fun developing for Facebook!

OpenSocial to Actionscript 3

I’ve been busy exploring the various social platforms for campaign integration. At Proximity BBDO we have successfully launched a campaign with Facebook Connect for Cécémel and our first OpenSocial integration on Netlog for Snickers. Both frameworks are very alike and different at the same time.

Facebook Connect extends an existing framework, that was available on Facebook itself for application development, and allows you to leverage the same functionality on any external site. This is great, because your website can be loosely coupled with Facebook and still keep its own identity and branding.

OpenSocial requires your application to live on a platform that supports OpenSocial. It is more a library that is available to you that is built with a certain feature set and OpenSocial is the interface to it. You may also notice that I talk about an application instead of a website. It’s not that websites can’t use OpenSocial as such but it goes more to the application direction.

From an advertising perspective, both frameworks can work for a campaign, the success depends more on the platform you choose than which framework you are going to implement.

You may have seen my last blog post about a Facebook Connect to Flash bridge and so now, there is a second Flash bridge, for OpenSocial this time. We used it internally for the Netlog application and it turned out to be pretty easy to utilize.

An example application can be tested in the sandbox of your preferred social platform which supports OpenSocial (Netlog, Orkut, MySpace, …).

OpenSocial Flash Bridge

There are some downsides when using the library on different browsers. When in production, OpenSocial sometimes sends different formatted objects with results back to the front-end.
I’m not sure why it happens in IE7 on one machine and doesn’t on another machine. Those little things, we fixed for now but it still requires some more testing and debugging.

If you have any questions about, or you want to download the full library, drop me an e-mail at pieter@wellconsidered.be or pieter.michels@proximity.bbdo.be.

Future of Flash Communication through RTMFP

This is the third post of my Adobe MAX Milan 2008 notes.
Read the first one about Adobe FMS 3.5 and multi-bitrate streaming and the second one about Searchable Video Content.

RTMFP, Real Time Media Flow Protocol, we have heard about this feature a few times, some weeks ago, at the Adobe MAX sneak previews and it got silently introduced in Flash Player 10.

At the moment we have some implementations for communicating with Flash Media Server and other third-party real-time servers: RTMP, RTMPT (for HTTP tunneling, but has a bad overhead), RTMPS (Secure comm. over HTTPS, so is in fact RTMPT + the S), RTMPE (light-weight encryption for stream protection), RTMPET (RTMPE plus tunneling). But they all have some downsides: they have a certain latency, only client-server communication possible, lossless and only TCP based.

Real Time Media Flow Protocol
RTMFP introduces a UDP based protocol for client to client communication. With the release of Flash Media Server 3.5 today, we have the ability to actually use it in combination with Flash Player 10. You might not be able to install FMS 3.5 yet but you can use an online service called Stratus from Adobe to start experimenting with RTMFP.

To use RTMFP we always need a Flash Media Server. The FMS server needs to introduce the clients to each other before the clients can connect to eachother. There is very good reason for this: clients only connect through a unique ID, and not the ip address for obvious security reasons.

After two clients connect there is direct communication between them. But what now?
What about:

  • direct streaming of your webcam and microphone to another client: video/telephony.
  • multiplayer games without a server hosting the game communication logic
  • file sharing: sending one file to another like you would with a IM client/service

As you can see, the functionality is already possible right now with p2p communication but the advantage in this situation is that the FMS server doesn’t need to handle all the data flowing in each application. All data transfer will happen directly between clients.

Some other key features of RTMFP:

  • Prioritizing media and in particular the Speex protocol for audio communications (Speex: audio priority, live and unbuffered, video always follows audio)
  • IP address mobility when losing connection, switching network connection: session can stay up. After connection loss: fast recovery.
  • Encrypted with AES-128, SSL if needed and Diffin-Hellman key exchange for encryption
  • UDP 1935 for connection establishment, afterwards higher UDP port possible

I will start playing with Stratus very soon and might post some more about this later.



Copyright © 2004–2009. All rights reserved.

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.