Flash : Local connection gives error
- by Fahim Akhter
I am trying to connect to FBJS bridge. It keeps giving me the following error.When I'm opening only one connection and I do not have any other window open.
ArgumentError: Error #2082: Connect failed because the object is already connected.
at flash.net::LocalConnection/connect()
at BabyVille()[C:\Documents and Settings\user\Desktop\babyville\flash\Main Project\src\BabyVille.as:56]
This is my code :
public class fbjsTest extends Sprite
{
private var connection:LocalConnection = new LocalConnection();
private var connectionName:String = LoaderInfo(root.loaderInfo).parameters.fb_local_connection;
public function fbjsTest()
{
connection.connect(connectionName);
}
}
That is on the Facebook page if I try to run it locally the following line returns null
LoaderInfo(root.loaderInfo).parameters.fb_local_connection
Any Ideas?