3 Replies Latest reply on Sep 6, 2015 8:59 AM by DanielCKX13

    Audio sprites in edge?

    Xrazzicaz Level 1

      I have an audio file with various sound effects that I want use as an audio sprite in my edge project. I have no problem with normal audio playback but cannot get edge to play back the audio sprite at particular time periods.


      I have converted the audio to a symbol and put labels on the timeline. Does anyone know how to trigger those specific points in code and then pause the audio after a certain time.


      I have tried things along the lines of :


      sym.getSymbol('audioSprite').play(0); which plays the whole audio file


      sym.getSymbol('audioSprite').play('mylabel'); which does not play anything.


      There is very limited information anywhere on the Internet. Please help :-)

        • 1. Re: Audio sprites in edge?
          Preran Adobe Employee

          Hi Xrazzicaz,


          Not sure if this is what you are looking for but am hoping that this provides you with some insights.


          HTML5 audio and audio sprites – this should be simple ✩ Mozilla Hacks – the Web developer blog




          1 person found this helpful
          • 2. Re: Audio sprites in edge?
            ScullE Level 1

            I have exactly the same question...The very bottom of this page from Adobe sketches out the idea as you have implemented it, but jumping to the labels within a symbol containing audio doesn't seem to work. I'm looking for something similar to Flash's audio on the timeline set to "stream", where the audio is synced to timeline position. It seems to work while in the editing environment--jump to a position on the timeline, and the correct point in the audio plays. But I can't get it to work in the published/previewed composition.


            I'd like to find an Edge Animate-based solution to this to keep external script dependencies down, but may end up importing Howler.js or SoundJS for audio sprite functionality...

            • 3. Re: Audio sprites in edge?
              DanielCKX13 Level 1

              I know this is an old thread, but any luck about this? How to stop a sprite?


              Ive got sym.getComposition().getStage().getSymbol("Audio").$("Sprites")[0].currentTime = 7; to set the audio on a specific time (in this case 7 seconds), then I use  sym.getComposition().getStage().getSymbol("Audio").$("Sprites")[0].play(); to start playing a sound from that particular point, but if I want to pause the sprite once it ends, sym.getComposition().getStage().getSymbol("Audio").$("Sprites")[0].pause(); doesn't work for me.


              Any ideas?