Groups | Blog | Home
all groups > flash actionscript > august 2004 >

flash actionscript : tree component Events


adi_c_adi
8/31/2004 11:50:32 PM
hello
I am using the TREE component from UIComponent set 2.
How can i catch a press event on a line, and get the line index?

adi_c_adi
9/1/2004 9:46:26 AM
sneakyimp
12/11/2004 8:48:07 PM
NSurveyor
12/11/2004 8:56:32 PM
I do not have the tree component, but this is a guess:


//Put this on the frame that holds your treee:
myTree = instanceNameOfTree
myTree.onMouseDown = function(){
if(this.hitTest(_root._xmouse,_root._ymouse)){
line = this.getSelectedIndex();//Don't know if this is right
trace(line);
}
}
sneakyimp
12/11/2004 10:00:43 PM
interestingly, this search:
http://www.google.com/search?hl=en&q=+flash++tree++listener&btnG=Google+
Search yielded this page:
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/
wwhelp.htm?context=Flash_MX_2004&file=00002882.html
Travis Newbury
12/11/2004 10:31:01 PM
In article <cpfme7$1r6$1@forums.macromedia.com>,
webforumsuser@macromedia.com says...
[quoted text, click to view]

The live docs have a great example of using he tree component. They
even suggest you cut and pase from their example then modify to your
AddThis Social Bookmark Button