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

Reply via email to