# Hover function not working when loaded into movie clip holder

**URL:** <https://forum.kirupa.com/t/hover-function-not-working-when-loaded-into-movie-clip-holder/280347>\
**Category:** Uncategorized\
**Created:** [January 26, 2009, 4:44pm UTC](https://forum.kirupa.com/t/hover-function-not-working-when-loaded-into-movie-clip-holder/280347 "2009-01-26T16:44:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![big\_bood](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@big\_bood](https://forum.kirupa.com/u/big_bood)\
**Post date:** [January 26, 2009, 4:44pm UTC](https://forum.kirupa.com/t/hover-function-not-working-when-loaded-into-movie-clip-holder/280347/1 "2009-01-26T16:44:44Z")

</div>

Hi

AS 2 question:

I am having issues with a hover funtion in a loaded swf file.

1. Hover file swf works on its own.
2. Parent file swf loads hover swf  
**[COLOR=darkred]3. Hover funtion no longer works in parent swf[/COLOR]**  
**[COLOR=#8b0000][/COLOR]**  
[COLOR=black]Here is the code for the hover swf[/COLOR]

```auto
var hoverMC:MovieClip;
var myInt:Number;
var d:Number = _level0.getNextHighestDepth(); // set this once so we only have one hover at a time
function moveHover(){
 hoverMC._y = _level0._ymouse;
 hoverMC._x = _level0._xmouse;
 if(!hoverMC._visible) hoverMC._visible = true
}
function showHover(mc){
 hoverMC = _level0.attachMovie(mc, "hoverMC", d);
 hoverMC._visible = false;
 myInt = setInterval(moveHover, 50);
}
function hideHover(){
 hoverMC.removeMovieClip();
 clearInterval(myInt);
}

btn1.onRollOver = function(){
 // make sure you set the linkage idendifier
 // of the MC you want to attach in the propertiers panel
 _level0.showHover("hoverMC1")
}
btn1.onRollOut = btn1.onDragOut = btn1.onReleaseOutside = function(){
 // hide whatever hover MC is available
 _level0.hideHover();
}

```

Code for parent swf loading the hover swf

```auto
_root.currMovie = "section2";
container.loadMovie(_root.currMovie+".swf");

```

Any help or points to reference material would be appricated.

Thanks

big\_bood
