mWindowEvent.SCROLL_WHEEL 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 SCROLL_WHEEL:String = "onScrollWheel";

Defines the value of the type property of an onScrollWheel Event object. This event is fired when the mouse scroll wheel is used.

Register for onScrollWheel events using mWindow.addEventListener().

This event has the following properties:

Property Value
scrollDelta

Number; Amount scrolled.

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

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.onScrollWheel()

cialis 20mg lilly achat cialis 10 mg best site to buy kamagra uk