mWindowEvent.DRAG_FILES constant

SupportPCMacPackage (AS3) / Scope (AS2)
ActionScript 3.0

4.0 or later

4.0 or later

stm.mprojector.mWindow stm.mprojector.mWindowEvent

ActionScript 2.0

public static const DRAG_FILE:String = "onDragFiles";

Defines the value of the type property of an onDragFiles Event object. This event is fired when the user drags files onto the application.

Register for onDragFiles events using mWindow.addEventListener().

This event has the following properties:

Property Value
files

Array; file paths of the files dragged on the application.

This AS3.0 onDragFiles event replaces mProjector's AS2.0 event handler function mWindow.onDragFiles().

ActionScript 3.0 Example:

The following example code sets up event listeners for the mWindowEvent events.

import stm.mprojector.mWindow;
import stm.mprojector.mWindowEvent;

function windowEventHandler(e:mWindowEvent):void {
	switch (e.type) {
		case mWindowEvent.ACTIVATE :
			//doSomethingCoolToMakeWindowStatesDistinct (e.active);
			break;
		case mWindowEvent.DOCUMENT_COMPLETE :
			//if (!e.error)
			//	doSomethingWithDocumentURL (e.documentURL);
			break;
		case mWindowEvent.DRAG_FILES :
			//isThisTheKindOfFileWeCanPlay_switchCursor (e.files);
			break;
		case mWindowEvent.DROP_FILES :
			//doSomethingWithFiles (e.files);
			break;
		case mWindowEvent.MAXIMIZED :
			//doSomethingMaximized ();
			break;
		case mWindowEvent.MINIMIZED :
			//doSomethingMinimized ();
			break;
		case mWindowEvent.RESTORED :
			//doSomethingRestored ();
			break;
		case mWindowEvent.SCROLL_WHEEL :
			//doSomethingScrollWheelie (e.scrollDelta);
			break;
		default:
			break;
	}
}

// == initialize listeners ====

function initListeners():void {
	// window events
	
	mWindow.addEventListener(mWindowEvent.ACTIVATE, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.DOCUMENT_COMPLETE, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.DRAG_FILES, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.DROP_FILES, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.MAXIMIZED, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.MINIMIZED, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.RESTORED, windowEventHandler);
	mWindow.addEventListener(mWindowEvent.SCROLL_WHEEL, windowEventHandler);
}

initListeners();

See Also

mWindow.addEventListener(), mWindow.onDragFiles()

venta viagra generica