# Show/ Hide element based on Fullscreen listener?

**URL:** <https://forum.kirupa.com/t/show-hide-element-based-on-fullscreen-listener/259588>\
**Category:** flash\
**Created:** [May 6, 2008, 9:44pm UTC](https://forum.kirupa.com/t/show-hide-element-based-on-fullscreen-listener/259588 "2008-05-06T21:44:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fatbat](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@Fatbat](https://forum.kirupa.com/u/Fatbat)\
**Post date:** [May 6, 2008, 9:44pm UTC](https://forum.kirupa.com/t/show-hide-element-based-on-fullscreen-listener/259588/1 "2008-05-06T21:44:18Z")

</div>

Hey, playing with a slideshow and trying to hide a button based on the status of the flash movie… normal or fullscreen. If it’s normal, I want the button to show. If it’s fullscreen, I want the button to be hidden.

This is what I have so far…

```auto

listenerObject = new Object();
listenerObject.onFullScreenChange = function(eventObject):Void {
    if (eventObject.data == "fullScreen") {
        // insert code here
    } else if (eventObject.data == "normal") {
        // insert code here
    }
}
my_slideshow.addEventListener("onFullScreenChange", listenerObject);

gallery_btn.onRelease = function() {
    fscommand("fullscreen", true);
};

```

What the right code to show and hide “gallery\_btn”?
