mWindow.onDragFiles()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows NT Support: Flash 7 SWF + mProjector 2.0;

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 2.0 r10;

Usage

mWindow.onDragFiles = function (files:Array) {
   // your statements here
}

Parameters

files - List of files being dragged into the window.

Returns

A boolean.; ;

Description

Event handler; An event handling function called when files are dragged into a window. After examining the files, this function should return "true" to continue the dragging session. This function should be combined with the mWindow.onDropFiles() and mWindow.onDragLeave() functions.

Example

The following mWindow.onDragFiles() event handler allows the user to drag one swf onto the window.

mWindow.onDragFiles = function(files) {
	var foundASWF = false;
	if (files.length == 1) {
		if (files[0].substring(files[0].length-3) == "swf") {
			foundASWF = true;
		}
	}
	return foundASWF;
};

Code Examples

Drag and Drop Files