我在卡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