PDA

View Full Version : Mask / Movement problems



Vexir
August 4th, 2005, 07:05 AM
Hey guys, I have a little movie clip on my stage which is a semi transparent square pretty much, and on the same _y I have a movieclip which contains all the buttons for my nav bar. I tried to put some AS on the little box (we'll call it greysq_mc) and have it mask the button's mc (we'll call it navbuttons_mc) as well as move down to the _x of the HOME button (homebutton). Check out my code, its not working for me.

Thanks in advance! :thumb:

onClipEvent (load) {
navbuttons_mc.setMask( greysq_mc );
}

onClipEvent (enterFrame) {
if ( this._x > navbuttons_mc.homebutton._x ) {
// reduce _x value because this is to the right of the target!
--this._x
}
else {
navbuttons_mc.setMask(null);
delete this.onEnterFrame;
}
}

Vexir
August 4th, 2005, 03:50 PM
*bump*

Krilnon
August 4th, 2005, 03:57 PM
I think you might need a _root or _parent reference to navbuttons_mc unless it's inside the mc… Which I don't think it is.