If you want an associative array like that use Object, not Array. The length of an array is the number of elements in the array, so it's 0. obj["name"] is referring to an attribute of an object not an element of an Array..

Do you really have to store values like that?

Paul


----- Original Message ----- From: "laurent" <[EMAIL PROTECTED]>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Monday, October 27, 2008 1:35 PM
Subject: [Flashcoders] AS3 associativ array length=0


Hi,

I use an array to store object with their name like that:
views[ "viewName" ] = Object

then views.length return 0 ...

It's normal behaviour ?? length work only on numerical indexes ?

L

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to