mApplication.onScreenChange()

Availability

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

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

Usage

mApplication.onScreenChange = function () {
   // your statements here
}

Parameters

None.

Returns

Nothing.

Description

Event handler; An event handling function called after the screen-size or color-depth settings change.

Example

The following example sets a new onScreenChange event handling function.

mApplication.onScreenChange = function (
{
    var Size = mSystem.getScreenSize();
    switch (Size.x)
    {
        case 1280:
            gotoAndPlay(100);
            break;
        case 1024:
            gotoAndPlay(101);
            break;
        case 800:
            gotoAndPlay(102);
            break;
    }
}

Code Examples

mProjector Class Basics -- mApplication