# Ignore second mouse click if movie started

**URL:** <https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295>\
**Category:** Uncategorized\
**Created:** [July 21, 2003, 7:51pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295 "2003-07-21T19:51:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikol27](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Mikol27](https://forum.kirupa.com/u/Mikol27)\
**Post date:** [July 21, 2003, 7:51pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/1 "2003-07-21T19:51:28Z")

</div>

I have a button that when It’s clicked it starts a movie within the maintime playing, if it is clicked a second time, it restarts that movie from the beginning, is there a way to detect if a movie is already running and if so, ignore the mouse click?

---

<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:** [July 21, 2003, 7:56pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/2 "2003-07-21T19:56:14Z")

</div>

on(release) {  
this.\_enabled = false;  
}

That will disable the button after is has been clicked. Then in the last frame of you MovieClip you can have:

myButton.\_enabled = true;

So that the button becomes avtive again.

There are other ways, like using a variable, but this was the first i thought of.

Regards,  
Viru.

---

<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:** [July 21, 2003, 7:57pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/3 "2003-07-21T19:57:16Z")

</div>

Here’s one simple way. On the button apply this action:

```auto
on (release){
_root.myButton.enabled = false;
}

```

That would disable that button after it is clicked. To renable it, place this on the last frame of the movie that is being played:

```auto
_root.myButton.enabled = true;

```

Now that’s a simple way of doing it, I’m sure you can set up some kind of function to do it as well.

EDIT: aww man korn beat me to it. 😛

---

<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:** [July 21, 2003, 7:59pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/4 "2003-07-21T19:59:03Z")

</div>

How about that, we have the same idea. Just mine a minute faster!! I win, whats my prize…?

V.

---

<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:** [July 21, 2003, 8:00pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/5 "2003-07-21T20:00:44Z")

</div>

Awesome! Very cool.

Thanks both of you.

---

<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:** [July 21, 2003, 8:00pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/6 "2003-07-21T20:00:51Z")

</div>

You get to be super duper cool for about 5 seconds. Starting now, enjoy! 😛

---

<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:** [July 21, 2003, 8:39pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/7 "2003-07-21T20:39:48Z")

</div>

hey EG … gotta know how you do that gradient thing in your title. i.e. on the forum it says

electrongeek  
Forum Wanderer

and the ‘Forum Wanderer’ is a gradient from light to dark red

how’d you do that? =)

thx

---

<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:** [July 21, 2003, 8:55pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/8 "2003-07-21T20:55:33Z")

</div>

Shuga, I’m not suppose to tell you this, but since you’ve been here for awhile, I’ll let you in on a secret…

It’s HTML!! 😛

---

<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:** [July 22, 2003, 4:23pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/9 "2003-07-22T16:23:31Z")

</div>

thanks that was helpful

blockhead:block:

HTML? did you just give each letter a seperate color? or did you use a css tag to give it some silly text effect?

thx =)

---

<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:** [July 22, 2003, 8:49pm UTC](https://forum.kirupa.com/t/ignore-second-mouse-click-if-movie-started/26295/10 "2003-07-22T20:49:53Z")

</div>

Yup each letter was assigned a color. 😛
