My account
Shopping cart
Knowledge base
Support

Knowledge Base

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

Drop Down (Tree) Menu V3

(views: 29636)

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: 15606)
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 com.jumpeye.menu::JDropDownMainMenuV3/setXML()
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.
import com.jumpeye.menu.JDropDownMenu;

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

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

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



Back