SWF to play mp3 files located on the server

Hello,
Does anyone know if it is possible to create an SWF file that can play mp3 files directly from the server, without the need for a streaming media server or external JS.
And also for the application to read the current directory its located in and build a playlist based on the files inside.
any information of examples would be greatly appreciated.
Peter.

As for loading and playing the files there is no issue.  Simply load them as you would load any file.  You can even use a relative path if they are in the same folder as the SWF, or a sub-folder that is in the folder with the SWF.
As for looking at the server directory for what files are there, and using them - I know of no way to do this.  That doesn't mean it is impossible, just that I haven't come across a method in my experience.
What I typically do is to archive the list of files in an XML file, and load the XML.  I know, that adds an extra step, and an extra file, but it is the easiest method for approximating what you want to do.
Let me edit this response.
You could use javascript, or a server language to grab the list of files in the directory and pass it into Flash via the ExternalInterface classes.

Similar Messages

  • Error while accessing a file located in the server from JSP

              Hi
              I am having problem while accessing the file located in the server from a JSP
              page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
              The same code is working if the jsp placd under defaultwebApp directory and not
              working if i create a war and deploy the same.
              I am using weblogic server 7.0 trail version.I am setting the context path also.
              Can any help me in this regard.
              Thank And Regards
              Anand Mohan
              

              Hi
              Thank you.Is there a way to read a file which is existing in the war file.
              Regards
              Anand Mohan
              "Wenjin Zhang" <[email protected]> wrote:
              >
              >In Weblogic, if your files are archived in a WAR, you cannot get an entry
              >as individual
              >file since it is only bytes in a large archive file. So getRealPath will
              >give
              >you null result. If you only want the path, try to use other getXXXPath,
              >getURL,
              >or getURI method. If you want to read the content, use getResource.
              >
              >
              >"Anand" <[email protected]> wrote:
              >>
              >>Hi
              >>I am having problem while accessing the file located in the server from
              >>a JSP
              >>page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
              >>
              >>The same code is working if the jsp placd under defaultwebApp directory
              >>and not
              >>working if i create a war and deploy the same.
              >>
              >>I am using weblogic server 7.0 trail version.I am setting the context
              >>path also.
              >>
              >>Can any help me in this regard.
              >>
              >>Thank And Regards
              >>
              >>Anand Mohan
              >
              

  • Where are the jar files located in the server in which the MS SQL Server is installed?

    Hello All,
    Please tell me the place where jar files are located in the system in which the MS SQL Server is installed.
    Please help me as early as possible.
    Thanks in advance.
    Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.

    Check BOL page: Using the JDBC Driver
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • OTL TIme card: ldt file location on the server

    Hi,
    In order to customize time card layout, I am trying to copy the ldt file from the server.
    Where can I find these files on the server?

    In order to customize time card layout, I am trying to copy the ldt file from the server.
    Where can I find these files on the server?Check under $HXC_TOP/patch/115/import and $HXC_TOP/patch/115/import/US directories.
    OTL - Download Timecard ldt File To Be Configured By User [ID 216942.1]
    Oracle 11i and R12 Time And Labor (OTL) Timecard Configuration [ID 304340.1]
    Creating Timecard Audit Trail Report For Configured Layouts [ID 842159.1]
    Thanks,
    Hussein

  • Why won't FireFox 4 play mp3 files that have been created since the FF update? It will play mp3 files created prior to the FF update. All of the mp3 files have been created in the same manner, as bounces from Logic Pro 9. Thank you.

    Why won't FireFox 4 play mp3 files that have been created since the FF update? It will play mp3 files created prior to the FF update. All of the mp3 files have been created in the same manner, as bounces from Logic Pro 9. Thank you.

    Hi David,
    Thank you for your detailed question. It sounds like the real issue is pdf files. Are there any antivirus/firewalls that might be blocking this specific file type? or are there any preferences in your control panel that might be blocking this?
    Do you have any stored preferences for PDF files in Firefox?
    *[[Applications panel - Set how Firefox handles different types of files]]

  • Simple GUI playing mp3 files

    Hi everyone , i am building a simple GUI playing mp3 files in a certain directory.
    A bug or something wrong with the codes listed down here is very confusing me and makes me desperate. Can anyone help me please ?
    import javax.swing.*;
    import javax.media.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    class PlayMP3Thread
    extends Thread
    private URL url;
    String[] filenames ;
    File[] files ;
    boolean condition=true;
    boolean pause=false;
    int count ;
    public PlayMP3Thread() { }
    public PlayMP3Thread(File[] files)
    //try
              this.files = files;
         filenames = new String[files.length];
         count = -1;
         // this.url = mp3.toURL();
         //catch ( MalformedURLException me )
    public void run()
    try
         while (condition)
              count++;
              if (count > (filenames.length - 1)) {
                        count = 0;
              this.url = files[count].toURL();
    MediaLocator ml = new MediaLocator(url);
    final Player player = Manager.createPlayer(ml);
    /*player.addControllerListener(
    new ControllerListener()
    public void controllerUpdate(ControllerEvent event)
    if (event instanceof EndOfMediaEvent)
    player.stop();
    player.close();
    player.realize();
    player.start();
    catch (Exception e)
    e.printStackTrace();
    public void stops()
    //stop the thread
    condition=false;
    pause=false;
    public void pause()
    while(!pause)
    //pause the thread
    try
    wait();
    catch(Exception ex){}
    pause=true;
    public void resumes()
    while(pause)
    notify();
    pause=false;
    } // end of class MP3Thread
    public class mp3Play extends JFrame {
    JTextField direcText ;
    JFileChooser fc;
    static final String
    TITLE="MP3 PLAYER",
    DIRECTORY="Directory : ",
    BROWSE="Browse...",
    START="Start up",
    STOP="Stop",
    PAUSE="Pause",
    RESUME="Resume",
    EXIT="Exit";
    public static void main(String args[])
         PlayMP3Thread play = new PlayMP3Thread();
         mp3Play pl = new mp3Play();
    } // End of main()
    public mp3Play() {
    setTitle(TITLE);
         Container back = getContentPane();
         back.setLayout(new GridLayout(0,1));
         back.add(new JLabel(new ImageIcon("images/hello.gif")));
         fc = new JFileChooser();
         fc.setFileSelectionMode(fc.DIRECTORIES_ONLY);
         JPanel p1 = new JPanel();
         p1.add(new JLabel(DIRECTORY, new ImageIcon("images/directory.gif"), JLabel.CENTER));
    p1.add(direcText = new JTextField(20));
         JButton browseButton = new JButton(BROWSE, new ImageIcon("images/browse.gif"));
         browseButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showOpenDialog(mp3Play.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
              direcText.setText(fc.getSelectedFile().toString());
              File[] files = (new File(direcText.getText())).listFiles(this);
         p1.add(browseButton);
         back.add(p1);
         JPanel p2 = new JPanel();
              JPanel butPanel = new JPanel();
              butPanel.setBorder(BorderFactory.createLineBorder(Color.black));
              JButton startButton = new JButton(START, new ImageIcon("images/start.gif"));
              startButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
                        PlayMP3Thread play = new PlayMP3Thread(files);
                        play.start();
         butPanel.add(startButton);
         p2.add(butPanel);
         JButton stopButton = new JButton(STOP, new ImageIcon("images/stop.gif"));
         stopButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
              play.stops();
         p2.add(stopButton);
         JButton pauseButton = new JButton(PAUSE, new ImageIcon("images/pause.gif"));
         pauseButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
              play.pause();
         p2.add(pausetButton);
         JButton resumeButton = new JButton(RESUME, new ImageIcon("images/resume.gif"));
              resumeButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
                   play.resumes();
         p2.add(resumeButton);
         back.add(p2);
    JButton exitButton = new JButton(EXIT, new ImageIcon("images/exit.gif"));
              exitButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
                   System.exit(0);
              p2.add(exitButton);
              back.add(p2);
              addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
         System.exit(0);
              pack();
         setVisible(true);
    }

    Actually I don't know much about fixing technical error or logical error.
    When it compiled , there are 6 errors showed up :
    can't resolve symbol : method listFiles (<anonymous java.awt.event.ActionListener>)
    location: class java.io.File
              File[] files = (new File(direcText.getText())).listFiles(this);
    can't resolve symbol: variable files
                        PlayMP3Thread play = new PlayMP3Thread(files);
    can't resolve symbol: variable play
              play.stops();
    can't resolve symbol: variable play
              play.pause();
    ^
    can't resolve symbol : variable pausetButton
    location: class mp3Play
         p2.add(pausetButton);
    ^
    can't resolve symbol: variable play
                   play.resumes();
    Any suggestions ?

  • ITunes takes a few seconds to start playing MP3 files

    I just started using this new MacBook Pro and transfered my music library to the new laptop. I'm having a problem with iTunes playing MP3 files: when I double click on a MP3 track iTunes seems to freeze for like 3 - 4 seconds before the track starts playing and then it plays normally without a hitch. This is happening with each and every MP3 track that I have in the library as well as new MP3 tracks that I'm adding. Th short delay/freeze also occurs when I try to view or alter the info of an MP3 track in the library, so that when I right click on a track and click Get Info, the 'Get Info' screen will take about 3 - 4 seconds to show up and the same freeze happens when I click OK to close the 'Get Info' screen.
    Note that this happens only with MP3 tracks. Tracks purchased from the iTunes store (AAC) do not have this problem and start playing without any delay/freeze.
    Another weird tidbit: When MP3 tracks are in the same playlist (or album) and I let them play one after another (without me skipping to the next/previous song) then the delay/freeze does not occur at all. This delay seems to just happen when I start playing a song or when I click the fast forward/Rewind buttons to skip to the next/previous track.
    Does anyone know what might be causing this? And if a fix is available somewhere? Thanks in advance!

    It only happens on mp3s not on AAC's to me too! Just so you all know. I thought an EXTERNAL DRIVE was my problem but after hours of research I found it's probably an intentional bug (just kidding Apple you don't hate other companies that much....geesh! ) It might not be this...but you never know.
    I thought maybe it was the TAG but it seems this has nothing to do with it. Point is either Apple left a bug on the last update of itunes MP3s because to them it's less of a priority or it's being messed up by Amazon folders (still looking in to), or maybe there was a problem with the install.
    So far my options are to get an MP3 to AAC convertor and dump my 3000 songs into a program for converting, wait for an update, reinstall, or keep looking for a missed solution.
    Any help would be appreciated!!
    [email protected]

  • Safari no longer plays mp3 files (OS X 10.9.5 Safari 7.1). Help!

    I have a 6-month-old MacBook Pro (13" Classic) running OS X 10.9.5. I use Safari 99% of the time to browse the web (version 7.1). Quicktime Player 10.3.
    All of a sudden (this week), Safari has stopped playing mp3 files. I have always been able to click on a link to an mp3 file and it would play in the browser. Now, this has stopped working. It does open a black page with the audio scroll bar showing. However, the arrow will not respond if I click it and it just says "Loading..." forever.
    What's up?!

    Force quit Safari and relaunch it while holding down the shift key.

  • Netstream.play() mp3 file

    Hello.
    I am having troubles playing an mp3 stream, using
    Netstream.play()
    According to AS 3.0 livedocs in Adobe...
    quote:
    To play MP3 files, use mp3: before the stream name. To play
    the ID3 tags of MP3 files, use id3: before the stream name
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html)
    When I test playing a video stream (.flv), everything works
    fine.
    The error I get when I try to play an mp3 is:
    Failed to play (stream ID: 1) code:
    NetConnection.Call.BadVersion
    I tried every different type of combinations:
    stream.play("mp3:test.mp3"), (test), (test.mp3) and nothing works.
    However, only in "mp3:test" I get the Call.BadVersion error. On the
    other ones, simply it doesn't play nothing... It finds the file
    though... because I get some results in the event handlers that i
    don't get when I enter an invalid filename...
    My question is... What is "NetConnection.Call.BadVersion",
    and is it really possible to play an mp3 stream. Are there other
    methods?

    Hi,
    Just check this url .its good you will get some idea.
    http://labs.flexcoders.nl/samples/MP3Player/version003/srcview/index.html
    Thanks,
    Anand.G

  • Cannot play MP3 files in Dreamweaver CS4

    Hi
    Apogogies if this has been asked before.
    I have an embedded MP3 file on one of my DWCS4 pages but when I try to play it from the Properties Inspector I get the message "Unable to find the plugin that handles this media type".
    The sound file plays OK in Firefox and IE but I would like to be able to test it in DW. I have the currrent version of Apple QuickTime Pro installed.
    I am using both Windows XP and Vista with the same problem.
    Is there a plug I can download for DW only in order to play these files without resorting to converting the MP3 to another format.
    Any help would be much appreicated.
    Thanks
    George

    Yes but I did exactly what I accused you of doing so it was really bad!
    Software troubles can drive you a bit crazy. Sorry again.
    From: pziecina <[email protected]>
    Reply-To: <[email protected]>
    Date: Thu, 08 Oct 2009 09:16:11 -0600
    To: d maass <[email protected]>
    Subject: Cannot play MP3 files in Dreamweaver CS4
    Hi
    Thank you for the apology, but as we have all (probably), misread and
    therefore wrongly replied to posts, it is not really necessary.
    PZ

  • Creative MuVo N2000 doesn't play MP3 files anymore?! HE

    Hi everyone,
    I hope someone can help me out. Here's the problem.
    My MuVo N200 player doesn't play mp3 files anymore.. there's only a strange noise comming from the player if i attempt to play mp3's...he only plays the wma files?! I gave my player to my flatmate so she could here music on her vacation to the US, and that's when the problem started. I never had this problem before, and i wonder if she acidently pushed a buttom she shouldn't. I can't figure out how to fix it. Anyone has a clue what has happend, or if the player is "lost" :-( ?! PS: The player is brand new.
    Help is appriciated
    Thx Lizzy ;-)Message Edited by lizzard on 08-23-2005 03:45 AM

    Unfortunately, NONE of my friends use Windows anymore , even at work we use Linux for security reasons. So what am i supposed to do now... They have a link at Creative that makes you belei've that they support Linux and offer you the possibility to choose the operating system, in other words=Linux. When i told in a mail to Creative Norway that they offer Linux support at their download-site, they actualy had the nerve to tell me that they don't do that!! I told them to remove the choice if they don't offer it, and don't try to tell people that they are eighter blind or stupid, and i pasted the Link + added a Screenshot of the page into the mail!! I realy got upset. It is the last time i by something from Creative. My first player from Creative lasted exactly 2 weeks, after that he stopped working for one odd reason, so i paid a little more in order to get a better one in exchange, and that device didn't li've longer than month eighter?
    Not exactly QUALITY we are talking about..aren't we?
    What to do, what to do?
    Anyone has a clue?

  • [solved] I can't play MP3 files in JuK

    Hi
    When i try play a mp3 file, with juk, the system says this:
    [zuargo@zuargo-archlinux ~]$ juk
    [zuargo@zuargo-archlinux ~]$ xine is asking to seek behind the end of the data stream
    I have installed xine-phonon and it is uses default.
    I have tried installing gstreamer phonon (with all official of the repository plugins) but I have the same problem... I can't hear anything...
    I have tried installing pulseaudio but... nothing...
    I have tried installing oss but.... nothing
    I have tried erasing the file ~.xine/catalog.cache but... nothing...
    some web pages says solved it issue installing a package called libxine-ffmep but it is not in pacman...
    really I tried many options but I can't solved this problem
    of course, I can play mp3 files in the command line (throughout mpg123) and they sound good...
    sorry for my bad english I speak spanish
    Last edited by zuargo (2009-08-25 02:20:27)

    AdrenalineJunky wrote:
    from everything i'm reading, it seems like that error message is normally associated with xine-ffmpeg being missing...
    phonon-xine depends on xine-lib which depends on ffmpeg, but its probably worth checking to make sure they are installed.
    I have installed xine-lib
    Rasi wrote:Since there doesnt seem to be an obvious solution, simply use the gstreamer backend.
    I have used the gstreamer backend and it not works... I can't hear the mp3 files...
    another idea?

  • Safari 4.0.5. problems playing mp3 files.

    Hi,
    I'm having trouble playing mp3 files on my iWeb created website. When I use Safari (4.0.5) to browse, Safari does not display the player part of the mp3., and on my welcome page, it does not play the music that's set to autoplay.
    When I use Firefox to browse the same website, all mp3 files work fine, including the mp3 set to autoplay on the welcome page !
    I also tested browsing with Safari 4.0.4 running on OSX 10.5.8, (on another computer), and it works fine !
    I'm guessing this means something is buggy with Safari 4.0.5. running on OSX 10.6.3. or could it be something else ?
    Anyone notice this type of issues with Safari 4.0.5. ?
    Some feedback would be appreciated.
    Thanks.

    Thanks for confirming that you are experiencing a similar issue when using Safari 4.0.5 and try to play your mp3 files. As I mentioned earlier, Firefox displays, and plays the files perfectly !
    This must be some kind of bug in 4.0.5. that Apple needs to fix.
    I already sent Apple a bug report.
    By the way, I used another computer running OSX 10.5.8 and Safari 4.0.4 to test my site, and found no issue, Safari 4.0.4 works fine, it played the autoplay mp3 file, and displayed the mp3 player without any issues. Which seems to indicate that this is a Safari 4.0.5. issue.

  • Changing mp3 file locations - how do i update / save information in iTunes?

    I am getting ready to put an additional hard drive into my computer - an old 60GB hard drive from another computer to act as the slave drive - in order put all of my music, movies, and pictures onto to save space on the main hard drive for my computer (only a 40GB). What do i have to do within iTunes to make sure it will still read the mp3 files when i move them to the new drive? Will iTunes save the changes and additions that i have made to the files?
    I've been working on my music library for over a month and updated all of my mp3 files to include the artist and song title, so that info will transfer with the file; but I have been working within iTunes for the past 2 weeks getting everything just right - changing artist and title names, adding artwork for cover flow and updating album information to group songs and artists the way i want. What do i need to do to save all of this within iTunes, so that when i change file destinations of my mp3 files everything stays the same? Can i select all of my songs within iTunes and back them up directly to the new drive and then delete the older versions from the old hard drive?
    Sorry if these sound stupid or are easy to fix, but i just don't want to lose all of my work that i put into my music library and have to start all over.
    Thanks for the help.

    What do i have to do within iTunes to make sure it will still read the mp3 files when i move them to the new drive?
    Don't move them yourself.
    Point iTunes prefs -> Advanced to the location where you want to music to go.
    Then go to menu Advanced -> Consolidate library.
    This will copy all the music in iTunes to the new location.
    Then you can delete \My Documents\/My Music\iTunes\*iTunes music folder*.

  • Play mp3 file.

    Hello world.. :)
    I am creating a music syncing app, and i need to know how how to play a MP3 file, is it possible to do it on a different thread so you can start, and stop it at the press of a button, etc. I don't know one thing about threads...
    JavaNut13*

    If you want to play mp3 file, I think you should use JMF. Here is the link to download JMF 2.1.1e from SUN
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/download.html|JMF 2.1.1e]
    You will need to install JMF first to manipulate the following code. You could get it from here:
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/MDIApp.java|MDIApp.java]
    Eg: You could add mplayer.start(); mplayer.stop() in between the code; and with some 'if else' to create a loop button.

Maybe you are looking for

  • Would like to add two devices since obtaining HDMI IV: a wireless keyboard

    Secondly, I would like to have headphones to have capability to listen tv without disburbing bed partner. I see apple wireless keyboard requires blue tooth usb dongle which costs as much as keyboard, looking at a Kensington wireless keyboard which us

  • A730 Screen Resolution

    So I just received my A730 machine and notice that the maximum screen resolution is 1920 x 1080. This contradicts with whats listed on the the spec page here: http://shop.lenovo.com/dk/da/desktops/ideacentre/a-series/a730/#features With the NVIDIA Ge

  • Xpath expression to read contents

    requesting to help to write an xpath expression to read contents of the below xml. i/p doc <transaction tid='00000000000000001852' ts='2012-05-10 08:43:15.000631' ops='2' commitTs='2012-05-10 08:43:15.000631'> <operation table='INTEREST_ACCRUAL_TERMS

  • Can't get podcasts to download

    I'm having a horrible time getting podcasts to download (from ESPN and NPR publishers). They'll get about 1/4 of the way through and then just stop. I did a speed test and can download at 35 mbs/sec. itunes diagnostics said I passed all network conne

  • PLEASE FIX the Color Swatches Window

    I am infuriated, crazed, insanely angry, that I cannot resize this window. This seemed like it was a problem through at least one iteration of Photoshop proper, and thankfully was either finally fixed, or I figured out how to use the interface differ