# Declaring Variable for Combobox components?

**URL:** <https://forum.kirupa.com/t/declaring-variable-for-combobox-components/207724>\
**Category:** flash\
**Created:** [November 20, 2006, 11:19pm UTC](https://forum.kirupa.com/t/declaring-variable-for-combobox-components/207724 "2006-11-20T23:19:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Waiter](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@The\_Waiter](https://forum.kirupa.com/u/The_Waiter)\
**Post date:** [November 20, 2006, 11:19pm UTC](https://forum.kirupa.com/t/declaring-variable-for-combobox-components/207724/1 "2006-11-20T23:19:10Z")

</div>

I have been given so much help on this subject -  
But today I’m asking for one last piece of the combobox puzzle!!

How do I declare my variable to be used with my combobox so the data/var is made available to my php script?

I have supplied my combobox variable via components - NOT actionscript.

My combobox is driven by the follwing code:

var myListener:Object = new Object();  
combo\_cb.addEventListener(“change”, myListener);  
myListener.change = function(evt){  
\_root.cb\_entry = combo\_cb.selectedItem.data;

}

I know my php works - it’s just a matter of declaring the variable in as2.

\_root.cb\_entry = “”;

doesn’t work.  
Any suggestions?  
 ![](http://forum.kirupa.com/uploads/kirupa/615/b7e0d890f190c4d7.gif)[![](http://www.actionscript.org/forums/images/buttons/report.gif) ![](http://www.actionscript.org/forums/images/misc/progress.gif) [URL=“http://www.actionscript.org/forums/editpost.php3?do=editpost&p=554466”] ![](http://www.actionscript.org/forums/images/buttons/edit.gif)](http://www.actionscript.org/forums/report.php3?p=554466)
