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???
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=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…
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…
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]
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!!!