Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Downloading ZIP Files With Flash



How do I allow a download of e.g. a .zip file from my flash-document? So far I have been using the getURL command, but it seems that the updates for IE has eliminated the popup-box which prompts you for either download or opening the file.

I would like to avoid using a seperate html-document to contain all downloadable documents and just keep a "Download" button in my flash document...

Advice is greatly appreciated!



Ultrashock Forums > Flash > ActionScript
Posted on: 2005-06-03


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Downloading Files From Flash
hi guys !! this might sound like a very dumb question, but here it goes ?

I have a button called "download" in my Flash movie which is linked to an mp3 file... When the user clicks that download button i want to give that user an option, where they would like to save the file i.e. desktop e.t.c much like a Save Target As option..


i dnt want the file to start playing in some realplayer or other players... i just want them to be able to download it.


can someone please give me the actionscript for that ?

pleaseeeee

im a newbie .. hehe

Downloading PDF Files From Flash
How can I enable viewers to automatically download pdf files from my flash website, by simply clicking on a button?

Downloading Files In Flash
I have a zip file i would like to put on my site. How would i go about doing it? Thanks.

Downloading Files In Flash
I want to have a link or button or something in flash that lets a user download a particular file. You know, something that launches the save file dialog.
Anyone know a way to do this?
Thanks

Downloading Files From Flash MX
Is it possible to download files such as MP3s from a flash movie? If not, how else would I go about doing this.

Downloading Files From Within Flash
hey amigos i need yr help

for my flash website i need a download button that loads a pdf file onto the users harddrive
i suspect it could be some ftp thing - just like the right-click- link on a html site - but i am pretty ignorant about that whole thing

can someone help me to set this up soon please?

cris

cris.r@volny.cz

Downloading Files Through Flash
Hello all,

I am designing a site for a record label:

Hear No Evil

They need users to be able to stream music and download music (music > mixes).

The streaming works fine: with the "listen" button opening an m3u playlist file which then opens the mp3 off the server through the users music player.

However the "download" button just plays the file through the users music player. I need the button to actualy download the file onto the users computer.

I have tried zipping the mp3 files which works fine as it forces the computer to unzip the file and therefor leaves the unzipped mp3 on the computer. But, I want the stream and the download buttons to use the same mp3 files ideally as this will minimize space occupied on the server.

Does anyone know if theres a specific command for a button to download files?

Or maybe a way of saving the mp3s??

Or any solution other than duplicating and zipping the files?

As always any help much appreciated
H

Flash + Php, For Downloading Files
I have this php code:

Code:
<?php
// We'll be outputting a XML
header('Content-type: text/xml');

// It will be called myLoam.xml
header('Content-Disposition: attachment; filename="myLoam.xml"');

// The original source
readfile('./files/save.xml');
?>
Which when accessed directly (i.e. myurl.com/download.php), brings up the browser dialog box for downloading files and lets you save the file.

When i try and call it from within flash, it doesn't seem to do anything. I'm not sure what the best way to call php script from flash is. I've been using xml objects to do it so far i.e:


Code:
tempXML.send("download.php");
Any ideas as to how I can get this to work?

Downloading Files From Within Flash
hey amigos i need yr help

for my flash website i need a download button that loads a pdf file onto the users harddrive
i suspect it could be some ftp thing - just like the right-click- link on a html site - but i am pretty ignorant about that whole thing

can someone help me to set this up soon please?

cris

cris.r@volny.cz

HELP ME PLEASE Lol Downloading EXE Files Via Flash
Hey guys

This is a massive problem I have. I built my portfolio from flash and have a few exe flash projects that i need to load from the portfolio site.

Problem is the exe wont load from the CD and i also cant seem to download the exes from Internet explorer.

Don't know if its a sercurity problem with IE if anyone knows please can you let me know

Thanks guys! :)

Downloading Flash Shockwave Files
Can Flash shockwave files be posted at a website in a configuration that does not allow the files to be downloaded, only looked at?

Downloading Files From A Flash Site
Does anyone know how I can make it possible to download mp3 files on my server when a link is clicked on from my flash site? (in MX)

thanks

Downloading Files From A Flash Movie. Is It Possible?
Hi everyone, its been a while!!!

Anyway I am doing some Flash work for a mate and in this particular part of this movie there are links to some Word & PDF documents.

What he wants to happen is that when they are clicked you are prompted to download the files to your computer.

