Thanks Rick, I finally got it working.
I added this function:
private function changeVolume():void
{
pubs.volume += 0.01;
pubs.volume -= 0.01;
}
I tried pubs.volume=pubs.volume but that doesn't work. You have to
really change the value.
And I added this to the VideoDisplay:
ready="changeVolume()"
This way it does the trick, sticking to the volume set by the user.
For me it is a bug in the VideoDisplay component.
Benjamin.
--- In [email protected], [EMAIL PROTECTED] wrote:
>
> I don't know what's happening there, but I can offer some possible
> quick and dirty workarounds:
> 1. Set volumeControl minimum attribute to 0.001 instead of 0. You
> might still be able to hear it though, you'd have to try it.
> 2. At beginning of each flv, if pubs.volume==0, set pubs.volume=0
> again programmatically. Oh, I see you're already doing that. OK,
> then, try setting it to some other value (0.1) and then immediately
> back to 0, or add a really short time delay. (Adding a short time
> delay has fixed a few such issues for me when an event doesn't seem to
> fire as advertised and I don't have time to figure out what I did wrong)
>
> Sorry none of these are good answers, but they might get you going if
> you're in a time cruch. (if they even work)
>
> Rick
>
> -----Original Message-----
> From: benjidudu [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 26, 2006 2:39 AM
> To: [email protected]
> Subject: [flexcoders] Volume trouble with VideoDisplay
>
>
> Hi there,
>
> I have a VideoDisplay which plays a list of flv. As soon as a clip is
> finished playing, it plays the next one. This part works fine.
> I added a volume control using a HSlider component. This also works
> fine. When I slide the slider (oh yeah), the volume changes accordingly.
> But this is the strange part. If I change the volume to 0 while a clip
> is playing, the next clip volume will automatically return to 0.75
> (default value). So I thought after each clip has started playing, I
> should set the volume to what the slider is set. But the problem is
> the VideoDisplay volume doesn't change when the next clip is played. I
> traced its volume property, and even if it is set to 0 (and the trace
> shows 0), I can HEAR the volume come back to 0.75 at each next song.
> Does anybody know what's happening here ?
>
> The VideoDisplay component:
> <mx:VideoDisplay id="pubs" height="150" width="100%" autoPlay="true"
> complete="showNextPub(new TimerEvent(TimerEvent.TIMER))"
> ready="pubs.volume = volumeControl.value / 100;" />
>
> The HSlider component:
> <mx:HSlider id="volumeControl" width="80%" x="35" liveDragging="true"
> minimum="0" maximum="100" dataTipFormatFunction="volumeTipFormatter"
> labelStyleName="time" labelOffset="0" labels="['0%', '50%', '100%']"
> snapInterval="1" value="{pubs.volume*100}"
> change="pubs.volume=event.value/100" />
>
> Thanks,
>
> Benjamin.
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/