Page 1 of 1
[help] missing lib?
Posted: 20 Mar 2012, 20:39
by htpeng
Well, it's kinda weird but my LeaveRoomRequest class seems to be missing.
I write this code
Code: Select all
private function exitRoom(evt:Event):void {
sfs.send(new LeaveRoomRequest());
}
and I got this error :
1180: Call to a possibly undefined method LeaveRoomRequest.
I tried to import the class alone
Code: Select all
import com.smartfoxserver.v2.requests.LeaveRoomRequest;
instead of
Code: Select all
import com.smartfoxserver.v2.requests.*;
and I got this error :
1172: Definition com.smartfoxserver.v2.requests:LeaveRoomRequest could not be found.
Am I really missing it? If yes, how to get it?
Thanks
Re: [help] missing lib?
Posted: 20 Mar 2012, 22:32
by rjgtav
Hello.
Well, it seems that either you're using a corrupted library, and so you need to download a new one (download the latest update at
http://www.smartfoxserver.com/download/sfs2x#p=updates), or your project is corrupted. If you create a new Flash project, add that library to the library path, and import that class, does it work?
Re: [help] missing lib?
Posted: 22 Jun 2013, 04:46
by shaka
Any solution for this? I'm running into the same problem. I'm using flash CS5.5, but editing my code with FlashDevelop. I've imported a new version of the AS3 API. FlashDevelop knows that the LeaveRequestHandler exists and what it needs (it autofills it when I try), but when I try to compile the code, I get the same errors as in the original post.
Oh, the other requests work in the same code for some reason (Join Room, Create Room, Extension), which is why I think something might be wrong.
Re: [help] missing lib?
Posted: 22 Jun 2013, 08:06
by Lapo
There is no known problem with the latest release. I've tested it myself and it works under Flash and Flash Builder.
It's difficult to say what else might be wrong.
I know from experience that sometimes Flash can stubbornly refuse to compile a project, although I've never understood the reason. Sometimes a simple "Save As" of the FLA project to another file can fix the problem.
In a few instances though I had to create a brand new FLA and transport all the library and code back to the new file

Re: [help] missing lib?
Posted: 22 Jun 2013, 10:58
by shaka
EDIT: nvm. weird, I had to import the swc in flash cs5.5 instead of flashdevelop, even though I don't have any code there (and despite everything else working fine without importing the swc there). Works for now, so no complaints. Thanks for your help, Lapo!
Re: [help] missing lib?
Posted: 22 Jun 2013, 11:15
by Lapo
Cool, glad you solved it
