Hi list,
I posted the following question a few days ago on Flash Tiger but got no response there.
Anybody here knows?

I have an mc attached to the mouse as a custom cursor.
Somehow I'm not able to click on buttons etc. in this setup anymore.
It seems as if the display items under the cursor do not recieve moude events anymore because the custom cursor is intercepting the clicks, although I set both _customCursor.mouseEnabled and _customCursor.mouseChildren to false. When I offset the _customCursor slightly from the actual event.stageX and event.stageY position all works well.
What am I missing?

Here's the code:
//customCursor is called in mouseUp functions of individual tools
private function customCursor(event:MouseEvent):void {
  Mouse.hide();
  for(var kwik:uint = 0 ; kwik < _lengthAll ; kwik++) {
      if(_allToolsArray[kwik].name != event.target.name)
          //do nothing for the moment
      } else if(_allToolsArray[kwik].name == event.target.name) {
          _customCursor = _allToolsArray[kwik];
          _customCursor.mouseEnabled = false;
          _customCursor.mouseChildren = false;
          _customCursor.backDrop.visible = false;
          addChild(_customCursor);
          stage.addEventListener(MouseEvent.MOUSE_MOVE,redrawCursor);
          _customCursor.visible = true;
      } else {
          trace("Clip to drag not found: " + _customCursor.name);
      }
   }
}

//redrawCursor is called by customCursor
private function redrawCursor(event:MouseEvent):void {
    _customCursor.x = event.stageX+0;
    _customCursor.y = event.stageY-0;
}

thanks,
Willem van den Goorbergh



=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31) 30-2719512 or cell phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: http://www.geografiek.nl
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to