# Help needed with \_alpha fade onRollOver

**URL:** <https://forum.kirupa.com/t/help-needed-with--alpha-fade-onrollover/173577>\
**Category:** Uncategorized\
**Created:** [December 27, 2005, 3:52pm UTC](https://forum.kirupa.com/t/help-needed-with--alpha-fade-onrollover/173577 "2005-12-27T15:52:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sumo/32/1950_2.png) [@sumo](https://forum.kirupa.com/u/sumo)\
**Post date:** [December 27, 2005, 3:52pm UTC](https://forum.kirupa.com/t/help-needed-with--alpha-fade-onrollover/173577/1 "2005-12-27T15:52:08Z")

</div>

Hello,

I have been searching the forums for hours to find an answer for my simple problem but I just can’t accomplish what I’m trying to do. Well, okay I’ll explain what I want to do… I want my MovieClip to fade in on rollover and fade out on rollout using the \_alpha command. Here’s the actionscript I thought would be needed but that isn’t quite working. It’s on the first frame inside this movieclip…

```
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0066CC]this[/COLOR].[COLOR=#0066CC]onRollOver[/COLOR] = [COLOR=#000000] **function** [/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#66CC66])[/COLOR][COLOR=#66CC66]{[/COLOR]
 [COLOR=#B1B100]if[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#0066CC]_root[/COLOR].[COLOR=#006600]my_mc[/COLOR].[COLOR=#0066CC]_alpha[/COLOR] &lt; [COLOR=#CC66CC]100[/COLOR][COLOR=#66CC66])[/COLOR][COLOR=#66CC66]{[/COLOR]

```

[COLOR=#0066CC]\_root[/COLOR].[COLOR=#006600]my\_mc[/COLOR].[COLOR=#0066CC]\_alpha[/COLOR] += [COLOR=#CC66CC]10[/COLOR];  
[COLOR=#66CC66]}[/COLOR]  
[COLOR=#66CC66]}[/COLOR]  
[COLOR=#0066CC]this[/COLOR].[COLOR=#0066CC]onRollOut[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#66CC66[/COLOR][COLOR=#66CC66]{[/COLOR]  
[COLOR=#B1B100] if[/COLOR][COLOR=#66CC66]([/COLOR][COLOR=#0066CC]\_root[/COLOR].[COLOR=#006600]my\_mc[/COLOR].[COLOR=#0066CC]\_alpha[/COLOR] \> [COLOR=#CC66CC]0[/COLOR][COLOR=#66CC66])[/COLOR][COLOR=#66CC66]{[/COLOR]  
[COLOR=#0066CC]\_root[/COLOR].[COLOR=#006600]my\_mc[/COLOR].[COLOR=#0066CC]\_alpha[/COLOR] -= [COLOR=#CC66CC]10[/COLOR];  
}  
}

[/LEFT]  
[/FONT]

Could anyone tell me how it should be done?:toad:

-sumo-
