How to share "Starling" game in a facebook feed

493 views Asked by At

I want to share a part of the game that I made on facebook like it can be done in Angrybirds.

but the problem is that the game was written in starling and

I am getting this error "application is not correctly embeded"

and my question are

  1. can I use starling without hardware acceleration same how?
  2. if same know of a way to tell Facebook to embed the swf in direct mode?

Here it end Angrybirds example just past it on facebook

https://angrybirds-facebook.appspot.com/embed?levelId=9-1&levelName=Surf+and+Turf-1&score=56530

2

There are 2 answers

0
hanenbro On BEST ANSWER

I came across this issue on a project earlier in the year and unfortunately there's no current way to use Stage3D inside the Facebook timeline ('feed gaming' as opposed to a standard Facebook app), because the embedding that Facebook applies uses wmode:"opaque", and there's no option to change that through the FBML meta properties. More details here on what you can specify: https://developers.facebook.com/docs/games/feed-gaming/

In the case of Angry Birds, they use a stripped down version of their app (with just one level, I believe) for the timeline feed version, which doesn't use Starling or Stage3D.

And to answer your other question, you can use Starling with a software rendered fallback (where compatible graphics hardware isn't available), but it unfortunately will still go through Stage3D (as described here: http://www.bytearray.org/?p=3443), and if used without wmode:"direct" it will still fail with the error 3702: Context3D not available.

The workaround, then, if you need it to run in the Facebook timeline, is to either rebuild your application to use conventional display objects, and no Stage3D content, or to make a cut-back second version, which doesn't use Stage3D but links out to your fullblown version, inside a conventional Facebook app. Sorry for the bad news; I feel your pain.

2
KumoKairo On
  1. can I use starling without hardware acceleration same how?

No, it's a Stage-3D based engine so it will use hardware acceleration

  1. if same know of a way to tell Facebook to embed the swf in direct mode?

You should change your HTML wrapper file (where your flash is embeded), add a new param "wmode = direct" an it will work perfectly. The place where you should change your wmode param depends on what IDE you work with. With FlashDevelop or Flash Builder you just add

wmode: "direct" 

to the params array