You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Sunday, August 29th 2010, 7:24pm

Tree Menu

the problem is to link the krpano xml to the tree menu...

On a normal menu (botton) the code then we apply is:

function loadpano2a_clicked(mouseevent:MouseEvent):void
// hide the loadfirstpano button
// this.button_loadfirstpano.visible = false;

// a example with following actions
// - each action, with a single call"loadpano(datafile/03.xml,null,KEEPALL,BLEND(2));");"4");"lookat(0,0,10);");
this.loadpano1a.addEventListener(MouseEvent.CLICK, loadpano1a_clicked);

Unfortunately on a tree menu we cant link the XML code of krpano.

You have a solution????

thanks *cry* *cry* *cry* *cry* *cry*


Sunday, August 29th 2010, 8:10pm

that is the code for the tree

//import the menubar

//import the required data class

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

//create an xml object
var menus:XML =
<menu label="colors">
<menuitem label="red" />
<menuitem label="orange" />
<menuitem label="yellow" />
<menuitem label="green" />
<menuitem label="blue" />
<menuitem label="purple" />
<menu label="cars">
<menuitem label="american">
<menuitem label="cadillac" />
<menuitem label="buick" />
<menuitem label="pontiac" />
<menuitem label="chevrolet" />
<menuitem label="ford" />
<menuitem label="japanese">
<menuitem label="toyota" />
<menuitem label="honda" />
<menuitem label="nissan" />
<menu label="apples">
<menuitem label="gala" />
<menuitem label="granny smith" />
<menuitem label="fuji" />

//instantiate the MenuBar and populate its dataProvider with the xml object
var menuBar = new MenuBar(this);
menuBar.dataProvider = new XMLDataProvider(menus);


Monday, August 30th 2010, 5:53am

or this code for the tree

// Import the treeClasses.* to use TreeDataProvider

// Define an XML variable that will be used to populate the Tree
var myxml:XML =
<node label="Root Node">
<node label="Family photos">
<node label="Mom and I.jpg"/>
<node label="Dad and I.jpg"/>
<node label="My dog Skip.jpg"/>
<node label="Dancing together.jpg"/>
<node label="Vacation shots">
<node label="Eiffel Tower.jpg"/>
<node label="Louvre pyramid.jpg"/>
<node label="Rodin Museum.jpg"/>
<node label="Rue Elysees.jpg "/>
<node label="Architecture pics">
<node label="Rome">
<node label="Coliseum.jpg"/>
<node label="Vatican.jpg"/>
<node label="Greece">
<node label="Parthenon.jpg"/>
<node label="M. Olympus.jpg"/>

// Set the Tree's dataProvider to a new TreeDataProvider, instantiated with the above XML
mytree.dataProvider = new TreeDataProvider(myxml);

// Define custom icons for the three different icon types in the Tree.
mytree.setRendererStyle("closedBranchIcon", folderClosedIcon);
mytree.setRendererStyle("openBranchIcon", folderOpenIcon);
mytree.setRendererStyle("leafIcon", fileIcon);


Sunday, September 5th 2010, 11:21am

Tree Menu

Nobody have any idea???????

Plase *cry* *cry* *cry* *cry* *question* *question* *question* *question* *question*



Posts: 390

Location: Malaysia

  • Send private message


Monday, September 6th 2010, 7:21pm

i do bought this 2 level menu flash file from HERE and modified the script just to make sure it compatible with krpano...