One other option, is NOT nesting the clips. At least not code wise.
On 10/9/06, Perdue, Blake <[EMAIL PROTECTED]> wrote:
Is there any other work around? I'd prefer to avoid wasting cycles checking the location of the mouse every time it's moved. I was hoping there was some sort of submenu flag or workaround that allowed this. Anyone know of it? -----Original Message----- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Johan Karlsson Sent: Monday, October 09, 2006 2:29 AM To: Flashcoders mailing list Subject: SV: [Flashcoders] Rollover states for sub-items When a movieclip has a buttonevent placed on it anything inside it will not be able to get any buttonevents. What you need to do is use a mouseMove event and a hitTest to simulate a rollover/rollout event either for the nav or the subitems. E.g: Nav.onMouseMove = function() { if(this.hitTest(_root._xmouse, _root._ymouse, true) && !this.open) { this.open = true; this.gotoAndPlay('expand'); } else if(this.open) { This.open = false; this.gotoAndPlay('collapse'); } } /Johan -----Ursprungligt meddelande----- Från: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] För Perdue, Blake Skickat: den 9 oktober 2006 01:27 Till: Flashcoders mailing list Ämne: [Flashcoders] Rollover states for sub-items I'm building an expandable/collapsible navigation - on rollover it expands, on rollout it collapses. I've placed event handlers on the navigation container movie clip, like so: nav.onRollOver=function() {this.gotoAndPlay('expand');} nav.onRollOut=function() {this.gotoAndPlay('collapse');} Inside of the navigation movie clip (nav), I have several movie clips that have their own onRollOver and onRollOut event handlers, like so: nav.subitem.onRollOver=function() {this.gotoAndPlay('over');} nav.subitem.onRollOut=function() {this.gotoAndPlay('out');} For some reason, because the container movie clip (nav) has rollover and rollout event handlers, the event handlers for the clips inside the container do not work. In other words, the nav onrollover/out works, but the nav.subitem rollover/out doesn't work. Does anyone know why this happens or a solution to this? Thanks. Blake Perdue | 212.522.1292 | AIM: blakepCNN _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com