Is this possible, if so any ideas as to how it can be done?

cheers for looking, ignorng, replying - its all appreciated

Mark

Downloading Files From Flash Based CD-ROM
I am creating an interactive CD in Flash MX 2004. I want to be able to download .eps and .jpg files from the CD to the users desktop. Is this possible????

Kevin

Downloading Files From Flash Site
hello people

i need to find out how to allow a user to download a file from a flash site im working on, either via html page or directly from the flash (the latter being the better). could anybody help?

cheers

Downloading Flash .swf Files From Other Websites?
Is there any way to download movies from other sites? Thanks!

[F8] Downloading Files From A Flash Site
Does anyone know how I could make a flash site download a file (e.g. a PDF) without having to open a URL?

Downloading Files From Flash File
Hi,

I need some actionscript to use on a button. I want it so that when the button is pressed it prompts the user to download a file.

Many Thanks

Jeff

Downloading Files From Flash With ASP - This Works
I've searched the forums, stole portions of code, and played with this to finally get it to work. I'm just sharing the knowledge in case someone else has a need. Forgive me if there is an answer out there that I may have missed.

Step 1 - Create an ASP file for downloading files called Download.asp (I've tested this with JPEG's, TIFF's, DWG's and PDF's). Here's the code...

<%@LANGUAGE="VBSCRIPT"%>
<%
'*FilePath = Request.form("ImageFilePath")
'*FileName = Request.form("ImageFile")

FilePath = "Y:Folder 1Folder 2PhotosMy File.jpg"
FileName = "My File.jpg"

Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set TSO = FSO.OpenTextFile(FilePath, 1, -2)
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition","attachment; filename=" & FileName
Set Stream = Server.CreateObject("ADODB.Stream")
Stream.Open()
Stream.Type = 1
Stream.LoadFromFile(filePath)
Response.BinaryWrite Stream.Read()
Stream.Close
SET adoStream = Nothing
Response.End
%>

Things to keep in mind.

In the FilePath variable the "Y:" needs to be a physical drive on the web server. My web site is running from one server and accessing the images on another. I had to map the Images to "Y:" on my web server. For some reason it doesn't want to take the computer name, i.e. "\Server NameFolder Name".

This code is set to work by running the ASP file from your web browser. To get the variables from flash you will need to set this portion of the code as follows...

FilePath = Request.form("ImageFilePath")
FileName = Request.form("ImageFile")

'*FilePath = "Y:Folder 1Folder 2PhotosMy File.jpg"
'*FileName = "My File.jpg"

Basically just remarking and unremarking (if thats a word).

Step 2 - In Flash create a button and add the following actions...

on (release) {
ImageFilePath = "Y:\Folder 1\Folder 2\Photos\My File.jpg";
ImageFile = "My File.jpg";
getURL("http://localhost/Images/Download.asp", "_self", "POST");
}

Final note: I don't know why but the file name (My File.jpg) needs to be in both the ImageFilePath and ImageFile.

I hope I didn't forget anything. Also, I'm not an expert - so take this for what it's worth.

Later.

Downloading Sound Files From Flash
hello there,

i was wondering how i would go about allowing a site visitor to download a sound file (voice over artist) from a website. i have the sound streaming now and it's fine. but i need to know how to program it so that they can download the sound directly. any advise or links to tutorials would be appreciated!

denise biondo

Downloading Large Files With Flash..............
Hello-

I'm having a couple of small issues with downloading files. On a particular page in my web site I have large audio files (greater than 100 mb) that are available for download. The page is also a flash doucument. The first problem is that the files over 100 mb (which is all of them) don't actually get saved to your hard disc, while smaller files (like pictures) download without any issues. In HTML you would just right-click a button and that would start the process. Does anyone have a solution for this?

The second problem is less important. It has to do with showing the web surfer the progress of the download. Even though I'm using an eventlistener for the progress.......no prompt is shown that specifies the progress.



Any help would be greatly appreciated.



Here's the code I've been using-


Code:

import flash.net.FileReference;

listener.onSelect = function(file:FileReference):Void {
trace("onSelect: " + file.name);
}

listener.onCancel = function(file:FileReference):Void {
trace("onCancel");
}

listener.onOpen = function(file:FileReference):Void {
trace("onOpen: " + file.name);
}

listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal);
}

listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
}

listener.onIOError = function(file:FileReference):Void {
trace("onIOError: " + file.name);
}

