4 Replies Latest reply on Oct 31, 2007 10:07 AM by Gil1


    Gil1 Level 1
      I have a list that have the names of variables.
      On the data provider I have also the description of the variables and some other data.

      When the user clicks on a list item it triggers a method that takes care of the change and that works fine.
      However, when the user rollover a list item (highlight the item) I want to be able to have a listener, so I can populate some other things (like description in a Text object).

      I have not been able to find a way to listen to rollover item. Any ideas?
        • 1. Re: List
          ntsiii Level 3
          Did you see the "itemRollover" event in the List docs?

          Did you try assigning a listener to that event?

          • 2. Re: List
            Gil1 Level 1

            I am using the itemRollover event, but it is not working. I have done the following:

            <mx:List x="0" y="19" width="40%" id="theVariables" dataProvider="{dataSource}" itemRollOver="onMouseOverList(event)"
            change="addVar(event)" height="142" creationComplete="onListComplete()"></mx:List>

            public function onMouseOverList(e:ListEvent):void
            trace("e.target from metrics "+e.currentTarget);

            the trace produces "theVariables".

            I tried trace("e.target from metrics "+e.currentTarget.rowIndex);

            but this produces an error "Error #1069: Property rowIndex not found on mx.controls.List and there is no default value."

            I tried putting the listener on onListComplete() function, but I get the same results.

            • 3. Re: List
              ntsiii Level 3
              The "rowIndex" property is on the ListEvent("e"), not on the List("e.currentTarget")
              • 4. Re: List
                Gil1 Level 1

                That makes sense and worked.