PDA

View Full Version : forcing download of files (e.g. mp3)


high1memo
11-19-2004, 06:42 PM
hi all, im goin crazy tryin to figure something out...

i have a few questions about basically the same thing.

I wanna be able to allow a download of a file, but this file is an mp3, so whatever method i try and do to have the file downloaded, instead of coming up with a SAVE AS dialog, it juz opens it with the associated MIME app - which is sometimes cool, but not in this case!
obviously i dont wanna change anything on my pc to make it work, cos i want it to work on all computers!!!

I want to be able to do it in two ways:
1. actionscript: I use geturl("file://[url of file]") and it juz opens in wmplayer instead of opening the SAVE AS dialog.

2. I would also like to be able to do it from an html page WITHIN flash. I have a html enabled textbox, and i load the contents of it dynamically. On that i want DOWNLOAD links to mp3s, obviously when i use < A HREF="mp3filename.mp3">mp3filename it does the same thing,

so what do i do!?!

cheers,

Cota
11-19-2004, 07:59 PM
A quick work around for that would be to place the mp3 in a zip file. So instead of mp3filename.mp3, you would have mp3filename.zip and would look like:

getURL("mp3filename.zip");

high1memo
11-19-2004, 10:50 PM
hi thx, yea that is one option, but then the user has to unzip etc... OBVIOUSLY a very simple task... but still requires SOME work on the user side, so not as user friendly as a simple click and download - which i think is the ideal solution...

Cota
11-20-2004, 04:18 AM
I really cant think of any other way around it. I'm sure I could come up with one given enough time. IE has that auto detect and auto play on media, which sux. Anytime IE detects an mp3, it will try to play it, rather than download it..