A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Volume Control

  1. #1

    Thumbs up

    Can somebody help me to get my volume controler to work. I have the slider built but the fllowing part of the script wont work..
    ------
    _root.MyAudio.setVolume(level);
    ------

    I know the problem but need a solution....I don't have the audio in a seperate movie nor is it being controlled from the library. The sounds clip is ON the timeline because I am streaming it in order to control text coming in at certain points.

    So how can I control the sound volume if it is on the timeline is my main question??? Is there some type of SetAllVolume action or anything like that?

    Thanks
    http://www.e-simpson.net

  2. #2
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    Wo, wo, wo! Hang on a sec!

    If you are using this sort of scripting:

    Code:
    _root.movieclip.setVolume(level);
    This it will not work.

    Do you know how to use the sound object?

    XFM

  3. #3

    yes but it wont work

    Yeh I know how to use a sound object but I can't!! I have keyframes that are labled along a timeline and each label starts at a different part of the sound, so the audio is stretched out on a timeline! Here is a link to the fla if you want to look at it http://www.e-simpson.net/21.zip

    Thanks

  4. #4
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    You can't control timeline-based sound.

  5. #5

    YES YOU CAN :)

    Jus thought I would let you know you can!! I figured it out
    you have to define a variable mine looked someting like this.....

    -----------
    level = 100
    globalSound = new Sound();
    globalSound.setVolume(level);
    -----------

    its amazing what you can learn from the help file in flash


  6. #6
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    Yeah, but you have to use a command like attachSound or specify the timeline you want the sound object to like to.

  7. #7
    More than a year later, this thread keeps on giving. I had a huge mental block on doing a volume control for Streaming Sounds, and this bit of code solved it. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center