Managing organization chart events

An OrgChart control can fire several kinds of specific event in response to user interactions. You can create an event handler for each of these events.
For example, if you register a listener for an itemClick event on an OrgChart class, this listener is called every time an item is clicked. The listener can then access the data for this item.
You can listen for the following OrgChart data events.
Organization chart data events
Organization chart data event
Description
Indicates that the selection changed as a result of user interaction.
Indicates that the user clicked the pointer over a visual item in the control.
Indicates that the user double-clicked the pointer over a visual item in the control.
Indicates that the user rolled the pointer out of a visual item in the control.
Indicates that the user rolled the pointer over a visual item in the control.
The OrgChart events are of the OrgChartEvent type.
The following code shows an interaction when an item is clicked.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
 xmlns:ilog="http://www.ilog.com/2007/ilog/flex" >
  <mx:Script>
    <![CDATA[
      import mx.controls.Alert;
      import ilog.orgchart.OrgChartEvent;
      private function displayItemName(event:OrgChartEvent):void {
        Alert.show("You have clicked on " + event.item.name, "Click Event");
      }  
    ]]>
  </mx:Script>
  <ilog:OrgChart itemClick="displayItemName(event)" />
</mx:Application>