# Flash loses hover focus when wmode = transparent is turned on!?

**URL:** <https://forum.kirupa.com/t/flash-loses-hover-focus-when-wmode-transparent-is-turned-on/316102>\
**Category:** flash\
**Created:** [November 12, 2010, 7:52am UTC](https://forum.kirupa.com/t/flash-loses-hover-focus-when-wmode-transparent-is-turned-on/316102 "2010-11-12T07:52:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vuleksa](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vuleksa](https://forum.kirupa.com/u/vuleksa)\
**Post date:** [November 12, 2010, 7:52am UTC](https://forum.kirupa.com/t/flash-loses-hover-focus-when-wmode-transparent-is-turned-on/316102/1 "2010-11-12T07:52:33Z")

</div>

Hello to all,  
I`m dealing with this issue for quite a while now, and finally I have find where is the problem.

I have a Flash with certain code in which I call externalinterface - javascript function which sets size of the div where my flash is placed.

Here is that html/js code:

```auto

<script type="text/javascript">
        var soFlash = new SWFObject("bar.swf", "theVars", "992", "100%", "9", "#000000");
        soFlash.addVariable("headlineText", "Head Line");
        soFlash.addParam("wmode", "transparent");
        soFlash.write("fla **** em");
    
        setBarHeight = function(h) {
           var fa = document.getElementById('fla **** em');
        fa.style.height = h + 'px';
        /*if (FA.barFrame != null) {
                  FA.barFrame.style.height = h + 'px';
               }*/
        }
        //setBarHeight(50);            
    </script>

```

And here is simple externalinterface from flash:

```auto

private function setSize(newHeight):void {
ExternalInterface.call("setBarHeight", newHeight);
}

```

So, when wmode is set **not to be transparent** everything works fine.

**Now, please pay attantion!**

It also works fine with wmode is set to be transparent along with my eventListener is set to CLICK or DOWN like this:

```auto

function sizeUp(){
    setSize(250);
}
buttonMc.btnTournament.addEventListener(MouseEvent.MOUSE_UP, sizeUp);

function sizeDown(){
    setSize(250);
}
buttonMc.btnTournament.addEventListener(MouseEvent.MOUSE_DOWN, sizeDown);

```

However, if it has a one of the OVER listeners like this and wmode is set to transparent it will not work:

```auto

function sizeUp(){
    setSize(250);
}
buttonMc.btnTournament.addEventListener(MouseEvent.MOUSE_OVER, sizeUp);

function sizeDown(){
    setSize(250);
}
buttonMc.btnTournament.addEventListener(MouseEvent.MOUSE_OUT, sizeDown);

```

**Looks like flash is losing Mouse focus on OVER and OUT event when transparency is turned on?**

And again, when I turn transparency off from my swfobject code, everything works fine.

Thank you!
