我在卡1上創建播放器並將播放器的文件名設置爲path/sound
。我將獨立應用程序保存到Windows。當我點擊按鈕開始。聲音不起作用。發生了什麼?無法播放WAV文件
這是我的代碼:
堆棧:
on preOpenStack
if the platform is "Win32" then
set the dontUseQT to true
set the dontUseQTEffects to true
end if
end preOpenStack
卡:
on mouseUp
set itemDel to slash
put the effective filename of this stack into realpath
delete last item of realpath
if environment() is not "mobile" then
set the fileName of player "player" to (realpath & slash & "assets/sounds/click.wav")
set the currentTime of player "player" to 0
start player "player"
else
put realpath & slash & "assets/sounds/click.wav" into tPath
put "clickbtn" into tChannelName
mobilePlaySoundOnChannel tPath, tChannelName , "now"
end if
end mouseUp
你寫您保存到獨立的「窗口」。那是什麼意思?你真的在「C:\ Windows」中保存你的獨立版嗎?那將是錯誤的。 – Mark 2014-10-18 14:11:09