View Full Version : Question - array

04-01-2009, 06:13 PM
I have a class (FSL) that has various arrays with values such as:

private const englishYesNo:Array = new Array([
public function getEnglishYesNo():Array {
return englishYesNo; }

private const spanishYesNo:Array = new Array([
public function getSpanishYesNo():Array {
return spanishYesNo; }

In an actionscript file I instantiate that and then try to assign it to local variables that are bindable to mxml objects(fields). This isn't working right. Here is one of the assignments:

[Bindable] public var spanishYesNo:Array = FSL.getSpanishYesNo();

The results as seen in the variables window in debug is spanishYesNo has one array entry that has an array of two values (the yes or no values). It appears to be an array (one entry) of an array (two entries).

Needless to say, that is not what I want. How do I get it to become:
spanishYesNo[0] = "si"
spanishYesNo[1] = "no"
instead of
spanishYesNo[0][0] = "si"
spanishYesNo[0][1] = "no"