Hi all,
In my code I need something to call the right soundfile from an array, like how I call a MC in the code below:
var currentBTN:String = event.currentTarget.name;
var currentMC:MovieClip = getChildByName ("mc_" + currentBTN) as MovieClip;
I tried that with:
var currentSND:Sound = getDefinitionByName ("snd_" + currentBTN) as Sound;
and:
var snd_name:Class = getDefinitionByName ("snd_" + currentBTN) as Class;
var currentSND:Sound = new snd_name();
but both don’t seem to work. I get the following error: #1065 variable snd_screenen is not defined. However I did define it, earlier in the code with:
var snd_screenen:Sound = new SCREENEN();
var snd_behandelen:Sound = new BEHANDELEN();
And I also gave de sounds a class name in my library. So I’m out of options…