"rsromeo" wrote:
how do you create an array of associated arrays? I'm guessing thats what I need to pass into the for-next loop. I tried this with an roList and it didn't work. It only played first video and then jumped out of channel when done.
assarray=CreateObject("RoArray",1,true)
assarray=[{key1:"dog",key2:"cat"},{key1:"apple",key2:"pear",key3:"banana"},{key1:"audi",key2:"mercedes",key3:"jaguar"}]
so now assarray is an array of associative arrays where
BrightScript Debugger> ?assarray
<ROT:roAssociativeArray>
<ROT:roAssociativeArray>
<ROT:roAssociativeArray>
BrightScript Debugger> ?assarray[0]
key2: cat
key1: dog
BrightScript Debugger> ?assarray[1]
key3: banana
key2: pear
key1: apple
BrightScript Debugger> ?assarray[2]
key3: jaguar
key2: mercedes
key1: audi
BrightScript Debugger> ?assarray[2].key2
mercedes
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!