# overLapping rollOvers

**URL:** https://forum.kirupa.com/t/overlapping-rollovers/28353
**Category:** flash
**Created:** [August 12, 2003, 9:12pm UTC](https://forum.kirupa.com/t/overlapping-rollovers/28353 "2003-08-12T21:12:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mayhem](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@Mayhem](https://forum.kirupa.com/u/Mayhem)
#### Post date: [August 12, 2003, 9:12pm UTC](https://forum.kirupa.com/t/overlapping-rollovers/28353/1 "2003-08-12T21:12:55Z")

</div>

I am scripting a thumbnial horizontal scroller, it will included (loaded) into a main .swf.

my problem is this, I have a big hidden button on the top layer that detects the rollOver and gets the thumbs moving, works great, except it prevents all my other other rollOvers from working… I undstand why it does this, what I would like to know is some kind of alternate way to trigger my function… or some trick other than swapDepths, or if swapDepths is the only way, how do I trigger it to swap the moveHit for the urlHit…

I have tried everything from a hidden button that covers the stage, to using:

this.onRollOver = function() {  
\_root.moveStrip();  
};

on everything.

hopefully I am missing something small.  
I forgot to mention that the strip will reset on(rollOut) as well, or else I wouldn’t worry about it, and just let the mouse drive it constantly.

sorry for being so verbose : )

Mayhem  
[www.2muchinfo.com](http://www.2muchinfo.com)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 12, 2003, 9:19pm UTC](https://forum.kirupa.com/t/overlapping-rollovers/28353/2 "2003-08-12T21:19:16Z")

</div>

so you have a button that tests if it hovers over the other buttons? then plays an animation?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 12, 2003, 9:25pm UTC](https://forum.kirupa.com/t/overlapping-rollovers/28353/3 "2003-08-12T21:25:55Z")

</div>

hoi

if you turn you big button into am MC and set the alpha to 0  
the change you

```auto

this.onRollOver = function(){
//code
}
 
this.onrollOut = function() {
//code
}

```

to

```auto

this.onEnterFrame = function(){
if(this.hitTest(this._parent._xmouse,this._parent._xmouse && !RolledOver){
RolledOver = true
// code
} else if (!this.hitTest(this._parent._xmouse,this._parent._xmouse && RolledOver){
RolledOver = false
//code
}
}

```

now your useing hit test instend of a hitArea and so not geting in the way of the other buttons

😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 12, 2003, 10:08pm UTC](https://forum.kirupa.com/t/overlapping-rollovers/28353/4 "2003-08-12T22:08:11Z")

</div>

Ooh, that’s a different approach, thanks, I’m going to try it right now!

Thanks.

Mayhem  
[www.2muchinfo.com](http://www.2muchinfo.com)
