4 Replies Latest reply on Oct 12, 2011 4:36 PM by rogerfox2012

    No audio in my iPad application?


      Hi there!


      I'm currently trying to develop my Flash animation to the iPad, however no audio plays...I'm currently using ActionScript 3 to make the audio appear instead of using the timeline, but even if I use the timeline the audio just doesn't play. The file itself is an mp3, and information on the iPad says that it should be able to play on it.


      I have a really bad feeling that this is a Flash/iPad issue and it hasn't been resolved yet. Does anyone have any idea why? I really can't figure out, because it's not like there's an audio option before you publish the application...

        • 1. Re: No audio in my iPad application?

          Can you give a little bit more information? What is the code you are using to load your audio? When not on the timeline, are you including MP3 in your additional files? Are you able to get the audio to play when testing on the desktop? Have you double checked the audio compression settings to be sure audio is being included and at a setting AIR can play if on the timeline?

          • 2. Re: No audio in my iPad application?
            rogerfox2012 Level 1

            Hi Antonio, thanks for the help in advice.


            This is the following code I use each time I ask to use an audio file:


            var p12:ac_12_1 = new ac_12_1();

            p12.play(0, 1);


            I have edited the audio so that it can be referenced when called on ActionScript 3, and when I test it on my computer it works fine. I am working on an Android vesion and I use the same code, and it works perfectly well on the Android also. As for the audio compression, is at the settings on the Publish Settings, and for the Audio Stream and Event area? I have been trying to change the kbps on it, and using it to override sound settings, however when I test it the problem is still there. It's really odd that the iPad itself won't play the audio, when on every other device it has worked.


            I have included MP3 files on two spots of the timeline, for easy audio editing sake, but are you saying that would be the issue? Even if tha twas the case, I had tested the project before I used ActionScript to reference the file and it still didn't work. Could it be I had to only use ActionScript if I want to use audio files?

            • 3. Re: No audio in my iPad application?
              antonio_holguin Level 1

              In order for me to be able to decipher your code, you will need to write it in a way that others can read it. What is p12? what is ac_12_1? What is the play function a function of (since i dont know what ac_12_1 is)?



              You may need to only use AS to access audio on iOS, I am not sure, to be honest because I don't think I've ever tried timeline audio on iOS. If you are loading an external MP3 via AS attaching the file on the timeline won't do you any good. If you are compiling an MP3 within the library of your fla you'll need to be sure it has a name. On iOS you may want to triple check that the audio file format and codec is supported ( I dont have a link to that right now).


              See this for properly loading and playing an MP3: http://www.republicofcode.com/tutorials/flash/as3sound/







              Antonio Holguin

              • 4. Re: No audio in my iPad application?
                rogerfox2012 Level 1

                Thank you for the help again Antonio, but I figured out the problem. It turns out it was as simple as updating Air 2.6 to 2.7...now everything works perfectly. Thank you again!