use java extension create room then joinroom fail

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
jenth
Posts: 14
Joined: 25 Aug 2009, 07:04

use java extension create room then joinroom fail

Post by jenth »

i use java extension create new room in server-side, when room is not existing it will create it. Now in client-side sendXtMessage create room and listener SFSEvent.onExtensionResponse then use sf.joinRoom ,the problem is sometime that success but sometime is fail. i find that in the server-side console where display trace create new room all success but joinroom function sometime is not receiver
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

You should join the room only when you receive the onRoomAdded event, not when your Extension replies.
Makes sense?
In other words you should execute the join call when in the client side onRoomAdded event.

As a side note, if you create the Room from server side you should probably also join it from there. It's easier.
The client will just receive a series of events:
1- onRoomAdded
2- onJoinRoom

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
jenth
Posts: 14
Joined: 25 Aug 2009, 07:04

Post by jenth »

Thank you for your help. i will try it again.
i find the reason is my server version is 1.6.6 ,but client API version is 1.6.2 when update to 1.6.6 that success
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hi,
server and client version are not the same, so this is expected.
I doubt that client side API can be version 1.6.2 because the latest update available is 1.6.1 and it's not even publicly available (it will be very soon)
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply