  | |  | multidimensional array questions - from a director programmer | multidimensional array questions - from a director programmer 2004-02-25 - By Merrill, Jason
Back :::>I've done some research and it looks like Flash doesn't :::>support property lists so the next best thing is to create :::>a multdimensional list in the same fashion.
Ah - no it doesn't BUT: In my opinion, in Flash you use something better - you can design Objects to hold the data. i.e.:
fruit_data = {}; //declare the object fruit_data.bowl1 = "Apples"; fruit_data.color1 = "Red"; fruit_data.bowl2 = "Oranges"; fruit_data.color2 = "Orange"; fruit_data.bowl3 = "Pears"; fruit_data.color3 = "Green";
or,
fruit_data = {}; //declare the object fruit_data = {bowl1:"Apples", color1:"Red"}
This is a very simplistic example, but you can see Flash doesn't support property lists because it doesn't need to. You can of course store objects inside of arrays or multidimensional arrays as well. i.e.:
thisColor = myArray[3][5].color3
or:
for(i=0; i<=files.length; i++){ for(n=0; n<=myLimit; n++){ this["instance"+i] = myArray[i][n]["color"+i] } }
Jason Merrill ICF Consulting Government e-Learning Solutions icfconsulting.com
NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited.
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105239 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |