Detailed description of the sound object in ActionScript

Source: Internet
Author: User
● Sound object (sound) ●

New sound ([MC])
Define a sound object that controls the sound under MC (by default, all sounds of the video.

Mysound. attachsound (id_string)
Connect to the sound id_string (the export label set for the sound in the group meta library during editing, that is, linkage> export ). After the sound is connected, it belongs to the video clip specified by mysound during definition.
Function to control playback.

Mysound. Start ([begin_num, loop_num])
Start playing the last connected sound (through the attachsound function ). Begin_num specifies the start position (in seconds. The default value is 0. If the value is smaller than 0, the start value is 0.) And loop_num specifies the number of cycles (the default value is 1, if the value is less than 1, it is counted as 1. Each cycle starts from the specified starting position. This action does not affect the current playback of other sounds.

Mysound. Stop ([id_string])
Stop all sounds that are identified as id_string in The Sound controlled by mysound (all sounds controlled by mysound by default ). For example, mysound is defined as control _ root. and _ root. at present, three sounds are playing under MC (whether using mysound. start is still placed at the time of editing), one of which comes from the sound of the connection identifier "id1", and the other two are from the sound of the connection identifier "ID2, then mysound. stop ("ID2") will stop the two of the sounds from the connection identifier "ID2.

= Mysound. getvolume ()
Returns the current volume of mysound (0 ~ 100 ). 0 indicates no sound, 100 indicates the standard volume (initial
The initial volume is 100 ).

Mysound. setvolume (Num)
Set the current volume of mysound to num (0 ~ 100 ). This setting affects the control of mysound.
All sounds.

= Mysound. getpan ()
Returns the current audio channel offset of mysound (-100 ~ 100 ). -100 indicates pure left audio channel, and 100 indicates
Pure right channel (Initial Value: 0 ).

Mysound. setpan (Num)
Set the current channel offset of mysound (-100 ~ 100 ). This setting affects the control of mysound.
All sounds.

= Mysound. gettransform ()
Returns the current sound transformation of mysound. The returned value is an object with the following members: LL, LR, rl, and RR.
(For more information, see the mysound. settransform function ). The initial values are LL: 100, LR: 0, RL: 0, RR: 100.

Mysound. settransform (Transform)
Set the current sound of mysound to transform. This setting affects all sounds controlled by mysound. Tansform includes members: LL (output ratio of left audio to left audio), LR (output ratio of left audio to right audio ), RL (output ratio of the right audio in the left audio channel) and RR (output ratio of the left audio in the right audio channel ). The value ranges from 0 ~ Between 100, 100 indicates the standard volume. If the value is smaller than 0, the absolute value is taken. If the value is greater than 100, it indicates the output of the overtone, which leads to high-end distortion ). For example, to output in a single channel, it can be set to LL: 50, LR: 50, RL: 50, RR: 50. If you want to output all sounds in one left channel, it can be set: LL: 100, LR: 0, RL: 100, RR: 0.

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: 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.