# Can we click through movie clips?

**URL:** <https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350>\
**Category:** Uncategorized\
**Created:** [May 14, 2008, 5:07pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350 "2008-05-14T17:07:52Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [May 14, 2008, 5:07pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/1 "2008-05-14T17:07:52Z")

</div>

Hey guys, this is my first post ever, so please forgive me if I am unclear or my explanation is too long. I’ve got a problem in Flash which I can’t seem to find the solution too, so here is the problem…

I have a house, and the front wall is a movie clip. When I roll over the wall, it gradually turns transparent so that I can see inside the house. Inside the house, there are clickable items like a phone, the oven, etc… BUT!!! I can’t click on them because of the front wall movie clip (which is now transparent). Is there a way to make the front wall react only to the position of the mouse and not the clicks? So that I can click the items through the front wall???

Any help is greatly appreciated!!!

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [May 14, 2008, 5:39pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/2 "2008-05-14T17:39:32Z")

</div>

once its 0 alpha set \_visible to false  
(but none of the rollouts will work)  
then you can click through it

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 14, 2008, 5:48pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/3 "2008-05-14T17:48:14Z")

</div>

Amagad!  
joran420 post 1.666 . o man you are evil!

---

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [May 14, 2008, 6:06pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/4 "2008-05-14T18:06:35Z")

</div>

Thanks man, but that wont work as I need it to come back on roll out… Hmm… there’s gotta be a way…

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 14, 2008, 6:21pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/5 "2008-05-14T18:21:08Z")

</div>

well,  
swap the depths then ?  
check swapDepths()  
and swap them on rollOver and onRollOut

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [May 14, 2008, 6:42pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/6 "2008-05-14T18:42:54Z")

</div>

lol i passed 666 now :vamp:

use a hittest on the mainhouse instead of rollovers  
even if you swapdepths each time you roll over one of your “inside” buttons it will rollout of the main one.

or add  
myInsideObject\_mc.onRollOver = function(){  
mainHoue\_mc.onRollOver();  
//code here  
}  
to every object inside  
but really you are using poor design a better way would be to hittest or just check \_xmouse \_ymouse and if its outside a target box then fade house front back in

basically there is no easy way to do what you want(its not that hard…but there is no magick ignore me except rollout code…)…

---

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [May 14, 2008, 6:49pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/7 "2008-05-14T18:49:02Z")

</div>

[quote=joran420;2326235]lol i passed 666 now :vamp:

use a hittest on the mainhouse instead of rollovers  
even if you swapdepths each time you roll over one of your “inside” buttons it will rollout of the main one.

or add  
myInsideObject\_mc.onRollOver = function(){  
mainHoue\_mc.onRollOver();  
//code here  
}  
to every object inside  
but really you are using poor design a better way would be to hittest or just check \_xmouse \_ymouse and if its outside a target box then fade house front back in

basically there is no easy way to do what you want(its not that hard…but there is no magick ignore me except rollout code…)…[/quote]

HEY!!!

Unbelievable! I was just trying out the hittest option when I came back to see if there were any more replies and just read yours! You absolutely right!!! It works just fine! But it only works if I put the code on the frontwall mc itself… If i put the code in the actions layer, it dont work… the code is below…

if (Barn\_frontwall\_mc.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
trace(“Rolled over”);  
this.\_alpha–;  
} else {  
trace(“Not over”);  
this.\_alpha++;  
}

Any ideas???

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [May 14, 2008, 6:50pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/8 "2008-05-14T18:50:37Z")

</div>

not without seeing the fla

---

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [May 14, 2008, 6:53pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/9 "2008-05-14T18:53:33Z")

</div>

How do I load an fla here???

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [May 14, 2008, 6:58pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/10 "2008-05-14T18:58:27Z")

</div>

go advanced and attach file…but im at work but maybe someone can look before i get home…  
but im sure its just a pathing issue…

---

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [May 14, 2008, 7:09pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/11 "2008-05-14T19:09:23Z")

</div>

Hey Joran,

Here’s the file… Took me a lil while to figure out how to upload it… I’m a noob that way… Thanks a lot for your time, really appreciate it! This has been breaking my head!

There are two sets of codes, one in the actions layer… which is blocked out… and the working code which is in the red movieclip it self…

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 14, 2008, 7:26pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/12 "2008-05-14T19:26:16Z")

</div>

I fix it ( just have to make some stuff ) give me 5 min

---

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [May 14, 2008, 7:31pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/13 "2008-05-14T19:31:47Z")

</div>

YEH mACSY’S GOOD he should be able to rock it 😛

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 14, 2008, 7:34pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/14 "2008-05-14T19:34:03Z")

</div>

okey  
remove all AS you have, in the MC and everything,  
and have this AS in Frame 1:  
[AS]  
over = false  
gone = false  
red\_mc.onRollOver = function (){  
over = true  
}  
red\_mc.onRollOut = function (){  
over = false  
}  
onEnterFrame = function (){  
if(over){  
red\_mc.\_alpha -=5  
}  
else{  
red\_mc.swapDepths(11)  
red\_mc.\_alpha += 5  
}  
if(red\_mc.\_alpha\<0){  
red\_mc.\_alpha = 0  
red\_mc.swapDepths(10)  
green\_mc.swapDepths(11)  
}  
}  
green\_mc.onRelease = function() {  
trace(“Click”);  
};  
[/AS]

---

<div class="post-metadata">

**Author:** ![Noahdecoco](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Noahdecoco](https://forum.kirupa.com/u/Noahdecoco)\
**Post date:** [May 14, 2008, 7:38pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/15 "2008-05-14T19:38:16Z")

</div>

WOOOOOHOOOOOO!!!

Thanks a lot guys!!! It works and it works beautifully! Nice going!!! Greatly appreciate your helps! I was getting myself into more trouble, I was about to start using listeners and stuff… Hahaha… Phew… well thats that… Once again, thanks a million!!! Cheers!!!

---

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 14, 2008, 7:58pm UTC](https://forum.kirupa.com/t/can-we-click-through-movie-clips/260350/16 "2008-05-14T19:58:22Z")

</div>

your welcome, please comeback if you have something more to challence me!
