[help] missing lib?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
htpeng
Posts: 9
Joined: 12 Mar 2012, 20:13

[help] missing lib?

Post 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
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: [help] missing lib?

Post 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?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
shaka
Posts: 45
Joined: 30 May 2011, 19:39

Re: [help] missing lib?

Post 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.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [help] missing lib?

Post 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 :(
Lapo
--
gotoAndPlay()
...addicted to flash games
shaka
Posts: 45
Joined: 30 May 2011, 19:39

Re: [help] missing lib?

Post 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!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [help] missing lib?

Post by Lapo »

Cool, glad you solved it :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply