12 Replies Latest reply on Mar 30, 2018 6:46 PM by amym56956038

    Sound with Flash

    Mitch Wallace Level 1
      I want to load several Flash animations into my Authorware piece but when I do the movies play without sound. I loaded the sounds with actionscript rather than embedding them in the timeline (see below). Is there a way to make the audio play?

      // This plays the intro sound track
      myMusic = new Sound();
      myMusic.attachSound("Intro30");
      myMusic.start();
        • 1. Re: Sound with Flash
          Mitch Wallace Level 1
          And I just noticed that the Flash frame rates don't play at the assigned speed when loaded in Authorware.
          • 2. Re: Sound with Flash
            Level 7

            >I want to load several Flash animations into my Authorware piece but when I
            >do
            > the movies play without sound. I loaded the sounds with actionscript
            > rather
            > than embedding them in the timeline (see below). Is there a way to make
            > the
            > audio play?
            >
            > // This plays the intro sound track
            > myMusic = new Sound();
            > myMusic.attachSound("Intro30");
            > myMusic.start();
            >

            If this is in the Asset Xtra, I don't think it works. You need to instert
            your Flash via the ActiveX control to get this to work.

            Steve

            • 3. Re: Sound with Flash
              Level 7

              > And I just noticed that the Flash frame rates don't play at the assigned
              > speed when loaded in Authorware.

              Again- if this is the Asset Xtra, then you need to set to Direct To Screen
              to get best performance. Better to use ActiveX

              Steve

              • 4. Re: Sound with Flash
                Mitch Wallace Level 1
                If I use ActiveX the user will need to have the Flash player installed on their system, correct?
                • 5. Re: Sound with Flash
                  Level 7

                  > If I use ActiveX the user will need to have the Flash player installed on
                  > their system, correct?

                  Yes. How many systems do you encounter that don't?

                  Note that since AW only supports Flash 6 with the Asset Xtra, you might just
                  find you have no choice if you want certain features.

                  Steve

                  • 6. Re: Sound with Flash
                    Level 7
                    Mitch--are you attempting to get your visual elements to synchronize with
                    the sound track? If so, it might be best to embed the sound in the timeline
                    rather than attach it.

                    Marc Lee

                    "Mitch Wallace" <webforumsuser@macromedia.com> wrote in message
                    news:f87luu$3nv$1@forums.macromedia.com...
                    > And I just noticed that the Flash frame rates don't play at the assigned
                    speed when loaded in Authorware.


                    • 7. Re: Sound with Flash
                      Mitch Wallace Level 1
                      Marc, I originally loaded the audio with actionscript and then created a small function that continually counted the number of milliseconds the audio had run. This way I could use the time code numbers I had been given when the audio was created to sync the animation to the sound. The function basically routed the play-head up and down the time-line according to where the audio was in the play cycle. It works kinda like dragging graphic icons beside an Authorware sound Icon and setting them for Synchronize on: Position.

                      The second message I posted ("And I just noticed that the Flash frame rates don't play at the assigned speed when loaded in Authorware") was when I tried loading the audio directly onto the time-line and adding enough frames that the play-head should hit them at the right time to sync with the audio track. For example a 24 fps rate means 240 frames = 10 seconds. That worked fairly well in Flash but when I loaded it into Authorware it wasn't even close. Selecting Direct to Screen as Steve suggested helped but it's far from perfect.

                      I think that I'm going to try the ActiveX option now.
                      • 8. Re: Sound with Flash
                        Level 7

                        "Mitch Wallace" <webforumsuser@macromedia.com> wrote in message
                        news:f8crgh$ibq$1@forums.macromedia.com...
                        > Marc, I originally loaded the audio with actionscript and then created a
                        > small
                        > function that continually counted the number of milliseconds the audio had
                        > run.
                        > This way I could use the time code numbers I had been given when the audio
                        > was
                        > created to sync the animation to the sound. The function basically routed
                        > the
                        > play-head up and down the time-line according to where the audio was in
                        > the
                        > play cycle. It works kinda like dragging graphic icons beside an
                        > Authorware
                        > sound Icon and setting them for Synchronize on: Position.
                        >
                        > The second message I posted ("And I just noticed that the Flash frame
                        > rates
                        > don't play at the assigned speed when loaded in Authorware") was when I
                        > tried
                        > loading the audio directly onto the time-line and adding enough frames
                        > that the
                        > play-head should hit them at the right time to sync with the audio track.
                        > For
                        > example a 24 fps rate means 240 frames = 10 seconds. That worked fairly
                        > well in
                        > Flash but when I loaded it into Authorware it wasn't even close. Selecting
                        > Direct to Screen as Steve suggested helped but it's far from perfect.
                        >
                        > I think that I'm going to try the ActiveX option now.

                        You may want to also look at GlobalTemp.


                        • 9. Re: Sound with Flash
                          Level 7

                          > You may want to also look at GlobalTemp.

                          GlobalTempo

                          Just to elaborate. Try setting it to a high value - 500, 1000 or more.
                          Should help Flash performance a little.


                          Steve

                          • 10. Re: Sound with Flash
                            Level 7
                            Mitch...

                            I too have struggled with frame speed of Flash in AW over the years: for the
                            purpose of sound-visual sync (for example, with Captivate SWFs playing
                            through the ActiveX control). On some machines, there would be no problem
                            but on others, there would. I've never been able to totally figure the
                            issue out.

                            Your AS-based sync function sounds cool. I did the same thing on the AW
                            side a few years ago...doing basically what you indicated: constantly
                            calculating the 'should be on' Flash frame based on the time code, then
                            repositioning the play-head accordingly. In the end, it worked pretty slick
                            but it was a real headache to get it all working.

                            I've since found that using the 'streaming' option of embedded sound works
                            well for playing back through AW.

                            If you're interested I can send you the AW-based sync code for playing
                            Flash. Just let me know. I'd also like to see your AS-based msec counter.
                            I have started on something similar but haven't finished it yet.

                            You should also check out the Colin Moock's FPS speedometer...It's a Flash
                            program you can set to a certain frame speed and it displays the actual
                            playback frame speed. You should be able to google it; if not, let me know.

                            -Marc L

                            "Mitch Wallace" <webforumsuser@macromedia.com> wrote in message
                            news:f8crgh$ibq$1@forums.macromedia.com...
                            > Marc, I originally loaded the audio with actionscript and then created a
                            small
                            > function that continually counted the number of milliseconds the audio had
                            run.
                            > This way I could use the time code numbers I had been given when the audio
                            was
                            > created to sync the animation to the sound. The function basically routed
                            the
                            > play-head up and down the time-line according to where the audio was in
                            the
                            > play cycle. It works kinda like dragging graphic icons beside an
                            Authorware
                            > sound Icon and setting them for Synchronize on: Position.
                            >
                            > The second message I posted ("And I just noticed that the Flash frame
                            rates
                            > don't play at the assigned speed when loaded in Authorware") was when I
                            tried
                            > loading the audio directly onto the time-line and adding enough frames
                            that the
                            > play-head should hit them at the right time to sync with the audio track.
                            For
                            > example a 24 fps rate means 240 frames = 10 seconds. That worked fairly
                            well in
                            > Flash but when I loaded it into Authorware it wasn't even close. Selecting
                            > Direct to Screen as Steve suggested helped but it's far from perfect.
                            >
                            > I think that I'm going to try the ActiveX option now.
                            >


                            • 11. Re: Sound with Flash
                              Mitch Wallace Level 1
                              Marc, you're spot on when you say that Flash anims within Authorware run all over the map from system to system. Some times a system with the same basic specs as one that works will be completely out of sync on my tests.

                              My ActionScript function is really nothing special. I just created a function called AudioNav at the start of the program and then call it with setInterval so that it doesn't bog the program down. I also ID it so I can clear it later. Inside the function you can set up any test you want to determine where to go. For example if I set a var called flag to show my current play head location I can then decide what to do when I hit a certain point in the narration.

                              var flag:Number = 0;

                              // Audio Navigation function
                              function AudioNav() {
                              myMill = String(myNarration.position); //<-- if you wanted to display the time code on screen with a text field
                              // a simple routing example
                              if (myNarration.position>3600 and flag == 150) {
                              gotoAndPlay("Section2");
                              }
                              }
                              // End AudioNav function

                              // Load the audio clip
                              myNarration = new Sound();
                              myNarration.attachSound("Nar001");
                              myNarration.start();

                              // Call the AudioNav function every 10 milliseconds
                              var intervalID:Number = setInterval(AudioNav, 10);

                              That's just a basic example, but you get the idea. As for the Streaming option, it changes the quality of the audio when I play it back. There seems to be a noticeable difference when I switch from AW played audio to the Flash Steaming audio. But it does sync the sound much better and is what I am currently using as a fix.

                              Any assists would be very welcome, but I'm beginning to think that there will not be a really good solution unless (I used to say until with regards to upgrades :-{ ) Adobe releases a new version of AW.

                              Amy, I tried GlobalTempo but it didn't help.
                              • 12. Re: Sound with Flash
                                amym56956038

                                I just got to the point where I was going to go to the movies and then I got to go to the movies and then I got to go to the movies and then