Flex Enterprise Application Development Practice Learning Notes (vii)--FLEX application

Source: Internet
Author: User

SystemManager:

Systemmanager is the controller of the Flex application, which controls the application window, application instances, pop-ups, and cursors, and manages classes in the Applicationdomain. Systemmanager is the first class instantiated by Flashplayer, which stores the size and position information of the main window, preserving its subcomponents, such as the traces of a floating pop-up window and modal windows. Embedded fonts, styles, and document objects can be obtained through Systemmanager.

Mxml files with the application tag root in flex generate SWF files after they are compiled, and the Flex app's SWF file contains only two frames.

"First Frame" contains Systemmanager, Preloader, Downloadprogressbar, and a small number of tool classes, the frame is lightweight, so he can download the run almost immediately. Whenever enough data is received in the first frame, Systemmanager is instantiated and created by Preloader. The Downloadprogressbar is then created to show the progress indication of the app loading.

"Second Frame" contains the app code and embedded resources.

When the Systemmanager object in the first frame is initialized, a progress bar is created to display information for two different stages: the data download phase and the data initialization phase.

Preloader:

Preloader is a class that listens to the status of the download and initialization processes of APPLICATION,RSL and modules, including listening to the download and generating corresponding initialization process events based on the status of the download.

"Flexevent.init_progress"

"Flexevent.init_complete"

"Flexevent.iprogress"

"Flexevent.complete"

Preloader Although the initialization event is published, but does not directly show the initialization process, but instead of the display to a display class to complete, we call this class to load the display class. Systemmanager calls Preloader's Initialize method in its own initialize method. The class of the display class is passed to Preloader as a parameter. By default, this class is specified by Systemmanager as Downloadprogressbar (the default progress bar);


application's role and main properties :

pagetitle: page title (the content set by this property is displayed in the title bar of the browser).

Preloader: It sets the content of the application pre-loading process to display the class name, and if this property is not set, its default value is Mx.preloaders.DownloadProgressBar.

Usepreloader: This property is used to control whether the pre-loading process is displayed. The preload process is not possible to skip, can only control whether the process is displayed, the default value of this property is true, if there is no special case, it is recommended to keep the default value.

application: This is a static property of the application class that points to the topmost application. In a application, all components can be parentapplication to get their own parent app.

The Parentapplication property points to the most immediate parent app for the component, while Application.application is the topmost application.

URL: This property indicates the current application is which SWF is loaded in the environment, or the full path of the SWF file being loaded, including the domain name + site name +swf file in the site path + parameters + other. The "other" refers to some additional parameters that Flash Player adds. SWF's load path is a useful attribute for enterprise applications, where you can control permissions by applying a path or you want to get the server's address and site name, or get page parameters.

parameters: This is the parameter in the Web page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.