I was just perusing the Flex/Flash API docs online, and noticed some
changes in AS 3 to the Sound class which alarm me. An application I am
working on now has essentially a simple wavetable synth, which has a
lot of assets named by note (e.g. "c#4"), and at runtime instantiates
a bunch of Sound objects, using attachSound() on each to initialize
the synth.

attachSound() has been removed from AS 3, and the docs' explanation of
how one would do this now do not make sense to me. For one thing, they
involve associating a unique class with each sound asset, unless I'm
confused.

Is anyone using event sounds a lot in AS 3, and care to comment?
Wondering how I will port my code, and eager to move on to AS 3 at
some point here...

Oh and another technical note: I discovered when I load sounds from an
external SWF, that Sound objects must be constructed specifying the
level where the loaded sound exists* in order to work properly. So
when calling from my main movie, I need to loadMovie("soundbank.swf")
and then do new Sound(_level1) for each sound object. Wondering if
this is different in AS 3, seeing as levels are no more.

* Even weirder, if I instantiate the Sound objects *inside* the loaded
soundbank movie, they need to be constructed as new Sound(_root), even
though when loaded the movie is definitely at level1. Presumably
something about how _root is resolved at compile-time...
_______________________________________________
[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