Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Flash Media Server - Streaming audio volume level.

Posted on 2006-06-05
1
Medium Priority
?
313 Views
Last Modified: 2012-06-27
Hi,
How could I change volume level for streaming FLV file by actionscript?

Here is my code:

/////////////////////////////////////////////////////
function initStreams() {
      client_nc = new NetConnection();
      client_nc.connect(voiceOverPath);
      client_nc.onStatus = function(info) {
            trace("Voiceover Level: " + info.level + " Code: " +  info.code);
            voiceOverStatus = info.code;            
      }
      voiceOver = new NetStream(client_nc);      
}
initStreams();
voiceOver.play(voiceOverFile);
/////////////////////////////////////////////////////////////////////////////////////

the way I am trying to do it now : voiceOver.setVolume(50) does not work.
Thanks you.
0
Comment
Question by:oshats
1 Comment
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 1600 total points
ID: 16838364
Here is the complete working code for you;
-----------
function initStreams() {
     client_nc = new NetConnection();
     client_nc.connect(voiceOverPath);
     client_nc.onStatus = function(info) {
          trace("Voiceover Level: " + info.level + " Code: " +  info.code);
          voiceOverStatus = info.code;          
     }
     voiceOver = new NetStream(client_nc);    
}
initStreams();
voiceOver.play(voiceOverFile);

// holds sound
_root.createEmptyMovieClip("vSound", _root.getNextHighestDepth());
vSound.attachAudio(voiceOver);
var so:Sound = new Sound(vSound);

//now set volume here as you want
so.setVolume(50);
---------------

Rgds
Aneesh
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question