mProjector Sample Code -- One FLA, TWO Platforms

Application Basics
level: simple
This sample demonstrates basic mProjector ActionScript and how to include a drag bar, minimize button, and close button to your application.
updated: 02/2007
version: 3.0
AS2.0
Drag and Drop Files
level: advanced
This sample shows how to add drag-n-drop file support to your application using the mWindow.onDragFiles() and mWindow.onDropFiles() event handlers.
updated: 02/2007
version: 3.0
AS2.0
Context Menus
level: advanced
This sample shows how to add context sensitive right-click menus to your application. Each shape and the system tray icon (Windows) pops a unique menu. Each user click on a menu item calls the mMenu.onCommand() event handler.
updated: 02/2007
version: 3.0
AS2.0
New Toaster Alert Application
level: sweet
This sample shows how to create a toaster pop-up window. This application grows a small flash-shaped window from the bottom of the primary monitor.
updated: 02/2007
version: 3.0
AS2.0
New Alert User
level: simple
This sample shows how to flash the Windows taskbar button, animate the Windows system tray icon, and bounce the Mac Dock icon.
updated: 02/2007
version: 3.0
AS2.0
Choose Files
level: simple
This sample shows how to use the mSystem.chooseFiles() command to enable the user to select multiple files.
updated: 02/2007
version: 3.0
AS2.0
Change Screen Resolution
level: simple
This sample shows how to change and restore the user's screen resolution using mSystem.setScreenResolutionTo800x600() and mSystem.resetScreenResolution()
released: 02/2006
version: 2.0
AS2.0
Download Image
level: simple
This sample shows how to check for an internet connection, and download a file from a server using checkNetConnection() and downloadFile()
updated: 02/2007
version: 3.0
AS2.0
Transparency and Alpha Correction
level: simple
To improve alpha channel and anti-aliasing rendering enable alpha correction with mWindow.enableAlphaCorrection(true). This command has no effect on standard or rectangular type windows or on Mac OS.
updated: 02/2007
version: 3.0
AS2.0
Flash Shaped Windows
level: simple
mProjector supports real-time, Flash shaped windows on both Macintosh and Windows. There are several design options and technical issues you will want to consider, which affect your application’s rendering and performance.

See "Flash-Shaped, Semi-Transparent Windows" in mProjector Help for a description of these samples and how to optimize alpha channel rendering, anti-aliased window boundaries, and performance for both Mac and Windows.

updated: 02/2007
version: 3.0
AS2.0
Fullscreen and Center
This sample shows how to center a window on the primary monitor, and to stretch a window to fill the screen.
level: simple
released: 01/2006
version: 2.0
AS2.0
Red Ball Installer
level: moderate
This sample shows how to create cross-platform single file installer. This application installs the Red Ball and it's Read Me file, creates a Windows Start menu item and desktop shortcut for the Red Ball, and opens the Read Me and launches the Red Ball on completion.
released: 01/2006
version: 2.0
AS2.0
Multiple Windows - Parent Child
level: moderate
This sample shows how to create and control multiple windows. This sample uses the function mApplication.createWindow() to create a child window. The command mWindow.setSize() is used to control the size of the child window from the parent and vice versa.

This sample also demonstrates how to expose user defined functions so they can be called synchronously from other windows -- i.e. synchronous window communications -- a Windows only feature.
released: 01/2006
version: 2.0
AS2.0
Multiple Windows - Create Window
level: advanced
This sample shows how to create a multiple window application. This sample utilizes the function mApplication.createWindow() to sublaunch child windows.
released: 08/2006
version: 2.0
AS2.0
Shortcuts
level: simple
This sample shows how to create a shortcut on the Mac or Windows desktop, and to add your application to the Windows Start Menu.
released: 01/2006
version: 2.0
AS2.0
Message Box
level: simple
This sample shows how to pop up a standard Operating System message box using the mSystem.messageBox() command.
released: 01/2006
version: 2.0
AS2.0
Project File
level: moderate
This sample shows how to create a project file for storing user settings. This example enables the user to save a project file, create a new project file, and choose and open an existing project file. As the user makes his selections, mFile commands are used to read and write data to a local file, and the user interface updates to reflect the current state.
released: 01/2006
version: 2.0
AS2.0
Startup Application
level: simple
This sample shows you how to make your application launch every time the computer boots using the mSystem.setStartAtLogin() command.
released: 01/2006
version: 2.0
AS2.0
Read and Write
level: simple
This sample shows how to read and write data to a local file using mFile.readString(), mFile.writeString(), and mFile.appendString().
released: 01/2006
version: 2.0
AS2.0
Open Documents
level: simple
This sample shows how to use mSystem.openDocuments() to launch open the user's preferred web browser to a URL, send email, and open a pdf file.
released: 03/2006
version: 2.0
AS2.0
Settings
level: moderate
This sample demonstrates how to save and read application settings. In this sample, the last saved settings are used to initialize the application when it is relaunched.
released: 01/2006
version: 2.0
AS2.0
TIF Shaped Windows (Mac Only)
level: simple
If the windowless performance for your Mac application is inadequate, mProjector also supports non-rectangular windows by using external TIF files. In order to use this method, define an initial shape for the application in the mProjector Builder "Shape" tab, by supplying an initial TIF file. You can change the shape of your window during execution by specifying a different TIF file using the mWindow.setShape() command.

