# \[FMX\]On button(mc) for two actions

**URL:** https://forum.kirupa.com/t/fmx-on-button-mc-for-two-actions/106266
**Category:** Uncategorized
**Created:** [April 3, 2004, 9:58pm UTC](https://forum.kirupa.com/t/fmx-on-button-mc-for-two-actions/106266 "2004-04-03T21:58:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)
#### Post date: [April 3, 2004, 9:58pm UTC](https://forum.kirupa.com/t/fmx-on-button-mc-for-two-actions/106266/1 "2004-04-03T21:58:26Z")

</div>

How can I make a mc witch I us as a button fuctional for two actions.I mean when I press the button that a clib fades out and when I press again it fades in again I tried it with an if but the it only works one time.This is the script

```auto
 but.onRelease = function(){
 if (mc._alpha <= 1){
  fadeClip (mc, 100, 4);
 }else if (mc._alpha >= 99){
  fadeClip (mc, 0, 4);
 }
} 

```

What is wrong ?
