# Toggling MC alpha with a button

**URL:** <https://forum.kirupa.com/t/toggling-mc-alpha-with-a-button/243707>\
**Category:** flash\
**Created:** [November 9, 2007, 8:16pm UTC](https://forum.kirupa.com/t/toggling-mc-alpha-with-a-button/243707 "2007-11-09T20:16:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigSHIFT](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bigshift/32/780_2.png) [@bigSHIFT](https://forum.kirupa.com/u/bigSHIFT)\
**Post date:** [November 9, 2007, 8:16pm UTC](https://forum.kirupa.com/t/toggling-mc-alpha-with-a-button/243707/1 "2007-11-09T20:16:00Z")

</div>

Hey all, I’m trying to have one button turn an mc’s alpha from 0 to 100, then next press from 100 to 0 but since I am new to action scripting, I am kinda just hit and miss with things.

I have this part done…

on (press) {  
if (“mc-instructions”,\_alpha, “0”) {  
setProperty(“mc-instructions”, \_alpha, “100”);  
}  
}

Which obviously makes the alpho 0 mc appear, but when it comes to the same button going away, I am at a loss. I would assume some sort of ‘if’ statement, but, as an actionscript hack… I am not all that familiar with them.

Thanks
