View Single Post
Old 01-19-2009, 06:36 PM   #3 (permalink)
Adrian
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 2,260
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Code:
menu_mc.onItemClick= function(node:XMLNode, level:Number){ 
    your_movie_clip.gotoAndStop(Number(node.attributes.frame));
 }
This is the code you should use. Replace your_movie_clip with the instance name of the movie clip you want to play. For example you could replace it with _root to play the main time line. Make sure your menu instance name is menu_mc.

This will work when you press either a menu item or a subitem. If you want to restrict it only to subitems, use the following:
Code:
menu_mc.onItemClick= function(node:XMLNode, level:Number){ 
    if(level == 2)
           your_movie_clip.gotoAndStop(Number(node.attributes.frame));
 }

Last edited by Adrian; 01-19-2009 at 06:38 PM.
Adrian is offline   Reply With Quote