Avatar hitArea definition
Posted: 09 Nov 2009, 12:12
My Avatar skins consist of a sequence of png´s which are 350 x 350 pix. The actual avatar graphic is centered in these png´s and measure about 100 x 100 pix. in the ‘walk’ and the ‘stand’ action. So there is a relatively large amount of transparent area around it. The reason for this is that I need other actions as well. During these actions the avatar graphic will measure up to 350 x 350 pix. (this way the png production will be easier).
The problem:
1. I need to be able to use mouseEvents, but as it is now OS react to the whole png, which it should´nt do. I need to be able to define a hitArea that only is in the center of the avatar. So that it do not register any mouseEvents when I mouseOver the transparent piece of the png.
2. Also I can not go to (register clicks on) any of the tiles in the area around the avatar, which is a serious problem. (Especially when there a 20 users on the map).
I have tried moving all the skin MovieClips into a movieClip container which I have set mouseEnabled and mouseChildren to false on, with no result. I have tried setting mouseEnabled and mouseChildren to false at the MainAvatar class as well (no result).
I have also tried setting all the avatar Related mouse options to ‘0’ in the Open Space
Config xml (result).
Please help
Thx
The problem:
1. I need to be able to use mouseEvents, but as it is now OS react to the whole png, which it should´nt do. I need to be able to define a hitArea that only is in the center of the avatar. So that it do not register any mouseEvents when I mouseOver the transparent piece of the png.
2. Also I can not go to (register clicks on) any of the tiles in the area around the avatar, which is a serious problem. (Especially when there a 20 users on the map).
I have tried moving all the skin MovieClips into a movieClip container which I have set mouseEnabled and mouseChildren to false on, with no result. I have tried setting mouseEnabled and mouseChildren to false at the MainAvatar class as well (no result).
I have also tried setting all the avatar Related mouse options to ‘0’ in the Open Space
Config xml (result).
Please help
Thx