RE: [flexcoders] Re: Index of an itemRenderer
That is a dead end. You must work with the dataProvider. BTW, I am a guy. Tracy, like in "Dick". Dick Tracy, get it? Ah, never mind. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of evert_dennis Sent: Thursday, February 01, 2007 5:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Index of an itemRenderer Thank you FlashCanon. I added the rollOver="trace(event.currentTarget.parent.getChildIndex(event.currentTa rget))" to my custom itemRenderer and that is tracing out an index value. Now the only problems lies in what Tracy had said in her first response about how only 5 items exist at once in a 10 item list. My list displays four items at a time but has 6 total. Therefore if I scroll over to item 6 and rollOver it, the index shows up as four, because it is now the 4th item in the list. Not sure what I am going to do about that one.
[flexcoders] Re: Index of an itemRenderer
Thank you FlashCanon. I added the rollOver="trace(event.currentTarget.parent.getChildIndex(event.currentTarget))" to my custom itemRenderer and that is tracing out an index value. Now the only problems lies in what Tracy had said in her first response about how only 5 items exist at once in a 10 item list. My list displays four items at a time but has 6 total. Therefore if I scroll over to item 6 and rollOver it, the index shows up as four, because it is now the 4th item in the list. Not sure what I am going to do about that one.
[flexcoders] Re: Index of an itemRenderer
Try placing this on your itemRenderer: click="trace(event.currentTarget.parent.getChildIndex(event.currentTarget))" I'm using that for something that sounds similar to what you are saying and it's working in my case. -FlashCanon --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > If you can get the renderer to emit a custom event that contained the > data that might work. > > > > Tracy > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of evert_dennis > Sent: Thursday, February 01, 2007 9:57 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Index of an itemRenderer > > > > I've got a repeater which is creating objects based on how many items > are in the HorizontalList. For the sake of this example lets say > there are 6 items. When I roll over an itemRenderer in the list I am > passing data to that object based on which itemRenderer you are rolled > over using event.itemRenderer.data. That works fine if I am only > passing it to repeated object number 1 from every single item in the > list. But I would like to pass the appropriate data to each > appropriate object based on which itemRenderer you are over. So if > you are rolled over itemRenderer 4, pass data to object 4. Does this > make sense? Any ideas? >
RE: [flexcoders] Re: Index of an itemRenderer
If you can get the renderer to emit a custom event that contained the data that might work. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of evert_dennis Sent: Thursday, February 01, 2007 9:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Index of an itemRenderer I've got a repeater which is creating objects based on how many items are in the HorizontalList. For the sake of this example lets say there are 6 items. When I roll over an itemRenderer in the list I am passing data to that object based on which itemRenderer you are rolled over using event.itemRenderer.data. That works fine if I am only passing it to repeated object number 1 from every single item in the list. But I would like to pass the appropriate data to each appropriate object based on which itemRenderer you are over. So if you are rolled over itemRenderer 4, pass data to object 4. Does this make sense? Any ideas?
[flexcoders] Re: Index of an itemRenderer
I've got a repeater which is creating objects based on how many items are in the HorizontalList. For the sake of this example lets say there are 6 items. When I roll over an itemRenderer in the list I am passing data to that object based on which itemRenderer you are rolled over using event.itemRenderer.data. That works fine if I am only passing it to repeated object number 1 from every single item in the list. But I would like to pass the appropriate data to each appropriate object based on which itemRenderer you are over. So if you are rolled over itemRenderer 4, pass data to object 4. Does this make sense? Any ideas?