var fileRef:FileReference = new FileReference();
var url:String = "http://www.trance-state.com/Downloads_files/DJTrinity-Faith-WWW.Trance-state.Com.mp3";
DL_Btn.onPress=function(){
fileRef.download(url, "DJ Trinity - Faith (www.trance-state.com).mp3");
}

Downloading Sound Files From Flash
hello there,

i was wondering how i would go about allowing a site visitor to download a sound file (voice over artist) from a website. i have the sound streaming now and it's fine. but i need to know how to program it so that they can download the sound directly. any advise or links to tutorials would be appreciated!

denise biondo

Downloading/open Files Trough Flash On A Cd Rom
hi all

i got a problem with /opening files trough flash on a cd rom.

(I know how to do it on a website...but not on a cd rom)

i'm making a flash file for a cd rom and there are also some files that you can dl/open from that flash presentation. But how do you do it?
I don't think i can create an exact path cause the cd rom file can be located on the D drive,or G, ...ect.
btw...these files are stored on the cd rom.

Can anyone help me?
thnx alot


ps: another question...is it possible to start the flash animation automaticly when you have inserted the cd rom in the cd rom drive?

Downloading Flash Files Which Link To Other Flash Files
Hi,

I was wondering if theres a way to download flash files that are loaded into other flash files? As I can only download the first file as its embeded..

Ta, Roger

Downloading .wav Files
Hi everyone!
How would I make it possible for someone to download a .wav file when they click on the link. Right now I have it set up where you click on a song title and it plays the song. I want it to download into Real Player, or Windows Media or whatever the person used to listen to audio. Thanks!

Downloading Files
I want to offer users an option to download a video file (mpg) so that they can view the file whenever they want to

What is the best way to do this

Please Help Downloading Files
I want to have a page where people could download music, screensavers, fonts etc... How do I do this.

Thanks

Frustrated

Downloading Files
Is it possible to have a file (MP3 in this case) sitting somewhere within a Flash movie that the end user could download?

Downloading PDF Files In MX
Hi there.

I'm building a site in MX, and have some PDFs that I am linking to via the "GetURL" action. Ideally, the user should be given the option to either download the file or open it from the server. Sadly, the PDFs just open when the button is clicked, in the browser window.

Does anybody know how I could allow the option to download?

Cheers.

Downloading Files
okay its a bit stupid but i cant make flash to download files for me

on (release) {
getURL("file.zip", "_self");
}

Downloading Zip And Exe Files
Hi!!
Simple question for you guys:

how do I make an exe and a zip file downloadable from an swf on the web? flash 5.

johajoha

Downloading Zip Files In XP
I'm making a CD-ROM in Flash. My client wants people to be able to download images from the CD to their hard drive. After looking through these forums I've realised that you can not download jpgs directly from Flash, but you can download zip files.

I have tried to do some test with this and have mixed results. I have been using the getURL command with the zip file in the same folder as the exe projector. It seems to work perfectly on Windows 98, but when I test it on XP it opens a browser with a small icon of the image in it. You can double click on the image and it opens the image in Picture and Fax viewer which has a Save dialogue. But this is not perfect, it's too many steps before the user can get the image.

Is there any way to get XP to act in the same way as '98 does when the link is clicked?

Any help would be greatly appreciated, it's really driving me nuts!

HOW Downloading Files Like A PDF?
Hi,

I have a link (bouton) to download a PDF directly to save in a computer, and I don't know how to write the actionscript for this. Help me!

Thanks

Downloading Swf Files
Hi everyone, listen, I need help, like hurry. Here is my problem.
I create a simple swf files that have like a couple animations using motion tweeens, bascailly a bunch of fades in and outs. But everytime I embbed it into dreamweaver it takes like forever to download and even in flash mx, when I try to publish it as a html file, it takes so long to download too. I need to make a flash intro page by next weeked. So if you could help me I would love you for life. Thank.

Downloading Files
hey,

In flash, how can i make it so the viewer can download a file?

For example, i want to have a button, "Download this file", and when the user clicks that button...the download window pops-ups asking the user where to save the file, and then, once the user has saved the file to there hard drive then they can open it and do whatever with it.

Thanks,
Baljinder

Downloading Files
This is probably a pretty dumb question, but I'm still fairly new to flash, so bear with me here... I'm making a friend's band's website, and he wants links that, when clicked, will allow you to download and save the mp3 files. What actionscript would I use on the buttons? Thanks in advance.

