Choose Files

This sample shows how to use the mSystem.chooseFiles() command to enable the user to select multiple files.

Mac and Windows OS use similiar but different parameters in the choose file dialog. Windows doesn't require a file description and a default file type. Use mSystem.isMac() and mSystem.isWindows() in an if statement to handle the platform differences.

The code below enables the user to pick multiple JPEGs.


var chooseFileTitle = "Select JPGs";
var initFileName = "test.jpg";
var initFolderName = mSystem.getSpecialFolder("PICTURES");
var fileFilter:String;
var defaultFileType:String;
var fileMustExist = true;
var saveFile = false;
var selectedFiles:String;

if (mSystem.isMac()) {
	fileFilter = "jpg";
	defaultFileType = "";
} else if (mSystem.isWindows()){
	fileFilter = "JPEG Files (*.jpg)|*.jpg";		
	defaultFileType = "jpg";
}

chooseFiles_btn.onRelease = function() {
	var selectedFilesArray:Array = mSystem.chooseFiles(chooseFileTitle, initFileName, initFolderName, fileFilter, defaultFileType);
	selectedFiles = "";
	for (i=0; i<selectedFilesArray.length; i++) {
		selectedFiles = selectedFiles+selectedFilesArray[i]+newline;
	}
};

You can download this sample, "loadSWF", from the mProjector Samples page -- /software/flash-projector/flas.html#chooseFiles.

adobe photoshop teacher discount viagra price australia viagra price australia legal buy viagra online australia viagra alternative apotheke viagra online paypal australia kamagra in apotheke erhältlich viagra australia 100mg preise viagra 50 mg can i buy generic viagra in australia cialis auf rechnung kaufen viagra from australia cialis rezeptfrei online bestellen cialis australia generic viagra sicher kaufen what is the price of viagra in australia