You either store a String or an object as part of the data in the combobox
item.
my_cb.addItem({data:"Subject is blah", label:"First Item"});
Then you can use in the change event listener.
var cbListener:Object = new Object();
cbListener.change = function(evt_obj:Object) {
var item_obj:Object = my_cb.selectedItem;
trace(item_obj.data);
};
my_cb.addEventListener("change", cbListener);
http://livedocs.macromedia.com/flash/8/main/00003195.html --
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "sun4none" <sukrit.nagraj@gmail.com> wrote in message
news:e4eld7$9mi$1@forums.macromedia.com...
There is a combo-box by the name "cbJobs" and it gets its value from the XML
file named "data.xml".. I want to store the value transferred from this XML
file into a variable.. so basically someone told me to use the code
on (change) {
_root.subject = this.getValue();
}
the only problem with this code is that it gets activated only after I
"change" the value in combobox by pulling it down.. I want to use this value
obtained from _root.subject as a subject in the script
getURL("mailto:abc@abc.com?subject="+_root.subject);
so any suggestions as to what shall appear in place of "on (change)" ??
Thank
you!