Re: [Flashcoders] dynamically naming sound objects?

2006-03-10 Thread murder design
paths are ok, playing them without dynamically loading and placing into arrays is fine. the trace of the array results in: [Object Object] four times, however no play. here is my complete code, no errors, but no results: when i give each sound object the same name, does that matter if there is a

Re: [Flashcoders] dynamically naming sound objects?

2006-03-10 Thread Marc Hoffman
Offhand I'm not sure of the problem -- anyone else have an idea? It could be as simple as the use of False rather than false in that last line. But I also wonder about two things: First, I would expect a trace of the mySounds array to return a list of paths to the sounds, not [Object

Re: [Flashcoders] dynamically naming sound objects?

2006-03-10 Thread Bob Leisle
I can think of 2 possibilities causing your trouble: 1. By using 1 name for all your Sound objects, each one is over-writing the one before it. So what you end up with is 4 references to the same Sound, the last one in the loop. 2. It's possible that you're trying to play the sounds before

[Flashcoders] dynamically naming sound objects?

2006-03-09 Thread murder design
I am trying to create a reusable function to load sound objects, dynamically naming them in sequence, and dynamically placing them into an array to hold a pointer to them. however, they do not seem to be being created. any ideas? // begin code var mySounds:Array = new Array(); var sPath:String =

Re: [Flashcoders] dynamically naming sound objects?

2006-03-09 Thread Andy Johnston
function loadSounds() { for (var i:Number = 0; i mySounds.length; i++) { sRef = _root[sound+i] // I assume sRef is a already created movieClip var testSound:Sound = new Sound(sRef); sounds_array.push(testSound); testSound.loadSound(mySounds[i], False); } } I am trying to create a

Re: [Flashcoders] dynamically naming sound objects?

2006-03-09 Thread Marc Hoffman
What makes you think they're not being created? Have you traced the array? More likely, the paths to the mp3's are wrong, in which case testing from the Flash API you'd get output errors indicating the file could not be found/loaded. FYI, sound objects are just code objects created in