Creating rooms using XIFF and AS3

Hi, I am trying to create a room using the folowing,

function createRoom():void

{

if(chatRoom == undefined)

{

chatRoom = new Room(conn);

chatRoom.roomName = “coffeecorner”;

chatRoom.nickname = “Coffee Corner”;

chatRoom.conferenceServer = “conference.qkan00191117a:9090”;

chatRoom.addEventListener( “groupMessage”, chatEventHandler );

chatRoom.join();

}

}

  • and I am getting this error…*

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at org.igniterealtime.xiff.conference::Room/get roomName()

at org.igniterealtime.xiff.conference::Room/set conferenceServer()

at RosterPanel/::createRoom()

at RosterPanel/makeRoster()

at LoginScreenVersion1/::loginSucess()

at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFuncti on()

at flash.events::EventDispatcher/dispatchEvent()

at org.igniterealtime.xiff.core::XMPPConnection/org.igniterealtime.xiff.core:XMPPC onnection::sendAuthentication_result()

at Function/http://adobe.com/AS3/2006/builtin::apply()

at org.igniterealtime.xiff.core::XMPPConnection/org.igniterealtime.xiff.core:XMPPC onnection::handleIQ()

at org.igniterealtime.xiff.core::XMPPConnection/org.igniterealtime.xiff.core:XMPPC onnection::socketReceivedData()

it occurs exaclty when I call

chatRoom.roomName=“blah”

the new AS3 /XIFF beta 3 users/creators…did someone find this problem…? what can I do to test it…?

thanks

vivian.

vivian,

I think room.setRoomJID needs to be called before room.roomName. hope this helps.

room = new Room(connection);

room.setRoomJID(“myroom@conference.127.0.0.1”);

room.roomName = “myroom”;

room.conferenceServer = “conference.conference.127.0.0.1”;

thanks for that… it was the missing line

cheers

vivian