Hey!
I’ve now successfully installed my copy of Openfire. And now I want to do 2 things.
-
I want to make “openfire start” everytime I start my (Ubuntu 8.10) server.
-
Start developing a flash/as3-based chat.
How?
Documentation?
I’ve been searching around a while, and have not found anything great yet. I found a “simple” code though.
import org.jivesoftware.xiff.conference.Room;
import org.jivesoftware.xiff.core.JID;
import org.jivesoftware.xiff.core.XMPPSocketConnection;
import org.jivesoftware.xiff.events.LoginEvent;
import org.jivesoftware.xiff.events.RoomEvent;
import org.jivesoftware.xiff.events.XIFFErrorEvent;
var connection:XMPPSocketConnection;
function onCreationComplete():void
{
connection = new XMPPSocketConnection();
connection.username = “username”;
connection.password = “password”;
connection.server = “server.mydomain.com”;
connection.port = 5222;
connection.addEventListener(LoginEvent.LOGIN, onLogin);
connection.addEventListener(XIFFErrorEvent.XIFF_ERROR, onError);
connection.connect(“standard”);
}
function onLogin(e:LoginEvent):void
{
var room:Room = new Room(connection);
room.roomJID = new JID(“test@conference.mesh.local”);
room.addEventListener(RoomEvent.ROOM_JOIN, onRoomJoin);
room.join();
}
function onRoomJoin(e:RoomEvent):void
{
Room(e.target).sendMessage(“im here”);
}
function onError(e:XIFFErrorEvent):void
{
trace(e.errorCode);
}
Which someone said should work great. But doesn’t seem to work at all. I get the output
Room.as, Line 214 1017: The definition of base class ArrayCollection was not found. public Room extends ArrayCollection
Room.as, Line 1251 1020: Method marked override another method. override public function toString():String
Somebody help me, please?
Cheers,
Artheus