Hi,
I'm trying to create an array of anonymous sound objects I want to access by index rather than name.
Code looks like this... where main is a global variable pointing to the main timeline
main.narrTracks = new Array();
main.narrTracks[0] = new Sound(main).attachSound("rules1");
This just gives me an undefined value though. Anyone know how this is done..?
typically when i'm shoving things into arrays i'll create the object first, then shove it into the array. kind of like:
MainContainer_array = new Array(); mySound = new Sound(); mySound.attachSound("myfile"); MainContainer.push(mySound);
but that's pretty much the "longhand" approach to it. honestly i haven't played around with the sound object as much as i'd like to, but i know were-here's Hayden has a whole bunch of stuff up at Sonify.org in the tutorials section. maybe check there as i know he's covered stuff like this before.
Thanks, I'll check that link out. It's not a show-stopper but would be nice to minimise the amount of variable names I'm throwing around... 