Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-27-2012, 10:16 AM   #1
bitbitbit
Member
 
Join Date: Aug 2008
Posts: 59
Question How to get to list-items?

Hi,

I wanted to make a custom context menu without the settings and about. To do this I used this link: http://blog.another-d-mention.ro/pro...in-flash-flex/

It works, I have removed the context menu completely and made a custom right-click menu with a list. I am using the sparks list-control instead of the mx lists. this works fine but I'm having trouble finding out how to get to the separate objects of the list. I added the list with flex-code:
Code:
<s:List includeIn="State1" width="55" height="40" id="dummyMenu" visible="false">
	<s:dataProvider>
		<s:ArrayList>
			<fx:String>Edit</fx:String>
			<fx:String>Persons</fx:String>
		</s:ArrayList>
	</s:dataProvider>
</s:List>
Now I'm trying to add eventlisteners to the objects of the list. I tried
Code:
dummyMenu.getChildAt(0).addEventListener(MouseEvent.MOUSE_DOWN, readyEdit);
but apparently this adds the eventlistener to the full list-control. How can I add eventlisteners to only one object of the list?

Thanks in advance.
bitbitbit is offline   Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:14 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.