- 浏览: 59927 次
- 来自: 北京
文章分类
最新评论
-
pengylfighting:
太感谢了
tomcat启动慢问题 -
shoushou2001:
很好很强大,
项目在tomcat中能运行,可是在WebLogic中部署就跑错的解决方案 -
java风:
严重错误 主要是程序的错误
WARN 为一般警告,比如ses ...
配置Log4j
SystemManager: Every Flex application’s best friend
When I first joined the Flex framework team, the Flex SystemManager seemed like a black magic, voodoo-y class that no one in their sane mind wanted to touch. In fact, the one time I did make a change to SystemManager (early in my development career), I inadvertently ended up pulling in all of UIComponent and bloating Flex development SWFs that week by a good 10k. Oops - good thing we have tests to check for mistakes like that.
Some time later, I started researching SystemManager in order to speak about it in one of my talks. I had an epiphany: SystemManager is not so scary. In fact, I’d go so far as to say that it is the most important class in the entire Flex framework.
So, let me try to make SystemManager less mysterious and explain how it enables the creation of Flex applications.
What does the Flex SystemManager do?
SystemManager is really the engine behind getting your Flex application up and running. Its most important job is creating the Application instance and adding it to the Flash Player display list. It also acts as the parent to all top-level items like popups, tooltips, and cursors in a Flex application. In addition to parenting them, SystemManager handles focus between these top-level items.
SystemManager creates my application? Tell me more….
This is what is so cool about SystemManager. There is a definite order to what happens the moment a Flex SWF is hit and it starts streaming down to a Flash Player client. Lets talk about that sequence of events.
First, it is imperative to understand that a Flex SWF is a 2-frame movie. The first frame of a Flex SWF contains the SystemManager, the Preloader, the DownloadProgressBar and some “glue” helper classes. Remember, the Preloader is what creates the DownloadProgressBar control which displays the progress of a Flex application downloading and being initialized. The second frame of a Flex SWF contains the rest of the Flex framework code, your application code and all of your application assets like embedded fonts, images, etc. By creating a 2-frame movie, Flex applications can take advantage of the streaming support built into the Flash Player and a preloader can appear before all of the Flex framework code and your application code are downloaded.
So, here’s the order of things once an mxml file or Flex SWF is hit. First, enough bytes for frame 1 are streamed down to the Flash Player. The Flash Player executes those bytes by creating a SystemManager instance. The first thing the SystemManager does is instruct the Flash Player to stop at the end of frame 1. The SystemManager then goes on to create the Preloader which creates the DownloadProgressBar control and pops that up on the client screen. The Preloader then starts tracking the rest of the bytes streaming in from the Flex SWF. Once all the bytes for the Flex framework and application code are in, the System Manager goes on to frame 2 and instantiates the Application instance.
Once the Application instance has been created, the SystemManager does a very important thing. It setsApplication.systemManager to itself. This is how you, the application developer, can access the SystemManager at a later time. After the systemManager property has been set on the Application instance, the Application goes on to create its children. Eventually, once all the Application child controls and containers have been created, sized and positioned, the Application dispatches thecreationComplete event. Once thecreationComplete event has been dispatched, the Preloader removes the DownloadProgressBar control and the SystemManager adds the Application instance to the Flash Player display list. (Aside - the Flash Player display list is basically the tree of visible or potentially visible objects that make up your application. When you add and remove child components to your application, your basically just adding and removing them from the display list).
Once the Application is added to the Flash Player display list, the Application dispatches itsapplicationComplete event and voila! The Application has been created and is up on the screen ready to be interacted with.
Phew - that was a mouthful, but hopefully it made sense. If you read over it a couple of times, you’ll see the execution of tasks once a Flex application is hit is very methodical.
发表评论
-
Flex事件效果与渲染
2011-11-28 15:38 831触发器名称 对 ... -
preloader
2011-11-14 15:55 459Flex 的默认的 Preloader, 平心而论,不是很 ... -
xml小心障眼
2011-11-11 18:13 0test.xml: <?xml version=& ... -
itemRenderer
2011-11-11 16:15 1234理解itemRenderer Flex中提供了大 ... -
Flex的注释
2011-11-11 15:28 588一.在<mx:script>标签中写注释 1.用 ... -
flex与js交互
2011-11-09 16:47 498一、在JavaScript中调用Flex方法在Flex中可以用 ... -
Flex Data Binding详解
2011-11-09 15:33 534转载-- Data BindIng简单的说就是当绑定源 ... -
callLater解析
2011-11-09 11:10 686转载-- Flash的fl组件和Flex的mx组件 ... -
在Flex中让Tree绑定数据后自动展开树节点
2011-11-09 11:00 640转载-- 用Flex/Flash做开发的同志们应该会 ... -
flex百条常用知识
2011-11-07 11:12 0flex百条常用知识 【 ... -
Flex 自定义事件
2011-11-07 11:09 567Flex 自定义事件 public static co ... -
AS3 数据类型转换 (转)
2011-11-07 10:22 1168AS3 数据类型转换 (转) ... -
AS3中遍历xml
2011-11-07 10:16 616AS3中遍历xml ... -
flex 数据基础-使用XML和XMLList
2011-11-07 10:08 627flex 数据基础-使用XML和XMLList ... -
flex 数据基础-使用XML和XMLList
2011-11-07 10:07 853flex 数据基础-使用XML和XMLList ... -
Flex自定义事件用法指南
2011-11-06 11:09 598Flex自定义事件用法指南 本文向大家介绍一下Fle ... -
Flex的Array和ArrayCollection
2011-11-06 10:39 4871.array作为控件使用 FLEX3写法: ... -
flex命名空间
2011-11-04 11:17 0Flex 4带给我们的,是全新的命名空间。了解这些命名空间必 ... -
沙箱安全
2011-11-04 11:08 0Flex的最重要两个文件:MXML文件与AS文件。 M ... -
Module通信的几个方法
2011-11-04 11:02 0推荐:启网 - 专业的主机、服务器合租提供商 17hz.ne ...
相关推荐
"systemManager:后台管理系统"是一个专门针对系统管理的开源后台应用。这个项目旨在提供一个高效、易用且功能丰富的管理平台,使系统管理员能够轻松地监控、管理和维护各种IT资源。下面将详细介绍这个系统的相关知识...
SystemManager不仅负责控制Flex应用的基本元素,如应用窗口、Application实例、弹出窗口和光标,还负责管理ApplicationDomain中的类加载和执行。下面将详细讨论SystemManager的主要功能和工作流程。 1. **应用窗口...
这是用于检测和增强系统硬件的终极Java应用程序:RAM,CPU和所有这些东西!
本文将深入探讨Flex事件运行流程,特别是与`mx:Application.applicationComplete`、`creationComplete`以及Flex应用程序初始化顺序相关的知识点。 首先,Flex应用程序的启动始于`preloader`阶段,系统管理器...
SystemManager 的 application:IUIComponent 属性引用载入 Flex 项目的 application 实例,getDefinitionByName(name:String):Object 方法获取载入 swf 中的定义,例如 Object(SystemManager(mySwfLoader.content)....
这里讲述的是在Flex Application中嵌套一个SWF,然后实现Flex与SWF相互间的通讯。我们需要引入SystemManager接口实现。 环境:Eclipse + Flex Builder
- `totalLevelSystemManager`属性:指向当前程序的SystemManager实例,如果Flex程序被嵌入,该属性将指向加载它的SystemManager实例。 - UIComponents的`systemManager`属性:每个组件都有一个指向SystemManager的...
在Flex开发中,用户界面的交互性和用户体验是至关重要的,而图标则是提升这些元素的关键因素之一。"Flex等待鼠标的图标"是指在Flex应用程序中,当系统正在进行后台处理或者加载数据时,显示的一种特殊鼠标指针,通常...
3.2 Flex Application 3.2.1 SystemManager 3.2.2 Preloader 3.2.3 Application的作用和主要属性 3.2.4 通过SWFLoader加载Application 3.2.5 域及跨域访问 3.3 Flex Module 3.3.1 创建模块 ...
3.2 Flex Application 3.2.1 SystemManager 3.2.2 Preloader 3.2.3 Application的作用和主要属性 3.2.4 通过SWFLoader加载Application 3.2.5 域及跨域访问 3.3 Flex Module 3.3.1 创建模块 ...
1. **创建新的Application类**:首先,你需要创建一个新的Flex `MXML`文件,定义一个新的`Application`类。在这个类中,你可以添加所需的组件、事件监听器和其他功能。 2. **定义启动方法**:在新`Application`类中...
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init()"> ``` 此部分声明了XML版本和编码,并定义了MXML命名空间。 2. **脚本定义**: ```xml <mx:...
SystemManager是一款强大的服务器管理系统,专为IT管理员设计,旨在简化和优化数据中心的日常运维工作。在深入了解SystemManager之前,我们首先要明白服务器管理的重要性。在信息化社会,服务器是支撑企业业务运行的...
Flex3 是 Adobe 开发的一种用于构建富互联网应用程序(RIA)的框架,它基于 ActionScript 3.0 和 Flash Player 或 AIR 运行时环境。在深入理解 Flex3 的组件和框架生命周期之前,我们需要先了解 Flex 的历史背景以及...
《SystemManager深度解析》 SystemManager,作为一个关键的系统管理工具,它在IT领域中扮演着举足轻重的角色。本文将深入探讨SystemManager的核心功能、工作原理以及其在实际应用中的价值,帮助读者理解并掌握这一...
华为手机,系统文件,安装后,手机可以用来为所欲为
- **SystemManager**:Flex 应用程序的核心是 SystemManager,它负责协调各个组件和事件的处理。 - **初始化阶段**:在这个阶段,应用的主要元素被初始化,包括外部接口和其他配置设置。 - **预加载阶段**:预加载...
- **管理器(Managers)**:Flex中的管理器执行特定任务,如SystemManager负责应用程序启动流程,StyleManager处理CSS样式和皮肤,DragManager支持拖放功能。理解这些管理器的工作原理对优化程序性能和实现复杂功能...