# Strange Mc action

**URL:** <https://forum.kirupa.com/t/strange-mc-action/27301>\
**Category:** Uncategorized\
**Created:** [July 31, 2003, 10:32pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301 "2003-07-31T22:32:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![posix](https://avatars.discourse-cdn.com/v4/letter/p/5f9b8f/32.png) [@posix](https://forum.kirupa.com/u/posix)\
**Post date:** [July 31, 2003, 10:32pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/1 "2003-07-31T22:32:42Z")

</div>

I have a rather odd question.  
I have several Mc’s with imbeded button properties on my root timeline. These mcs have instance names. When they are pressed they load a frame in another Movie Clip. My problem is that I want to disable all of these buttons while the loaded Movie Clip is playing, because if the buttons are pressed multiple times the Movie Clip gets stuck and keeps repeating itself.  
I tried adding this to the movie clips:

[AS]  
on (press) {  
\_root.button1.\_enabled = false;  
}  
[/AS]

and then adding the reactivation code in the last frame of my loaded Movie Clip. This works fine, but since the MC buttons have instance names they wont show the button properties.

Is there a work around for this?

Thanks!

---

<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 31, 2003, 10:38pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/2 "2003-07-31T22:38:11Z")

</div>

“but since the MC buttons have instance names they wont show the button properties.”

You could make that a bit clearer i dont understand, sorry.

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 31, 2003, 10:49pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/3 "2003-07-31T22:49:23Z")

</div>

Viru,

I have Movie clips with buttons inside of them that control the over and down states.  
For some reason when the movie clips have instance names the button states dont show up.

heh, I dont really know how else to explain it, sorry.

---

<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 31, 2003, 11:07pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/4 "2003-07-31T23:07:12Z")

</div>

I see, kind of. Can u attach your fla?

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 31, 2003, 11:57pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/5 "2003-07-31T23:57:36Z")

</div>

alright, this is a mock-up of what im attempting to do.

---

<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:** [August 1, 2003, 12:23am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/6 "2003-08-01T00:23:43Z")

</div>

like this? i’m having a bit of trouble understanding too :trout:

---

<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:** [August 1, 2003, 1:11am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/7 "2003-08-01T01:11:01Z")

</div>

I’d remove that trout-slap son!! I think that’s what posix wants. Now if you want the rollOver animation not to activate on rollOver, you will have to put that movieClip inside an actual button (in the over state), and then enable=false-it.

Oh yeah, and kO2n ROCKS!! I think I saw that twice, right?😛

---

<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:** [August 1, 2003, 3:55am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/8 "2003-08-01T03:55:09Z")

</div>

yes thast what i was looking for. but now ive run into another problem. In my move I have several buttons like this one, that all move to a different section of the orange square. how do i delete the hitTest for the section that is currently open?  
I tried this…

[AS]  
home.onMouseDown = function() {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {   
slide.endX = 0;  
}  
if (slide.endX =0){  
\_root.home.enabled = false;  
}  
};  
[/AS]

but the whole slide mc stopped working after that.

I would post my real .fla but its over 300k.  
I appreciate the 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:** [August 1, 2003, 4:30am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/9 "2003-08-01T04:30:07Z")

</div>

First of all, i would put actions on the buttons themselves instead of assigning functions - that’s just me, I’m lazy.

Then I would ad a unique variable into the button/movieClip actions. (I also would abandon using hitTest for this)

```auto

//this would be the first button called 'home'
on(release){
//do whatever you need to and:
_root.whichDisable=1;
}
//do that for each button, the next one I'll call 'news'
on(release){
//do whatever and:
_root.whichDisable=2;
}
//..etc,etc

```

Then add actions on the first frame that carry throughout the movie. Like:

```auto

if (whichDisable == 1){
_root.home.enabled = false;
} else {
_root.home.enabled = true;
if (whichDisable == 2){
_root.news.enabled = false;
} else {
_root.news.enabled = true;
}
//...etc,etc

```

Thus, no matter which button was pressed (and you would also need to set the variable ‘whichDisable’ in the beginning of your movie) one will be disabled while the others are enabled.

That’s how I would do 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:** [August 1, 2003, 4:43am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/10 "2003-08-01T04:43:49Z")

</div>

> _Originally posted by Freddythunder_  
> **First of all, i would put actions on the buttons themselves instead of assigning functions - that’s just me, I’m lazy.**

**Stupid reply:**  
You!? Lazy!? Please…  
**Not-so-stupid reply:**

If you’re actually lazy, you wouldn’t put those actions on the Buttons. You’d have your code well organized in the Frame actions. 😉

I find quite annoying having to go through the Buttons (MovieClips) actions when I need to edit the code. 😛

---

<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:** [August 1, 2003, 4:50am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/11 "2003-08-01T04:50:43Z")

</div>

Okay…okay…you got me. I’m not lazy; I’m disorganized, and I go out of my way for that disorganization!!! So there!! :trout: I’ll take that!!😛

---

<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:** [August 1, 2003, 6:02am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/12 "2003-08-01T06:02:34Z")

</div>

ok freddy. Yea I think the hitTest is the main thing thats causing me problems. And I think that if I set something up like how you say it should work…

But how do I activate the slide from the movie clips if they have instance names?

If I add an on (release) code to the movie clips I lose the button properties…

I dont even know if im going about this the right way… thanks for putting up with me!

---

<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:** [August 1, 2003, 8:50am UTC](https://forum.kirupa.com/t/strange-mc-action/27301/13 "2003-08-01T08:50:25Z")

</div>

Hmm. Well, is this something like what you are looking for?

> **[DEWA89 | LINK ALT DAFTAR DAN LOGIN VPN89.ME/DEWA89](https://89decibeles.com/)**
>
> DEWA89 adalah game gacor maxwin dari tahun 2022 sekaligus agen provider pragmatic play dan pg soft terpercaya yang menawarkan deposit via qris.

If not, I will help further, I just thought of this a couple minutes ago.

BTW -

> … thanks for putting up with me!

Helping is what the forums about - no worries!!(-:

---

<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:** [August 1, 2003, 5:40pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/14 "2003-08-01T17:40:00Z")

</div>

thanks alot freddy. I actually resolved the whole issue last night. It turned out that the hitTest was causing all sorts of problems. I took it out and everything started working.

I appreciate all the help guys!  
Thanks

---

<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:** [August 1, 2003, 6:48pm UTC](https://forum.kirupa.com/t/strange-mc-action/27301/15 "2003-08-01T18:48:52Z")

</div>

Good times…good times :beam:
