Yeah, you may want to try an indexed(?, sorry tired!) array:

var a:Array = new Array();
a["b"]  = 1;
.
.
a["d"] = 4;

then,

var y:Number = a["b"];

will result in y == 1;

Scott

On 9/18/06, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote:

Hi list...

Is there an easy/quick way to find out if an item is in an array?  For
instance:
Var a:Array = ["a","b","c","d"];
Var y:Number = a["b"];
//y would be the position in the array of "b" or undefined if it's not
in the array/

I'm looking for the equivalent of Director's getOne() function.

Thanks,
- Michael M.

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--

: : ) Scott
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to