15 Replies Latest reply on Jan 27, 2014 4:54 PM by Cindyjoy4

    Audio in Edge Animate

    Cindyjoy4 Level 1

      Hi, I am very excited about the new audio feature!  I put it into my project and it works great on my desktop, but when I view it on my ipad with edge inspect, it only plays the audio that was put into the script, or on the stage upon complete... The sound that I put  just on the timeline does not play.  Is there something that I can do to make it work?  Thanks in advance for your help.

        • 1. Re: Audio in Edge Animate
          SujaiS Adobe Employee

          What audio format are you using in the timeline? Would be nice if you can PM a sample file that has the issue.


          You can check some info on the link: http://forums.adobe.com/message/5187777



          1 person found this helpful
          • 2. Re: Audio in Edge Animate
            resdesign Adobe Community Professional & MVP

            remember that autoplay is not supported by Apple devices.

            1 person found this helpful
            • 3. Re: Audio in Edge Animate
              Cindyjoy4 Level 1

              ok here is the link to the template file in edge animate http://adobe.ly/1iudcbA  thanks for checking it out for me! if you would rather the an file let me know

              • 4. Re: Audio in Edge Animate
                resdesign Adobe Community Professional & MVP

                Template is fine. I am getting the same as you so far and I am trying to understand why. I tested one of my files and it works fine on the iPhone. So I am going through your code to see if there is something that prevents the sound from working.


                One thing I noticed is that you still have the yepnope code to load your pluggins both in compostionReady and creationComplete. You need to take that off since it is redundant.


                I'll try to get back with you sometime today.

                • 5. Re: Audio in Edge Animate
                  jbowden Adobe Employee

                  Hi Cindy,


                  Thanks for posting your template. There's one problem I see that would keep this from working in iOS and other mobile devices: you have audio elements that are comprised only of .ogg files. What you want is to have each audio element be comprised of both mp3 and ogg files, for widest browser compatibility.


                  To fix it, locate each audio element, and look up its Source property in the Properties panel. Then look up that name in the Audio section of the Library. If there's only an ogg file, or only an mp3 file associated with the audio element, then you'll have browser compatibilty troubles on at least one browser. I see that you appear to have an ogg & mp3 version of each audio file, so the trick here is to put them in the same audio group (source). You can drag and drop the corresponding mp3 file in the Library into the audio group containing the ogg file in the Library, and then both files will be available as a source for the audio element, and the browser will play the first one that's compatible with it.


                  Btw, we do this automatically so you don't have to do it manually - provided the files have the same name except for the extension, e.g., Pop05.mp3 and Pop05.ogg would automatically be placed in the same group when you import them.


                  I didn't check all of your audio elements, but the autoplay disclaimer mentioned by resdesign does apply to iOS and other mobile devices.





                  p.s. Also note that playback actions on the timeline for audio elements are considered the same as autoplay as far as iOS is concerned - they aren't supported because Apple and other mobile device makers don't want to incur data charges automatically unless audio playback is initiated by a user event, such as touchstart, click, swipeleft/right, etc.

                  • 6. Re: Audio in Edge Animate
                    Cindyjoy4 Level 1


                    • 7. Re: Audio in Edge Animate
                      resdesign Adobe Community Professional & MVP

                      i added a sound with a trigger for a new button I put on the stage and it works on iPhone. The sound on your sun still does not work. Not sure why yet.


                      OK - I also changed the sound for the sun to main and it now works. The rest main not work because the sounds are not triggered.

                      • 8. Re: Audio in Edge Animate
                        Cindyjoy4 Level 1

                        Ok, so I fixed all of the file names for the audio files and it still doesn't work... Even the one that is a touch or click start to the audio.

                        • 9. Re: Audio in Edge Animate
                          jbowden Adobe Employee

                          Make sure that your audio fallback files (mp3 & ogg) are grouped together in the Library, and that each audio element in your composition references the correct audio group in the Library.


                          As long as each audio element has an mp3 file, it will work on iOS if it is triggered by a user event. Playback actions for audio elements, as I saw in your composition timeline, won't play back in iOS. Audio playback on mobile devices must be initiated by a user event.

                          • 10. Re: Audio in Edge Animate
                            Cindyjoy4 Level 1

                            Ok, I think I understand now.  Thanks again for all of your help today! Dang IOS!  thanks

                            • 11. Re: Audio in Edge Animate
                              resdesign Adobe Community Professional & MVP

                              I got your file corrected. All is working except the autoplay sounds. Also simplified all the code.


                              • 12. Re: Audio in Edge Animate
                                resdesign Adobe Community Professional & MVP

                                FIle  has been updated to show animation on correct image with correction from Zaxist in the event handler.

                                In the future do not use names starting with underscore - this is very bad practice!


                                Zaxist is the best!

                                • 13. Re: Audio in Edge Animate
                                  Cindyjoy4 Level 1

                                  Thank you so much!  Thanks for the help!  You went way beyond what I expected!  I have one more little question  When you click the replay button (maybe you could look at a revised version) if I had placed any of the faces up on the tree they appear there again.  Is there a way to make it start fresh so there are no faces on the tree?http://adobe.ly/1fepJN5

                                  • 14. Re: Audio in Edge Animate
                                    Zaxist Level 4

                                    Thank you Dear redesign


                                    well Dear Cindy.., i had a look on your project, i tried to cleanup it for you but because of that heavy mess your project have it would take two days for me, so i decided to leave it as it was


                                    i noticed that you used 2 series of images, one image and other one symbol, you really dont need to do it this way, you could have those images that you made start and falling animation with them as a draggable objects and you really didnt need to re create a symbol for every single image, and maybe you think so how should i play those animation ?

                                    you could place the symbol animation on the tree where ever that user will put the images and use that animation symbol as droppable area !!


                                    see very easy, and didnt needed much additional element and symbols that you made to show, also here is a note: if you can use less objects and symbols then your work will play smoother and better on Mobile Devices and slow computers


                                    btw, here is how you can reset the location of your images after drag and drop


                                    we need to save our images original positions and put them back on their original place when we reply so, here is how we do this :


                                    for (i=1;i<32;i++)

                                    sym.$("_"+i).data("left", sym.$("_"+i).position().left).data("top", sym.$("_"+i).position().top);


                                    because you made your drag and drop display off, we just can get their position when they are on !!

                                    so the only way we can do that is putting this code on the time line after they are on, so i decided to put them on 9.900 th miliseconds


                                    now we saved their original position, and we need to put them back on replay button, so we should write this code at the top of all codes in click action on replay button :


                                    for (i=0;i<32;i++)

                                    sym.$("_"+i).css({"left": sym.$("_"+i).data("left"),"top": sym.$("_"+i).data("top") })


                                    now problem is solved and after Reply you can see your images are in their first place




                                    1 person found this helpful
                                    • 15. Re: Audio in Edge Animate
                                      Cindyjoy4 Level 1

                                      Thank you for all of your help.  As i'm sure you can see by my lack of knowlege of code I am truely just a designer and thought I could do this in edge animate... Anyways I obviously need to get more help from someone like you so wish me luck, and again thank you so much!