680
Chapter 7: ActionScript for Flash
Sound class
Availability
Flash Player 5.
Description
The Sound class lets you control sound in a movie. You can add sounds to a movie clip from the
library while the movie is playing and control those sounds. If you do not specify a target when
you create a new Sound object, you can use the methods to control sound for the whole movie.
You must use the constructor
new Sound
to create a Sound object before calling the methods of
the Sound class.
Method summary for the Sound class
Property summary for the Sound class
Method
Description
Sound.attachSound()
Attaches the sound specified in the parameter.
Sound.getBytesLoaded()
Returns the number of bytes loaded for the specified sound.
Sound.getBytesTotal()
Returns the size of the sound in bytes.
Sound.getPan()
Returns the value of the previous
setPan()
call.
Sound.getTransform()
Returns the value of the previous
setTransform()
call.
Sound.getVolume()
Returns the value of the previous
setVolume()
call.
Sound.loadSound()
Loads an MP3 file into Flash Player.
Sound.setPan()
Sets the left/right balance of the sound.
Sound.setTransform()
Sets the amount of each channel, left and right, to be played in
each speaker.
Sound.setVolume()
Sets the volume level for a sound.
Sound.start()
Starts playing a sound from the beginning or, optionally, from an offset
point set in the parameter.
Sound.stop()
Stops the specified sound or all sounds currently playing.
Property
Description
Sound.duration
Read-only; the length of a sound, in milliseconds.
Sound.id3
Read-only; provides access to the metadata that is part of an MP3 file.
Sound.position
Read-only; the number of milliseconds a sound has been playing.
CHAPTER 7
ActionScript for Flash
Содержание FLEX
Страница 1: ...Flex ActionScript Language Reference ...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0 ...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally ...
Страница 135: ...case 135 See also break default strict equality switch ...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while ...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in ...
Страница 808: ...808 Chapter 7 ActionScript for Flash ...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators ...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code ...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values ...
Страница 822: ...822 Index ...