# Trouble changing Alpha on multiple mc's

**URL:** https://forum.kirupa.com/t/trouble-changing-alpha-on-multiple-mcs/146563
**Category:** Uncategorized
**Created:** [May 2, 2005, 3:35pm UTC](https://forum.kirupa.com/t/trouble-changing-alpha-on-multiple-mcs/146563 "2005-05-02T15:35:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![6bit](https://avatars.discourse-cdn.com/v4/letter/6/c68b51/32.png) [@6bit](https://forum.kirupa.com/u/6bit)
#### Post date: [May 2, 2005, 3:35pm UTC](https://forum.kirupa.com/t/trouble-changing-alpha-on-multiple-mcs/146563/1 "2005-05-02T15:35:04Z")

</div>

I’m doing a menu on a site- and instead of making true roll overs- I have set the buttons (in white), onto a black background, and am using AS to alter the alpha when I roll in and out. The main buttons start at 20% alpha, go to 100% on RollOver, and back to 20% on rollOut- Thats not the problem. The problem comes next.

As the user rolls onto the instance of “Graphics\_mc”, I want another MC (GraphicsSubtitle\_mc) appear and disappear (alpha going from 0% to 100%), right now its just going from 20% and back, with the original RollOver, and I’m sure its just a scripting error, but i can’t figure it out. I’ll attach the script, can anyone help?

on (release) {  
\_root.contents.loadMovie(“Graphics.swf”);  
}

onClipEvent(load)

{  
dir = 0;  
speed = 6;  
this.\_alpha = 20;  
\_parent.GraphicsSubtitle\_mc.\_alpha = 0;  
}

on (rollOver)  
{  
this.dir = 1;  
\_parent.GraphicsSubtitle\_mc.dir = 1;  
}

on (rollOut) {  
{  
this.dir = -1;  
\_parent.GraphicsSubtitle\_mc.dir = 1  
}  
useHandCursor = true;  
}  
onClipEvent(enterFrame)  
{  
temp = \_alpha + speed\*dir;  
\_parent.GraphicsSubtitle\_mc.\_alpha = Math.min(100,Math.max(temp,0));  
this.\_alpha = Math.min(100,Math.max(temp,20));

}

And if thats more difficult than it needs to be- feel free to take liberties. Any help is appreciated. Thanks.
