質問

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