How to import and play sound file from mxl link?

I need to load different sound files dependent on which link you previously clicked in my app, but cannot figure out how to call the link to the sound file from my mxl file:
<carRace>http://www.unisux.org/zik-car/lamborghini-diablo-gtr_standing-start.mp3</carRace>
Can someone tell me what I am doing wrong in this code?
<fx:Script>
   <![CDATA[
                                        private var req:URLRequest;
                                        private var context:SoundLoaderContext = new SoundLoaderContext(1000);
                                        private var bCall:Sound;
                                        private var bSong:Sound;
  private function playSong():void
                                                  var urlSong:String = "{carRace}";
                                                  var request:URLRequest = new URLRequest(urlSong);
                                                  bSong = new Sound(request, context);
                                                  bSong.play();
  ]]>
</fx:Script>
because this code does work:
<fx:Script>
   <![CDATA[
  private var req:URLRequest;
  private var context:SoundLoaderContext = new SoundLoaderContext(1000);
  private var bCall:Sound;
  private var bSong:Sound;
  private function playSong():void
  var urlSong:String = "http://www.unisux.org/zik-car/lamborghini-diablo-gtr_standing-start.mp3";
                                                  var request:URLRequest = new URLRequest(urlSong);
                                                  bSong = new Sound(request, context);
                                                  bSong.play();
  ]]>
</fx:Script>

Visit: http://www.tools.de/solaris/
you will love sound/audio programming.... source available.

