0
votes

I'm using the default flv player component in Flash cs4. I want my video to start on page load, but I would like it to be muted in the beginning, so the visitors can chose to unmute it if they want.

I tried to google and found a number of solutions which doesn't work for me(or rather I don't know how to make it work).

There seems to be a good solution here: http://bangersandflash.net/muting-flvplayback-component-by-default/

But the zip link is broken, and I'm not sure how to piece the tutorial together.

Is someone able to help me shed some light into this situation by providing me an example fla file?

Edit: I tried something like this but unfortunately it didn't seem to work:

myVideo.volume = 0;

myVideo.muteButton.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(e:MouseEvent) {
    myVideo.volume = 1;
}
2

2 Answers

0
votes
var flag:Boolean;
foo.volume = 0;
foo.addEventListener(MouseEvent.CLICK, action);
function action (e:MouseEvent):void 
{
    if(!flag){
            foo.volume = 1;
            flag = true;
        }else{
            foo.volume =0;
            flag = false;
        }       
}
0
votes

if you want to keep the functionality of the player skin, use this:

mc_video.volume=0;
mc_video._uiMgr._isMuted = true;

am aware this is an old question, but someone might still need this answer.