[flashpro] external list and array description

elusive elu at elusive.de
Thu Sep 22 05:52:44 EDT 2005


you could put your vars into the text document like this:
valeurs="value1_value2_value3"
and after loading it create the arrey like this:
_global.my_array=new Array()
_global.my_array= valeurs.split("_")

hope this helps

elu
Am 22.09.2005 um 11:25 schrieb eric choisy:

> hi
>
> well, i'm trying to use an external text file with a formated  
> string like that
>
> valeurs=tableMenu[1] = []&tableMenu[1].titre = "Sécurité"&tableMenu 
> [1].nom = "m_1"&tableMenu[1].menu = []&tableMenu[1]["menu"][1] = [];
>
>
> these vars describe an associative array "tableMenu" and would like  
> to create it by parsing the file...
>
> some think like that :
> for (var i= 0; i<myLoadVars.length; i++) {
>         _global["g"+i] = this[i]
>     }
>
> but it doesn't "eval" the firs argument as an "instruction to fill  
> the array.
>
> hope i'm clear
>
> best regards
>
> eric------------------------------------------------------------------
> send message to the list:               mailto:flashpro at muinar.org
> [FlashPro] list info, subscribe, archive:   http://flash-list.com/
> There's also a WebPro mailing list:     http://webdesign-list.com/
> cutting-edge sounds for flash:            http://flash-sounds.com/
>



More information about the FlashPro mailing list