AS3 Volume Slider

I am using a volume slider component that was created using AS2 and I'd like to recreate it in AS3, but am not quite sure how to get started.
Flash CS3
Sync = Stream
Audio file on the timeline
Can someone direct me to a good source for this or does anyone have any code they've used in the past?
Thank you!
~AMH~

check these out
http://www.kirupa.com/developer/mx/volume_slider.htm
http://www.terrypaton.com/as3-volume-slider/
want to get fancier, well audio volume perception is logarithmic so slight movements in the start of your volume control seem to make a huge difference and less difference at the higher end.
so you should adjust for that
http://stackoverflow.com/questions/1165026/what-algorithms-could-i-use-for-audio-volume-le vel

Similar Messages

  • Global Volume Slider (from library) to control drag and drop xml playlist

    hi there,
    have spent some time doing tutorial and looking online but can't seem to get a volume slider functioning.
    the scenario is :
    3 circles which can be dragged over a target (one for each circle)
    When the circle is placed on its target it loads its respective xml playlist into 4 buttons (play, pause, forward, back)
    I want to be able to create some kind of function to control the volume, either using a slider or a rotary dial, whichever is easiest!
    any help greatly appreciated!

    Be sure you include the SoundTransform class...
    import flash.media.SoundTransform;
    Create a SoundTransform object
    ...named 'st' (I like short names). Create this AFTER the creation of your soundChannel object...
    var st:SoundTransform = channel.soundTransform;
    st.volume = 1;//This sets the volume to 100%
    channel.soundTransform = st;//This associates your SoundChannel object with your SoundChannel object
    Then, for simple testing of this
    ...create some new button...
    halfVol_btn.addEventListener(MouseEvent.CLICK, doHalfVolume);
    function doHalfVolume(e:MouseEvent):void{
       st.volume = .5;//This sets the volume to 50%
    So, now you have a half-baked volume control. Nothing exciting, but this gets you acquainted with the volume part of what you want. You have created, and have access to, the st.volume property to set the volume to whatever you want, from 0 to 1.
    Next, I'd suggest that you practice the creation of your own slider. Search online for tutorials on it, like I mention above (as a Flash programmer, this is something I, and you, end up doing - searching - dozens of times a week at times). In the end, the position of your knob/button/control in the slider is a %: What % is the location of the knob on the total width/height of the slider. This % is what you send to the st.volume property.
    http://www.lmgtfy.com/?q=create+volume+slider+as3
    As an alternative to create your own slider, you can also use the Flash "Slider" component:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/Slider.html
    ...but this, too, requires some getting-up-to-speed with using it.
    Good luck. If you want some actual code examples - you'll find plenty online :-)

  • My speaker doesn't work when I try to listen to music or open up a quick time file, however they seem to work perfectly when I listen to a voice memo (p.s. the volume slider disappears in a song page and even in the multi tasking bar)

    my speaker doesn't work when I try to listen to music or open up a quick time file, however they seem to work perfectly when I listen to a voice memo (p.s. the volume slider disappears in a song page and even in the multi tasking bar)

    Thanks for your solution, it wasn't quite what solved the problem but i remembered that i had a bit of salt water on my phone recently and spraying the charging port with an anti-oxide spray solved my problem, do you mind if i ask, how is the charging port related with the volume or/and speakers?

  • Hi there. I have a problem with sound on my 4s. When you move the volume slider up, it sounds well. But when I move the volume slider down I will hear barely and unclear sound in my headphone.I tried different headphones but result is same as old one.Help

    Hi there. I have a problem with sound on my 4s. When you move the volume slider up, it sounds well. But when I move the volume slider down I will hear barely and unclear sound in my headphone.I tried different headphones but result is same as old one.Help

    Try A and B
    (A) Restart iPad
    1. Hold down the Sleep/Wake button until the red slider appears.
    2. Drag the slider to turn off iPad.
    3. Turn iPad back on, hold down the Sleep/Wake until the Apple logo appears
    (B) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • How to fix my volume slider so i can see it on the screen

    I have a dv6-1355dx and i had to restore it to the factory settings and ever since then when i try my volume slider it works still i just dont see it on the screen anymore any one that knows what this could be would help me out alot

    Welcome to the HP Forum!
    bpc4587 wrote:
    I have a dv6-1355dx and i had to restore it to the factory settings and ever since then when i try my volume slider it works still i just dont see it on the screen anymore any one that knows what this could be would help me out alot
    What is the installed operating system and version (32-bit or 64-bit)?
    Do you mean the volume slider from the taskbar or the one from the audio software/
    The audio driver can be found on the driver and software download section of the web support portal for your notebook.  This is the page you seek. Use the dropdown to select the correct version of the installed operating system for your notebook. Right-click Computer and select properties to see which version is installed in your notebook.
    Kind regards,
    erico
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • I have an I phone 4 and since I upgrade to the lastest ios  6.1.3 , my volume slider is missing. The sound works when but I can't mute or turn up or turn down the volume. I've tried a hard reset , reboot, blowing air in the dock and earrplug jack. :-(

    I tried almost evrything to restore my volume slider( + & - ). My phone rings, plays music and every other sound but I can't mute or put  the volume up r down with the side buttons.. My volume slider bar is missing. This is only simce I upgraded to iso 6.1.3 .. What's with that?? I figured out how to manually  mute the phone through (General, Accessibitily) by muting the bell for sound and unmuting the bell for silent mode. But what a freaken pain, when you have to take all those extra steps to turn your volume up or down or  mute your Iphone??
    We have no Apple Store here so no luck to bring it in to get looked at.. Please , does anyone out there know what else I coold do???
    Cheers

    Does it work with headphones plugged in?  That is typically the culprit, the device mistakenly believes that a pair of headphones are plugged in.

  • How can I re-enable the volume slider?

    Sometimes I want to play around with the volume curve, and sometimes that doesn't work out or isn't needed anymore. But when I delete all volume curve points (i.e. click left of the curve, press backspace) the volume slider doesn't come back. It seems like a bug, anybody know a workaround?

    its not a bug. click on the little upside down triangle just to the left of the volume knob. after you click on the triangle the track volume will appear with a rectangular blue box click on that to turn off the volume curves.
    By the way if you on the words track volume the track pan will also appear.

  • IPod Touch 1st Gen and 3.1 update DELETES volume slider

    I had a perfectly working iPod Touch 1st Gen/16GB until I updated to 3.1 software. Now I do not have a volume slider.
    Yes headphones are in but there is no place to adjust the volume. There is previous, next arrows and play and pause AND its centered in the rectangular area, but no volume slider.
    I have restored it 3x in various ways. I have tried 5 times to downgrade the operating system but ALWAYS get an error, so it never completes. Of course the ipsw files where found using google because there isn't any links that work on Apple's site for previous iPhone software. If I try to restore to 3.1 right after that it goes through perfectly.
    So it seems that Apple has locked out downgrading once you upgrade! All I want is my volume slider back. How can I get it back if 3.1 deletes it everytime and I can't go back to the previous operating system?
    Thank you.

    I too have had this exact same problem, except that I was running 3.0 and hadn't updated to 3.1. I put my ipod on the table overnight, after listening to it, and when I picked it up the next morning, theres no volume slider. I never even unplugged the headphones. Double clicking the home button while on the home screen would bring up the popup to skip songs, and there it says "Dock Connection" even though it not connected to a computer. Multiple reboots an no effect. I've tried different sets of headphones, to no effect. Its like the iPod isnt detecting them being plugged in. The worst part is i DO get sound in the headphones, but no volume control, and the sound level is turned really low. So the headphones ARE working.
    I updated to 3.1 just now, and the problem has NOT been fixed. Theres no way anywhere in the settings to adjust the volume. Theres only a limit slider, so I have no way to turn up the volume loud enough to actually HEAR things.

  • I can't get the volume to work when I watch a you tube video, there's no volume slide under the play button, and my volume control on my I pad won't do anything either, but the volume of all my alarms and sounds works perfect, what can I do??

    I can't get the volume to work when I watch a you tube video, there's no volume slide under the play button and my volume control on my I pad don't do anything to help, but yet my volume works perfect on everything else, what can I do???

    do u have your ipad doing airplay because that could happen

  • Cannot use volume slider in Windows 7 via bootcamp

    Hello everyone. My MBP spec is 15" i7. I've installed a Windows 7 via Bootcamp. after that, i installed the drivers using my Apple Os X disk. But after all that, I can't use the volume slider to control the volume. why is that?

    Boot Camp Support Software 5.0.5033

  • Volume Slider on HP DV9000 (DV9700) Does not work,using Windows 7

    Not too long ago, the volume button,next to the volume slider on my laptop stopped working.  After checking postings that I found,  was able to resolve the volume on/off issue, by shutting down the PC,unplug and take the battery out and put it back in.  I still cannot get the volume slider to work!  I can go into the sound mixer and control the volume,but it would be nice to make it work again.  I had this problem with the original OS (Vista) and have upgraded to 7 Ultimate and it still continues.
    This question was solved.
    View Solution.

    @evangelos
    Hi,
    Download and install:
    HP Quick Launch Buttons here (ver 6.50.13.1 for 32/64 bit Win7)
    If you want to have on-screen visuals and associated sounds that are displayed and heard when adjusting volume then download and install:
    3VRX here (ver 2.5 for 32/64 bit Win7)
    Note:
    Here is YouTube video which shows what can be done with this software.
    You need more solutions? Check below link:
    Windows 7 Upgrade Guide for dv6000/dv9000 models
    ** Say thanks by clicking the "Thumb up" icon which is on the left. **
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **

  • Where is the volume slider in iTunes 12.0.1?

    where is the volume slider in iTunes 12.0.1?

    try dragging the corners to make the itunes window bigger .... the volume slider will show up

  • Volume slider not working in ipod app

    Here's an odd one - since the last update, occassionally with headphones plugged in the slider in the ipod app won't work. I can slide it, but then it goes back to max. The physical vol buttons still work, but the change isn't reflected in the slider. Anybody else see this?

    Yes, I have seen this quite a bit. There are times when I am listening to music on the iPod app, when I try to move the volume slider one way, it doesn't want to move. It will move a little but not freely as to where I want it to go. To correct this, I just do a reset with both buttons. Not sure on the cause of the problem, but the reset makes the problem go away.

  • Volume Slider not working in DV6-2150US

    I have HP Pavilion Notebook DV6-2150US, Win 7.  Just discovered a few days ago that the volume slider and quick launch mute button stopped working.  I searched the old posts but don't know if this relates to other issues mentioned.

    Hi,
    Perform a Hard Reset:
    1. Disconnect all peripheral devices and remove all USB devices and media cards.
    2. Disconnect the AC power adapter, remove the battery, and then press and hold the power button for at least 1 minute.
    3. Reconnect the AC power adapter (do not connect the battery), press the Power button.
    Check is this issue solved or not.
    ** Say thanks by clicking the "Thumb up" icon which is on the left. **
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **

  • Fiddling with volume slider and sound quality

    In an attempt to bypass the infamous volume cap that plagues iPods sold in the EU, in the past I fiddled with the volume slider of many of my MP3 tracks, either directly or via third party applications (such as euPod). Afterwards I have changed my mind and reset the slider.
    Later on, I have read a few sources claiming that the above procedure would cause a permanent modification of the MP3 file and/or affect sound quality.
    I am somewhat puzzled by such claims... Am I really better off re-ripping all those tracks? Can anyone point me towards an undisputed “truth” on this matter?

    The third one is a hardware issue: The earbuds jack
    is very loose. Apparently, the iPod automatically
    pauses playback when the headphones are disconnected.
    Hence, I only have to wiggle the connector a bit and
    the nano stops playing. This really would be annoying
    if I were to go jogging with my iPod ...
    hmmm.. that happens to my ipod too and i only got it for christmas. so i was a bit gentle with it.so hence it comes out very easily.
    but whilst reading all the replys i decided to be harsher to my ipod and just push my earbuds in all the way..it worked!! that might be the same for u or i might have just been a bit too forgetfull and thought that my ipod was delicate coz its like.. so preety:)
    lol im in love with my ipod ..
    dont know if this helps..hope it does..
      Windows XP  

Maybe you are looking for