[Flashcoders] RE: right-click triggers MOUSE_LEAVE?

2010-03-23 Thread Mattheis, Erik (MIN - WSW)
Elsewhere in the code I'd set the textfield's selectable property to false.

When I set the selectable to true in the textfield.click handler, 
Event.MOUSE_LEAVE no longer fires on right-click. Problem solved!

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik 
(MIN - WSW)
Sent: Monday, March 22, 2010 2:13 PM
To: Flash Coders List
Subject: [Flashcoders] RE: right-click triggers MOUSE_LEAVE?

Code that illustrates the behavior I'm trying to avoid:

stage.addEventListener(Event.MOUSE_LEAVE, stageOffHandler);

// embed code is a dynamic textfield
embedCode.text = 'Here is somer text';

embedCode.addEventListener(MouseEvent.CLICK, selectAllEmbedCode);

function selectAllEmbedCode(e:MouseEvent) {
e.target.setSelection(0, e.target.text.length);
}

function stageOffHandler(e:Event) {
// I don't want this to fire on RIGHT_CLICK
trace('mouse is off stage or right mouse button clicked');
embedCode.visible = false;

}

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik 
(MIN - WSW)
Sent: Monday, March 22, 2010 1:08 PM
To: Flash Coders List
Subject: [Flashcoders] right-click triggers MOUSE_LEAVE?

I want to allow users to copy text from a dynamic text field. When I 
right-click on the textfield the MOUSE_LEAVE event fires (which hides the 
textfield  - I intend for MOUSE_LEAVE to hide the textfield).

Googling, I find no results of someone else experiencing the problem I'm 
assuming this isn't the expected behavior but am at a loss for looking what is 
causing this in my code, there's no RIGHT_CLICK listener and from within a 
class, I have

_stage.stage.addEventListener(Event.MOUSE_LEAVE, videoOffHandler);

where _stage is a reference to the Document class.

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year

___
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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] RE: right-click triggers MOUSE_LEAVE?

2010-03-22 Thread Mattheis, Erik (MIN - WSW)
Code that illustrates the behavior I'm trying to avoid:

stage.addEventListener(Event.MOUSE_LEAVE, stageOffHandler);

// embed code is a dynamic textfield
embedCode.text = 'Here is somer text';

embedCode.addEventListener(MouseEvent.CLICK, selectAllEmbedCode);

function selectAllEmbedCode(e:MouseEvent) {
e.target.setSelection(0, e.target.text.length);
}

function stageOffHandler(e:Event) {
// I don't want this to fire on RIGHT_CLICK
trace('mouse is off stage or right mouse button clicked');
embedCode.visible = false;

}

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik 
(MIN - WSW)
Sent: Monday, March 22, 2010 1:08 PM
To: Flash Coders List
Subject: [Flashcoders] right-click triggers MOUSE_LEAVE?

I want to allow users to copy text from a dynamic text field. When I 
right-click on the textfield the MOUSE_LEAVE event fires (which hides the 
textfield  - I intend for MOUSE_LEAVE to hide the textfield).

Googling, I find no results of someone else experiencing the problem I'm 
assuming this isn't the expected behavior but am at a loss for looking what is 
causing this in my code, there's no RIGHT_CLICK listener and from within a 
class, I have

_stage.stage.addEventListener(Event.MOUSE_LEAVE, videoOffHandler);

where _stage is a reference to the Document class.

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year

___
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