AS3 dynamic array names???
I've been trying to wrap my head around this for the past few days and have tried numerous iterations and thought someone might have some insight...
I've got an array (slides) that I parsed from an amfphp return that contains the following data in each array element:
slides = (chapterName, lessonName, slideName, slideText), for every slide in the course
I'm trying to get arrays out this that will look like:
chp1Array = list of Lesson names in that Chapter
chp1Less1Array = list of slide names in that Lesson
chp1Less2Array
chp2Array
chp2Less1Array
chp2Less2Array
chp2Less3Array
etc. etc.
This wouldn't be a problem in as2 but I can't get it to work in AS3 because it gives me errors when I try to create the arrays with dynamic names from within the function?
I've tried several different methods, but none seem to quite get what I need because I can't figure out how to get the dynamic number into the array name...
Any ideas??