# Need Help with dual action button

**URL:** <https://forum.kirupa.com/t/need-help-with-dual-action-button/251478>\
**Category:** Uncategorized\
**Created:** [February 8, 2008, 9:36pm UTC](https://forum.kirupa.com/t/need-help-with-dual-action-button/251478 "2008-02-08T21:36:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramirez](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@ramirez](https://forum.kirupa.com/u/ramirez)\
**Post date:** [February 8, 2008, 9:36pm UTC](https://forum.kirupa.com/t/need-help-with-dual-action-button/251478/1 "2008-02-08T21:36:00Z")

</div>

Hello all !  
I’m trying to create a website with pages that would simulate layers in Photoshop/Illustrator, by having an option to be clicked on and off.

each page would be a movie clip, and would have a button that when clicked fades the movieclip/page out, and when clicked again will fade it back in etc.

if some one would be kind enough to write the code including the fade script .  
I’d rather it be in the code rather than a go to and play tween or something)  
just please bare in mind I’m a newbie , with very basic AS knowledge/capability’s.

P.S - I heard the switch/case would be a good solution but I can’t seem to get the code right

Thank you so much
