Text component that contains html
The Slider controls the alpha of the Image";
}
public var menuDP:Object = {label: "top", children: [
{label: "File", children: [
{label: "Open"},
{label: "New File"} ]},
{label: "Edit", children: [
{label: "Copy"},
{label: "Paste"},
{label: "Send"} ]},
{label: "Window"} ]};
public var menuBarDP:Object = {label: "top", children: [
{label: "File", children: [
{label: "Open"},
{label: "New", children: [
{ label: "File"},
{ label: "Folder"} ]} ]},
{label: "Edit", children: [
{label: "Copy"},
{label: "Paste"},
{label: "Send"} ]},
{label: "Window"} ]};
public function initMenuComponents():void
{
testMenuBar.dataProvider = menuBarDP;
}
public var testMenu:Menu;
public function createAndShowMenu():void
{
var menu:Menu = Menu.createMenu(null, menuDP, false);
testMenu = menu;
var point:Point = new Point(0, 0);
point = testImage.localToGlobal(point);
menu.show(point.x, point.y);
menu.addEventListener("itemClick", menuChanged);
}
public function menuChanged(event:Event):void
{
testMenuLabel.text = MenuEvent(event).item.label;
}
public function insertItemInTree():void
{
var c:ICollectionView = ICollectionView(testTree.dataProvider);
var cursor:IViewCursor = c.createCursor();
cursor.seek(CursorBookmark.FIRST, 1);
cursor.insert({label:'Archive', data:'archive'});
}
]]>