Menubar component problems

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Menubar component problems

    Greetings all,

    I have been pounding away on the new MX2004 flash, and I have run into a
    little snag. I am trying to use a menubar component in multiple .swf files, and
    it loads and populates beautifully in the first file I open.

    Problem is, when I use a menubar link to open another flash movie (.swf) using
    "LoadMovie", the menubar items all read "Undefined". I have used SEVERAL
    methods to build the menubar, including the one given in the help file. No
    luck.

    To make it even stranger, when I open flash player and drag a .swf into the
    window, all of the menubar items are undefined EVEN IF THERE WAS NO OTHER MOVIE
    LOADED INTO THE PLAYER. I have a little example of the code I have attached to
    the menubar:

    onClipEvent (load) {

    var general = this.getMenuAt(0);
    general.addMenuItem({label:"Overview", instanceName:"overView"});
    general.addMenuItem({label:"How to Use this Tutorial",
    instanceName:"howToUse"});

    var listen = new Object();
    listen.change = function(evt){
    var general = evt.menu;
    var item = evt.menuItem;
    if (item == general.overView){
    loadMovie("Overview.swf",0);
    trace(item);
    } else if (item == general.howToUse){
    loadMovie("howToUse.swf",0);
    trace(item);
    }
    }

    }

    Anybody got an idea of why this would happen?

    madtiger Guest

  2. Similar Questions and Discussions

    1. Opening a component with menubar/menuitem
      Hi I am a new user of Flex Builder. I am trying to develop a new software product. I wanted to know how one can open a component in stack when...
    2. Help with menuBar component
      Hi, I am new to flash MX 2004 Pro, (was a flash user for 3 and 4) I am trying (unsuccessfully) to create a menu using the menuBar component. I...
    3. MX 2004 Pro - MenuBar Component
      Greg, What do I have to do to add more items and link them. pls send an example.. tks a lot.
    4. menuBar component -- using it as toolbar
      I've spent the last week trying to find out how to use the menubar component as just a simple toolbar. In other words, one completely without sub-...
    5. How to use getURL at component MenuBar?
      How to use getURL at component MenuBar?
  3. #2

    Default Re: Menubar component problems

    oops- I forgot- I also have a listener component before the last bracket:

    general.addEventListener("change",listen);

    -MT
    madtiger Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139