getMapObject failure?

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
laxersaz
Posts: 50
Joined: 30 Nov 2009, 16:19
Contact:

getMapObject failure?

Post by laxersaz »

Hello!

When I use

Code: Select all

openSpaceInstance.getMapObject("someID");
it always returns null. I call this method inside of my onAvatarCreated() handler since the map is already rendered then.

I know it works with the ranch example which is provided with openspace, but somehow I can't figure it out. Is "someID" the skin class inside my skins.swf or is it some other reference (like a movieclip's instance name)?

I checked the map objects hash too and it seems to be empty when I call this method. Should I wait for another event else before calling it?

Thanks,
Benjamin
laxersaz
Posts: 50
Joined: 30 Nov 2009, 16:19
Contact:

Post by laxersaz »

OK, I found it. All objects that should be inside the hash MUST have an objectID set via the map editor. This is NOT in the right editor panel but in the bottom panel of the editor. :roll:
Post Reply