See "Flash-Shaped, Semi-Transparent Windows" for more information on window shape options.
released: 01/2006
version: 2.0
AS2.0
Wallpaper and Screensaver
level: simple
This sample demonstrates how to change the active wallpaper and screen saver.
released: 01/2006
version: 2.0
AS2.0
Internal and External Files
level: simple
This sample shows to load internal "included" SWF files. In addition the sample shows how to copy internal files to the local drive.
released: 01/2006
version: 2.0
AS2.0
mApplication
level: simple
The mApplication sample demonstrates the mApplication class methods and event handlers. The mApplication class enables you to check for an internet connection, get the mouse post ion, download files, animate the Windows system tray or Mac dock icon, generate a unique user id, create child windows, respond to activate/deactivate events, and more.
released: 01/2006
version: 2.0
AS2.0
mSystem
level: simple
The mSystem sample demonstrates the mSystem class methods.The mApplication class enables you to check for an internet connection, get the mouse post ion, download files, animate the Windows system tray or Mac dock icon, generate a unique user id, create child windows, respond to activate/deactivate events, and more.
released: 01/2006
version: 2.0
AS2.0
mSystem 2
level: simple
The mSystem 2 sample demonstate how to get a list of the current windows, their size, and their location.
released: 03/2006
version: 2.0
AS2.0
mFile
level: simple
The mFile sample demonstrates the mFile class methods. mFile provides file handling capabilities, including reading and writing to a file, deleting files and folders, listing files and folders, renaming files and folders, copying files and folders, testing for the existence of a file, and more.
released: 01/2006
version: 2.0
AS2.0
mWindow
level: simple
The mWindow sample demonstrates the mWindow class methods and event handlers. The mWindow class enables you to resize a window, center windows, position windows, play fullscreen, minimize windows, add a drag bar, respond to minimize, restore, activate, scroll wheel and close events, and more.
released: 01/2006
version: 2.0
AS2.0
mMenu
level: simple
The mMenu sample demonstrates the mMenu class methods and event handlers. With mMenu you can customize the right-click and system tray menus on Windows and application menu bar menus and the right-click (cntl-click) menu on Mac OS X.
released: 01/2006
version: 2.0
AS2.0
mFTP
level: simple
The mFTP sample demonstrates the mFTP class methods. mFTP gives you a basic API for uploading and downloading files to and from an FTP server.
released: 01/2006
version: 2.0
AS2.0

WINDOWS ONLY - because some things are apples and oranges (or vice versa) ;-0
Uninstaller and Add/Remove Control Panel
level: advanced
Add your application to the Windows "Add or Remove Program" Control Panel. Demonstrates new build 'dj' commands mApplication.deleteSelf() and mApplication.getMyPath().
released: 04/2006
version: 2.0 'df'
AS2.0
Cut, Copy, and Paste
level: simple
This sample shows you how to add cut, copy and paste functionality to text fields in "windowless" swfs in Windows applications. It solves a problem that doesn't’t exist on the Mac.
released: 01/2006
version: 2.0
AS2.0
COM Beep - COM Object Basics
level: moderate
This example shows you how to call Windows DLL functions from Flash using ActionScript syntax.
released: 03/2006
version: 2.0
AS2.0
Datagrid - Flash, ADODB, and MS Access
level: advanced
This example shows you how to load a local Microsoft Access database into a Flash datagrid component using ActionScript syntax.
released: 03/2006
version: 2.0
AS2.0

MAC ONLY (for now)
Media Player
level: simple
This sample shows you embed HTML, PDFs, and QuickTime content into your Macintosh applications.
released: 04/2006
version: 2.0.6
AS2.0

If there are specific examples you'd like to see, send us an email

Home Buy mProjector SCREENTIME Forums Support About