Usage and Code Samples for Accordion Tree Menu Pro V1 Flash Component
home » flash components » flash menus » accordion tree menu pro v1 » usage and code samples for accordion tree menu pro v1 flash component »
Accordion Menu Pro V1 Usage
Methods
// expands one item and its parents
acordeon.expandItem(itemName:String);
// colapse one item and (but not necesarly) its childs
acordeon.colapseItem(itemName:String);
// clicks an item, if it is expandable it will expand, else it will colapse
acordeon.clickItem(itemName:String);
// expands one item only at a time, and waits till it ends (if tweened)
acordeon.expandLevelItem(itemName:String)
// sets (in real time) a new xml path
acordeon.xml_Path = path:String;
// expands all items in open mode ALL
acordeon.expandAll();
// colapse all items in open mode ALL
acordeon.colapseAll();
Events
onLoadXML, onDrawComplete, onReleaseItem, onReleaseLeaf, onOpenItem, onCloseItem, onRollOver, onRollOut, onPress, onDragOver, onDragOut
Properties
//if false, a click on expanded item will not collapse it
Close on Click
// if true will close submenus with a parent colapse action
Close submenus : Boolean
// if true the font will be searched inside the library and opened as embeded
Embed font : Boolean
// the default color for text
Font color : Color
// the size of the default text
Font Size : Number
// the header default height
Header height : Number
// if true, will send width and height inside the mapped clip and will not resize automatically, letting the clip to resizes itself
Header resize : Boolean
// will load from library
Icon Closed : String
Icon Expanded : String
// indent size (pixels)
Indent step : Number
// if true will show bold text
Menu boldstyle : true
// the default font for Menus (top level)
Menu font style : Font Name
// Menu mc's loaded from library
Menu normal position : String
Menu over position : String
// opening mode ONE or ALL
Open mode : String -> (ONE,ALL)
// if true will autoresize to fit all texts, false will set up the width from the bounding box
Resizeable : Boolean
// submenus are non-top level items (they can have submenus too)
// some submenus properties are same as those for menus
// if true will allow tweening mode
Tweening : Boolean
// sets the speed of the transition tween
Tweening speed : Number
// sets the xml path // this is the only one param that can be reset from runtime
xml_path : String
// every item can load diffrent fonts, sizes, mc's, diffrent from the others.
// to override an item's attributes, you need to set them up in the XML file.
Code Samples
Here is a working example of Accordion Tree Menu Pro V1 http://store.jumpeye.com/temp2/atm.htmHere is an example how to use this menu to browse links. In your xml file at a simple node you have the following attributes:
item title="goto jumpeye" id="jump" description="http://www.jumpeye.com"
title = the title that is displayed
id = a string that can be used for a switch action or even for this link
description = a string attribute that can be used to passs the link...
here is how to do it: (also example no 2 in the .zip file purchased, go on the first/ first/ first/ submenu, where you see jumpeye) i would use a item node like the one above and i will use the listener to retreive the link
var obj:Object = new Object();
accordionInstance.addListener(obj);
obj.onPress = function(args) {
if(args.description){
getURL(args.description);
}
}