FORUMS: list search recent posts

Sound control in multiple FLVs

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bruce Wilson
Sound control in multiple FLVs
on Jul 10, 2008 at 2:33:26 am

Here's what I want to do - 2 flv side by side in the same swf - both running at the same time, both with audio. I basically want to have a mouse over / out situation where the swf loads, both flv's play. Initial state I guess will have to be both audios off.

I want to be able to mouse over one flv and have it's audio on; on mouse out I want the audio to stop, on mouse over the other one the audio plays and mouse out it stops. Meanwhile the flvs continue visually. The flvs will be different lengths and looping.

A perfect example, in Quicktime, is here http://professordvd.typepad.com/my_w...rhizomeOne.mov

Anyone here who can give me a (detailed) solution?

Thanks for your time.



Return to posts index

Alvaro Castaneda
Re: Sound control in multiple FLVs
on Jul 13, 2008 at 10:13:38 pm

hi

there you go

import fl.video.*;

flvplay.addEventListener(VideoEvent.COMPLETE, loop);
flvplay2.addEventListener(VideoEvent.COMPLETE, loop);

function loop(event:VideoEvent):void
{
flvplay.play();
flvplay2.play();
}

flvplay.volume = 0;
flvplay2.volume = 0;

flvplay.addEventListener(MouseEvent.MOUSE_OVER, soundOn);
flvplay.addEventListener(MouseEvent.MOUSE_OUT, soundOff);

function soundOn(event:MouseEvent):void
{
flvplay.volume = 1;
}

function soundOff(event:MouseEvent):void
{
flvplay.volume = 0;
}

flvplay2.addEventListener(MouseEvent.MOUSE_OVER, soundOn2);
flvplay2.addEventListener(MouseEvent.MOUSE_OUT, soundOff2);

function soundOn2(event:MouseEvent):void
{
flvplay2.volume = 1;
}

function soundOff2(event:MouseEvent):void
{
flvplay2.volume = 0;
}


stop();


i have to flvplayback components on stage on named flvplay the other flvplay2 , just add you own two movies to them an roll



----------------------
varomix - pixelEater
http://www.intelianimate.com


Return to posts index

Bruce Wilson
Re: Sound control in multiple FLVs
on Jul 14, 2008 at 9:55:53 pm

Mr Castaneda thank you very much for your reply.
This code will indeed do the job well. I had no idea how to do it.
Thanks and regards
Bruce Wilson.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]