Downloading PDF Files
Hi everyone,

Quick question. I'm looking to put a link in a flash clip to let users download a PDF file but i've got absolutly no idea on how to do so. Does anyone know how to do this?

Thx in advance for the help.

OnAir

Downloading Files
I think I'm using the download class or something... Where it lets you choose where you want to save it and name it. But when you click to start the download, it won't give any progress bar or anything like it would normally do in html. It starts downloading it, I can see that from the activity menu in Safari, but there's no way of telling if it's downloading. So people are getting confused that it's not working.

Anyone know a solution?

I could just navigateToUrl, but That would open up an ugly window.

Downloading Txt/xml Files
Hi all,

Hopefully someone can help me out with a problem I’m having. Using one of the tutorials from this site (http://www.actionscript.org/resource...ion/Page1.html) I have been able to do half of what I need.

I have used this tutorial to create and save a txt file to my server. However, I wish this file to be saved by the user on their own computer. I would be content if it even got saved to their downloads folder.

I have it set up at the minute, so the users can name the file what they wish, the information is then saved and then the text file is opened in a new window. Instead of it opening is there any way of getting it to download?

Alternatively is there a way of saving the file directly to the computer. I have looked into this and so far it looks like it’s not possible.

Many thanks for any help you can give....

Downloading Files
I am trying to send a file via email but it is too large. I know that there is a way to upload the file on to me website so that it can be downloaded that way, but I do not know how to do this. I have turned it into a zip. file.

Can anyone help me out?

Downloading Pdf-files
Hi,

i want to create a download button to download PDF-Files.
All results i get so far, is the PDF-File is opened in the window - but i want the download function. Could anyone be so kind and help me?

many thanks

Downloading Files
Hi all,

I want to create a list or library of files, such PDFs, Quark files etc. which can be downloaded. Can anyone let me know where to start?

Thanks

Installing Or Downloading Files From Swf
I have one question, and one problem.

First off, im trying to download a .zip file from a swf (its going to be distributed on a cdrom). I setup these actions:

On(release)
GetUrl("banav.zip",window="_blank")
End On

When I click the button, it brings up the .zip file (where you click to extract or whatever), but only for like a split second. Not nearly long enough to click the zip file.

Second, is it possible to setup an action so when you click on a button, it actually links you right to the install wizard for whatever software you want to install?

Thanks in advance.

Downloading .swf Files From A Site
I've tried saving a site but didn't get the .swf files. Does anyone know of a way to do this?

Downloading .swf Files From My Site...
Does anyone know how to make it so people can download an .swf from my website? I have a download link in my website file, but I don't know how to script it to download. Any help would be appreciated.

Downloading Options For Dcr Files
Hi...

i have a dcr file with a corresponding shockwave file..how can i have it so that upon opening the shockwave file i will NOT be prompted with the option to either save to disk or open file....i'd like for it to just open in the browser....here is my shockwave.htm code:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<p>
<object CLASSID="clsid:166B1BCA-3F9C-11CF-8075-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,0,0" WIDTH="809" HEIGHT="601" NAME="MovieName">
<param name="SRC" value="NVCBT.dcr"><embed SRC="NVCBT.dcr" HEIGHT="480" WIDTH="600" NAME="MovieName">
</object>
</p>

</body>

</html>

Downloading Mp3 Files From Flashkit
How do you download mp3 sounds from flashkit?
When I click on the mp3 link to download it. It launches a new window with mp3 embedded in the page.

Downloading Files, Screensavers.
Hey guys,

Just wondering what the script was to download a file screensaver from my server.

eg. when they click my rollover button, a box appears and ask them where they want to save the screensaver to??

cheers

shaun

Larger Swf Files Not Downloading 100%
Ok, so I found out the hard way that a preloader is a must. If the player starts before its downloaded then it plays up to the downloaded frame at which it started and then loops back to the beginning. So, a preloaded is not an option but a MUST.

Ok.. did that.. however, when I made a larger movie and added the preloader the movie now will not download 100% thus causing the preloader to keep looping because the downloaded has "paused". Paused meaning the browsr keeps saying more content to download but its not actually downloading. I made a smaller movie and it worked just fine. The smaller one downloaded and played with out a preloader just fine.

So, why is it not downloading the entire movie?

example http://www.lowerbilling.com

Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved