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 ActionScript, not external assets. To be clearer, your post should be referring to "sound files" or "mp3 files."

At 02:04 PM 3/9/2006, you wrote:
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 = "sound/loops/";
mySounds[0] = sPath + "Accident-Broadkas-8819.mp3";
mySounds[1] = sPath + "5-jakkob-2501.mp3";
mySounds[2] = sPath + "albert-Mikkel_M-204.mp3";
mySounds[3] = sPath + "delerium-queali-1634.mp3";

var sounds_array:Array = new Array();
var sBaseName:String = "sound";
function loadSounds() {
 for (var i:Number = 0; i < mySounds.length; i++) {
  sRef = _root["sound"+i]
  sounds_array.push(sRef = new Sound());
  sRef.loadSound(mySounds[i], False);
 }
}

// end code

i have no problems dynamically creating mcs and naming them dynamically, but
this method does not seem to be appliying to this scenario. just a direction
would be helpful..

-edward
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to