I am building an XIFF chat client with a whiteboard for a school networking project and I’ve run into some problems utilizing the Path class serializeSegments() method. Each time it attempts to serialize I get the following error:
Error #1009: Cannot access a property or method of a null object reference.
Fault, serializeSegments() at Path.as:124
I am trying the following simple example to construct the message as stated in a previous post, however, I made a modification since it would not compile using the WhiteboardExtension object as a parent XMLNode for p.serialize( wb );
// Construct a XIFF message
var message:Message = new Message(whiteboardEvent.getJID(), null, null, null, Message.CHAT_TYPE);
var a:XMLNode = new XMLNode(1, null);
var wb:WhiteboardExtension = new WhiteboardExtension();
var p:Path = new Path(); p.addPoints(5, 5, 7, 7); p.serialize(a)
If anyone could point out anything I might be doing wrong or point me to a more concrete example it would be greatly appreciated.