Error in output:
- Code: Select all
TypeError: Error #1010: A term is undefined and has no properties.
at sample.ui::Chat/onMessage()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at bridge::Connection/::handleMessage()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at bridge.utils::BinarySerializer/::onMessage()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ::MessageBuilder/AddValue()
at bridge.utils::BinarySerializer/::onValue()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ::TokenBuilder/AddByte()
at bridge.utils::BinarySerializer/AddByte()
at MethodInfo-280()
Code:
- Code: Select all
public function onMessage(m:Message, id:String, message:String){
if(content.numChildren > 50){
content.removeChild(content.getChildAt(0));
}
content.addChild(
new Label(users[id].text + ": " + message, 12, TextFormatAlign.LEFT, 0x0, true)
)
base.reset();
container.scrollY = 100000
}
Error in log:
- Code: Select all
null
in callback handler for Connection.addMessageHandler("ChatMessage")
This error occurs when the second person to join receives the ChatMessage message.
- Code: Select all
Case "ChatMessage"
For Each p As SagaMountainPlayer In Players
If p.Location.Map = player.Location.Map Then
p.Send("ChatMessage", player.Id, message.GetString(0))
End If
Next
I don't fully know if this is caused by me or if it was an issue with the sample UI.