Gerry,
> "Raymond Basque" <webforumsuser@macromedia.com>
wrote
> in message news:frre65$o1m$1@forums.macromedia.com...
> It certainly works here.
Agreed. In principle, you're taking an array, converting it
to a
string, then converting that comma-delimited string back into
an array.
It's an effort in tautology ... unless I misunderstand what
you're after,
you're ending up with the same thing you started with.
In your sample code from an earlier post in this thread, you
ended up
naming a variable "myNewString," but you set it to an array.
var comboSelectedLabels:Array = new Array("a", "b", "c");
var myString:String = comboSelectedLabels.toString();
trace(myString);
var myNewString:Array = myString.split(",");
trace(myNewString);
In this revision, I've tried to clarify that. The
String.split() method
returns an array (see the String.split() entry in the AS2
Language
Reference), so you wouldn't easily be able to populate a text
field with the
content of myNewString.
If you want to display your list in a text field, you can
step through
the original array's elements and use a for() loop. I'm not
sure if this is
what you're after, but for what it's worth ...
var comboSelectedLabels:Array = new Array("a", "b", "c");
for (var n:Number = 0; n < comboSelectedLabels.length;
n++) {
myTextField.text += comboSelectedLabels
+ "\n";
}
Does that help?
David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."