QQ聊天

MaxScript播放wav

--ActiveX版本
rollout test
"Test" width:350
(
--去掉visible可以显示出播放控制界面
ActiveXControl axmp
"MediaPlayer.MediaPlayer" height:50 visible:false
on test open
do
(
axmp.filename
= "d:\\games\\小鬼的罗嗦.wav"
--这个参数如果为0,则是一直重复,其他数字为重复次数
axmp.playCount
=1
axmp.play()
)
)

-- .Net版本
SoundPlayer
= DotNetObject "System.Media.SoundPlayer"
SoundPlayer.SoundLocation
= "d:\\games\\小鬼的罗嗦.wav"
SoundPlayer.Play()
/*
SoundPlayer.PlayLooping()
SoundPlayer.Stop()
*/
posted @ 2011-06-21 16:18  SITT  阅读(511)  评论(0编辑  收藏  举报
QQ聊天