HELP!reallyREALLYstumped

Ok, I have a simple action where the position of the mouse causes a section of the stage to fade out or in with the use of an alpha mask inside a 2nd mc. For some reason, the fade doesn’t work. When triggered by the mouse position, the alpha just pops out or in w/o the keyframed fade. To make things more curious, if I remove the quotes from around either “fadeout” or “fadein” in the code below, the “fadeout” portion will work, but not the “fadein”. Have tried a number of purmutations of script w/ no luck. (the_parent. stuff is because the whole movie gets loaded into a master movie.)

Any help greatly appreciated!!

this is the script on the mc containing the alpha fade.

onClipEvent (load) {
gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (_parent._xmouse>660) {
_parent.emptyMC.gotoAndPlay(“fadeout”);
} else if (_parent._xmouse<660) {
_parent.emptyMC.gotoAndPlay(“fadein”);
}
}

you can’t change the alpha of a mask. :-\

you’d need to fade in/out whatever the mask is covering.

edit. sorry… i meant to say you can’t change the alpha value of a mask. :stuck_out_tongue:

But the point of the mask is to have a changing alpha. Half of the operation works (fadeout), but only when fadein is not in “”. I wanted to attach an example.fla, but that option is not available in this reply form. I’ll (sorry) repost with the .fla.

wait! you can attach your fla… just click here <a href=“newreply.php?s=&action=newreply&threadid=21653”><img alt=“post reply button large” src=“images/post_reply.gif” border=“0” width=“90” height=“25”></a> :wink:

here it is.

ehmm… the .zip is empty!? :-\

Ok, that was stupid, but…

i’m going crazy!! my fla is 296k, but that’s over the max size, so i zip it and it’s 212k, but that’s still over the max size. what’s the point of attaching when you can’t attach a tiny fla. Any suggestions??

yeah… remove everything that has nothing to do with this problem. :-\

i did that. base size does not go below 296k. compressed stays @ 212k.

then upload it to your server… :stuck_out_tongue:

thanks

go here

http://invisible7.com/example.fla

try this:

onClipEvent (load) {
	gotoAndStop(1);
}
onClipEvent (enterFrame) {
	if (_parent._xmouse>110 && !flag) {
		this.gotoAndPlay("fadeout");
		flag = 1;
	} else if (_parent._xmouse<110 && flag) {
		this.gotoAndPlay("fadein");
		flag = 0;
	}
}

:wink:

you just really rock. It works! What’s the flag stuff??

the problem was that the script executed the gotoAndPlay over and over again, that’s why it didn’t fade. i set up a variable (flag) so it only is executed once.

!flag checks if the variable is equal to 0 (false)
flag checks if the variable is equal to 1 (true)

=)