I am developing a multiplayer game and trying out the sfbits community edition components for the login and lobby features. It works fine except for when I try to load the components in a frame other than the first one.
If I am loading the classes in the 2nd frame and load the components in the same frame (I know that they should be loaded after the classes have been loaded already but that method gives another problem which I will describe later) then the preloader works properly but the components don't show up. Instead I see only a white rectangular box where the components were supposed to be.
If I uncheck the "Export in frame #N" checkbox from the components' properties then I get the error that "The class or interface 'SFSEvent' could not be loaded." for the function onLogin
The function is the standard one in one of the examples provided with the community edition and works perfectly when I am loading everything on frame 1:
Code: Select all
function onLogin(evt:SFSEvent):Void
{
var response:Object = evt.params.resObj
if (response.success) {
trace("logged in!");
gotoAndStop("lobby");
}
}
I will really appreciate it if anyone can give me some pointers as to how to solve this problem. Feel free to ask me about any details which I may have missed out on in this post.
Thanks.