views:

163

answers:

0

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!