Change / set volume on NetStream object (FLV playback)

0 Flares Twitter 0 Facebook 0 Google+ 0 Email -- Filament.io 0 Flares ×

Sometimes you just spend time for stupid things like this and when you find out how to do it you just wonder why it has to be like this… I feel like there are still a lot of inconsistencies in ActionScript 3…

Anyway, here is the code to do so. Just set a new SoundTransform object to the soundTransform property of your NetStream object like so:

[sourcecode language=’as3′]
var nc = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// change “1” to whatever you need the volume to be changed to
ns.soundTransform = new SoundTransform(1);
[/sourcecode]

0 Flares Twitter 0 Facebook 0 Google+ 0 Email -- Filament.io 0 Flares ×

2 Comments

  1. Man what a pain, Thanks so much! Also if you think these references are esoteric, you should check out the Flash GoogleMapsAPI… soooo many references.

  2. Mat Paul

    Thank you.

    Greetings from Germany.

Leave a Comment