Can't add a custom listener for BitEvent.ROOM_CHANGE

Everything about the SmartFoxBits UI Components for SmartFoxServer 1.x. Post your questions, suggestions and bug reports.

Moderators: Lapo, Bax

ThierryStiegler
Posts: 15
Joined: 24 Feb 2009, 12:49
Location: France
Contact:

Can't add a custom listener for BitEvent.ROOM_CHANGE

Postby ThierryStiegler » 01 Apr 2009, 09:04

I want to create a specific frame who the user choose the room.

After he click on the RoomList instance (roombox), he go to the chat.

In the chat frame, there is a button to go back to my "room" frame.

Here the code of my "room" frame:

Code: Select all

import    it.gotoandplay.smartfoxbits.events.*
stop()

smartFox.getRoomList()   

roombox.showGameRooms = false
//roombox.defaultRoom = "Welcome"
roombox.refreshView()

roombox.addEventListener(BitEvent.ROOM_CHANGE, myChangeRoom)

function myChangeRoom(evt:BitEvent)
{
   trace("the selected room has change so handle it ! :)")
}



And the exception I got :

Code: Select all

ReferenceError: Error # 1056: Unable to create property selectedRoom on it.gotoandplay.smartfoxbits.bits.RoomList.
at it.gotoandplay.smartfoxbits.bits: RoomList / onListEvent ()
at flash.events:: EventDispatcher / dispatchEventFunction ()
At flash.events:: EventDispatcher / dispatchEvent ()
at fl.controls: SelectableList / handleCellRendererClick ()


I have to deal directly with roombox.userList ?

Cheers,

Thierry.
ThierryStiegler
Posts: 15
Joined: 24 Feb 2009, 12:49
Location: France
Contact:

Postby ThierryStiegler » 01 Apr 2009, 11:56

little typo, roomsList and not usersList ;)
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 01 Apr 2009, 12:01

This is a bug, thank you for reporting.
We will release an updated version within a few days.
Paolo Bax
The SmartFoxServer Team

Return to “SmartFoxBits for SFS 1.x”

Who is online

Users browsing this forum: No registered users and 1 guest