# Simple button q

**URL:** https://forum.kirupa.com/t/simple-button-q/119233
**Category:** Uncategorized
**Created:** [August 12, 2004, 5:53pm UTC](https://forum.kirupa.com/t/simple-button-q/119233 "2004-08-12T17:53:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sqladmin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sqladmin/32/125_2.png) [@sqladmin](https://forum.kirupa.com/u/sqladmin)
#### Post date: [August 12, 2004, 5:53pm UTC](https://forum.kirupa.com/t/simple-button-q/119233/1 "2004-08-12T17:53:33Z")

</div>

i have a question about a simple button action.

i have a button, that when you click on it launches an mc, and when clicked again it plays the mc’s next frame which affectively closes the mc. but…  
when clicked again nothing happens. it’s like an empty click or some thing.

if you click it again after that it works fine… second click works well, but then again… the third click does nothing.

i’m not sure why this happens. does any have any advice on this?

just wondering.

---

<div class="post-metadata">

### Author: ![Dunga](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Dunga](https://forum.kirupa.com/u/Dunga)
#### Post date: [August 12, 2004, 6:10pm UTC](https://forum.kirupa.com/t/simple-button-q/119233/2 "2004-08-12T18:10:52Z")

</div>

Try actually removing/adding the clip with attachMovie and removeMovieClip (why, why aren’t they “attachMovieClip” and “removeMovieClip”?)

---

<div class="post-metadata">

### Author: ![sqladmin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sqladmin/32/125_2.png) [@sqladmin](https://forum.kirupa.com/u/sqladmin)
#### Post date: [August 12, 2004, 6:20pm UTC](https://forum.kirupa.com/t/simple-button-q/119233/3 "2004-08-12T18:20:32Z")

</div>

i just figured it out. as i was typing the question in i realized what i was doing.

its a simple mistake.

the button has just the usual 'on (release){ mc.play(2) }

the mc was just sitting on the stage. the start of the mc has an empty  
keyframe with stop(). so on frame 2 the mc plays through to the next  
stop(). then following the second click on the button flash sends the play  
head to the next frame by default right… so it just plays through till the  
3rd stop().

the problem is when clicked again flash sends the play head to the next frame  
which is at the start of the mc. remember the first stop right? well it was that one that caused the clip to just sit there. cause the play head went to the next stop() frame.

the solution was to remove the 3rd stop(). then the play head goes right to the first stop() frame.

so in conclusion the play head stopped 3 times. when removing the last frame stop() frame it went to the beginnnig where it should have been going the whole time.

thanks again for the reply. hate to waste a post like that.

cheers

- sqladmin
