When I invoke the createMyAvatar method from the open space object, I am receiving the following error:
method invokation
Code: Select all
_os.createMyAvatar("WalkingAvatar", null, skin, null, 0);
Code: Select all
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.smartfoxserver.openspace.mvc::IsoEngineModel/createAvatar()
at com.smartfoxserver.openspace::OpenSpace/createMyAvatar()
at com.teampalz::World/_onAvatarAssetsRetrieved()[C:\Users\Paul\teampalz_workspace\TPZ_TRUNK\dev\lib\as3\com\teampalz\World.as:272]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.teampalz::Seed/_sfs_onExtensionResponse()[C:\Users\Paul\teampalz_workspace\TPZ_TRUNK\dev\lib\as3\com\teampalz\Seed.as:195]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at it.gotoandplay.smartfoxserver.handlers::ExtHandler/handleMessage()[C:\Users\Paul\teampalz_workspace\TPZ_TRUNK\dev\lib\as3\it\gotoandplay\smartfoxserver\handlers\ExtHandler.as:52]
at it.gotoandplay.smartfoxserver::SmartFoxClient/xmlReceived()[C:\Users\Paul\teampalz_workspace\TPZ_TRUNK\dev\lib\as3\it\gotoandplay\smartfoxserver\SmartFoxClient.as:2673]
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleMessage()[C:\Users\Paul\teampalz_workspace\TPZ_TRUNK\dev\lib\as3\it\gotoandplay\smartfoxserver\SmartFoxClient.as:3014]
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleSocketData()[C:\Users\Paul\teampalz_workspace\TPZ_TRUNK\dev\lib\as3\it\gotoandplay\smartfoxserver\SmartFoxClient.as:2996]
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<OpenSpace>
<!-- Map rendering parameters -->
<TileSize>60</TileSize>
<TileRatio>0.5</TileRatio>
<ShowTileElevation>1</ShowTileElevation>
<ShowTilesGrid>0</ShowTilesGrid>
<ShowTilesFill>0</ShowTilesFill>
<TileCustomParamsSeparator>|</TileCustomParamsSeparator>
<ProcessedTilesPerFrame>60</ProcessedTilesPerFrame>
<!-- Controller parameters -->
<ControllerType>mouse</ControllerType>
<Use8Directions>1</Use8Directions>
<UseHandCursor>0</UseHandCursor>
<!-- Scrolling parameters -->
<UseSmartScrolling>1</UseSmartScrolling>
<ScrollSensorSize>10</ScrollSensorSize>
<ScrollPercentage>50</ScrollPercentage>
<ScrollTime>250</ScrollTime>
<ScrollTransition>easeOutSine</ScrollTransition>
<UseContinuousScrolling>1</UseContinuousScrolling>
<!-- Avatar parameters -->
<EnableAvatarMouseEvents>1</EnableAvatarMouseEvents>
<UseHandCursorOnAvatars>1</UseHandCursorOnAvatars>
<EnablePixelCollisionCheck>0</EnablePixelCollisionCheck>
<AvatarTypes>
<AvatarType type="WalkingAvatar" className="com.teampalz.avatars.WalkingAvatar" animTime="400" stature="30" />
</AvatarTypes>
</OpenSpace>
Does this exception mean that the WalkingAvatar class cannot be instantiated?
I should note that our custom avatar is working in a modified version of the ranch example. Is there something specific in the backgrounds or skins fla that needs to link to the WalkingAvatar class or is that specifically a function of the openspace configuration to define this?
Your help is very much appreciated.
On another note, I have to say that the openspace editor is a bit rough around the edges. I sincerely hope that it evolves into a more usable product (especially since we just dropped the money to go ahead and purchase it). A short list of wish list features includes: undo, drag and drop of assetts on the map once they are placed, consistent saving mechanism, user feedback after a map is exported, etc.
Thanks!
Paul