# One button two functions

**URL:** https://forum.kirupa.com/t/one-button-two-functions/297352
**Category:** Uncategorized
**Created:** [September 30, 2009, 6:51pm UTC](https://forum.kirupa.com/t/one-button-two-functions/297352 "2009-09-30T18:51:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michaelafoley](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@michaelafoley](https://forum.kirupa.com/u/michaelafoley)
#### Post date: [September 30, 2009, 6:51pm UTC](https://forum.kirupa.com/t/one-button-two-functions/297352/1 "2009-09-30T18:51:24Z")

</div>

Hi, Im new here, been working in flash for one week. Have my first problem.  
I have attached a sample fla file of what i am talking about. I am trying to get a button to do two different functions with one CLICK event. depending were you are on the time line a window should open on close when button is clicked. The problem is it dose it once, opens then closes. I would like it to work every time the button is clicked either open or close depending on the state.  
thanks,  
michael
