hello,
trying to work out whether there’s a way to save a pic from within a flash photo gallery i’m working on. i’m trying to create an effect that is similar to right clicking in a browser on a pic and then selecting “Save Picture As…”.
anyone got any ideas?
thanx
system
August 24, 2003, 5:49pm
2
I dont think thats possible unless you zip the jpg and use the getURL action.
system
August 24, 2003, 5:55pm
3
that’s what i was thinking, though i have an array of pics. sure wish there was a way without using getURL.
i’m wondering if i could have a module in php compress the required jpg on the fly and then have getURL link to the zip instead?
system
August 24, 2003, 7:50pm
5
eyezberg
just what i needed
didn’t think about passing the jpg url’s as variables via js
nice one, this has helped a lot!
this forums fast back soon! i must return the favour
system
August 25, 2003, 4:54am
6
just discovered a serverside way of doing this with raw http headers by using the header() php function. the following as calls the rename.php file that follows the as below:
save_btn.onRelease = function() {
pass_pic_path = history_sequence_array[index_selection];
getURL("rename.php?file=" + pass_pic_path);
tip("");
};
<?
$file = $_GET['file'];
header("Content-Type: image/jpeg");
header ("Content-disposition: attachment; filename=".$file.";");
header("Content-Length: ".filesize($file));
readfile($file);
exit;
?>
this works a treat. now to use this process with a right click context menu, any ideas?
this flash beats java any day? why didn’t i get into flash sooner
been searching through some of the posts here today, top place!