Controlling Streaming Sound

I have a movie with a sound on the timeline set to stream and
it is synched with the animation. I now need a button to stop the
sound. I used the stop all sounds behavior and that works fine. But
if I want that button to toggle and all the sound to be heard again
wherever they are in the movie, what do I need to do at this point?
Do I have to create a sound object and go through that hassle of
setting sound objects, declaring things like I'm going through
customs, etc.? I'd like to avoid a lot of work just to allow them
to turn the sound back on (no more money in the budget and I'm
already waay over scope). Isn't there some behavior I can use that
will just set all sounds to volume 0 or volume 100?
Thanks,
Brian

Thanks. The only problem with that is I have an animation in
the main timeline and a soundtrack that is synched with it. There's
no music timeline that I can start back up. The animation will
continue on without sound after they've click the button to stop
all sounds. I'd like the sound just to come back up when they click
the button again and play from wherever they are in the timeline.
Is there a way to do that? Can't you just make the volume 0 and
when they click again it puts the volume at 100?

Similar Messages

  • My imported swf files have lost their streaming sound. What can I do?

    I am trying to import a swf I made that contains streaming sound. When I place it on the time line and press cntr enter my animation plays but with no audio. I see the symbols from the swf and the swf inside my library. When I open the swf file inside my project it is broken down frame by frame with no audio. I can add audio back into my movie clip so I know that movie clips can support streaming audio. But I would rather not have to do this.
    I'm very new to flash so I am hoping there is something big that I am missing.
    In addition to my previous question: I need to embed a lot of objects over and over in this project I am working on. Each object will have controls for play back of itself. Is there some reason I cannot do this?
    Thank you for any advice you may have.

    Thank you for your reply
    Ok. I will need to maintain a libary of movie clips that contain streaming audio and simple scripts. Does anyone know of a good tutorial for importing a file at runtime? I've seen something called shared libary properties and it has a field for a url. I put a swf file on my web site and took it's url and put it into this field but nothing shows in my library. What else do I need to do?

  • Controlling timeline sound

    Hey guys, i was wondering if you would be able to help, PLEASE!!
    I'm making a presentation in flash, it has 3 segments, 1st is sound in sync with timeline 2nd is a video which is streaming and third is sound insync with timeline again.
    I can control the video thats no probs, but i want to be able to control the sound/timeline.
    What i want to be able to do is put in some controls just pause play and stop and when i push pause it obviously pauses it, when i push play it continues to play and when i push stop it goes to frame 1 and clears what ever it was playing in the timeline previously.
    I know how to control the timeline but not the sound!
    any suggestions please?

    You will find sound quality options for individual sounds if you double click on the sound in the library.
    If you look in your Flash Publish Settings you will find sound quality options for all streaming/event internal sounds. These global settings can optionally override individual sound quality settings.

  • The sound of my iphone has dissapeared when I play games and when i listen to muisic but when I put the headphones the sound come back and I can control the sound,what should I do??

    I was on a boat ride when some water fell on it but it was just a little bit then when i tried to control the sound and volume while playing and listening to music it didn't showed anything and just with headphones it appeared again and i could listen and I could control it again but when i take the headphones out it goes back to the same thing.What should I do??

    try toggling the Ducking menuItem

  • Inspiron 1525 not able to select internal mic for webcam, nor is it showing up on Control Panel, Sound, Audio Devices

    Initial problem was Dell Webcam video recording records no sound.
    In Control Panel, Device Manager, Sound Video and Game Controllers there are two High Definition Audio Devices listed: Location 1 (Internal High Definition Audio Bus) - I deduce this is the internal mic; and Location 2 (Internal High Definition Audio Bus) - I deduce this is external microphone jack. Both have the same driver version.
    The Control Panel, Sound, Recordings Tab showed 2 devices that looked identical except the bars that show green with volume were only on the first one, which is also the default one, and would detect sound if you got real close to the webcam mic when talking. Both devices displayed as 'working'.
    Accessories, Sound Recorder recordings are silent no matter how close you get to internal webcam mic.
    Dell WebCam Audio Source tab has two selections, both reading Microphone (3 - High Definition Audio Device). Both selections record sound with the EXTERNAL MIC jack. There is no way to select the internal webcam mic, it is not an option.
    Per instructions found on the web, I uninstalled the first device only in Device Manager and rebooted. The same driver version as before was installed. But now the settings have changed. Device Mgr still shows Loc 1 and Loc 2. However, under the Sound, Recordings tab there are still 2 devices, but the first one says 'currently unavailable' , is still the default, and the sound bars that go green for audio testing are on the SECOND device now instead of the first one. If you check the Properties for each device, they BOTH are showing the same location Location 2 (Internal High Definition Audio Bus), i.e., the external mic jack.  Loc 1 device (built in mic) is not showing up!!
    Accessories Sound Recorder works with the EXTERNAL mic. (How does it know which one to use, it's not giving me a choice?)
    So the Location 1 device (internal mic) is not showing up anywhere besides the device manager. I want to use the internal mic for skype and webcam. Somehow I need to get the Loc 1 device to show up on the Sound - Recording tab and in the Webcam Audio Source list? What do I do?
    Thank you in advance for your help.

    kestark
    This is Vista.
    Go to the Inspiron 1525 support page. Find the small blue "Change OS" and click on the arrow. Select Vista.Then download and install these 3 items with a restart between each one.
    1. Dell System Software in the System Utilities category.
    2. Intel Mobile Chipset in the Chipset category.
    3. Sigmatel audio driver in the Audio category.
    See if it works any better after you get the Sigmatel driver installed.

  • Problem streaming sound only to Apple TV

    Apple TV with the latest software of of Nov 23
    Macbook Pro with Retina Display running 10.10.1
    - I can see my itunes lib through home sharing and is able to play movies, see photos without any issue.
    - I can mirror my desktop using airplay and play movies and music without any issues.
    The issue comes when I try to stream sound only on to Apple TV. I have the ATV connected to my audio player and stream Spotify. The sound is choppy and broken. Going against my instinct I purchased a new router (Asus RT-AC68U) which obviously was not the issue since airplay was working on when I mirror my desktop.
    After a couple of hours with apple support, I saw on the forum that some people has issues with bluetooth. I TRIED TURNING OFF BLUETOOTH AND IT FIXED THE SOUND STREAMING TO ATV. I have an apple blue tooth mouse.
    I tried both shortcuts, from preferences - sound - output and Apple TV and using Option + Sound Icon to select Apple TV instead of internal speakers. Both have the same problem.
    I hope its a software issue rather than a hardware one and it can be updated soon.

    A Follow up on this issue , bluetooth also stops AirPlay from working reliably.

  • Can the Sound Object control two sounds at once?

    I have a sound object that I want to control two seperate
    sounds in different movie clips..one is intro music which lives on
    the main shell of the website along with the sound object. This
    fades out into a loop that lives on another movie clip that loads
    into the shell on a loadMovie action naturally.
    My goal:
    To control both sound clips with ONE sound object living in
    the main flash site's shell. Can this be done or would I have to
    have two seperate sound objects for each sound clip?
    Thank you,
    Dayton

    You could write a fairly simple class that would act as a
    wrapper for the sound class. In this class you would let it define
    the 2 sound objects but then you would only need to use call to the
    class object to control both. This could also be expanded to
    control more than 2 sounds. It is not exactly what you were hoping
    for but in the long term it would simplify sound control and be
    reusable in pretty much any setting that required sound.
    Tim

  • Clicking noise when streaming sound to SourceDataLine

    Hello,
    I'm trying to stream sound to the PC's speakers using SourceDataLine, but I have trouble getting rid of a clicking noise.
    It seems to occur when sourceDataLine.available() equals sourceDataLine.getBufferSize(). Is there a way to avoid this?
    I am dealing with an audio of indeterminate length. Here's the test code:
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.LineEvent;
    import javax.sound.sampled.LineListener;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.SourceDataLine;
    public class PlaybackLoop implements LineListener {
       SourceDataLine sourceDataLine;
       AudioFormat format;
       public PlaybackLoop() throws LineUnavailableException {
          AudioFormat.Encoding
              encoding = AudioFormat.Encoding.PCM_SIGNED;
          int sampleRate = 8000; // samples per sec
          int sampleSizeInBits = 16; // bits per sample
          int channels = 1;
          int frameSize = 2;  // bytes per frame
          int frameRate = 8000; // frames per sec
          // size of 1 sample * # of channels = size of 1 frame
          boolean bigEndian = true;
          format = new AudioFormat(
                encoding,
                sampleRate,
                sampleSizeInBits,
                channels,
                frameSize,
                frameRate,
                bigEndian);
          // PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian
          DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
          sourceDataLine = (SourceDataLine) AudioSystem.getLine(info);
       public synchronized void play() throws LineUnavailableException,
                                              InterruptedException {
          int bytesPerSec = (int) format.getFrameRate() * format.getFrameSize();
          int intervalMs = 200;
          int loop = 50;
          int bytesSize = bytesPerSec * intervalMs / 1000;
          byte[] bytes = new byte[bytesSize];
          // creates a high pitched sound
          for (int i = 0; i < bytesSize / 2; i++) {
             if (i % 2 == 0) {
                writeFrame(bytes, i, 0x05dc);
             } else {
                writeFrame(bytes, i, 0x059c);
          sourceDataLine.open(format, 16000);
          sourceDataLine.addLineListener(this);
          int bufferSize = sourceDataLine.getBufferSize();
          System.out.println(format.toString());
          System.out.println(bufferSize + " bytes of line buffer.");
          long nextTime = System.currentTimeMillis() + intervalMs;
          sourceDataLine.start();
          for (int i = 0; i < loop; i ++) {
             int available = sourceDataLine.available();
             if (available == bufferSize) {
                // clicking noise occurs here
                System.out.println("*");
             int w = sourceDataLine.write(bytes, 0, bytesSize);
             long currentTime = System.currentTimeMillis();
             if (w != bytesSize) {
                System.out.println("Not all written.");
                // TODO
             // time adjustment , to prevent accumulated delay.
             long delta = (nextTime - currentTime);
             long wait = intervalMs + delta;
             if (0 < wait) {
                this.wait(wait);
                nextTime += intervalMs;
             } else {
                nextTime = currentTime + intervalMs;
          System.out.println();
          System.out.println("End play()");
       public static void main(String[] args) throws LineUnavailableException,
                                                     InterruptedException {
          new PlaybackLoop().play();
       public static void writeFrame(byte[] bytes, int halfwordOffset, int value) {
          writeFrame(bytes, 0, halfwordOffset, value);
       public static void writeFrame(byte[] bytes, int byteOffset,
                                     int halfwordOffset, int value) {
          byteOffset += 2 * halfwordOffset;
          bytes[byteOffset++] = (byte) (value >> 8);
          bytes[byteOffset++] = (byte) (value >> 0);
       public void update(LineEvent event) {
          System.out.println();
          System.out.print("Update:");
          System.out.println(event.getType().toString());
    }

    I have modified the code so that it shows how the audio goes out of synch
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.LineEvent;
    import javax.sound.sampled.LineListener;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.SourceDataLine;
    public class PlaybackLoop implements LineListener {
         SourceDataLine sourceDataLine;
         AudioFormat format;
         public PlaybackLoop() throws LineUnavailableException {
              AudioFormat.Encoding
                    encoding = AudioFormat.Encoding.PCM_SIGNED;
              int sampleRate = 8000; // samples per sec
              int sampleSizeInBits = 16; // bits per sample
              int channels = 1;
              int frameSize = 2;  // bytes per frame
              int frameRate = 8000; // frames per sec
              // size of 1 sample * # of channels = size of 1 frame
              boolean bigEndian = true;
              format = new AudioFormat(
                        encoding,
                        sampleRate,
                        sampleSizeInBits,
                        channels,
                        frameSize,
                        frameRate,
                        bigEndian);
              // PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian
              DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
              sourceDataLine = (SourceDataLine) AudioSystem.getLine(info);
         public synchronized void play() throws LineUnavailableException, InterruptedException {
              int bytesPerSec = (int) format.getFrameRate() * format.getFrameSize();
              int intervalMs = 200;
              int loop = 400;
              int bytesSize = bytesPerSec * intervalMs / 1000;
              byte[] bytes = new byte[bytesSize];
              // creates a high pitched sound
              for (int i = 0; i < bytesSize / 2; i++) {
                   if (i % 2 == 0) {
                        writeFrame(bytes, i, 0x05dc);
                   } else {
                        writeFrame(bytes, i, 0x059c);
              sourceDataLine.open(format, 16000);
              sourceDataLine.addLineListener(this);
              int bufferSize = sourceDataLine.getBufferSize();
              System.out.println(format.toString());
              System.out.println(bufferSize + " bytes of line buffer.");
              long nextTime = System.currentTimeMillis() + intervalMs;
              sourceDataLine.start();
              for (int i = 0; i < loop; i ++) {
                   int available = sourceDataLine.available();
                   if (available == bufferSize) {
                        // clicking noise occurs here
                        System.out.println("*");
                   int w = sourceDataLine.write(bytes, 0, bytesSize);
                   if (w != bytesSize) {
                        System.out.println("Not all written.");
                        // TODO
                   // printing time drift
                   if (i % 100 == 0) {
                        long currentTime = System.currentTimeMillis();
                        // this number increases
                        System.out.println(nextTime - currentTime);
                   nextTime += intervalMs;
              System.out.println();
              System.out.println("End play()");
         public static void main(String[] args) throws LineUnavailableException, InterruptedException {
              new PlaybackLoop().play();
         public static void writeFrame(byte[] bytes, int halfwordOffset, int value) {
              writeFrame(bytes, 0, halfwordOffset, value);
         public static void writeFrame(byte[] bytes, int byteOffset,
                                             int halfwordOffset, int value) {
              byteOffset += 2 * halfwordOffset;
              bytes[byteOffset++] = (byte) (value >> 8);
              bytes[byteOffset++] = (byte) (value >> 0);
         public void update(LineEvent event) {
              System.out.println();
              System.out.print("Update:");
              System.out.println(event.getType().toString());
    }The output looks like this:
    PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian
    16000 bytes of line buffer.
    Update:Start
    200
    1200
    1450
    1700
    End play()
    The printed number keeps on rising. (Maybe I'm not sending enough information to the audio input stream?)
    The printed number should be stable if in synch, but it continues to rise, signifying that it's playing audio faster than it's being provided. When the audio input source is from a network streamed audio (instead of the test audio source in this example), it results in a buffer under run, which causes the clicking sound.

  • Flash animation with stream sound not playing in mac

    Dear all,
    I have made a 5 min animation with stream sound. Its playing perfectly in PC. But in mac, its not playing. Stream sound starts from frame 60. So mac plays the swf plays till 60 frame, after that it pauses. I tried importing different sound format (wav, aif, mp3) and tried with all sound export setting but the problem remain same; its playing only till 60. When i removed the sound, it played till end. Even with event sound, it plays till end. But with stream sound, the problem. The problem is only in mac; in pc its perfect.
    I am using VMware Mac OS x leopard in window xp for testing purpose. I tested it in laptop with mac; but the problem is same. What could be the solution?
    Thanks in advance. Waiting for solution.
    Bhushan Pradhan
    spherenepal.com

    Dear all, I solved the problem myself. The problem was with the sound driver of mac. After installing sound driver, the problem is gone. Bhushan

  • StopAllSounds vs. new Streaming Sound not playing

    In my timeline, I'm using a stopAllSounds action (because the
    user could be coming from anywhere in the movie and I need to stop
    whatever narration might be playing), then, in the next frame, I'm
    trying to stream a new sound. My problem is that the streaming
    sound doesn't play. I've tried adding a few frames between the
    stopAll Sounds action and the start of the streaming sound, but
    that doesn't seem to be the problem. Any ideas would be greatly
    appreciated.
    - BillG

    I was about to try your suggestion, but after sending a few more test emails, I discovered that it does in fact play the sound sometimes.  I sent about 20 test emails, and they were all received using the "idle" command, with about 75% of them playing the sound.  There was a 5-10 second delay between the messages being received and the sound playing that I don't remember from Snow Leopard, but I'm not positive about that.
    It shouldn't be the actual sound that is the issue, being that it is played sometimes, but I still don't know why it's not playing every time.  I tried receiving messages with the app running in the background, with it minimized, and with it as the active window, but I couldn't find any specific instance that caused it to not play the sound.
    I wasn't having this issue in Mail 4.  It didn't start until I installed Lion, which I did a clean install of, if it matters.
    I'm still open to thoughts on this, and thank you for your help.

  • Kde control center sound i/o method

    I just installed arch 0.5, and had some problems getting ALSA set up.  After reading through this forum and several others, I managed to get it set up properly (I think). 
    However, when I go to the KDE control center>>sound>>sound i/o, I don't see an option for ALSA.  When I had Mandrake 9.1 installed, it was there.
    Do I have to do something special to get the ALSA option to show up?  Do others out there running Arch have that option?  I added the alsa drivers to modules.conf and do see them when I run lsmod.  Is there something else I need to do to use alsa in KDE?
    Thanks!

    no i dont think so ... my modules.conf-sound-part looks like this:
    #### SOUND #####
    # the specific part:
    snd_index=0
    options snd snd_cards_limit=1 snd_major=116
    alias snd-card-0 i810_audio
    # and some things for the general sound support:
    alias sound-slot-0 snd-card-0
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-11 snd-mixer-oss
    alias sound-service-0-12 snd-pcm-oss
    i'm using the "i810_audio" module, as oyu can see ... and with this OSS works for me --- adapt this for you --- and in the KDE-aRTs-dialog(the one in the control center) just select "Autodetect"
    -> one more thing: be sure you have access to /dev/dsp (either chmod in /eth/rc.local or make a usergroup sound that owns it)

  • Help my nav controls my sound

    I am building a site and i have one section for lights with
    on and off buttons that works fine. I have a sound section with on
    and off buttons that work fine. The problem I have is if the sound
    is off and I hit say the navigation home button then my sound
    starts up again. Its the only nav button i have coded so far but i
    believe if i finished it the others would do the same thing. I have
    tried every tutorial i can find and the code is either wrong, or i
    get the funny button problems were other buttons cause the sound to
    restart. All i want is the site to load with the music playing, but
    if the user turns it off, it should stay off regardless of the
    scene they go to unless they decide to turn it back on. So what am
    i missiong here, why won't only the sound buttons control the
    sound. I tried loading the sound and unloading it, including it on
    a time line, and in a button, but everything has the same problem,
    other buttons such as the nav turn the sound back on. i am
    uploading my flash file hopefully someone can suggest something i
    am missing and suggest something better.
    my file is at www.designbytreitner.com/main2.fla

    Like I said, I’ve tried several tutorials and methods
    and they all wind up with the same bad side effect. Of course all
    methods use scripting, how else would you get anything to work.
    What do you mean post my code here that would be fine if the
    problem could only be my sound buttons. However it could be
    something else as well, that’s why I gave a link to my flash
    file instead. Also I mentioned trying several different methods
    which all had the same problem with other buttons re-starting my
    sound. That tells me the problem is something other than the code
    on my sound buttons.

  • 8kHz sample rate option broken for stream sounds in CS5

    I've made several test files where all I do is add a sound to a keyframe, set it to Stream sound, add a sufficient number of frames to hear the sound (about 300), then change publish settings to override as MP3 with "use 8kHz sample rate" option.
    Testing movie yields a SWF that has NO SOUND at all.
    Changing the sound to Event sound and republishing PLAYS THE SOUND AS EXPECTED.
    Changing it back to Stream sound and turning off the "use 8kHz sample rate" option again yields a SWF that has NO SOUND at all.
    It seems to make no difference what sound I import and use.
    I'm on a Mac Octocore.
    This Publish Setting appears to be broken in Flash CS5.

    The only setting that I could find in compressor that lets your change the bitrate to 44.1 is when you create a new dolby digital setting and then under the inspectors audio tab/Target System button, change the button to Generic AC-3. When done, you can change the Sample Rate to 44.1.
    Hope this helps?

  • Can I control the sound on users computer

    Hi
    I have a high school lab with 25 new intel iMacs. Is it possible to control the sound on the user computer so they can not use it. I have Mac server 4.10.10 and Apple Remote 3.0, etc. Any help would be appreciated.
    Perry

    Assuming you can't reset this by removing or locking the particular Sound settings in System Preferences via Workgroup Manager (WGM), then take a look at:
    http://discussions.apple.com/thread.jspa?threadID=1141459
    It's not exactly the same, but it might well point you at a solution.
    If you're just getting going with Macs in this particular environment, then you'll likely come to realize the Workgroup Manager and Server Admin tools are going to be your BFFs.

  • Control flash sound level

    Hi,
    is it possible to control the sound level of the flash player from Windows Volume Mixer and have it permanently stay on the level I set? I'm using Windows 8.1. After every playback on Youtube, the sound level resets to the maximum level.
    Thanks.

    Hi alv93,
    Yes, however the volume mixer does not sync with the volume slider on the flash plug in unfortunately.

Maybe you are looking for