MP3 Player for the Flash IDE using JSFL File API
28 09 2004
While thinking about some cool examples for the JSFL File API introduced with the 7.2 updater for Flash MX 2004, I came up with the idea of building an MP3 player panel for the Flash IDE. Think about it, practically everyone likes to have his/her favourite music on while coding away in ActionScript
It was actually surprisingly simple to build, just a couple of components and under 50 lines of code. From the feedback I’ve gotten people were really excited about this example. When I’ve got some more time I’ll add support for playlists and shuffle.
Other windowSWF’s that I’ve got in the works are an FLV previewer and XML browser.
In case you’re wondering the JSFL File API does not (yet) support browsing to a folder to select the source file URI. Guy Watson’s FileSystem API does have a function that allows this and I’m working on getting an example ready using his FileSystem extension.
You can download the MXP here, feel free to drop me a line with your thoughts and/or suggestions!






Peter, you really caught the JSFL bug, eh? Nice stuff.
Great stuff, dv8 (John D Giotta) posted a JSFL mp3 player on the boards which may yeild some other useful functions to you (such as folder browser etc).
Link: http://flashmove.com/forum/showthread.php?threadid=15477
The only thing with both versions that seems to be a limit of JSFL is the mp3 pausing when you alt+tab to another window such as SE|PY or PrimalScript. Any ways around this?
I have a version on hiatus that loads M3U and saves M3U.
Along with other Right-Click Menu options.
I’d be happy to sure.
@Richard- Thats one of a few drawbacks… however I find that if you dock the Player it will continue to play even if your not focused on the author.
Another I ran into was the playhead “forgets” its progress in a song.
You could use FLfile.listFolder() and then pass it in the folder the user has selected, and then could have a list box fill with the mp3 files that are in the folder.
Might be a nice project to populate a tree with folders and files. and allow multipl selections within the tree.
Actually, now that I think about it, I have a couple of library functions in DW flavored JavaScript that can list out all the contents of a folder. One that lists only the folders, then one can list all the files within a folder, and another that can list out the files in a folder matching the items in a passed in array of file extensions.
I’ll post them to my blog over later today.
http://www.communitymx.com/blog/index.cfm?blogger=12
Now the killer option would be to be able to import them into your .fla. That way you could have a directory of sound effects and sample them within flash. Find the one you want and then import it.