# Click to load, click again to unload

**URL:** <https://forum.kirupa.com/t/click-to-load-click-again-to-unload/113473>\
**Category:** Uncategorized\
**Created:** [June 18, 2004, 10:20am UTC](https://forum.kirupa.com/t/click-to-load-click-again-to-unload/113473 "2004-06-18T10:20:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Booker](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@Booker](https://forum.kirupa.com/u/Booker)\
**Post date:** [June 18, 2004, 10:20am UTC](https://forum.kirupa.com/t/click-to-load-click-again-to-unload/113473/1 "2004-06-18T10:20:12Z")

</div>

i have a button that loads a movie clip when clicked, how do i use the same button to make the movie disappear when i click on the button again?

my current code…

for the button

on (release) {  
window.loadmovie(“slideshow.swf”);  
\_root.Y = 1;  
}

the movie clip where the movie load into

onClipEvent (enterFrame) {  
if (\_root.Y == 1) {  
this.\_alpha = 100;  
} else {  
this.\_alpha = 0;  
}  
}
