The .swf files would load okay, and the background would load but as soon as this executed:
Code: Select all
public function onOpenSpaceMapRendered(evt:OpenSpaceEvent):void
{
os.createMyAvatar("dummy")
}
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
at com.smartfoxserver.openspace.avatar::Avatar()
at com.smartfoxserver.openspace.avatar::AvatarsManager/createAvatar()
at com.smartfoxserver.openspace.mvc::IsoEngineModel/createAvatar()
at com.smartfoxserver.openspace::OpenSpace/createMyAvatar()
at vw.app.modules::OpenSpaceCodeModule/onOpenSpaceMapRendered()[/Users/djacobs7/svn/vw_client/src/vw/app/modules/OpenSpaceCodeModule.as:211]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace::OpenSpace/forwardOpenSpaceEvent()
at com.smartfoxserver.openspace::OpenSpace/onMapRendered()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace.mvc::IsoEngineModel/onMapBuilt()
at com.smartfoxserver.openspace.map::MapManager/onMapGenerationCompleted()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace.utils.executor::MultiFrameExecutor/runStep()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
After a lot of debugging, I realized that this was caused by a Security Sandbox violation, because the createMyAvatar function tries to read in some classes from the AvatarsLibraryExample.swf. This requires a different level of permissions then simply reading in map files, which is why it did not break until this point.
I know Flex will occasionaly throw an error saying there was a security sandbox violation, and it would be helpful if OpenSpace.createMyAvatar could do the same so this would be easier to debug.
Thanks,
Daniel