Adobe air systemchrome options




















The default value of wmode is window , so, by default, SWF content is not displayed in transparent windows. PDF content cannot be displayed in transparent windows, no matter which wmode value is set.

Prior to AIR 1. Windows created with the createRootWindow method remain independent from the opening window. The parent and opener properties of the JavaScript Window object are null. To create a mx:Window, you can create an MXML file using mx:Window as the root tag, or you can call the Window class constructor directly. The following example creates and shows a mx:Window by calling the Window constructor:. How you add content to an AIR window depends on the type of window.

You can embed resources in the application SWF files or you can load them from separate application files. Any content in the application security sandbox, that is, content installed with your application and loadable with the app: URL scheme, has full privileges to access all the AIR APIs. JavaScript content outside the application sandbox is not able to use the runtime , nativeWindow , or htmlLoader properties of the JavaScript Window object.

To allow safe cross-scripting, you can use a sandbox bridge to provide a limited interface between application content and non-application content. In HTML content, you can also map pages of your application into a non-application sandbox to allow the code on that page to cross-script external content. See AIR security. You can load Flash SWF files or images into the display list of a native window using the flash. Loader class:. The following example displays HTML content within a by pixel display area on the stage of a native window:.

SWF content in an HTML file is not displayed if the window uses transparency that is the transparent property of the window is true unless the wmode parameter of the object or embed tag used to reference the SWF file is set to either opaque or transparent. Since the default wmode value is window , by default, SWF content is not displayed in a transparent window. PDF content is not displayed in a transparent window no matter what wmode value is used. The addChild method adds content layered above any existing content in the window.

Placing an object at the zero index moves existing content, including the HTML display, up one layer and insert the new content at the bottom. In addition, any elements of the page that set a background color, will not be transparent. If, for example, you set a background color for the body element of the page, none of the page will be transparent.

The following example illustrates how to add a Flash display objects as overlays and underlays to an HTML page. The example creates two simple shape objects, adds one below the HTML content and one above. The example also updates the shape position based on the enterFrame event.

This example provides a rudimentary introduction to some advanced techniques that cross over the boundaries between JavaScript and ActionScript in AIR. If your are unfamiliar with using ActionScript display objects, refer to Display programming in the ActionScript 3. Using the Flex AIR components.

Adobe Flash Platform. Creating windows Adobe AIR 1. Specifying window initialization properties The initialization properties of a native window cannot be changed after the desktop window is created. These immutable properties and their default values include: Property Default value systemChrome standard type normal transparent false owner null maximizable true minimizable true resizable true.

Note: You cannot set the initialization properties for a window created with the JavaScript window. See Handling JavaScript calls to window. When you create a window with no system chrome, then you must add your own chrome controls to handle the interactions between a user and the window. You are also free to make transparent, non-rectangular windows.

To allow alpha blending of a window with the desktop or other windows, set the window transparent property to true. The transparent property must be set before the window is created and cannot be changed.

A transparent window has no default background. Any window area not containing an object drawn by the application is invisible. If a displayed object has an alpha setting of less than one, then anything below the object shows through, including other display objects in the same window, other windows, and the desktop. However, rendering large alpha-blended areas can be slow, so the effect should be used conservatively.

Transparency cannot be used with windows that have system chrome. The static NativeWindow. When transparency is not supported, the application is composited against a black background. In these cases, any transparent areas of the application display as an opaque black.

It is a good practice to provide a fallback in case this property tests false. For example, you could display a warning dialog to the user, or display a rectangular, non-transparent user interface. Note that transparency is always supported by the Mac and Windows operating systems.

Support on Linux operating systems requires a compositing window manager, but even when a compositing window manager is active, transparency can be unavailable because of user display options or hardware configuration. If an element in the HTML document sets a background color, the background of that element is not transparent. Setting a partial transparency or opacity value is not supported. However, you can use a transparent PNG-format graphic as the background for a page or a page element to achieve a similar visual effect.

One window can own one or more other windows. These owned windows always appear in front of the master window, are minimized and restored along with the master window, and are closed when the master window is closed. Window ownership cannot be transfered to another window or removed. A window can only be owned by one master window, but can own any number of other windows. You can use window ownership to make it easier to manage windows used for tool palettes and dialogs.

For example, if you displayed a Save dialog in association with a document window, making the document window own the dialog will keep the dialog in front of the document window automatically. The following table illustrates the visual effects of different combinations of window property settings on the Mac OS X, Windows, and Linux operating systems:. Using the Flex AIR components. Setting AIR application properties. Adobe Flash Platform. View Help PDF 5. ActionScript windows When you create windows with the NativeWindow class, use the Flash Player stage and display list directly.

Note: The JavaScript Window object also has methods for scripting the containing window, such as moveTo and close. Where overlapping methods are available, you can use whichever method that is convenient. Flex Framework windows The Flex Framework defines its own window components. The initial application window The first window of your application is automatically created for you by AIR. Native window event flow Native windows dispatch events to notify interested components that an important change is about to occur or has already occurred.

The following sequence illustrates the flow of events that occurs when a user clicks the maximize button of a window: The NativeWindow object dispatches a displayStateChanging event. If no registered listeners cancel the event, the window maximizes. The related events are: A move event is dispatched if the top, left corner of the window moved because of the maximize operation. Any content in the application security sandbox, that is, content installed with your application and loadable with the app: URL scheme, has full privileges to access all the AIR APIs.

JavaScript content outside the application sandbox is not able to use the runtime , nativeWindow , or htmlLoader properties of the JavaScript Window object.

To allow safe cross-scripting, you can use a sandbox bridge to provide a limited interface between application content and non-application content. In HTML content, you can also map pages of your application into a non-application sandbox to allow the code on that page to cross-script external content. See AIR security. The following example displays HTML content within a by pixel display area on the stage of a native window:.

SWF content in an HTML file is not displayed if the window uses transparency that is the transparent property of the window is true unless the wmode parameter of the object or embed tag used to reference the SWF file is set to either opaque or transparent. Since the default wmode value is window , by default, SWF content is not displayed in a transparent window. PDF content is not displayed in a transparent window no matter what wmode value is used. The addChild method adds content layered above any existing content in the window.

Placing an object at the zero index moves existing content, including the HTML display, up one layer and insert the new content at the bottom. In addition, any elements of the page that set a background color, will not be transparent. If, for example, you set a background color for the body element of the page, none of the page will be transparent. The following example illustrates how to add a Flash display objects as overlays and underlays to an HTML page.

The example creates two simple shape objects, adds one below the HTML content and one above. The example also updates the shape position based on the enterFrame event. This example provides a rudimentary introduction to some advanced techniques that cross over the boundaries between JavaScript and ActionScript in AIR.

If your are unfamiliar with using ActionScript display objects, refer to Display programming in the ActionScript 3. Adobe Flash Platform. View Help PDF 5. Creating windows Adobe AIR 1. Specifying window initialization properties The initialization properties of a native window cannot be changed after the desktop window is created. These immutable properties and their default values include: Property Default value systemChrome standard type normal transparent false owner null maximizable true minimizable true resizable true.

Note: You cannot set the initialization properties for a window created with the JavaScript window. See Handling JavaScript calls to window. Creating the initial application window Use a standard HTML page for the initial window of your application. NativeWindowInitOptions ; options. NativeWindow options ; The window is not shown until you set the visible property to true or call the activate method.

Note: To determine the maximum and minimum window sizes allowed on the current operating system, use the following static NativeWindow properties:.



0コメント

  • 1000 / 1000