# TextFiled is not receiving mouseEvents, because of the sprite on top

**URL:** <https://forum.kirupa.com/t/textfiled-is-not-receiving-mouseevents-because-of-the-sprite-on-top/315541>\
**Category:** flash\
**Created:** [October 28, 2010, 11:31am UTC](https://forum.kirupa.com/t/textfiled-is-not-receiving-mouseevents-because-of-the-sprite-on-top/315541 "2010-10-28T11:31:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fjckls](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fjckls](https://forum.kirupa.com/u/fjckls)\
**Post date:** [October 28, 2010, 11:31am UTC](https://forum.kirupa.com/t/textfiled-is-not-receiving-mouseevents-because-of-the-sprite-on-top/315541/1 "2010-10-28T11:31:51Z")

</div>

Textfield.htmlText text link doesn’t receive mouse events underneath sprite

```php
package
{
    import flash.display.*;
    import flash.text.*;
    import flash.events.*;
    
    public class Test extends Sprite {

        public function Test() 
        {
            init();
        }
        
        private function init():void
        {
            var txtFld:TextField = new TextField();
            txtFld.htmlText = "<a href='http://www.kirupa.com'>this is link</a>"
            addChild(txtFld);
            
            var sp:Sprite = new Sprite();
            sp.graphics.beginFill(0xff0000, .2);
            sp.graphics.drawRect(0,0,66,20);
            sp.graphics.endFill();
            sp.buttonMode = true;
            addChild(sp);
            
            sp.addEventListener(MouseEvent.CLICK, onClick);
        }
        
        private function onClick(e:MouseEvent):void
        {
            trace("Sprite was clicked");
        }
    }
}

```

How can textField receive mouse events if the sprite on top has to be mouseEnabled also?  
Please, enlighten me… is that possible?

Thnks
