I have just started learning OpenSpace and playing around the Flex demo version on SFS2X.
I tried extending the Furnitures.swf library by modifying the Furnitures.fla file on Flash CS5 and add my own graphics which are in PNG format. I converted them to a sprite by clicking Create Symbol and then Export to ActionScript. Then I put a class name for AS Linkage and then the Base Class is: flash.display.Sprite as recommended by the OpenSpace Map tutorial.
I was able to add my own graphics on the sample maps using the OS Editor and it rendered well when I executed the demo app. However, I noticed something. When I clicked an open tile beside the tranparent part of my graphic, the avatar doesn't respond to move there. But if I click on the tranparent side of another graphic that is supplied by the demo (e.g. Tree) the avatar responds and moves towards it.
Therefore, OpenSpace is not able to detect the transparency of my graphic images, because if I click on the area within the bounding box of my graphics, OpenSpace is still thinking that it is still part of the image that is why no avatar movement is done. How can I fix this problem? Is there any documentation on how to import PNG files to the library properly?
Skin Transparency
Please read the grey box at the bottom of the "Skin separation approach" paragraph in this tutorial: http://openspace-engine.com/support/tutorials/mapStructure
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
bax wrote:Please read the grey box at the bottom of the "Skin separation approach" paragraph in this tutorial: http://openspace-engine.com/support/tutorials/mapStructure
Thanks for the prompt response Bax
So where do I define these?
private var _os_id:String;
public function get os_id():String { return _os_id; }
public function set os_id(value:String):void { _os_id = value; }
I actually added my assets on the furniture.fla file from the demo and then publish it and reimport to the SWF Manager of the OS Editor so I can create a tile out them. Do I need to define the above code for each graphic asset that I will add to the library so the transparency can be detected by OpenSpace at runtime?
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 32 guests