Similar Messages

  • How to import and play audio files in java

    Hi, I'm pretty new to java and im trying to make an application that can import and play simple audio clips (mp3, wav, etc formats) when a button is clicked. If any one can help me it would be greatly appreciated.

    hi,
    i'm not a professional with java sound but it may be possible that you will find something good at this link:
    http://www.jsresources.org/examples/
    peace

  • Uploaded my pictures from my iPhone to my MacBook- Some of the videos I made show that they imported and play sound, but no picture- are they gone?

    I Uploaded my pictures from my iPhone to my MacBook… Some of the videos I made show that they imported and play sound, but no picture… are they gone?Becuase they offer to delete what was imported, so to save space i did... Is there anything I can do to restore the picture?

    Do your videos play in QuickTime Playerwhen you reveal one of them in the Finder with "File > Reveal > Original"? Try to open the revealed movie in QuickTime and see if it plays.
    Check the format of the movie. You can see it in the Inspector in QuickTime Player from the "WIndow" menu: Window > Show Inspector.
    iPhoto does not support all movie formats and codecs that QuickTime player can play, and not all frame rates.
    See: Using AVCHD video with iPhoto '11
    If the movie does not play in QuickTime Player either, install QuickTime 7 for more codecs.

  • How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app.   Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.

  • Can anybody explain me how to sample and play audio files with logic's EXS2

    can anybody explain me how to sample and play audio files with logic's EXS24 Sampler???
    i cant find a way to upload and manage my own audio content on this sampler...

    i uderstand , thanx...
    i managed to open an audio file and placed it in the sampler,i can play t sample in the little keyboard in the zones section, howver i dont know how to play it with my controller... the sample shows in C1 on logic's keyboard but if i play C1 on my controller nothing happens... how can i fix this?
    Also, i noticed the sample plays from beginning to end once i click on it, how do i do to just make it last until i release the key? like a logic sound??? (in case i want to play a small portion of the sample only)
    Thanx

  • How to import microsoft outlook pst files from window 7 to mac mail

    How to import microsoft outlook pst files from window 7 to mac mail??

    Outlook PST to MBOX Converter is a best and user-friendly software that facilitates smooth conversion of Outlook mailboxes (PST files) to MBOX files. The software supports PST to MBOX migration for Thunderbird, Spicebird, SeaMonkey, and Netscape.
    For more information and free download click http://psttombox.blogspot.com

  • How to embed and launch ipa file from another ipa package created using Air for iOS

    Hi Guys,
    Anybody out there knowing how to embed and launch ipa file from another ipa package created using Air for iOS ?
    I am having 1 ipa file created using Xcode, Now i need to include that file in my ipa Package which is created using Flash CS 5.5 and Air for iOS. Also i need to know how to open my 1st ipa file from AS3 ?
    Thanks,

    Hi Sir,
    Thanks for your reply.
    But in that case user need to download 2 applications right. I need user to download my parent application created using Flash and that package contain one more ipa created using Xcode, so from my parent app only user should able to open my 2nd app. Is there any way to do that?
    Ps:  I am not talking about in-app but 2 individual apps inside one package.

  • How to upload and download any file from plsql through weblogic server

    hi all,
    how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
    Thanks and Regards,
    MSORA

    hi bala ,
    for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
    bye
    vamshi

  • How to get and read a file from META-INF directory

    how to get and read a file from META-INF directory in a EJB project

    Use this.getClass().getResourceAsStream("/META-INF/filename");This should work. Probably, you would need to set the Manifest Class-Path attribute.

  • How to upload and overwrite a file from a dynamic list

    I need to come up with a way to upload and overwrite and existing image file from a dynamically generated list. For instance, there would be a drop-down select box with Company A, Company B, Company C, etc. and when the user selects one of them it should display a prompt to upload a new logo image file, overwriting the existing logo file. Any help would be appreciated.

    I'm not sure why you need a prompt.  Sounds like an unnecessary annoyance to me.
    A simple form with a select and input type="file" should get you started.  Then I would probably do something like:
    1.  upload the file to a temp folder on your server.
    2.  Rename it according to what company was selected.
    3.  Move it to it's permanent folder.

  • How to import and read .lmx files into 2710 Nav.?

    All,
    is there a way to import a route (lmx file) and use it with the 2710?
    I can't find the way to open such a file...
    Thanks a lot for any help, Benoit.

    There is a way (not very comfortable but working) how to import POIs in Nokia 2710.
    Create a set of LMX files, __each containing just one POI__.
    Store those files somewhere on the SD card.
    When you need to reach a POI, select the particular file (Menu / Gallery / All content / Memory card / (the particular directory) / (the particular file)) and select Open.
    The POI will open in the Ovi Maps. Now you can navigate to it (Options / Navigate to) or save it (by Options / Use location / Save location). When saving, you will need to insert the name (the name is NOT copied from the .LMX file).
    Make sure that you have a map covering the area of POIs (if you do NOT have it, upon opening the POI file, you will just get yellow background).
    Examples of LMX files are attached. Examples are located in the Czech republic so make sure that you have the map of the Czech republic.
    PS: Maybe someone would be interested to write a J2ME application which
    1) would parse .GPX file with a lot of POIs
    2) show the POIs to the user (including all the details of POI)
    3) when user selects a POI, generate an LMX file and invoke system to show it (using platformRequest J2ME API).
    4) alternatively, user could insert the GPS coordinates directly.
    Attachments:
    lm.zip ‏1 KB

  • How to open and read many files from a directory and store contents in 2D array?

    I want to make a VI that opens and reads the data from various files contained in a directory (200 files each with 2 columns) and store these in a single 2D array. For file number 1 I want to store the data from both columns in the 2D array, but for files 2 to 200 I only want to store the second column of each file. Can someone please help?

    Hi Nadav,
    Thanks for your help. I have followed your instructions but i cannot get it to work. I used the LIST DIRECTORY to list the files in the directory - that works. However, how do I read each of the 200 files using READ FROM SPREADSHEET FILE without me having to manually select each of the 200 files? So, if I use LIST DIRECTORY to list all 200 files in an array, how do I get each of these to open and store the data in a 2D array? Here is what I have done (File called read_files.VI) Could you please help me? Thank you very much in advance.
    Attachments:
    read_files.vi ‏18 KB

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • How to write and read Xml file from database if possible?

    Hi all,
    I need to read the .Xml file when receives from Source systems and write the data into the table as well as write in the.xml file thru reading the data from table as per the client needs. I am stranger to this area. Since, please provide some examples how to approach the same.
    Thanks in advance !!
    Regards.
    Vissu.....

    The XML DB forum is better suited to your question.
    It also has a FAQ which details how to read and shred XML into tables as well as other common XML based questions...
    XML DB FAQ

  • Recording and playing sound input from mic simultaneously in iphone/ipad

    I want to simultaneously record and play the sound from a mic in iphone. As thecricket commentory application.
    Please provide me a solution for this.
    Is this possible in iOs.

    This probably isn't going to sound very helpful, for which I apologise in advance, but I'm afraid it's the truth...
    The only way you stand any way of doing any of this is by using ASIO4ALL, which can aggregate different drivers from multiple devices. But I don't rate your chances too highly, I'm afraid - USB mics have long been the problem child of computer-based audio. On top of that, you are trying to get sounds in and out of a separate device at the same time - not only that, but it's a Creative Labs gamer's device and they are second only to USB mics in terms of the 'difficult' stakes - search this forum!
    A much, much better way to attempt to do this would be to use a sensible ASIO external device with sufficient inputs, and a mic that plugs into it, not a USB one. That way you could route the inputs and outputs appropriately, and use the device's monitoring so that you could monitor what you need to. I wouldn't attempt to do anything like this any other way, I'm afraid. Another approach (which can be made to work well) is to use an external mixer to do most of the work - often it's easier to set up the monitoring on these. You can get mixers with the appropriate interface built-in, and they don't cost a fortune either. Mackie and Behringer make suitable devices.

Maybe you are looking for