Flash C3 List Selection help

For some reason my list doesn't "select" anything

Page 1 of 1

0 Replies - 741 Views - Last Post: 14 April 2009 - 12:09 PM

#1 StanKnight  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 25
  • Joined: 14-April 09

Flash C3 List Selection help

Post icon  Posted 14 April 2009 - 12:09 PM

Hi everyone!

I'm fairly new to flash and need some help with the list component. The code is as follows...

This is how I load the list...

function CreateList() {
	var index:Number;	
	var file:String;
	var song:String;
	for(index = 0; index < numSongs; index++)
	{
		file = SongsArray[index];
		song = NamesArray[index];
		listSongs.addItem({label:song, data: SongsArray[index]});
	}
}


And this is how I'm trying to do the list select...

on(change)
{
	trace(listSongs.selectedIndex); //listSongs is the listbox
}


And for some reason it comes back as "undefined" when I try to "click" an item in the list box.

So does anyone know what I'm doing wrong?

Any help is appreciated :).

- Stan :)

Is This A Good Question/Topic? 0
  • +

Page 1 of 1