1 Reply Latest reply on Aug 16, 2009 3:47 PM by Tamist

    Flash Drop Down Nav Bar

    Tamist

      THANKS in advance for the help you can provide.

       

      I am attempting to build a flash drop down navigation bar and I followed the Tutvid video tutorial on YouTube, which launched successfully - it looks wonderful!

       

      However, when I wanted to add additional drop down menus for other buttons, the video has a big gap in information for the beginner (me).

       

      To speak the same language, the video is at this address: http://www.youtube.com/watch?v=LC7BaZCForE

       

      Action Script sequences to scroll to are the following:

       

      1. Movie where drop downs are created on timeline with action script: 29:13

       

      2. Action Script content for Hit Area: 29.52

       

      3. Root Layer action script: 32:33

       

      I assumed that I should be adding my additional menu drop downs on the same timeline window as the first.  I added new layers for the menus and frames, but I thought I should write the action script for the new menus on the same action script layer as the first.  I added action script 10 frames from the first menu, so the next grouping began at frame 20 and ended at frame 30.

       

      Adding the second menu (I want more but stopped when I tested) resulted in the two menus alternately blinking on and off so a repeating movie kicks in and no "over" and "out" functions for the menu are recognized.

       

      I'll now paste in my code for corresponding segments from his video so maybe you can show me where I need to change my coding to make it all work.  Apparently my function definition needs to change, but I have no clue what that means or how it needs to be different.  Before I paste, however, let me share the error that pops up:

       

      Location: Symbol 'mcDropDowns', Layer AS MugCup', Frame 20, Line 4

      Description: 1021: Duplicate function definition.

       

      Okay, here's my coding:

       

      1.

      Frame 1

      stop();
      clicker_mc.visible = false;

       

      2.

      Frame 10

      stop ();
      mugFrame_btn.addEventListener(MouseEvent.MOUSE_OVER, goBackF);

      function goBackF(event:MouseEvent):void{
      gotoAndStop(1);
      }

       

      Frame 20

      stop ();
      tableFrame_btn.addEventListener(MouseEvent.MOUSE_OVER, goBackF);

      function goBackF(event:MouseEvent):void{
      gotoAndStop(1);
      }

       

      3.

      var navBtnGlow:GlowFilter = new GlowFilter(0x425616, 0.75, 0, 15, 1, 2, true, false);
      navBar_mc.addEventListener(MouseEvent.MOUSE_OVER, navOverF);
      navBar_mc.addEventListener(MouseEvent.MOUSE_OUT, navOutF);

      function navOverF(event:MouseEvent):void{
      event.target.filters = [navBtnGlow];
      navBar_mc.setChildIndex(event.target as MovieClip, 1);
      dropMenus_mc.gotoAndStop(navBar_mc.getChildAt(1).name);
      trace("We are Rolled Over..." + navBar_mc.getChildAt (1).name)
      }
      function navOutF(event:MouseEvent):void{
      event.target.filters = [];         
      }

      navBar_mc.addEventListener(MouseEvent.MOUSE_OVER, navOverF);
      navBar_mc.addEventListener(MouseEvent.MOUSE_OUT, navOutF);

       

       

      Please know that I realize this will take a few moments for you to compare my code to what's on the video.  Know that you will be doing me a TREMENDOUS favor by helping me to understand the theory behind replicating this step.

       

      I look forward to hearing from you - THANKS!