# AS noob needs help!

**URL:** <https://forum.kirupa.com/t/as-noob-needs-help/58537>\
**Category:** flash\
**Created:** [July 23, 2004, 9:37am UTC](https://forum.kirupa.com/t/as-noob-needs-help/58537 "2004-07-23T09:37:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sikth007](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sikth007](https://forum.kirupa.com/u/sikth007)\
**Post date:** [July 23, 2004, 9:37am UTC](https://forum.kirupa.com/t/as-noob-needs-help/58537/1 "2004-07-23T09:37:52Z")

</div>

Hiya, I’ve got a simple yet frustrating problem in MX 2004. I’ve got a combo box in my movie (called news\_selector), whenever the selection of the combo box changes, I want to do something. Here’s my code for the combobox so far…

```auto
 
on(change)
{
trace("News feed changed to: " +news_selector.selectedIndex);
if (news_selector.selectedIndex == 1) 
{ 
	 newsFeed.URL = "[http://www.movabletype.org/news/index.rdf](http://www.movabletype.org/news/index.rdf)";
	 newsFeed.direction = "receive";
	 newsFeed.ignoreWhite = true;
	 newsFeed.trigger(); 
} 
else if(news_selector.selectedIndex == 2) 
{ 
	 newsFeed.URL ="[http://www.trainingfromthesource.com/blog/index.rdf](http://www.trainingfromthesource.com/blog/index.rdf)";
	 newsFeed.direction = "receive";
	 newsFeed.ignoreWhite = true;
	 newsFeed.trigger(); 
} 
} 

```

The problem is that the news\_selector.selectedIndex bit is showing as undefined in the debug window, and thusly the if/else statements are ignored completely. What am I doing wrong exactly? Help!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2004, 10:47am UTC](https://forum.kirupa.com/t/as-noob-needs-help/58537/2 "2004-07-23T10:47:20Z")

</div>

Ok I managed to fix it. Just needed to use “this” instead of the combo boxes instanct name 🙂
