To use it add this FBML tag to the page where your FB:swf tag is:
fb:fbjs_bridge
I then created a util function called getURL() to remind me of the good old days. This function first checks to see if it can make the navigateToURL() directly and if not uses the lc instead. This way the same movie will work as a standalone and on Facebook too:
public static function getURL(thisURL:String):void{
var request:URLRequest = new URLRequest(thisURL);
try{
navigateToURL(request);
}catch(er:Error){
// for Facebook
var conn: LocalConnection = new LocalConnection(); ;
conn.send("callFBJS", "document.setLocation",[thisURL]);
}
}
Here is more info onthe genesis of the problem:
http://bugs.developers.facebook.com/show_bug.cgi?id=994#c28
No comments:
Post a Comment