# HELP ME! Exit button problem

**URL:** <https://forum.kirupa.com/t/help-me-exit-button-problem/38321>\
**Category:** flash\
**Created:** [December 21, 2003, 6:32am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321 "2003-12-21T06:32:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ignusb](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@ignusb](https://forum.kirupa.com/u/ignusb)\
**Post date:** [December 21, 2003, 6:32am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321/1 "2003-12-21T06:32:47Z")

</div>

Hi all, I am trying to make an exit button for an .exe, and I cannot work out what actionscript to attribute to a button, can someone help? I have tried multiple scripts, and this is my current one:

on.press= function () {  
fscommand(“quit”);}

I can’t see what is wrong with this, can someone please help!?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2003, 6:39am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321/2 "2003-12-21T06:39:34Z")

</div>

[http://www.kirupa.com/developer/flash5/projectorcommands.htm](http://www.kirupa.com/developer/flash5/projectorcommands.htm)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 22, 2003, 1:54am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321/3 "2003-12-22T01:54:38Z")

</div>

By the way… the event handler is [font=courier new]onPress[/font], so your code should read as follows:

```auto
onPress = function () {
fscommand("quit");
};

```

And welcome to kirupa forum. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 22, 2003, 7:48am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321/4 "2003-12-22T07:48:52Z")

</div>

thanx, that helped, it’s now working well.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2003, 12:40am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321/5 "2003-12-23T00:40:37Z")

</div>

dubbelpost \>:\<

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2003, 1:24am UTC](https://forum.kirupa.com/t/help-me-exit-button-problem/38321/6 "2003-12-23T01:24:42Z")

</div>

now, what was the point of that?
