TwelvestoneFlash

Create an array of anonymous sound objs - how?


Sign in

  • Waiting for Godot ( 720 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 4.8 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.8 k posts )
    general front end design an...
  • Back End ( 9.6 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
mattp52
 
2003-01-28

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..?

mosquito
 
2003-01-28

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.

mattp52
 
2003-01-28

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... k

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

Create an array of anonymous sound objs - how?