Sound start - stop
Submitted by veled on July 29, 2008 - 13:30.
i'm trying to make a start - stop button for sounds. and i don't want to start the sound automaticly when the scene loaded. i make a code lik this;
<?xml version="1.0" encoding="utf-8"?>
<tour>
<global>
<meta>
<defaultview scene="scene1" pan="180" tilt="0" fov="60"/>
<cameralimits panmin="-180" panmax="180" tiltmin="-1" tiltmax="1" fovmin="30" fovmax="60" />
</meta>
<uigroup src="#tool" />
<!-- special ui group that allows us to resize/position the panoramic camera rect
note that this is an actual group and it can contain elements like any other group -->
<uigroup id="_viewport" width="100%" height="-50" valign="top" halign="left" />
<!-- a couple of images that are referenced from multiple elements -->
<image id="bg-white" width="16" height="16">
<layer class="base" type="matte" color="FFFFFF"/>
</image>
<image id="dot" width="16" height="16">
<layer class="base" type="matte" color="202020" alphatype="bitmap" alphasrc="#dot-open"/>
<layer class="hover" type="matte" color="a02020" alphatype="bitmap" alphasrc="#dot-open"/>
<layer class="press" type="matte" color="a02020" alphatype="bitmap" alphasrc="#dot-filled"/>
<layer class="disabled" type="matte" color="202020" alphatype="bitmap" alphasrc="#dot-arrow"/>
</image>
<image id="fotografl" width="222" height="50">
<layer class="base" type="bitmap" src="#fotograf"/>
<layer class="hover" type="bitmap" src="#fotograf"/>
<layer class="press" type="bitmap" src="#fotograf"/>
<layer class="disabled" type="bitmap" src="#fotograf"/>
</image>
<image id="hs">
<layer class="base" type="matte" color="FF00FF" alphatype="bitmap" alphasrc="#hs-circle-alpha"/>
<layer class="hover" type="matte" color="FF0000" alphatype="bitmap" alphasrc="#hs-circle-alpha"/>
<layer class="press" type="matte" color="FFFF00" alphatype="bitmap" alphasrc="#hs-circle-alpha"/>
<layer class="disabled" type="matte" color="808080" alphatype="bitmap" alphasrc="#hs-circle-alpha"/>
</image>
<uigroup id="branding-bar" width="100%" height="64" halign="center" valign="bottom" zorder="9">
<!-- top bar graphics -->
<uielement id="bar-bg" image="bg-white" width="100%" height="100%" zorder="1" />
<uielement id="bar-left" halign="left" zorder="2">
<image><layer class="base" type="bitmap" src="#hirshhorn_bar" /></image>
</uielement>
<uielement id="linkus" image="dot" halign="left" zorder="4">
<behavior><action event="release" type="setView" scene="hirshhorn00" /></behavior>
</uielement>
<!-- info Element -->
<uielement id="bar-info_hide" halign="right" hoffset="-13" voffset="10" zorder="3" visible="false">
<image>
<layer class="base" type="matte" color="000000" alphatype="bitmap" alphasrc="#map-hide" />
<layer class="hover" type="matte" color="a02020" alphatype="bitmap" alphasrc="#map-hide" />
</image>
<behavior>
<action event="release" type="setProperty" property="active" target="info-shifter" value="true" />
<action event="release" type="setProperty" property="visible" target="bar-info_hide" value="false" />
<action event="release" type="setProperty" property="visible" target="bar-info_show" value="true" />
</behavior>
</uielement>
<uielement id="bar-info_show" halign="right" hoffset="-13" voffset="10" zorder="3">
<image>
<layer class="base" type="matte" color="000000" alphatype="bitmap" alphasrc="#map-show" />
<layer class="hover" type="matte" color="a02020" alphatype="bitmap" alphasrc="#map-show" />
</image>
<behavior>
<action event="release" type="setProperty" property="active" target="info-shifter" value="true" />
<action event="release" type="setProperty" property="visible" target="bar-info_show" value="false" />
<action event="release" type="setProperty" property="visible" target="bar-info_hide" value="true" />
</behavior>
</uielement>
</uigroup>
<ramp id="info-shifter" value1="0" value2="-320" duration=".3" pingpong="true">
<behavior>
<action event="change" type="setProperty" property="hoffset" target="opaque-info" value='=getProperty("info-shifter","value")' />
</behavior>
</ramp>
<uigroup id="info-container" height="100%" halign="right">
<uigroup id="opaque-info" width="396" valign="center" halign="left" hoffset="0" voffset="170" zorder="8">
<uielement id="op-info" zorder="2">
<image id="op-infop-img"><layer class="base" type="bitmap" src="#info"/></image>
</uielement>
<!-- information menu -->
<uielement id="foto1" image="fotografl" hoffset="-10" voffset="130" zorder="3">
<behavior><action event="release" type="setProperty" target="soundui" property='=setProperty("soundui","value")' /></behavior>
</uielement>
</uigroup>
</uigroup>
</global>
<scene id="hirshhorn00">
<panoelement id="hh06_pano">
<image><layer class="base" type="bitmap" src="#hh06" /></image>
</panoelement>
<panoelement id="fotocuk" type="flat" hfov="22" vfov="20" pan="140" tilt="0" zorder="3" visible="false" >
<image><layer class="base" type="bitmap" src="#xfoto" /></image>
</panoelement>
<uielement id="soundui" visible="false">
<sound id="soundID" src="prelude.mp3" volume="90" ambient="20" pan="0" tilt="0" radius="0" streaming="true" loop="true" active="true" />
</uielement>
</scene>
</tour>but it is not working =( how can i fix this?
fieldOfView | SPi-V dev
Re: Sound start - stop
it is okey now. tried a lot of thinh, now it is working.