# Button Conditional?

**URL:** <https://forum.kirupa.com/t/button-conditional/315656>\
**Category:** flash\
**Created:** [November 1, 2010, 4:44am UTC](https://forum.kirupa.com/t/button-conditional/315656 "2010-11-01T04:44:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RHayabusa](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@RHayabusa](https://forum.kirupa.com/u/RHayabusa)\
**Post date:** [November 1, 2010, 4:44am UTC](https://forum.kirupa.com/t/button-conditional/315656/1 "2010-11-01T04:44:45Z")

</div>

Hey guys/gals I was wondering if you could please help me with an AS3 problem? I have a button that currently when pressed will show an instance object on screen, however what I would like for it to do WHEN PRESSED AGAIN is to remove it just like every other application. AM I right in thinking that would be a conditional, an “if” statement (I’m not sure I haven’t done AS1 in 5 years let alone A3). Any help is appreciated - thank you in advance. 🙂

My Current Code:

Help\_Btn.addEventListener(MouseEvent.CLICK, HelpDisplay);

function HelpDisplay(event:MouseEvent):void  
{  
var Help\_MyInstance:LibrarySymbol = new LibrarySymbol();  
addChild(Help\_MyInstance);

Help\_MyInstance.x = 92.70;  
Help\_MyInstance.y = 46.70;  
Help\_MyInstance.border = false;  
Help\_MyInstance.width = 372.20;  
Help\_MyInstance.height = 220.75;

}
