My account
Shopping cart
Knowledge base

Knowledge Base

Important! All new questions are usually answered within the next business day.

Drop Down (Tree) Menu V3

(views: 29656)

Drop Down Menu V3 and Drop Down Tree Menu V3 are xml flash accordion menus featuring customized states, customized transitions and tweens. Here are all known issues for Drop Down Menu V3 and Drop Down Tree Menu V3, they should be similar, since basically it is the same component. If you have any questions that you think we should discuss here please let us know.

setXML() generates error message

(2008-04-02 - views: 15630)
Q: When I try to assign using the setXML method a XML object generated by code, there's an error message in the Output Panel and the menu doesn't show up:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/removeChild()
at Untitled_fla::MainTimeline/cbMenu()
at Untitled_fla::MainTimeline/frame1()

How can I assign a XML object to the drop down menu ?

A: The workaround for this problem is to create a child object just before you use the setXML() method. Usually this is only necessary when populating the menu with items for the first time, but it's ok if it gets called each time.

// Import the class for the child object.

// Create the XML object.
var xmlData:XML =  <component

// This is the workaround for the problem.
// "mainMenu" is the instance name of the menu.

if (mainMenu.child == null) {
        mainMenu.child  = new JDropDownMenu();
// Now, you can call the setXML method.