Skip navigation
Currently Being Moderated

How to control volume in Netstream

Aug 11, 2012 1:26 PM

Hello,

 

I had a previous post but received no answer after a while.  I have a project in actionscript 2.0 using flash cs4.  It is a flash game.  I have the flv files loaded from my site using NetStream. Some of the videos volume is lower and I would like to adjust them without rerendering all of the videos.  I have gone on line and have tried many things, but none have worked and most have given error messages.  Below is the script I have been loading my flvs. 

 

var nc:NetConnection = new NetConnection();

nc.connect(null);

var ns:NetStream = new NetStream(nc);

aud1.attachVideo(ns);

ns.play("http://www.mysite.org/video/myvideo/1.flv");

ns.onCuePoint = function(evt:Object){

    trace(evt.name);

    trace(evt.time);

    if(evt.name == "c1") {

        trace("YO !Jump to 108!");

        gotoAndPlay(108);

    }

};

I have this script above the layer with my NetStream player. 

 

Thank you for your help.

 

Mark.

 
Replies
  • Currently Being Moderated
    Aug 11, 2012 1:56 PM   in reply to MARKARKARK

    Per the directions kGlad provided in the other posting...

     

    var st:SoundTransform=your_ns.soundTransform;

    st.volume=.5;

    your_ns.soundTransform=st;

     

    you should have tried...

     

    var nc:NetConnection = new NetConnection();

    nc.connect(null);

    var ns:NetStream = new NetStream(nc);

    var st:SoundTransform=ns.soundTransform;

    st.volume=.5;

    ns.soundTransform=st;

    aud1.attachVideo(ns);

    ns.play("http://www.mysite.org/video/myvideo/1.flv");

    ns.onCuePoint = function(evt:Object){

        trace(evt.name);

        trace(evt.time);

        if(evt.name == "c1") {

            trace("YO !Jump to 108!");

            gotoAndPlay(108);

        }

    };

     

    If that doesn't work, you should continue in your other posting, and show what you tried that doesn't work. 

     

    Please don't start a new one just because no one has responded for little while.  When kGlad comes around he will almost certainly respond.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 12, 2012 6:45 AM   in reply to MARKARKARK

    Review alternate audio control method posted here:

    http://forums.adobe.com/thread/1047840

    Best wishes,

    Adninjastrator

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points