1、引入声音控件
在tour.xml加入导入插件代码
<plugin name="soundinterface"
url="%SWFPATH%/plugins/soundinterface.swf"
alturl="%SWFPATH%/plugins/soundinterface.js"
rootpath=""
preload="true"
keep="true"
/>
或在tour.xml调用sound.xml文件
<include url="%SWFPATH%/sound/sound.xml" />
2、加入调用声音代码
- 一般声音:playsound(bggsnd, '%SWFPATH%/sound/music1.mp3', 10);
- 方向声音:playsound3D(s1,music1.mp3, 0,0);
- 暂停声音:pausesound(bggsnd);
- 恢复声音:resumesound(bggsnd);
- 暂停/恢复声音:pausesoundtoggle(bggsnd);
- 停止声音:stopsound(s1);
- 停止所有声音:stopallsounds();
转自:网络 - 隶属于 KRpano教程。来自:www.ibixue.com