Re: [Flashcoders] (x,y) position of selectedItem in a list - AS3
Taka Kojima wrote: So I did some object introspection and found that List (or SelectableList rather, which is the class List extends), has a protected property called "list" which has all the list item DisplayObjects, so what you will have to do is create a custom component that extends list and then accesses that protected "list" property, using list.getChildAt(selectedIndex) - Taka Interesting - thanks Taka. Paul On Mon, Jan 4, 2010 at 2:48 PM, Paul Andrews wrote: Taka Kojima wrote: You will have to use localToGlobal, but first things first... You are correct, selectedItem returns an Object, not a DisplayObject, however I am pretty sure you can do list.getChildAt(list.selectedIndex) to get the display object, and then go from there. That didn't seem to work - I don't think there's a direct relationship between the components that make up the list and the list elements themselves. Thanks for the suggestion though Taka. Paul - Taka On Mon, Jan 4, 2010 at 12:44 PM, Paul Andrews wrote: Cor wrote: Not sure, but have you looked into : localToGlobal? Yes, I did, but no luck. I will check again. Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: maandag 4 januari 2010 21:17 To: Flash Coders List Subject: [Flashcoders] (x,y) position of selectedItem in a list - AS3 AS3: Is it possible to find the (x,y) position on the stage of a selectedItem in a list? The selectedItem property returns an Object and I don't think it's DisplayObject. Any suggestions? Paul ___ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] (x,y) position of selectedItem in a list - AS3
So I did some object introspection and found that List (or SelectableList rather, which is the class List extends), has a protected property called "list" which has all the list item DisplayObjects, so what you will have to do is create a custom component that extends list and then accesses that protected "list" property, using list.getChildAt(selectedIndex) - Taka On Mon, Jan 4, 2010 at 2:48 PM, Paul Andrews wrote: > Taka Kojima wrote: > >> You will have to use localToGlobal, but first things first... >> >> You are correct, selectedItem returns an Object, not a DisplayObject, >> however I am pretty sure you can do >> >> list.getChildAt(list.selectedIndex) to get the display object, and then go >> from there. >> >> > That didn't seem to work - I don't think there's a direct relationship > between the components that make up the list and the list elements > themselves. > > Thanks for the suggestion though Taka. > > Paul > > - Taka >> >> On Mon, Jan 4, 2010 at 12:44 PM, Paul Andrews wrote: >> >> >> >>> Cor wrote: >>> >>> >>> >>>> Not sure, but have you looked into : localToGlobal? >>>> >>>> >>>> >>>> >>> Yes, I did, but no luck. I will check again. >>> >>> Paul >>> >>> >>> >>>> -Original Message- >>>> From: flashcoders-boun...@chattyfig.figleaf.com >>>> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul >>>> Andrews >>>> Sent: maandag 4 januari 2010 21:17 >>>> To: Flash Coders List >>>> Subject: [Flashcoders] (x,y) position of selectedItem in a list - AS3 >>>> >>>> AS3: >>>> >>>> Is it possible to find the (x,y) position on the stage of a selectedItem >>>> in a list? >>>> >>>> The selectedItem property returns an Object and I don't think it's >>>> DisplayObject. >>>> >>>> Any suggestions? >>>> >>>> Paul >>>> ___ >>>> >>>> >>> > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] (x,y) position of selectedItem in a list - AS3
Taka Kojima wrote: You will have to use localToGlobal, but first things first... You are correct, selectedItem returns an Object, not a DisplayObject, however I am pretty sure you can do list.getChildAt(list.selectedIndex) to get the display object, and then go from there. That didn't seem to work - I don't think there's a direct relationship between the components that make up the list and the list elements themselves. Thanks for the suggestion though Taka. Paul - Taka On Mon, Jan 4, 2010 at 12:44 PM, Paul Andrews wrote: Cor wrote: Not sure, but have you looked into : localToGlobal? Yes, I did, but no luck. I will check again. Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: maandag 4 januari 2010 21:17 To: Flash Coders List Subject: [Flashcoders] (x,y) position of selectedItem in a list - AS3 AS3: Is it possible to find the (x,y) position on the stage of a selectedItem in a list? The selectedItem property returns an Object and I don't think it's DisplayObject. Any suggestions? Paul ___ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] (x,y) position of selectedItem in a list - AS3
You will have to use localToGlobal, but first things first... You are correct, selectedItem returns an Object, not a DisplayObject, however I am pretty sure you can do list.getChildAt(list.selectedIndex) to get the display object, and then go from there. - Taka On Mon, Jan 4, 2010 at 12:44 PM, Paul Andrews wrote: > Cor wrote: > >> Not sure, but have you looked into : localToGlobal? >> >> > Yes, I did, but no luck. I will check again. > > Paul > >> -Original Message- >> From: flashcoders-boun...@chattyfig.figleaf.com >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul >> Andrews >> Sent: maandag 4 januari 2010 21:17 >> To: Flash Coders List >> Subject: [Flashcoders] (x,y) position of selectedItem in a list - AS3 >> >> AS3: >> >> Is it possible to find the (x,y) position on the stage of a selectedItem >> in a list? >> >> The selectedItem property returns an Object and I don't think it's >> DisplayObject. >> >> Any suggestions? >> >> Paul >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> No virus found in this incoming message. >> Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: >> 270.14.124/2599 - Release Date: 01/04/10 >> 09:24:00 >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> >> > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] (x,y) position of selectedItem in a list - AS3
Cor wrote: Not sure, but have you looked into : localToGlobal? Yes, I did, but no luck. I will check again. Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: maandag 4 januari 2010 21:17 To: Flash Coders List Subject: [Flashcoders] (x,y) position of selectedItem in a list - AS3 AS3: Is it possible to find the (x,y) position on the stage of a selectedItem in a list? The selectedItem property returns an Object and I don't think it's DisplayObject. Any suggestions? Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.124/2599 - Release Date: 01/04/10 09:24:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] (x,y) position of selectedItem in a list - AS3
Not sure, but have you looked into : localToGlobal? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: maandag 4 januari 2010 21:17 To: Flash Coders List Subject: [Flashcoders] (x,y) position of selectedItem in a list - AS3 AS3: Is it possible to find the (x,y) position on the stage of a selectedItem in a list? The selectedItem property returns an Object and I don't think it's DisplayObject. Any suggestions? Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.124/2599 - Release Date: 01/04/10 09:24:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] (x,y) position of selectedItem in a list - AS3
AS3: Is it possible to find the (x,y) position on the stage of a selectedItem in a list? The selectedItem property returns an Object and I don't think it's DisplayObject. Any suggestions? Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders