Read external sound (iOS app)

Hi everyone, so I have a problem, I do a few game btns who will play a sound when it is pressed.

I have the mp3 file in a folder that I want to talk about the code:

He played well during the test, but when I 'publish' as a .ipa app and put it in my iPhone that does not have the play button,

and I added files to the app, exactly as it is in the code, which is as follows:

Random_btn.addEventListener (MouseEvent.CLICK, playRandomSound);

var random_sound:Sound = new Sound();

random_sound. Load (new URLRequest("random/randomness/randomsound.mp3"));

var my_randomchannel:SoundChannel = new SoundChannel();

function playRandomjSound(event:MouseEvent):void {}

my_randomchannel = random_sound.play ();

}

function stopSound(event:MouseEvent):void {}

my_randomchannel. Stop();

}

Any reason why he shouldn't play that I don't know?

I reapeat I added the folder "random" with the subfolder 'random' with the 'randomsound.mp3' of the app file in the settings of iOS AIR...

Thanks for all the answers help

Try to use the File class to reference the file.

var randFile:File = File.applicationDirectory.resolvePath("/random/randomness/randomsound.mp3");

There are?

If (randFile.exists)

{

var random_sound:Sound = new Sound();

random_sound. Load (new URLRequest (randFile.nativePath));

etc.

}

Tags: Adobe Animate

Similar Questions

  • A free iOS app that reads typed entries to speak out?

    Hello.

    Which is good, a free iOS app for iOS v9.3.1 to an old iPhone 4s, who can

    translate English entries typed to say outloud (voice of Siri) for those

    who can't talk? Also, it can work on cell phone calls?

    Thanks in advane.

    Why not use the built in function? Settings > general > accessibility > Vision > speech. From there on, you have three options. Talking about selection, I would be most useful. Once enabled, you can select a block of text, press on and hold it and tap Speak...

    I don't know if it will work during a call.

  • iOS App average rejected binary (2.16)

    Recently submitted an application iOS to the appstore for the publication, but it was rejected with the error following by Apple:

    ------------------------------------------------------------------------------------------ ----------(start error message)


    rejected binary 1.0

    2.16 details your app says the audio support in the UIBackgroundModes key in your Info.plist file but did not include features that require

    Apple

    • 2.16 - multitasking Apps can use background services for their destination: VoIP, audio playback, situation, task completion, local notifications, etc.


    2.16 details
    Your app says the audio support in the UIBackgroundModes key in your Info.plist file but did not include features that require a persistent audio.

    Next steps

    The audio button to be used by applications that deliver audio content to the user while in the background, like the music player or streaming of audio applications. Please modify your application to provide sound content to the user so that the application is in the background, or remove the "audio" key of UIBackgroundModes parameter.

    Resources

    If you have difficulties to reproduce a problem report, please try to test the workflow described in technical Q & A QA1764: how to reproduce the bugs found compared to observations of the App Store.

    If you have any questions at the level of the code after using the resources above, you can consult with Assistance technique Apple Developer. When the DTS engineer follows upward with you, please be prepared to provide:
    -all the details of your rejection problem (s)
    -screenshots
    -steps to reproduce the problem (s)
    - symbolicated crash logs - if your problem results in a crash log

    ------------------------------------------------------------------------------------------ ----------------------------(end error message)



    Any help to solve this problem so that I can submit the application for approval would be greatly appreciated.

    Ivan Mironchuk

    Hi Hayden,

    There is a setting in App Builder for this. Unless you use a background sound in your application you should not check the box that says "Enable background audio" in App Builder when you set up your iOS app.

    You must either:

    (1) uncheck this box, rebuild your app and submit again

    (2) response to Apple and tell them where in your content, they can find audio that had enabled background reading

    Neil

  • its iOS app problem

    Hello

    My question has to do with sound drive of ios app icon located in the top bar, near the battery icon. It appears when the user listens to music through certain applications such as ipod, soundCloud, youtube and etc.

    With the tests I did, I saw that AIR doesn't do this when you create a sound object and read it. Is it possible to make the air as default player application in ios?

    the icon image is here (blue arrow in the top bar)

    http://a5.mzstatic.com/us/r1000/090/Purple/8a/21/cb/mzl.anbzmref.320x480-75.jpg

    Thank you.

    I solved the problem by using htmlwebview.

    It's javascript. radio.html

    Audio var = new Audio();

    audio.setAttribute ('src', 'http://xxx.xx.xxx.xxx:9001 /; component/1 ');

    function playRadio()

    {

    audio. Play();

    }

    function stopRadio()

    {

    audio.pause ();

    }

    and side actionscript

    _html = new StageWebView();

    _html.viewPort = new Rectangle (0, 0, 0, 0);

    _html.stage = stage;

    _html.addEventListener (Event.COMPLETE, onHTMLLoadComplete, false, 0, true);

    var buildPath:String = File.applicationDirectory.nativePath;

    var source: String;

    source = buildPath + "" / radio.html ";"

    _html.loadURL (source);

    function onHTMLLoadComplete(event:Event):void

    {

    _html.loadURL ("JavaScript:playRadio ()");

    }

  • Where can I find my purchase history in the ios app store?

    Where can I find my purchase history in the ios app store? I use air ipad 2 and I bought some elements of support in an online game, but it is not my purchased item? She already deduct under my belt.

    This, to iTunes on a computer.

    Read here: see your purchase history in iTunes on Mac or PC - Apple Support store

  • Cannot able to connect to xbox 360 glass smart iOS app.

    Original title: glass smart xbox

    I can't able to connect to xbox 360 glass smart iOS app.

    I activated the security of two steps on hotmail.

    I created the app password for log in glass smart app.

    his failure to connect.

    What is the solution without turning off validation in two steps.

    Hello

    Your Question is beyond the scope of this community...

    I suggest that repost you in the Xbox Forums.

    "Xbox a Preview program FAQ.

    http://support.Xbox.com/en-us/Xbox-one/system/Xbox-update-preview-FAQ

    'Home'

    http://forums.Xbox.com/

    "Xbox forums.

    http://forums.Xbox.com/xbox_forums/general_discussion/f/3817.aspx

    _________________________________________________

    "Xbox Forums directory.

    http://www.Xbox.com/en-us/forums

    General

    Material & Discussion Services

    Xbox support
    Agent hours: M - F 09:00-17:00 PT

    Law enforcement forums

    Technical support of Xbox Live rewards
    Xbox Live rewards Squad hours: M - F 09:00-17: 00 PST

    See you soon.

  • E5410 LED indicator causes appears on the external sound card

    Hi, I use an an external sound card audio Hifi via USB, but it gets serious on my E5410 appears whenever storing drive led flashes blue (i.e., the small cylinder blue next to the wifi and battery indicators). The sound card works fine on other computers. I tried various usb slots, and they all have the same effect. The light flashes every 1 or 2 seconds, no matter what I do. I understand that it flashes when there is a read/write on the hard drive. My question: is there a way to diasble temporarily LED? Or is it simply a red herring. Its really too bad. I use Ubuntu 14.04 with uptodate bios and kernel linux vanilla in real-time mode. Thank you

    It's a laptop, so you will probably get a better answer in the forum of the laptop. (This is the forum office.)

  • Bookmarks are not correctly displayed in the iOS app version 15.4

    We are having a problem with the current version of the iOS app.  Bookmarks to a PDF file are displayed in the application, but the part of the text for the bookmark is missing.  We tried to open the PDF in iBooks and bookmarks are displayed correctly.  See the attached images.

    Seeimage1.PNGimage2.PNG

    HI jamieh40910107,

    Thanks for posting the screenshots.  They are very useful.

    The second screenshot shows clearly that the bookmark labels contain newline characters.  Your bookmark labels extend two lines.

    line 1:6.

    line 2:. Horse Expo

    line 1:7.

    line 2:. a. second reading...

    Acrobat Reader for iOS shows only the first line ('6', '7') of each bookmark label and don't watch not the second line.  In contrast, iBooks shows multi-line bookmark labels.

    I will file a bug report for the problem with bookmark multiline labels in Acrobat Reader.

    As a solution, if you have a copy of Acrobat Pro (a PDF editor for Windows or Mac computers), you can change the bookmark labels to remove line break characters and turn them into bookmark single-line labels.

    Alternatively, you can use a trial version for 30 days to see if it fits your needs.

    Download Adobe Acrobat free trial | Acrobat Pro DC

    Thanks for reporting the issue!

  • Can you read a DPS 2015 app when you are not connected to the wi - fi?

    Can you read a DPS 2015 app when you are not connected to the wi - fi?

    As mentioned, articles that have already been viewed are cached locally on the device for offline use. Note that the application, if any, will remove the oldest available items to free up space.

    If your reader wants to ensure that a collection is available offline, we have a new feature on iOS which was released Friday, which allows an explicit download of a collection and prevents purged automatically. See Digital Publishing Solution helps | What's new in this version of DPS 2015 for more information. This feature is currently on iOS, and will be available on Android and Windows in a few weeks.

    Neil

  • Lack of option 'open' or 'view' (Adobe reader DC iPad iOS 8.3)

    Why is missing an option "open" or "view" in my Adobe CD player? (iPad iOS 8.3)

    How can I open a document from a net connection? Or from another source?

    Hello

    Is there a particular element of the button or menu you think is missing from the new domain controller Acrobat?

    To open a PDF from Safari or other iOS app, you can use the feature of "open in" iOS.  (He has not changed the old version - Adobe Reader for iOS).

    Do you want to take a look at the next document in the FAQ to see if it answers your question?

    How to open PDF documents in Adobe Reader (iPad on iOS version 7 or 8)

    The FAQ document indicates Adobe Reader of iOS (the old version).  But the content applies to Acrobat CC for iOS (new version) as well.

    Please let us know if you have any questions.  Thank you.

  • Adobe Air + Box2D.swc = TypeError: Error #1009 / / new way of managing .swc files in Flash for iOS Apps?

    Hello

    I need your help please - I need to update one of my iOS Apps. In this application, I use Box2d for a simple maze game (this is an application for children). When I publish and test this game on my Mac it works fine. I can drag my hero (fish) in this maze and all detections of collision, gravity etc perfect work.

    maze.jpg

    When I test it on my iPad it does not work. The device debugger shows this error message:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    Global $init)

    Global $init)

    at Box2DAS.Common::b2Base$/initialize() [/ users/jan/Documents/_Projekte/Spielplatz/Universal_ Retina/src/com/Box2DAS/Common/b2Base.as:31]

    to wck::WCK/create() [/ utilisateurs/jan/Documents/_Projekte/Spielplatz/Universal_Retina/src/com/wck/WCK.as:26]

    in misc::Entity/ensureCreated() [/ users/jan/Documents/_Projekte/Spielplatz/Universal_Retina/s rc/com/misc/Entity.as:50]

    in misc::Entity/handleAddedToStage() [/ users/jan/Documents/_Projekte/Spielplatz/Universal_Ret ina/src/com/misc/Entity.as:100]

    in misc::Entity/handleAddedToStage()

    Line 31: loader = new CLibInit();

    Bildschirmfoto 2014-10-23 um 21.06.03.png

    I guess that "CLibInit" must come from the .swc file.

    The thing is:

    I won't change anything in this maze game - it seems it has to do something with the new version of Flash or Adobe Air. File box2d.swc is included:

    Bildschirmfoto 2014-10-23 um 21.01.26.png

    It has always worked like that - and it works when test on my Mac - but it doesn't work anymore on my current system.

    So I started my Mac from an older system (10.9.5 on an external HD) and published the App in Flash and Adobe Air 13.0 CS6 - then all of a sudden, he is working on my iPad as before. I was able to draw a fish and make it arround.

    The same project / app released from my current OS X 10.10 + Flash CC 2014 + Adobe Air 15.0.0.302 does not work. I still have this error message - I can't drag the fish - nothing happens. And I have no idea why this happens and what I could do. I searched all day for a solution but found nothing.

    If nothing has changed by the way Flash and/or Air manages the .swc files? Is there another way to include: import cmodule. Box2d.* / CLibInit?

    -If someone has an idea - please let me know!

    Best regards

    Jan

    SOLVED!

    I uncheck 'Schnelleres Verpacken aktivieren (Beta)' and now it works again! Hooray!

    @ Adobe: Please take a look at this!

  • presentation of iOS app from AppStore - certificate of Distribution?

    I finished developing the first version of my iOS app and continued to fill all the holdouts not in Itunes Connect and started to download my application through the AppLoader mac operating system. Which therefore found that the problem is that my application which was published in Adobe Flash Proffesional 6 has been set up under a certificate of development (in the deployment tab) and not a certificate necessary to publish to the App Store distribution. I have generated such a certificate on a Mac, and tried to use it in my project through Flash 6 on my PC, however, a password is required to publish the application.

    I have several questions about this:

    (1) is there a way to generate a certificate of distribution on my PC (and not via a mac)?

    (2) these certificates of distribution are the extensions .cer - FLASH, you are prompted to find the certificates .p12.

    (3) if I use the distribution certificate created in my project on my Windows PC mac computer, where I can understand the password it asks me to enter?

    This is a very frustrating issue, Adobe if you can download a tutorial of Distribution for publication on App Store that would help people struggling with the same problem... There are currently only a tutorial on how to create a development .p12 certificate...

    Thank you

    Roy

    1. Yes, but it is much more difficult to do it on a mac.  in fact, I think that you will have to emulate a mac to do.

    2. When you create your .p12 file in Keychain Access, you enter a password.  (there is no reason to use a different password for the development and distribution).

    1. Go to the https://developer.apple.com/devcenter/ios/index.action using a Mac or Mac Virtual PC
    2. Log-in.
    3. Click on the iOS Dev Center.
    4. Click iOS Provisioning Portal link.  (See Fig08-04).
    5. Click certificates in the left panel.
    6. Click the Distribution tab in the right panel.
    7. Click on the certificate request button in the right panel.
    8. Follow the instructions to create your distribution certificate using Keychain Access.  (See fig. 08-05)  Apple has some easy to follow instructions to create a signature that is used to create your certificate. The steps needed to create a Certificate Signing Request appear in the right panel after step 7.  The only part that I come across is when you are prompted to open the Certificate Wizard.  You will find it in the top left of your Mac after clicking on the Keychain Access, not in the Keychain Access window.
    9. The right panel change and to show that your certificate is waiting for deliverance.  Refresh the page and you should see that your certificate and reading by download. (See Fig08-06).
    10. Download your ios_distribution.cer by clicking on the download button.
    11. Download an AppleWWDRCA.cer by clicking on the "* If you do not have the WWDR intermediate certificate installed, click here to download it right now." link.
    12. Open both files in Keychain Access (using the login keychain).
    13. Right click of your private key in Keychain Access (you may need to expand the iPhone Developer certificate in your Keychain Access window) and click Export.  Make sure that the file format is the exchange of personal information (.p12) and click Save.  You will be prompted for a password that you must remember.  You will use this password whenever you publish an iOS game and you will use your .p12 (certificate distribution) file for all the apps/games that you distribute (until your certificate expires and you pay another $99 and do again).
  • (HTML w/embedded SWF)-->--> iOS app?

    I've read that a SWF-> AIR-> iOS app impossible to import another SWF on the fly, so am I right in assuming that an HTML AIR file cannot include and embedded SWF?  It's just a SWF.  It will not change during execution.  As a way to include the SWF file in the package so that when AUGUST the AIR app GET iOS compiled the SWF doesn't exist to somehow get embedded in the HTML document?

    Thank you!

    Looks like you can't AIR port for iOS-based HTML, so the question is really questionable.

    "The mobile AIR HTML-based applications are not currently supported." http://help.Adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-8000.html>

  • Mail in 10 iOS app

    The mail in 10 iOS app is probably one of the worst pieces of Apple software in 10 years. When you receive a response in a conversation and beat up, the emails appear in absolutely random order! For example, I received a response to a conversation today and after seizure on the mail of the order was: yesterday 15:39, today 10:11, 2 days ago 16:04.

    When you tap the first triangle they will appear in the correct order. However: the triangle type gives a view that does not allow to decide where the mail is part of the conversation and where other - no intention, no other color.

    Resolved, new user preferences to control this behavior.

  • How can I remove a 10 iOS app? There is no mention that a menu

    How can I remove a 10 iOS app?

    All 10 iOS did when I press and hold, is to bring up a menu - which is a feature new, unexpected and undesirable new iOS operating system 10. This action is used to make the icons to move, I could press the "x" on the app, and it has been deleted. Now, I get a menu, without any option to delete.

    Help would be appreciated

    Post edited by: Grace Hope
    I just thought about it - you must maintain the App "slightly" and then move the icons, and you can press the 'x' to remove the application. If you push hard and here, the menu useless appears - lack of vision of Steve Jobs to Apple... he really wants this App menu? Without disabling option - the only thing I see is maybe turn off touch 3D, but I have not yet tried this plan.

    Tactile 3D power off will solve the problem. You can also try setting the sensitivity of touch 3D cabinet so that there is a major difference between a light and press tap. Tactile 3D can also just take some time to get used to. I struggled for the first week with building accidentally instead of tapping, but now I'm a pro at home. To access the tactile 3D settings, go to settings > general > accessibility > scroll to the 3D button.

Maybe you are looking for