Maybe event.target.selectedItem?

----- Original Message ----- 
From: "Ethan Miller" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Tuesday, July 18, 2006 6:10 PM
Subject: [flexcoders] Getting Data Out of Rollovers in TileLists


Greetings -

I'm trying to get data out of a dataProvider (the 'orientation'  
field) used by a tileList, on rollover, not on selection. But, as  
there's no "selectedItem" in the returned event I'm not sure how to  
reference the rolled over item. The docs suggest using itemRollOver  
but the compiler claims not to know about it...

Here's some sample code (using an alert to see if the data is being  
caught), my question is how to refernce the fields in the  
dataProvider (of the rolled over item) after e.currentTarget ...

<mx:Script>
<![CDATA[
import mx.controls.Alert;
import flash.events.Event;
import mx.events.ListEvent;

private function showInfo(e:Event):void {
Alert.show(e.currentTarget.itemRollOver.orientation, "Data  
Found...", Alert.OK);
             }
         ]]>
</mx:Script>

<mx:ArrayCollection id="mediaLibraryDP">
     <mx:Object
orientation="landscape" space="RGB" date="07/18//2006" 
source="Apps/Content/Images/back.png"/>
     <mx:Object
orientation="landscape" space="RGB" date="07/18//2006"
source="Apps/Content/Images/side.png"/>
     <mx:Object
orientation="landscape" space="RGB" date="07/18//2006"
source="Apps/Content/Images/stomach.png"/>
     <mx:Object
orientation="landscape" space="RGB" date="07/18//2006"
source="Apps/Content/Images/couple.png"/>
</mx:ArrayCollection>

<mx:TileList
dataProvider="{mediaLibraryDP}"
rollOver="showInfo(event)"
rollOut="hideInfo()">
     
<mx:itemRenderer>
<mx:Component>
<mx:Image source="{data.source}"/>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>


Thanks!  ethan





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to