poppy.thiggins / code / list-array converter functions

 

list-array converter functions

I've created a simple *.ls file that contains two JS functions for use inside of Director MX 2004. Each function serves as a converter to allow conversion of Lingo linear and property lists to JS arrays or associative array objects as well as the reverse, from JS arrays or associative array objects to Lingo linear or property lists. Each function recurses through the data provided and converts any internal data structures through recursive function calls. Download the *.ls file and import it into a given file as a Movie script in order to expose the listToArray() and arrayToList() function calls. See the code comments for documentation regarding these functions.

NOTE: as of the last update these functions only convert between Lingo lists and JavaScript syntax arrays, updates are planned that will allow conversion between those data formats as well as Flash arrays, whether globally created or used within a specific Flash sprite.

 

downloads
ListArray_converters.ls (~8Kb)