O'Reilly logo

The ActionScript™ 3.0 Migration Guide: Making the Move from ActionScript 2.0 by Kris Hadlock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Sound

LET’S FACE IT—SOUND IS FUN to work with! Unfortunately, when working with sound in ActionScript 2, we’ve had to create a lot of the functionality ourselves, using custom code. In ActionScript 3, we no longer need to write custom code when working with the Sound object, but in general, we have to write more lines to achieve the same effects. Fortunately, existing code is always easier to write than customized code.

Loading

The ability to play sound with ActionScript usually begins with the loading of an external MP3.

AS2: Loading

Loading an external sound file with ActionScript 2 is fairly simple. First you create a Sound object instance and add it as a class property for later access in the class. Once the Sound instance is created, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required