Hi,
In my application user has the option to download the images. But currently i need to download multiple images. How can i perform it.
Any idea wil be helpful for me.
If the user wants to download the image, he will click the download icon. In that,
var fileRef:FileReference = new FileReference();
var loadmc:MovieClip;
download_mc.onPress = function()
{
var listener:Object = new Object();
listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void
{
loadmc.status_txt.text = (Math.abs(bytesLoaded / bytesTotal)*100) +"%"
}
listener.onComplete = function(file:FileReference):Void {
loadmc.removeMovieClip();
getURL("javascript:alert(' Download Completed ');");
}
listener.onHTTPError = function(file:FileReference):Void {
loadmc.removeMovieClip();
getURL("javascript:alert('" + "ComonHTTPErrorplete: " + file.name + "');");
}
listener.onIOError = function(file:FileReference):Void {
loadmc.removeMovieClip();
getURL("javascript:alert('" + "IOError: " + file.name + "');");
}
listener.onSecurityError = function(file:FileReference, errorString:String):Void {
getURL("javascript:alert('" + "SecurityError: " + file.name + "');");
}
listener.onOpen = function(file:FileReference):Void {
loadmc = _root.fullImg_mc.attachMovie("progress_mc","loadingmc",0);
loadmc._x = 0;//(_root.fullImg_mc._x)+(_root.fullImg_mc._width/2);
loadmc._y = 0;//(_root.fullImg_mc._y)+(_root.fullImg_mc._height/2);
}
listener.onCancel = function(file:FileReference):Void {
loadmc.removeMovieClip();
trace("onCancel");
}
fileRef.addListener(listener);
var filename = _root.img_arr[temptot] + ".jpg";
var url:String = "images/"+filename;
fileRef.download(url,filename);
};
Which makes me to download the single image. What i need now is to download the multiple image.
Is there any option to zip all the file ...? and download....?
Give me some idea and hints
North America
Europe, Middle East and Africa
Asia Pacific