Flash Player 10 Dynamic Sound Slider

I’ve been playing around lately with the new sound features in Flash Player 10. I decided to combine my throw slider with these features to create the Flash movie below. You can throw the slider to hear the frequencies change. These changes are also reflected in the graphical waveform. I’ve included the source below. You will need to have the Flash Player 10 RC installed to view this.

You can download the FLA if you want to see how it was made. You won’t be able to actually compile it though as it was made with Flash CS4.

Lee

Comments

  1. jerryliu
    August 25th, 2008 | 12:40 am

    how to play it? I alread install flash player10

  2. lee
    August 25th, 2008 | 1:09 am

    You need to have Flash Player 10 RC installed to view this. You can get it at http://labs.adobe.com/technologies/flashplayer10/.

  3. chris
    August 25th, 2008 | 3:46 am

    Wow, I had my volume cranked when I just tried this – that was weird! That’s pretty cool. Looking forward to CS4. Thanks Lee.

  4. August 25th, 2008 | 5:16 am

    Nice Example. What do you mean ccompile with CS4? Why do you have Flash CS4? Give it as a beta, this pirated copy i have sucks….

    But you’ll likly be able to compile it using a nightly build Flex/SDK 3.xxx Flash 10

  5. oliver_l1
    August 25th, 2008 | 6:06 am

    what we really need is flash cs4,lee:-)

  6. August 25th, 2008 | 6:15 am

    You always beat me to the punch on posting ideas. :(

  7. August 25th, 2008 | 6:46 am

    Hello !
    thanks for all of your flash code and Fla files. If any one wanna learn flash i always proffer your blog.

    Omer KARADENIZ
    Blog: http://www.omerkaradeniz.com

  8. Mot
    August 25th, 2008 | 7:55 am

    Great stuff Lee, as always. I can’t wait to start using the new flash. Very exciting!

  9. August 25th, 2008 | 8:43 am

    Very cool stuff. I can wait to sit down and have a play with this new stuff!

  10. Edward
    August 25th, 2008 | 9:19 am

    That is pretty neat! I could see many applications for something similar. I would love to play with it, and an Alpha of CS4 lol

  11. Larry Lague
    August 25th, 2008 | 9:56 am

    Is anyone else noticing the sound clipping you get if you leave the slider anywhere to the right of 0, and you scroll down the page till the swf is out of focus? I am on OSX 10.5.4, Firefox. I am guessing it has something to do with the browser freeing up CPU cycles for a swf you can no longer see?

  12. Basil Al-Dajane
    August 25th, 2008 | 5:01 pm

    Cool, but do you know when a public beta will come out for Flash CS4, cause I can’t wait

  13. Ian
    August 25th, 2008 | 8:12 pm

    @ Larry Lague

    Yea, exact same behavior here, MAC 10,0,2,26 (Debug player) in FF3

  14. lee
    August 25th, 2008 | 8:20 pm

    @Larry @Ian Yes it happens to me too. That’s why I kill the audio when the slider is at zero :)

  15. Aubby
    August 26th, 2008 | 1:28 am

    Holy. Freaking my debug player out! >_< Haha. Can’t wait for player 10, so much excitement!

  16. August 26th, 2008 | 7:29 am

    Hi Lee,

    funky application :)
    Maybe throw in an onReleaseOutside event handler for the slidy-slider?

    Cheers,
    Christian

  17. August 26th, 2008 | 10:20 pm

    Very nice and thanks for the source code 2 :)

  18. RyanP
    September 3rd, 2008 | 10:10 pm

    Awesome example, really looking forward to the new features in 10. The freq variable looks unnecessary though.

  19. September 5th, 2008 | 7:34 am

    Nice, it reminds me of my Musical Acoustic class. I posted a dynamic piano with the new SampleDataEvent: http://tinyurl.com/65bzmx

  20. schpinn
    September 10th, 2008 | 2:38 am

    ..umm, where’d you get cs4 :) ? how could i get my hands on something like that ?

  21. Dimitris
    September 17th, 2008 | 12:49 pm

    It doesn’ t even shows the “wave” and no sound is played, since I updated my Flash player yesterday(16 Sept)

  22. Dimitris
    September 25th, 2008 | 4:13 pm

    When I try to open this file get this error.

    TypeError: Error #2007: Parameter type must be non-null.
    at flash.events::EventDispatcher/addEventListener()
    at throwsound_fla::MainTimeline/frame1()

  23. Sam
    February 6th, 2009 | 11:16 am

    When I test your source in Flash CS4 I get:
    1046: Type was not found or was not a compile-time constant: SampleDataEvent. (In line 80)
    What could be wrong?

  24. Sam
    February 6th, 2009 | 11:24 am

    Solved it: Somehow it got loaded as Player 9 Changed it to 10
    The got error
    1119: Access of possibly undefined property SAMPLE_DATA through a reference with static type Class.

    Changed Line 74:
    s.addEventListener(Event.SAMPLE_DATA, onSampleData); //->
    s.addEventListener(SampleDataEvent.SAMPLE_DATA, onSampleData);

    Now its working like a charm :)

  25. February 10th, 2009 | 8:57 pm

    In case anyone cares, I downloaded the fla, and updated the publish settings and the static reference to the SampleDataEvent so it compiles in the release version of CS4.
    http://www.richmediainstitute.com/_EXTERNAL/downloads/throwsound.fla

    Thank you, lee,

    -r

  26. p2man
    February 4th, 2010 | 9:05 pm

    Nice work!

    I came across a dynamic audio library in Flash by these guys called Sonoflash.

    Here’s a link to their player: http://www.sonoflash.com/sounds/#

Leave a reply