Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-19-2004, 05:42 PM   #1
high1memo
maker of abstract sh*t
 
high1memo's Avatar
 
Join Date: Jul 2003
Posts: 58
Default forcing download of files (e.g. mp3)

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,
high1memo is offline   Reply With Quote
Old 11-19-2004, 06:59 PM   #2
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

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");
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Old 11-19-2004, 09:50 PM   #3
high1memo
maker of abstract sh*t
 
high1memo's Avatar
 
Join Date: Jul 2003
Posts: 58
Default

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...
high1memo is offline   Reply With Quote
Old 11-20-2004, 03:18 AM   #4
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

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..
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:21 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.