API problem when publish

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Kawa
Posts: 9
Joined: 26 Mar 2005, 14:33

API problem when publish

Post by Kawa »

Great work Lapo!! It a great product.

But I found something error when publish your MX2004 examples. They can't connect and in flash status window it show

--------------------------------------------------------
WARNING! The API you are using are not compatible with
the SmartFoxServer you're trying to connect to
--------------------------------------------------------

I use your new API from your new packet ( just download today ) and no problem with your MX examples.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API problem when publish

Post by Lapo »

Kawa wrote:Great work Lapo!! It a great product.

But I found something error when publish your MX2004 examples. They can't connect and in flash status window it show
It looks like you haven't updated your API. The new API are version 0.9.0

Try this code in Flash:

Code: Select all

s = new SmartFoxClient()
trace(s.getVersion())
It will display your current API version. If it's not 0.9.0 then you're using some old API version. In such case uninstall them from the Macromedia Extension Manager and then install the new ones.

Let me know if it works! :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Kawa
Posts: 9
Joined: 26 Mar 2005, 14:33

Post by Kawa »

No, Lapo. Its already 0.9.0. I just upgraded today after download your new smartfoxbasic package (Windows). I try to uninstall-reinstall API and Smartfoxserver 2-3 times but same results. Maybe tomorrow I will test with another fresh PC and I will tell you again.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

If you open one of the example files and launch it (CTRL + ENTER) you should see these 2 lines as the very first in the Flash Output Window:

Code: Select all

[ Sending ]: <msg t='sys'><body action='verChk' r='0'><ver v='090' /></body></msg>
[Received]: <msg t="sys"><body action="apiOK" r="0" /></msg>
Do you see them? Are they different? If so, could you please copy and paste them here?

Thanks! :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Kawa
Posts: 9
Joined: 26 Mar 2005, 14:33

Post by Kawa »

It very strange Lapo.It show "v='080'" in Output windows.

[ Sending ]: <msg t='sys'><body action='verChk' r='0'><ver v='080' /></body></msg>

But in Extension manager it show 0.9.0 :shock:

"This extension installs the Actionscript 2.0 SmartFoxServer API (v.0.9.0) for Flash MX 2004

To use the SmartFoxServer API for AS 2.0 just use the import command: import it.gotoandplay.smartfoxserver.*"


So I try to uninstall and reinstall Macromedia Extension program but same result.

But after I uninstall and reinstall Flash MX2004 it work!!!

Maybe it's Macromedia bug!!!!

Thank you very much Lapo and sorry for waste your time. :D :D
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

No problem! I am glad it works! :D
Lapo
--
gotoAndPlay()
...addicted to flash games
Annecy
Posts: 9
Joined: 29 Mar 2005, 12:46

Post by Annecy »

I did have exactly the same problem.
Reinstalling only the extension manager has no effect.
I uninstall and reinstall Flash MX2004 then it work.

There is a problem somewhere... :?

Just a little thing in the config.xml file :
For MaxUserIdleTime 10 minutes is 600 and not 6000 s. :wink:

Michel
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

did you already have the SFS Lite components installed? If so did you try to unistall them? Did you have any problems uninstalling the old ones?

Also what version of the Extension Manager and Flash did you use?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

For MaxUserIdleTime 10 minutes is 600 and not 6000 s.
Thanks! That's 100 minutes :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Annecy
Posts: 9
Joined: 29 Mar 2005, 12:46

Post by Annecy »

The history with smartfox :
1 - I had installed smartfoslite 0.9.0 and his API components (0.8.0).
2 - I had installed smartfoslite 0.9.1, uninstall API components and reinstall the "new" ones (0.8.0) without knowing if there where new or not from the previous installation (because all seems work well).
3 - I had install smartfoxbasic 1.0.0 and I uninstall the smartfoxlite components for AS1 and AS2 (version 0.8.0), then restart Extension Manager and then install smartfoxbasic component for AS2 (version 0.9.0). As it does not work, I reinstall Extension manager... without success. So I had reinstall Flash MX 2004.

Extension manager version 1.6.063 even if I reinstall it from the macromedia web site where it indicate an 1.6.062 version without consequence on the problem.

Flash MX 2004 version 7.2
All are french version

Michel
Annecy
Posts: 9
Joined: 29 Mar 2005, 12:46

Post by Annecy »

Can the smartfoxlite and the smartfoxbasic API components could coexist ? Is it useful ?
Could we used smartfoxbasic components with smartfoxlite server ?

Michel
Annecy
Posts: 9
Joined: 29 Mar 2005, 12:46

Post by Annecy »

It seems that API lite 0.8 and API basic 0.9 could not coexist in Flash Extension Manager (even if of course I devalid one of the two to avoid conflict when compiling).
What I try with one of my game and with your smartfoxTris : I compile with API lite 0.8 valided and API basic 0.9 devalided and run the game on lite server : when one player leave a game room the other don't see the other have leaved the room (onRoomVariablesUpdate don't work). It works fine when running with basic server. So I imagine that Flash compiled with API 0.9 and not API 0.8 instead of directive.

That's a pity to developpe with both system : lite (server on production) and basic (server on test). So to switch I must uninstall and reinstall Falsh each time !. Is there a better solution ?

Michel
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Here's a solution >> http://forums.smartfoxserver.com/viewtopic.php?t=16

You can now download the API separately and just use them locally in your project folder.

Hope this helps :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Annecy
Posts: 9
Joined: 29 Mar 2005, 12:46

Post by Annecy »

My target is to be able to work on project for Lite and for Basic server.

So I have put API 0.9 "decompress" in one directory (as you give in zip)and the API 0.8 "decompress" in an other directory and uninstall all smartfox API in the Extension Manager. I chose as you suggest the place of the class smartfox to compile my project for Lite (0.8) or for Basic (0.9) server, but in final it always compile with API 0.9 !!? :cry:

Michel
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Annecy wrote:My target is to be able to work on project for Lite and for Basic server.

So I have put API 0.9 "decompress" in one directory (as you give in zip)and the API 0.8 "decompress" in an other directory and uninstall all smartfox API in the Extension Manager. I chose as you suggest the place of the class smartfox to compile my project for Lite (0.8) or for Basic (0.9) server, but in final it always compile with API 0.9 !!? :cry:

Michel
Sorry but it is not very clear what you mean.

The best thing to do if you want to develop for both Lite and Basic together is to keep the Lite API installed just like you would normally do, throught the Extension Manager; and then copy the SFS Basic API directly in the folder where your FLA is located.

Flash always looks first in the current project folder so there shouldn't be any problems. For example I've been using 3 different versions of the API on my computer without problems using this method.

What Flash version do you use?
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply