Skip navigation
MARKARKARK
Currently Being Moderated

Volume control

Aug 10, 2012 4:07 PM

Hello,

I have a flash game with several videos.  I am using netstream to play my videos.  the project is in actionscript 2.0.  Is there a way to adjust the volume of the videos individually?  Most of my videos have correct volume, but some are too quiet.

 

Mark.

 
Replies
  • kglad
    72,373 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 10, 2012 5:36 PM   in reply to MARKARKARK

    each netstream instance has a soundTransform property you can use.

     
    |
    Mark as:
  • kglad
    72,373 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 10, 2012 10:58 PM   in reply to MARKARKARK

    :

     

    var st:SoundTransform=your_ns.soundTransform;

    st.volume=.5;

    your_ns.soundTransform=st;

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

    I believe that soundTransform is AS3, while the rest of your project is AS2... so that won't work.

    You can use this method instead:

    //-------Sound Controls--------//
    this.createEmptyMovieClip("sound_mc",this.getNextHighestDepth());
    sound_mc.attachAudio(ns);

    var videoSound:Sound = new Sound(sound_mc);
    videoSound.setVolume(100);

    Use volume of 100 as starting point. For turn up volume on very quiet videos, set volume to 400 or so. To turn volume down, use a volume less than 100.

    Add this code in after the very last

    };

    of the code you posted... The audio control code does not go inside ns play function.

    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