Introduction to ActionScript Learning-voice control

Source: Internet
Author: User
Control animation If there is no sound, the effect must be greatly compromised. Readers must have seen some of the more excellent Flash animation bar, the screen may not be complex, and may even be more rough, but in good sound effect with the cooperation, you see after also feel quite powerful miles. And when the button moves, you might want to add some sound. After all, now is the era of multimedia, the site only animation no sound, how can attract the eyeball?
In Flash 4, the control of the sound is very simple, you do not need any interference, as long as in the need to add your favorite frame of the sound on it, and Flash 4 you can simply adjust the sound effect, such as the left and right channels, from small to large effects, from large to small effects and so on. You can also control whether a sound is allowed to play. Although this has been able to achieve a certain effect, however, our control of sound is generally very weak.
flash 5 Strengthens the sound control, especially by adding a sound object that you can use to play any sound you want anywhere, without having to cling to the frame. You can also adjust the sound playback effect, intensity, control the sound playback time, and so on.

£ sound-related functions and their general forms
stopallsounds ()
Immediately stop playing all the sounds in the entire animation.

£ Sound Object Sound
The sound object is defined as follows:
attachsound (<idName>)
Directly bind a sound in the library, Idname is the name of the sound in the library.
getpan ()
Get the mixed usu of sound.
gettransform (<sxForm>)
Gets the current sound's transformation amount.
getvolume ()
Gets the volume of the current sound (percentage)
new Sound ()
New sound instance.
setpan (<pan>)
Set the sound mixed usu.
settransform (<sxForm>)
Sets the current sound's transformation amount.
setvloume (<volumn>)
Set the volume of the current sound, volumn as a percentage, in the range of 0-100.
start ()
Start playing the current sound.
stop ()
Stop playing the current sound.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.