PDA

View Full Version : MP3 noisy preload


greg
01-13-2011, 06:33 AM
I'm using several MP3 sounds that way:

<view id="backgroundSound" play="false" source="00.mp3" />

The idea is to preload sound to be used later. However, when the view is created, the first half second the sound is played. I tried to use:

<view id="backgroundSound" play="false" >
<handler name="oninit" >
this.setAttribute("source", "00.mp3");
</handler>
</view>

... same result. What am I doing wrong??

bitwalker
01-13-2011, 03:07 PM
Yeah, thats annoying isn't it. I always have to do it like this

<view id="backgroundSound" >
<handler name="oninit" >
this.setAttribute("source", "00.mp3");
this.stop();
</handler>
</view>

greg
01-14-2011, 01:11 AM
Thanks I'll try that.:)