A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Volume slider clarification

  1. #1
    Senior Mamba austriaman's Avatar
    Join Date
    Aug 2004
    Location
    Somewhere over the rainbow
    Posts
    472

    Volume slider clarification

    ...Sorry to bug you again, it's just that my concern is fairly urgent: What I purpose is creating a volume slider that doesn't just work with background music, but also with sounds that are produced when (for example) clicking on buttons (etc.)
    Thanks for taking the time!

    Original message:
    Hi, Just created a nifty Flash-presentation, featuring all kinds of classy effects and sounds. It holds a number of movie-clips and buttons, all/most of them feature attached sounds. NOW that I'm finally (almost) done, I am thinking of adding a volume-slider, which appears to be a major problem: all of the tutorials I've come across so far deal with volume sliders which you have to additionally attach the sound to. Is it at all possible to create a slider that simply responds to the sounds that already exist in your .swf-file? THX!

  2. #2
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    Are you using a sound object to control the attached sounds? If so, create a movieclip to manipulate the volume level of the sound object with something like.....

    code:

    onClipEvent (load) {
    top=_y;
    left=_x;
    right=_x;
    bottom=_y+100;
    }
    onClipEvent(enterframe) {
    if (dragging==true) {
    _root.mySound.setVolume(100-(_y-top));
    var soundValue = (100-(_y-top));
    if (soundValue <=1) {
    _root.speaker.gotoAndStop(1);
    }else {
    _root.speaker.play();
    }
    }
    }


  3. #3
    Senior Mamba austriaman's Avatar
    Join Date
    Aug 2004
    Location
    Somewhere over the rainbow
    Posts
    472

    Well...

    I'm pretty new to everything that concerns SOUND in Flash... I don't really see what you're saying ...attached the .fla which holds a Volume Slider that is in charge of an mp3 called "mystical background music.mp3" (which I didn't attach; due to that the Volume Slider doesn't do anything, it works just fine under regular conditions though...). the .fla also features three buttons that bleep as soon as you click on them. Is it possible to make the Slider respond to the sound the buttons produce?

    Thanks for your dedication!
    Chriz.
    Attached Files Attached Files

  4. #4
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    I have not had time to download your file to see how you have things set up. Here is a quick demo of a custom sound slider I made that uses attachSound.

    http://ntdesigns.net/quickDemo/soundSliderDemo.swf

    Change the .swf extension to .fla for a look at the file.

    Hope it helps
    NTD

  5. #5

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