Knowledge Base |
Important! All new questions are usually answered within the next business day.
Drop Down (Tree) Menu V3
(views: 5915)
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: 1272)
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 ?
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);
// 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);
User Comments
embedding fonts in as3
Embedding fonts in AS3 is similar to AS2, except that in AS3 you need to specify a class name instead of a linkage id. But the class name in AS3 is the same as the linkage id in AS2.
posted by negush on 2008-05-22
Embedding fonts in AS3 is similar to AS2, except that in AS3 you need to specify a class name instead of a linkage id. But the class name in AS3 is the same as the linkage id in AS2.
Login to post your comment
Other questions in this item:
Drop over HTML content Call JavaScript from XML Open menu item pages into target - "_self" Item description from XML Initiate Drop Down Tree Menu V3 through ActionScript Disable-Enable Drop Down (Tree) Menu Displaying the submenu horizontally instead of vertical Navigate through scenes Adding a checkbox to a menu Hand cursor Referencing item's textfield in Drop Down (Tree) Menu V3 Centering the titles on the Drop Down (Tree) Menu V3 Load movies on item select Go to different frames by pressing a menu item Changing Design Different text formats and anti alias Adding a separating gap between menu items Autoexpand on start Open menu items upwards Load movies on item select Correct width of the main menu Initiate DropDownTreeMenuV3AS3 by ActionScript codeMenu |
|
|

im embeding the fonts following the tutorial on the page and all i get when i publish the movie is a blank menu the tutorial is for as2 im not sure if its any different but can i get it to work do i have to define anything in the xml file to embed fonts?