public class SndFx
{
[Embed(source="Sounds/01.mp3")]
public static const s01:Class;
public static const s01s:Sound = new s01() as Sound;
[Embed(source="Sounds/02.mp3")]
public static const s02:Class;
public static const s02s:Sound = new s02() as Sound;
[etc...]
}
Can I access these attributes dynamically? I've got a number of which sound I want to play, and I want to do something like this:
SndFx["s"+numberStr+"s"].play();