# Observations on nested MC behaviour

**URL:** https://forum.kirupa.com/t/observations-on-nested-mc-behaviour/284801
**Category:** Uncategorized
**Created:** [March 23, 2009, 7:48pm UTC](https://forum.kirupa.com/t/observations-on-nested-mc-behaviour/284801 "2009-03-23T19:48:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![andalusite](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@andalusite](https://forum.kirupa.com/u/andalusite)
#### Post date: [March 23, 2009, 7:48pm UTC](https://forum.kirupa.com/t/observations-on-nested-mc-behaviour/284801/1 "2009-03-23T19:48:47Z")

</div>

I have been tearing my hair out with the behaviour of nested MCs made in the timeline.  
I have a button with a nested MC which acts as a “tooltip”. A design I have used before in Buttons in Flash MX.  
But I dont want the tooltip MC to respond to mouse events.  
So I used “parentMC.tooltipMC.mouseEnabled = false”.  
But it did not work.  
I tried with AS in the timeline, in a document Class, and placing the art on the stage manually and with script.  
None of these approaches worked.  
So I disabled the parentMC too. And placed another “dummyMC” in the parentMC with mouseEnabled = true to act as the “button”.  
And that worked.  
With my limited knowledge of AS I assume the “mouseEnabled”, or “mouseChildren” properties are restricted to objects placed programmatically?

Along the way I found a couple of other issues…

1. 

The project Im working on places the final SWF on a Papervision Plane. If I constructed the event listener like this:  
parentMC.addEventListener(MouseEvent.ROLL\_OVER, TurnOver);  
the mouse functionality was lost once in Papervision.  
However, if I used this construction:  
parentMC.addEventListener(MouseEvent.MOUSE\_OVER, TurnOver);  
the mouse functionality was preserved. Why?

1. 

In my original artwork the “tooltipMC” did not exist in frame 1 of the “parentMC”. The swf would not compile and I got TypeError: Error #1009: Cannot access a property or method of a null object reference.  
After some time on the web I found similar problems with nested MCs, related to the use of gotoAndPlay() and gotoAndStop() e.g. [http://www.actionscript.org/forums/showthread.php3?t=159449](http://www.actionscript.org/forums/showthread.php3?t=159449)  
A bug report is posted here: [http://bugs.adobe.com/jira/browse/FP-43](http://bugs.adobe.com/jira/browse/FP-43)  
It seems to be due to the order in which Flash executes [http://www.kirupa.com/forum/showpost.php?p=2113726&postcount=358](http://www.kirupa.com/forum/showpost.php?p=2113726&postcount=358)

Now Im not the greatest AS guy around, so I solved the problem by ensuring the “tooltipMC” was present in frame 1 of the “parentMC” with an Alpha of zero, so Flash could “see” it, but a human could not.
