tech: actionscript 3, status: stable / not maintained, by: malczakFUI - window manager for Flash CS3

FUI is a Flash CS3 window management component, written with ActionScript 3.0. It is using Flash UI components architecture.

FUI is open source library. Feel free to extend, copy, alter and redistribute (though it would be nice if you credit segfaultlabs wherever you use the lib).

FUI is stable, but not maintained anymore.

Features

  • window z-order (depth) management
  • authoring time and run time support
  • window drag and window minimize support
  • modal child windows support ~ prompts
  • global alert windows support
  • lightweight base window class
  • fla based skinning
  • tooltip manager component included

Download

FUI Window Manager component source code with examples (2.3MB)

API

WindowManager (window management class)

WindowManager.initialized:Boolean

Set to true if WindowManager has already been initialized. If not true, method should be invoked by manually.

WindowManager.initialize(rootInstance:DisplayObjectContainer):void

Initializes WindowManager. It's called automatically if any window was dropped on main time line in authoring enviroment. If all windows are dynamic user should call this method before adding any window to "system".

WindowManager.addWindow(winClass:Object, initObject:Object=null):BaseWindow

Adds window to the 'system'. First parameter can be either a class or an object, in both cases it has to extend BaseWindow class. Second parameter is currently not supported.

WindowManager.alert(alertText:String, caption:String="Message"):BaseWindow

Creates 'system' wide alert window on top of all other windows and objects. It also restricts user input and focuses to itself.

WindowManager.centerWindow(window:BaseWindow):void

Centers window at the 'screen' (flash area).

WindowManager.findWindow(wndName:String):BaseWindow

Finds window with specified name. If window with that name does not exists in 'system' return value is null.

WindowManager.removeWindow(window:BaseWindow):void

Removes window from 'system'.

WindowManager.toFront(window:BaseWindow):void

Moves window on top of all other windows.

WindowManager.numWindows():uint

Number of windows in 'system'.

WindowManager.numAlerts():uint

Number of alert windows in 'system'.

BaseWindow (base class for all windows)

class BaseWindow extends UIComponent implements IFocusManagerComponent

BaseWindow.content:Object

Content of specified window (client area content).

BaseWindow.caption:String

Ritle of specified window.

BaseWindow.modal:BaseWindow [read-only]

If window does not own a modal child window this property is null, in other case it stores child window instance.

BaseWindow.fitToContent():void

Fit size of the window to its content.

BaseWindow.close():void

Close window and remove it from 'system'.

BaseWindow.addModalWindow(modalWindowClass:Class):BaseWindow

Creates a modal child window of class Class that extends BaseWindow class and returns ints instance. Modal child window locks its parent until it is closed. Each BaseWindow can own only one modal child window. Modal windows can also own modal childs.

Known bugs

  • focus management in modal modes

Examples

Preview

Flash player (ver. 10.0.0) is required to see this content. Please update to newest possible version.

Get newest Adobe Flash player

Website content premeditately commited by malczak & sobstel.
Layout by mlando. Icons by dryicons.com. All rights reserved.