Forum ActionScript 3.0 Error in sample UI?

Problems and discussions relating to ActionScript 3.0 here.

Error in sample UI?

Postby Cyclone103 » February 25th, 2010, 1:45 am

I believe I have found an error in the sample UI. (or I just failed again)
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.
Cyclone103
 
Posts: 155
Joined: January 18th, 2010, 6:47 pm

Re: Error in sample UI?

Postby Benjaminsen » February 25th, 2010, 11:27 am

Zip up the project and send it over, and I will look into the bug.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Error in sample UI?

Postby Cyclone103 » February 25th, 2010, 3:05 pm

K
Cyclone103
 
Posts: 155
Joined: January 18th, 2010, 6:47 pm

Re: Error in sample UI?

Postby Cyclone103 » March 12th, 2010, 1:16 am

Sorry for the bump, but it has been a while. Any progress?
Cyclone103
 
Posts: 155
Joined: January 18th, 2010, 6:47 pm


Return to ActionScript 3.0