S > Sound.setPan |
Sound.setPan
지원 버전
Flash Player 5
구문
mySound.setPan(pan);
매개 변수
pan 사운드의 왼쪽-오른쪽 균형을 지정하는 정수입니다. 유효한 값의 범위는 -100에서 100까지입니다. 여기서 -100은 왼쪽 채널만 사용하고 100은 오른쪽 채널만 사용하며 0은 두 채널 사이에 똑같이 사운드 균형을 맞춥니다.
반환값
없음
설명
메서드; 왼쪽과 오른쪽 채널(스피커)에서 사운드가 재생되는 방식을 판별합니다. 모노 사운드의 경우 pan은 사운드가 재생되는 스피커(왼쪽 또는 오른쪽)를 판별합니다.
예제
다음 예제에서는 Sound 객체 s의 인스턴스를 만들고 라이브러리에서 식별자 L7을 가진 사운드를 첨부합니다. setVolume 및 setPan 메서드를 호출하여 L7 사운드를 조절하기도 합니다.
onClipEvent(mouseDown) {// create a sound objects = new Sound(this);// attach a sound from the librarys.attachSound("L7");//set volume to 50%s.setVolume(50);//turn off the sound in the right channels.setPan(-100);//start 30 seconds into the sound and play it 5 timess.start(30, 5);
참고 항목
Sound.attachSound, Sound.setPan, Sound.setTransform, Sound.setVolume, Sound.start