PDA

View Full Version : [MX] multiple fadein's



karolyne
February 14th, 2004, 08:35 PM
Thanks to everyone who tried helping me with this last week but it's still not working.

this is what i'm hoping to accomplish entirely in AS:

on button rollover, the button and title of the page fade in
on button rollout, they both fade out
on button release the MC fades in
on new button release, the last MC fades out


so far I have this AS on my button:

on (rollOver) {
_root.x + 1;
_root.caption.words = "shows";
_root.fadein(this, 100, 8);
_root.fadein(_root.caption, 100, 20);
}
on (rollOut) {
_root.x = 0;
_root.caption.words = " ";
}
on (release) {
gotoAndStop("shows");
}


but neither the button or caption fades in

i also put this in the first frame of my main timeline:

stop();
fadein = function(alpha, obj, steps) {
this.alpha = alpha;
this.obj = obj;
this.steps = steps; // the lesser steps, the faster the fade
if (this.obj._alpha < 100){
this.obj._alpha += 100/this.steps;
}
}

fadeout = function(alpha, obj, steps) {
this.alpha = alpha;
this.obj = obj;
this.steps = steps; // the lesser steps, the faster the fade
if (this.obj._alpha >= 100){
this.obj._alpha -= 100/this.steps;
}
}




and instead of my mc's fading in, everything just disappears. Eeek. What am I doing wrong?!

here's a link to the .fla file (http://home.comcast.net/~amcelis/autumndefensework.sit)

Thanks so much and Happy Valentine's Day!

Adam
February 14th, 2004, 09:47 PM
I couldn't download your file, I guess it's a mac? Anyway, I quickly did this file for you...not knowing exactly what you wanted, but this does everything you said you were having problems with. Hope it helps in any way:

http://www.geocities.com/yellowraincoatman/fade.fla

I came back to edit, because after re-reading I was wondering if you wanted something more like this:

http://www.geocities.com/yellowraincoatman/fade2.fla

Adam

karolyne
February 16th, 2004, 07:27 PM
eek! i couldn't open your files either. i'll try uploading something better.

thanks!

Adam
February 16th, 2004, 07:34 PM
If you zip them, I can open them, but if I zip mine, I'll have to email them to you...I use geocities to hold my stuff, and they are funny about zip files. Weird, I thought mac users could open PC files, not just the other way.

Adam