Putting this here for safe keeping. Basically this is a way to deal with sound now in AS3. Previously it was documented how to do things with sound using attachSound, however that is no longer in AS3. Now, all the documentation points to loading in external MP3s and playing them that way. The problem I found, however, is that it’s not documented how to programatically manipulate audio in sounds which you create classes for in the library, (the new way of ‘linking’ things…)
Got RIA? » Instantiating Classes in AS3 Without eval() or [ ]
var dynamicClass:String = “com.brianmriley.apps.MyClass”;
var classRef:Class = flash.utils.getDefinitionByName(dynamicClass) as Class;
var myClass:com.brianmriley.apps.MyClass = new classRef();
// var myClass:* = new classRef();
//…much cleaner
FlashBrighton » Blog Archive » how to make actionscript 3 play generated pcm wave data
var soundClass:Class=loaderInstance.contentLoaderInfo.applicationDomain.getDefinition(“SoundClass”);
var sound:Sound=new soundClass();
sound.play();
Related posts: