# Button

**URL:** <https://forum.kirupa.com/t/button/273172>\
**Category:** Uncategorized\
**Created:** [October 12, 2008, 4:27pm UTC](https://forum.kirupa.com/t/button/273172 "2008-10-12T16:27:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvita](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@cvita](https://forum.kirupa.com/u/cvita)\
**Post date:** [October 12, 2008, 4:27pm UTC](https://forum.kirupa.com/t/button/273172/1 "2008-10-12T16:27:07Z")

</div>

I am trying to make a “previous” button as it follows; There are 5 movie clips in the scene and one button, everything placed in one frame. I gave those movie clips **\_alpha=0** ; on the stage. I wrote the following code on the button

on (press) {  
if (\_root.two\_mc.\_alpha=100)  
{  
\_root.one\_mc.\_alpha=100;  
\_root.two\_mc.\_alpha=0;  
\_root.three\_mc.\_alpha=0;  
\_root.four\_mc.\_alpha=0;  
\_root.five\_mc.\_alpha=0;  
}  
if (\_root.three\_mc.\_alpha=100)  
{  
\_root.one\_mc.\_alpha=0;  
\_root.two\_mc.\_alpha=100;  
\_root.three\_mc.\_alpha=0;  
\_root.four\_mc.\_alpha=0;  
\_root.five\_mc.\_alpha=0;  
}  
if (\_root.four\_mc.\_alpha=100)  
{  
\_root.one\_mc.\_alpha=0;  
\_root.two\_mc.\_alpha=0;  
\_root.three\_mc.\_alpha=100;  
\_root.four\_mc.\_alpha=0;  
\_root.five\_mc.\_alpha=0;  
}  
if (\_root.five\_mc.\_alpha=100)  
{  
\_root.one\_mc.\_alpha=0;  
\_root.two\_mc.\_alpha=0;  
\_root.three\_mc.\_alpha=0;  
\_root.four\_mc.\_alpha=100;  
\_root.five\_mc.\_alpha=0;  
}  
}

but it doesn’t work! What do I have to do to make it right?
