Re: [Flashcoders] AS3: custom cursor

2008-02-13 Thread Geografiek

Thanks again Cedric,
stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor, false);  
didn't make any difference.
The custom cursor is an mc made up of shapes plus 1 child mc, called  
'backDrop'.
backDrop in turn contains a child called 'backDropVis' + a  
transparent shape to define the outer boundaries of the custom cursor.

But then again:
_customCursor.mouseEnabled and  customCursor.mouseChildren both trace  
'false'.

backDrop.visible = false
and shapes don't intercept events, do they?
I did a test with a custom cursor that contained nothing but a shape - 
> same result.

I have no clue what's causing this.
Willem

Op 13-feb-2008, om 16:42 heeft Cedric Muller het volgende geschreven:

I would say 'yes'. What type of graphic is your custom cursor  
symbol (Does it have some transparent background ?)
Out of curiosity and frivolity, did you try to set your listener  
only during the target and bubbling phases (instead of capture) ?


stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor, false);

?
Cedric


Thanks Cedric but that doesn't help.
Only if I get the custom cursor really out of the way (say 15 px  
or so) the underlying button receives the event.
_customCursor.mouseEnabled and  customCursor.mouseChildren both  
trace 'false'.
Shouldn't this this prevent the custom cursor from intercepting  
the event?

Pulling my hair,
Willem

Op 13-feb-2008, om 11:54 heeft Cedric Muller het volgende geschreven:


Hello Willem,
I never done Custom cursors in AS3, but did you look at





?


It seems offsetting x and y by 1 pixel is helpful :S

HTH,
Cedric



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


Re: [Flashcoders] AS3: custom cursor

2008-02-13 Thread Cedric Muller
I would say 'yes'. What type of graphic is your custom cursor symbol  
(Does it have some transparent background ?)
Out of curiosity and frivolity, did you try to set your listener only  
during the target and bubbling phases (instead of capture) ?


stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor, false);

?
Cedric


Thanks Cedric but that doesn't help.
Only if I get the custom cursor really out of the way (say 15 px or  
so) the underlying button receives the event.
_customCursor.mouseEnabled and  customCursor.mouseChildren both  
trace 'false'.
Shouldn't this this prevent the custom cursor from intercepting the  
event?

Pulling my hair,
Willem

Op 13-feb-2008, om 11:54 heeft Cedric Muller het volgende geschreven:


Hello Willem,
I never done Custom cursors in AS3, but did you look at





?


It seems offsetting x and y by 1 pixel is helpful :S

HTH,
Cedric



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


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


Re: [Flashcoders] AS3: custom cursor

2008-02-13 Thread Geografiek

Thanks Cedric but that doesn't help.
Only if I get the custom cursor really out of the way (say 15 px or  
so) the underlying button receives the event.
_customCursor.mouseEnabled and  customCursor.mouseChildren both trace  
'false'.
Shouldn't this this prevent the custom cursor from intercepting the  
event?

Pulling my hair,
Willem

Op 13-feb-2008, om 11:54 heeft Cedric Muller het volgende geschreven:


Hello Willem,
I never done Custom cursors in AS3, but did you look at





?


It seems offsetting x and y by 1 pixel is helpful :S

HTH,
Cedric



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


Re: [Flashcoders] AS3: custom cursor

2008-02-13 Thread Cedric Muller

Hello Willem,
I never done Custom cursors in AS3, but did you look at





?


It seems offsetting x and y by 1 pixel is helpful :S

HTH,
Cedric



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


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


[Flashcoders] AS3: custom cursor

2008-02-13 Thread Geografiek

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