flex 4: swfloader - how to mute game completly

Posted by ufk on Stack Overflow See other posts from Stack Overflow or by ufk
Published on 2010-05-17T14:56:33Z Indexed on 2010/05/17 15:01 UTC
Read the original article Hit count: 751

Filed under:
|
|
|

Hiya. Ive read some answers here regarding muting swfloader volume but none of the examples would work in flex 4.

I tried doinf the following:

this._swfGame.source=url;
this._swfGame.soundTransform = new SoundTransform(0.0);

this would shut down the volume of the preloader, but when the game starts the volume is back to normal.

i tried adding the following to the previous code:

this._swfGame.addEventListener(Event.COMPLETE,this._configSwf);

private function _configSwf(event:Event):void
        {
            this._swfGame.removeEventListener(Event.COMPLETE, _configSwf);
            var soundTransform:SoundTransform = new SoundTransform(0.0); // TODO: set proper volume
            this._swfGame.soundTransform = soundTransform;

        }

but i got the same results.

any ideas?

thanks!

© Stack Overflow or respective owner

Related posts about swfloader

Related posts about flex4