");
application.mb.labelField = "@label";
application.mb.showRoot = false;
application.mb.dataProvider = xmlObjE4X2;
}
public function setXMLDP_AS() : void
{
application.mb.dataProvider = testXMLDP;
application.mb.showRoot=false;
application.mb.labelField='@label';
}
[Bindable]
public var myCol:ArrayCollection;
public var myDPArray:Array = [{label: "menu 2", children: [
{label: "mail", name: "MAIL", children: [
{label:"inbox", name:"INBOX"},
{label:"outbox", name:"OUTBOX", children: [
{label:"you are a draft", name:"DRAFT"},
{type:"check", label:"check me", name:"CHECK"}
]}
]}
]},
{label: "menu 1", children: [
{label: "file", name: "FILE", children: [
{label:"I am a Menu", name:"MENU"},
{label:"here goes Nothing", name:"NOTHING", children: [
{label:"aw, don't sell yourself short", name:"AW"},
{type:"check", label:"can you check me?", name:"CHECK ME"}
]}
]}
]}];
public function setArrayCollectionDP() : void
{
myCol = new ArrayCollection(myDPArray);
application.mb.dataProvider = myCol;
}
]]>