View Single Post
  #7 (permalink)  
Old 10-09-2007, 11:56 PM
AndyField AndyField is offline
Member
 
Join Date: May 2004
Posts: 78
Default Re: Creating zip files by using SWFKit Pro

I think I've found the errors I've been making - I've now successfully been able to generate a .zip file using the following code:

Code:
// get the name for the saved .zip file
var filename = Dialogs.fileSave("Zip files(*.zip)|*.zip|", "zip");
if (filename) {

	// Generating .zip file
	// creates a new zip file to get a handle
  var handle = new Object;
	handle.value = 0;
	zipCreate(handle, filename, "");

	// grab a file from the resources panel
	var file1 = getAdditionalFile("example.swf");

	//	zipAddFile
	// adds files
	zipAddFile(handle.value, filename, file1);
	
	// closes and saves the zip file
  zipClose(handle.value); 
}
What I'm still stuck on is how to have an existing .zip file in the resources section and then add two additional files to it. Any ideas?
__________________
:)
Reply With Quote