# Fade a mc on click of another button

**URL:** <https://forum.kirupa.com/t/fade-a-mc-on-click-of-another-button/189464>\
**Category:** Uncategorized\
**Created:** [June 2, 2006, 8:26pm UTC](https://forum.kirupa.com/t/fade-a-mc-on-click-of-another-button/189464 "2006-06-02T20:26:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dru\_nasty](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dru\_nasty](https://forum.kirupa.com/u/dru_nasty)\
**Post date:** [June 2, 2006, 8:26pm UTC](https://forum.kirupa.com/t/fade-a-mc-on-click-of-another-button/189464/1 "2006-06-02T20:26:23Z")

</div>

I’m trying to fade a movieclip by clicking on a button. On the main timeline I have just a circle graphic movieclip with instance name ball, then I also have two buttons on the main timeline with the following as:

```auto

on (release) {
if (_root.ball._alpha <=0) {
_root.ball._alpha +10;
}
}

```

That’s on the button to increase the opacity  
Then on the button to decrease opacity I have:

```auto

on (release) {
if (_root.ball._alpha >=100) {
_root.ball._alpha -10;
}
}

```

No luck.Also would it be possible to make a slider bar to adjust the opacity of the ball mc?

Thanks
