0 Replies Latest reply on Sep 20, 2007 10:35 AM by rkwattsinconnecticut

    Mouseout event in VBox

      I can't seem to detect a mouse event (MouseOut) on an Accordion menu. I can do it on the TabBar but am not able to do it on the children. I know I am missing something fundamental here. The purpose is to make Accordion (id=locations) property Visible=False when MouseOut occurs on the submenu. Any enlightenment would be appreciated greatly.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:Canvas width="753" height="300" verticalScrollPolicy="off" horizontalScrollPolicy="off" x="0" y="0" >

      import mx.events.ItemClickEvent;
      import mx.controls.TabBar;
      import mx.collections.ArrayCollection;

      public var STATE_ARRAY:ArrayCollection = new ArrayCollection([
      {label:"Home", data:"Home"},
      {label:"Locations", data:"Locations"}


      public function leavemenu(event:MouseEvent):void

      public function testIt(event:MouseEvent):void
      if (event.target is Button)
      {textarea2.text=textarea2.text + 1;
      var index:int = bar.getChildIndex(DisplayObject(event.target));
      var tab:Button = Button(bar.getChildAt(index));
      if (tab.label=="Home")

      if (tab.label=="Locations")
      if (event.target is VBox)
      textarea2.text=textarea2.text + 2;



      <mx:Canvas x="478" y="93" width="275" height="404" mouseOver="leavemenu(event)">
      <mx:TabBar width="600" id="bar" x="0" y="72" mouseOver="testIt(event)"
      <mx:Accordion width="150" id="locations" visible="false"> <!--21 pixels height per line-->
      <mx:VBox label="Bethel, CT" width="100%" height="100%" mouseOver="testIt(event)">
      <mx:VBox label="Branford, CT" width="100%" height="100%" mouseOver="leavemenu(event)">

      <mx:TextArea x="603" y="74" height="18" width="103" id="searchbox"/>
      <mx:Button x="707" y="74" label="Search" width="46" height="18" fontFamily="Arial"/>
      <mx:TextArea x="327" y="28" id="textarea2"/>

      <mx:Image x="0" y="93" source="images/DSC02878.JPG" />
      <mx:TextArea id="textarea1" width="150" x="92" y="546" visible="true"/>