Page 1 of 1

BuildMap Error

Posted: 06 Jul 2009, 04:55
by trispo
Hey,

I have a problem after loading the map xml file. Sometimes my map is not parsed because of the following error:

Code: Select all

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at com.smartfoxserver.openspace.map::MapManager/buildMap()
	at com.smartfoxserver.openspace.map::MapManager/onParseCompleted()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at com.smartfoxserver.openspace.map::XmlMapParser/onXmlLoaded()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at flash.net::URLLoader/onComplete()
Most times, it is loaded and parsed correctly. I don't know what causes the problem. Does anyone know, waht can cause error? What instance can be null at this moment?

Thanks,
trispo

Posted: 06 Jul 2009, 08:17
by Bax
Can you please send the map with those issues?

Posted: 06 Jul 2009, 08:26
by trispo
I've already found the issue. The error occurs if OS is not on stage, right?

trispo

Posted: 06 Jul 2009, 10:49
by Bax
Can you better explain please?

Posted: 06 Jul 2009, 10:51
by trispo
I got this error when OpenSpace was not on the stage while it was building the map. If I use addChild(openSpace) it works.

Posted: 06 Jul 2009, 11:14
by Bax
Ok, thank you for reporting.