krpano 加入背景音樂


krpano version="1.19" pr16

1、在tour.xml里加入

<plugin name="soundinterface"
    url.flash="%SWFPATH%/plugins/soundinterface.swf"
    url.html5="%SWFPATH%/plugins/soundinterface.js"
    rootpath=""
    preload="true"
    keep="true"
    />


<action name="bgsnd_action" autorun="onstart">
   playsound(bgsnd, 'backgroundmusic.mp3', 0);
</action>


其中backgroundmusic.mp3放在根目錄下

2、在vtourskin.xml中查找layer的name為skin_btn_vr、skin_btn_fs,在這兩個layer之間加入黑體字部分的代碼

<layer name="skin_btn_vr"   style="skin_base|skin_glow" crop="0|0|80|64"    align="center"      x="+146" y="0"  scale="0.5" onclick="webvr.enterVR();" visible="false" />

<layer name="skin_btn_sound"     style="skin_base|skin_glow" crop="64|704|64|64"  align="right"      ox="0"   x="130"   y="0"  scale="0.5" onclick="pausesoundtoggle(bgsnd);switch(crop,64|704|40|64,64|704|64|64);switch(alpha,1,0.25);switch(ox,0,-12)"  />

<layer name="skin_btn_fs"        style="skin_base|skin_glow" crop="0|576|64|64"  align="right"       x="90"   y="0"  scale="0.5" onclick="switch(fullscreen);" devices="fullscreensupport" />


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM