• Part 2. Submenu

    Article Preview

    The next step in our menu tutorial will be creating the submenu for our Main Menu module. As we are creating the vertical menu, the submenu will appear on the right.
    ...
    Article Preview

    Now we will create a class for logic of our submenu. Let's name it MainSubMenu, as we have specified in the structure.xml, and place it in the modules package. This class will inherit the DynamicMotoMenu class. And let's import the MovieClip class at once.
    ...
    Article Preview

    We have to create a holder for submenu in the MainMenu Movie Clip. Let's open the MainMenu Movie Clip in the website.fla and create a new layer. The layer name is not important. We name it submenuHolder.
    ...
    Article Preview

    Then we will create a Movie Clip for our submenu. Let's open the website.fla and create a new layer on the main scene.
    ...
    Article Preview

    Now let's create a new layer in the MainSubMenu Movie Clip. We'll create a plane for our submenu here.
    ...
    Article Preview

    Well, now we should create a submenu item renderer Movie Clip in the website.fla. We can just duplicate the MainMenuItemRenderer MovieClip. So, let's find it in the library in Modules - MainMenu Assets, right-click on it, and choose Duplicate in a context menu.
    ...
    Article Preview

    We will also copy the code from MainMenuItemRenderer class. So, let's open both MainMenuItemRenderer and MainSubMenuItemRenderer classes.
    ...
    Article Preview

    At this step we will set the menuHolder Movie Clip as a target holder for our submenu elements. Let's we open the MainSubMenu class and create a new variable:
    ...
    Article Preview

    Our next step will be creating a submenu in the control panel. So, let's open the panel or refresh it if it was open. If there is a menu which was added to stage before enabling dropdown in structure.xml file, it should be removed and the menu module should be added to the stage again.
    ...
    Article Preview

    If we compile and load our site now, we will see that the submenu is not placed in correct coordinates. So, we have to specify where the submenu must appear. Let's open the MainMenu class and override the getItemRendererSubMenuPoint method:
    ...
    Article Preview

    We have created an animation for our submenu plane with labels show and hide (in the MainSubMenu Movie Clip). There are the empty methods show and hide in the super class, so we should override them in the MainSubMenu class:
    ...

  • Recent Forum Posts

    madmaxedcn

    ive downloaded again the template chked in my...

    ive downloaded again the template chked in my server the website.xfl it is not there i really need help with this..thank you

    madmaxedcn 05-12-2012, 08:30 PM Go to last post
    bigmassa

    Hi Paul Thanks for your reply. I have updated to...

    Hi Paul
    Thanks for your reply. I have updated to v1.7. After the update I have created new pages in order to test. But unfortunately the URL bug was not fixed.

    When browsing from my PC, the URL...

    bigmassa 05-12-2012, 08:14 PM Go to last post
    madmaxedcn

    :/

    no im chking the folder did a search also its not there....if you want i can give you my ftp or host account in a PM so you can check

    madmaxedcn 05-12-2012, 01:50 AM Go to last post