Win Overview

Win Overview

The Win commands give you control over many aspects of your application's window settings and properties. SWF Studio can also inform your application when some attributes, such as your application's window size and position, are changed by the user.

With the Win commands you can get and set the size of your application window. You can also choose to constrain the window by specifying a minimum size, maximum size, and a fixed aspect ratio.

The position of your application within the desktop can be controlled, as can the relative position of your Flash content within the application window, also known as the stage alignment.

You can programmatically minimize, maximize and restore the window position, as well as force your application to the front by setting it top-most, or send it out of the user's way by sending it to the bottom of the z-order.

The application window's icon can be changed on the fly, your application can be made to flash on the taskbar to get the user's attention, and you can show or hide your application window.

You also have control over the look of your application. You can change the title bar caption, show or hide the title bar buttons, and show or hide the icon on the title bar. The border around your application can be removed or made visible, the background color changed, and you can even apply transparency to your application window by changing the alpha value.

You are also not limited to just using the title bar to drag your application around the desktop. Through Win commands, you can turn SmartDrag on and off, enable or disable the dragability of your application, or even programmatically force the start of a drag operation.

The Win.saveImage command lets you capture a part of your application window and save it to disk.

For those times when you need to exercise some control over other applications, the Win.sendMessage and Win.setFocus commands will let you perform some of the above tasks on other applications.