# Proper If/Else Statement?

**URL:** <https://forum.kirupa.com/t/proper-if-else-statement/140222>\
**Category:** Uncategorized\
**Created:** [March 9, 2005, 7:13am UTC](https://forum.kirupa.com/t/proper-if-else-statement/140222 "2005-03-09T07:13:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![earph](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/earph/32/79_2.png) [@earph](https://forum.kirupa.com/u/earph)\
**Post date:** [March 9, 2005, 7:13am UTC](https://forum.kirupa.com/t/proper-if-else-statement/140222/1 "2005-03-09T07:13:52Z")

</div>

I using the code below to fade a loop in and out, but I need an if/else statement so I can use one button. I can’t seem to get it right. Can someone please help?

Here’s what I’m using on the button:

> on(release) {  
> turnSound(“off”);  
> turnSound(“on”);  
> }

Thanks!
