문제

I have some problem =(
I am very new to as3 and I am stuck! please help me T_T)

Right after the code (timeText.text = "ALARM!!!";) I added one more line so that it can play a sound rather than just showing "ALARM" which was this

var s:Sound = new Sound(new URLRequest("test.mp3"));

I put test.mp3 in the same directory but it doesn't play the sound when time is up to alarm.

도움이 되었습니까?

해결책

var mySound:Sound = new Sound();
mySound.load(new URLRequest("myFavSong.mp3"));
mySound.play();

http://www.republicofcode.com/tutorials/flash/as3sound/

This tutorial helps you to understand how to play sound in flash.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top