PDA

View Full Version : HELP!reallyREALLYstumped



invisible7
April 26th, 2003, 01:32 PM
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");
}
}

kode
April 26th, 2003, 01:35 PM
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. :P

invisible7
April 26th, 2003, 03:44 PM
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.

kode
April 26th, 2003, 03:47 PM
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> ;)

invisible7
April 26th, 2003, 04:08 PM
here it is.

kode
April 26th, 2003, 04:11 PM
ehmm... the .zip is empty!? :-\

invisible7
April 26th, 2003, 04:25 PM
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??

kode
April 26th, 2003, 04:38 PM
yeah... remove everything that has nothing to do with this problem. :-\

invisible7
April 26th, 2003, 04:52 PM
i did that. base size does not go below 296k. compressed stays @ 212k.

kode
April 26th, 2003, 04:54 PM
then upload it to your server... :P

invisible7
April 26th, 2003, 05:02 PM
thanks

go here

http://invisible7.com/example.fla

kode
April 26th, 2003, 05:09 PM
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;
}
}
;)

invisible7
April 26th, 2003, 05:13 PM
you just really rock. It works! What's the flag stuff??

kode
April 26th, 2003, 05:19 PM
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)

=)