PDA

View Full Version : Problems with alpha & buttons


sketched
02-07-2002, 03:15 AM
This'll probably seem like a simple question to many, and in turn may reflect my simpleness, but hopefully that'll mean someone can help me out.

What I'm trying to do is create navigation buttons that use actionscript to fade in and out on mouseOver.

Right now I have them doing just that . . except all of the buttons fade when just one is mouseOver'd. I'm missing something, and I know it's probably quite easy . . but, hey, I'm (extremely) new.

Any help would be great. Thanks in advance!

da script i gots.....

ON MY MOVIECLIPS::::::::
onClipEvent (load) {
_root.about._alpha = 20;
col = new Color(_root.about);
_parent.targvals = myvals=col.getTransform();
speed = 5;
}
onClipEvent (enterFrame) {
fademe();
}

ON MY BUTTONS (on top of MCs)::::::
on (rollOver) {
targvals = {aa:90};
}
on (rollOut) {
targvals = {aa:20};
}


AND THE SCRIPT THEY REFER TO:
movieclip.prototype.fademe = function () { with (myvals) {aa += (_parent.targvals.aa-aa)/speed;}col.setTransform(myvals);};

Ricod
02-07-2002, 08:07 AM
Hey sketched ! That's some fancy script u got there for a newbie !
prototyping and such, anyway ...

By the looks of it, every button is in the same mc. If u want them to work seperately, ur gonna have to put every button in its own mc, label it and then target it.

sketched
02-08-2002, 12:31 PM
y'see, i do things ass backwards and as such take on scripts that i have no business playing with. but, hey, i'm tryin'. =)

both mc's are on the main timeline, and are seperate ('about', 'portfolio'). their respective buttons are also on the main timeline, placed over them. so, if i understand right, those buttons should actually be in the mc's?

thanks for the help, i'm gonna mess around with it on the weekend and if all goes well . . well, all will be well.