Click On A Button And Download A Jpeg File?
May 15, 2009I'm making a presentation in flash. I want users to be able to click on a button and download a jpeg file.
View 1 RepliesI'm making a presentation in flash. I want users to be able to click on a button and download a jpeg file.
View 1 RepliesTried to use geturl and that does not solve, for I want the button click to cause the browser to actually download the file, not play it. With geturl, some browsers will play the mp3 and the user is left wondering still how to download it to their own computer.
This is code I was trying to use to cause button link to cause file to be downloaded. I have 6 files, was going to make this for each button. But it doesn't work.
ActionScript Code:
demo_audio.mtdemo.onPress=function()
{
var request:URLRequest=new URLRequest("fielnamehere.mp3");
[Code]...
Im making a Flash site for class and I have a button made for the user to download a jpeg. The site isn't online. How do I link the button to the jpeg so when the user clicks it they can download it? Is it possible to make sure the download button works before it is uploaded online?
View 1 RepliesI have a few buttons rigged up for downloading word.doc, mp3 etc
Problem is its opening the file rather than giving a download this file option.
i have a pdf in my public_html and a button on my site that links to a PDF but when i click the button it opens the PDF in a browser window, is there a way to save directly to the desktop? without opening in a browser window or zipping the file?
View 1 RepliesSo basically when I used to run my code using Flash cs3 there was a button under view that had simulate download would click it and it would simulate download. Now am using flash builder and had to install some kind of flash debugger player or smth like that and can't find that button now...
View 2 Repliesi can only find info on this using AS3.i, however, am still using AS2.i need to create a button that a user can click to download an MP3.the only thing i could think to do was use a getURL, but when i do that, it opens the MP3 file and starts playing it in the browser. i need it to open a "Save As" dialogue, instead. I'm totally stuck on this one.the MP3 for download is located in a folder called "music" (music/A.mp3)
View 6 RepliesI have a mc with the instance name of 'resume'. When clicked, I want a resume to download to the user's desktop. I'm currently doing this:
resume.addEventListener(MouseEvent.CLICK, downloadFunction);
function downloadFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("profile_images/resume.pdf");
navigateToURL(request);
}
I haven't put this on the server yet, so I'm just testing it locally, thus the url request not having an actual url address. Is this correct? I use this same code, roughly, for the loading of external links... and images etc. When I test it, the pdf doesn't pop up.
I have a dynamically loaded data through xml, and I want to include an option to download a file (.rar) on a link click.
View 1 RepliesClick the 'download picture' button on the lower left aligned movie.url...How do they bring up a save as box for the jpeg? I have searched high and low for a solution on how to make flash save a jpeg to your computer that is stored on a server. I can make it work with a zip file but when I try the jpeg I end up linking to another page.This is the code I currently use to retrieve a zip file if anyone wants it.[code]
View 1 RepliesI need a counter click button that can storage every click on a txt file or something..
View 1 Repliesi am trying to make a button that when clicked will prompt the user to downalod a file to a target directory of the users choice. I have tried using URLRequest but it just opens the mp3 on another window with qiucktime which, i suspect, will happen with most users. is there a simple way to do this? i have no problem creating the button its just the function code for the button im lost on.url...
View 2 RepliesI want to create a button (in flash 8) that once clicked will download a file to the users' pc. It's a common button but there doesnt seem to be many tutorials on this subject.
View 2 RepliesHow do I make a button allow the viewer to download a .doc file? I've used this code to open a pdf file in a new window and it works but not for a .doc??
on (press, release) {
getURL("myfile.pdf", "_blank");
}
So I basically have used the fileReference class to allow the user to download a determined file if he wants to.
I use the file.download(URL) function and it works well.
However, the file is downloaded and saved to the hard drive using only the flash player. The browser is not aware of the download, and thus, if I want to show the progress of the download I'd have to make some progress bar myself. I know how to do it, but it would become really tedious and take too much UI space.
Isn't there a damn way in Flash to "send" a determined file to the browser so that it prompts the user to download it? It's an image file, so navigateToURL doesn't cut it since it will just display the image, both if I use a new tab or the current one.
I am unfamiliar with Flash, but would like to have a jpeg which when clicked, is replaced by a video which starts to play. Visit [URL] to see an example. This should just be a couple lines of actionscript and well placed frames.
View 2 RepliesI want a user to press an excel button and get prompted to download an excel file. I normally do it like this:
var dest:String = excelEndpoint;
var request:URLRequest = new URLRequest();
request.url = dest;
fr.download( request,'Locates.xls' );
fr.addEventListener(HTTPStatusEvent.HTTP_STATUS, handleStatus);
fr.addEventListener(IOErrorEvent.IO_ERROR, handleErr);
[Code]...
I am using video so I want everything to be single swf files and then I want to link it all, I followed the flash site tutorial to set up my flash site, it worked ok except when you click my button and the swf file loaded it played under the scene I was on. I want to click my button and have it take you to the new swf file and I want the old one to go away. Here is the code I used,
[Code]...
Using AS3.0, how do I load an external swf file when I click a button? Also, how can I get rid of that swf file when I click a different button on a menu?
View 1 RepliesI'm trying to find out if it's possible to use a .ICO file instead of a .PNG or .JPEG file in my Flash project. Is this even possible? The reason I'm asking is that the project I'm putting together uses ActionScript 2.0 code (not sure if that makes a difference or not) and displays a bunch of images for a bunch of different applications. So instead of creating a .PNG file for each application, since I've already got .ICO files on hand, I'd rather use those (saving me a ton of time).
View 4 RepliesI have a class file which prints a flash object. I don't want the print job to activate until a button is clicked. The print activation is a package and referenced by the document class. How would I code this to activate only when a button is pressed/ Currently it activates when the movie is played.
View 14 RepliesI have created a flash file that I will export as an SWF. It is to go on my web site. The one problem I have is that I need to put code in the flash file so that when you click a button it allows you to download a file from my website to your desktop. How do I script this?
View 7 RepliesI have this menu that I am loading my swf files under a as. file and linked to a xml file. It loads perfectly my swf files when i click on the buttons, but when i keep clicking the buttons, it keeps loading it on top of each other...How can i unload the current swf file when i click on the other button.? under the as file i have the following to load my swf files:
private function customFunc(link):void { var request:URLRequest = new URLRequest(link); var loader:Loader = new Loader() loader.load(request) var swfContainer:MovieClip=new MovieClip ; this.addChild(swfContainer) swfContainer.addChild(loader);; trace(link);
}
and under the xml i have the following code :
<buttons> <button name="HOME" linkType="custom" link="ball.swf" /> <button name="DESIGN" linkType="custom" link="rec.swf" /></buttons>
The problem i am facing right now is a filename.php generates filename.xml.... and this filename.xml is called in my Flex Tree.Now everytime i update my DB, the values are not getting reflected into filename.xml unless i call the filename.phpNow how would i call filename.php from flex which will make the update of xml
View 1 Repliesi have some code that looks like this
function main9Click(event:MouseEvent):void {
var main9URL:URLRequest = new URLRequest("N:ICTNationalsUnit 2PagesCars");
navigateToURL(main9URL, "_self");[code]....
I need to make it open so when you click on that button it opens the file
I am creating a library like flash file for our game. I am using adobe flash cs5 with as3 and adobe indesign. I am still very new at flash(a real newbie) and i am wondering if anyone could help me in my problem.
i have a movieclip file named "mainPage". mainPage contains 6 buttons (with a cyrstal design) but lets focus only on 1 button. The 1st button contains the name Art_btn which calls the movieclip artBook when the button is clicked (which is my problem) . I have another movieclip named "artBook". the contents in my artBook are separated or written on each frames that could be called when clicked next or prev.
here is my prob. i dont know what is the right code that would call for artBook when Art_btn is clicked.i tried inserting codes such as loadMovie, gotoAndPlay and addChild but when I test it, the mainPage contents doesnt show up and it produces errors.
[Code]...
In my game I would like it so once I have died you can click the 'Main Menu' button and it will take you back to the main menu and clear everything else which had been going on.
But at the moment as seen in the flash file attatched once you have died in the game a child form appears with two buttons on it 'Play Again' and 'Main Menu'. On clicking the 'Main Menu' button as you can see it takes you to the main menu but all the stuff from the previous frame are still there in the background.
I am building a flash website for a friend and I have managed to load an external .swf file to the .fla project. My problem is, that when I test the movie out, I can't manage to remove the .swf file at the click of a button. For example, if button 3 is clicked, it should show the picture gallery, and when the user clicks button 4, the picture gallery should disappear. [code]...
View 5 RepliesI want to call flash file (.swf file) on click button in flash file.
View 1 RepliesI have a flash MC that is loading in a text file. In that text file there are URL's. I also have inside the flash MC several buttons. How do I get the URL's from the loaded text file to be the URL when you click a button.
View 1 Replies