SourceTec Software

It is currently Thu Apr 24, 2014 10:47 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun May 09, 2010 9:39 pm 
Offline
Member

Joined: Sun Apr 11, 2010 2:38 am
Posts: 4
I'm a little new to all this, so bare with me as i'm still learning.
I'm trying to use create a listbox, then pull the selected item from that list box, whenever i click on it, and do an action based on whichever selection was made.

here are the steps I have tried which don't seem to work....
1. dragged a listbox to a new project page
2. set that to the name "ListOne"
3. added in data in the following order .. ( 1, 2, 3)
4. added in labels in the following order .. (test1, test2, test3)
5. tried adding in the following into the Change action tab, all separately and all with the same result of "undefined"

trace(ListOne.getSelectedItem().data);

trace(ListOne.getSelectedItem.data);

trace(ListOne.getSelectedItem());

Please help me out here, and let me know what i'm doing wrong to pull the value of the selected item, thanks!


Top
 Profile  
 
PostPosted: Wed May 12, 2010 5:40 am 
Offline
Member

Joined: Sun Apr 11, 2010 2:38 am
Posts: 4
I see it's been nearly a week now, and no reply to my post. Let me maybe change my question around a little, and maybe i can find a different way to do what I am trying to do.

Can anyone tell me exactly what the User Interface option called "LIST" is used for and how to use it? I can see how you can populate it with a list of items, and with data, but I can't seem to figure out how to get the data or label from my selection in the List. I have tried multiple actionscript codes, along with adding a button to see if maybe it had to be linked to a button to generate the data or label values, but I still can't get it to generate values based on whatever is selected. Please help me out here! Thank you!

(also, if there is any other good place to ask for help on this for this product, please let me know. thank you again)


Top
 Profile  
 
PostPosted: Sun May 16, 2010 11:12 pm 
Offline
Member

Joined: Sun Apr 11, 2010 2:38 am
Posts: 4
nope, didn't realize I could send a ticket directly as I was more focused on "why" this wasn't working, lol.

I did figure it out, it's acualy very simple, and I wanted to smack my head into the wall after i figured it out, i was just making it to complicated.

(selectedItem.data); -- this pulls the data correctly, if i create a listener, and add in there (ListOne.getSelectedItem().data); or anything similar, it doesnt work, so it's kind of odd but at least i got it working, thx for the reply.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group