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();
本文章原創自“域圖新視界”victu360.com
最新krpano文檔、插件更新、視頻教學、全景視頻後期、免費全景VR教程資料下載:http://victu360.com