Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-25-2002, 04:09 AM   #1
leandrosalem
Registered User
 
Join Date: May 2002
Location: Rio de Janeiro - Brazil
Posts: 16
Send a message via ICQ to leandrosalem
Default getting values

I'm using a variable called "return" to show the value clicked on the ComboBox.
The script is the following:
onClipEvent (enterFrame) {
_root.return.getSelectedItem();
}
But it don't work. How can i show the value of the clicked item in a text variable?
leandrosalem is offline   Reply With Quote
Old 09-25-2002, 02:24 PM   #2
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

first, don't name anything return in as, return is a keyword.
second use change handlers to find out what is selected.
ActionScript Code:
// combobox named pick_cb pick_cb.setChangeHandler=function("getPick"); function getPick(pick_cb){   //to show the label:   trace(pick_cb.getSelectedItem().label;   //to show the data:   trace(pick_cb.getSelectedItem().data; }

this is all on the fly here, so i may have mangled parts of this.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Reply


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 Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:06 AM.

///
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.