logo.
home. utilities. download. about. contact.
   

Macromedia

Northcode

Moock.org

Flashkit

Flashcoders Wiki

Actionscript.org

Ultrashock

Mike Chambers

Flash Magazine

This site is
sponsored by:

www.northcode.com

 

 

 

 

 


Center running application(s) on the desktop  

There are no commands in Flash alone to control the placement of the Flash projector window. The best you can do is create a full screen projector and center the Flash movie within that window. However, this leaves a border around your Flash movie and the user will be unable to access the desktop.

CENTER allows you to reposition any running application on the desktop. The size of the window being centered and the size of the desktop are determined dynamically at run time so you don't have to include any of that information in your call.

usage: center.exe pattern

If you call CENTER without specifying a value for the pattern argument, nothing will happen. If you supply a value for the pattern, any window that contains the pattern in its caption will be centered on the desktop. Case is not important but spaces are significant.

This actionScript command fscommand("EXEC", "center.exe" + chr(9) + "Flash"); will center all open windows that have "Flash" in the caption.

  • If you use the old Flash trick of using tabs in place of spaces, CENTER will look for tabs in the caption (exact match) and will probably fail to find the window.

  • Flash 5 will allow you use a tab between the application name and the pattern.

  • Flash MX does not allow spaces in the argument to the EXEC actionScript command. This means that the CENTER utility can't be called directly from Flash MX.

  • In a batch file the pattern can contain spaces which provides a workaround for Flash 5 limitations and makes it possible to use CENTRE from Flash MX projectors.

  • If you're working with SWF Studio you can use spaces in the pattern argument.