# This \*has\* to be an easy AS3 question...

**URL:** https://forum.kirupa.com/t/this-has-to-be-an-easy-as3-question/634817
**Category:** programming
**Created:** [June 22, 2016, 4:46pm UTC](https://forum.kirupa.com/t/this-has-to-be-an-easy-as3-question/634817 "2016-06-22T16:46:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![preps](https://avatars.discourse-cdn.com/v4/letter/p/cc9497/32.png) [@preps](https://forum.kirupa.com/u/preps)
#### Post date: [June 22, 2016, 4:46pm UTC](https://forum.kirupa.com/t/this-has-to-be-an-easy-as3-question/634817/1 "2016-06-22T16:46:13Z")

</div>

This _has_ to be an easy AS3 question…doesn’t it?

I am not seeing the below code in MOUSE\_DOWN fired, until I lift the mouse button back up.

This happens even on a new FLA, with only MOUSE\_DOWN, MOUSE\_UP and CLICK handler code – nothing else.

Regardless of what I do, I only see MOUSE\_DOWN, MOUSE\_UP and CLICK traced out AFTER I lift (release) the mouse button…  
See code below.

It happens if I attach the handlers to the stage;  
or to a sprite.

It happens with/without buttonMode being set.

It happens with/without preventDefault() being called in CLICK…

It happens using event:MouseEvewnt or event:Event as some have suggested.

When I click, I see nothing.  
When I release, I see this:  
Mouse down  
Mouse up  
Mouse CLICK

Why don’t I see “Mouse down” when clicking (before releasing)?

What the heck am I missing here?

Thank you!

```auto
stage.addEventListener(MouseEvent.CLICK, function(event:MouseEvent)
                       {                  
                         // event.preventDefault();  
                         trace("Mouse CLICK");   
                       } );

stage.addEventListener(MouseEvent.MOUSE_DOWN, function(event:MouseEvent)
                       {
                           
                        // event.preventDefault();  
                         trace("Mouse down");   
                       } );
                       

stage.addEventListener(MouseEvent.MOUSE_UP, function(event:MouseEvent)
                       {                      
                         // event.preventDefault();
                         trace("Mouse up");
                       } );
                       

stage.addEventListener(MouseEvent.CLICK, function(event:Event)
                       {                  
                         event.preventDefault();  
                         trace("Mouse CLICK");   
                         _mouse = "click";
                       } );

_sprite.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event)
                       {
                           
                        // event.preventDefault();  
                         trace("Mouse down");   
                         _mouse = "down";
                       } );
                       

_sprite.addEventListener(MouseEvent.MOUSE_UP, function(event:Event)
                       {
                           
                         event.preventDefault();
                         trace("Mouse up");
                         _mouse = "up";
                       } );

```

---

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [June 27, 2016, 6:42pm UTC](https://forum.kirupa.com/t/this-has-to-be-an-easy-as3-question/634817/2 "2016-06-27T18:42:58Z")

</div>

Works for me. Maybe something is blocking your trace output? If you put timestamps in your traces, do they show a time gap between down and up?

---

<div class="post-metadata">

### Author: ![preps](https://avatars.discourse-cdn.com/v4/letter/p/cc9497/32.png) [@preps](https://forum.kirupa.com/u/preps)
#### Post date: [June 30, 2016, 2:40pm UTC](https://forum.kirupa.com/t/this-has-to-be-an-easy-as3-question/634817/3 "2016-06-30T14:40:36Z")

</div>

thank you @senocular

I found the problem.

It was a Logitech wireless keyboard issue (development machine).

The keyboard’s touchpad tap to emulate a click does not trigger a ‘real’ click.  
It passes a MouseEvent.CLICK but not a MOUSE\_DOWN (!).

I have never run into something like that before ☹

It was a real pain – as I would not have guessed that could be a problem.

Moved to a different machine and it worked.

Thank you.
