Flex 学习之路之十三 用户接口user interface 实现进度条 preloader
来源:互联网 发布:激光手术治疗近视 知乎 编辑:程序博客网 时间:2024/06/10 20:06
preloader:Object - spark.components.Application
- 应用程序容器支持应用程序预加载器,该预加载器使用下载进度条来显示应用程序 SWF 文件的下载和初始化进度。默认情况下,已启用应用程序预加载器。预加载器跟踪已下载的字节数,并持续更新进度条。
使用此属性指定用于定义自定义进度指示符的组件的路径。要创建自定义进度指示符,通常需要创建 SparkDownloadProgressBar 或 DownloadProgressBar 类的子类,或者创建用于实现 mx.preloaders.IPreloaderDisplay 接口的 flash.display.Sprite 类的子类。
<?xml version="1.0"?><!-- containers\application\SparkMainDPBMin.mxml --><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" preloader="myComponents.SparkDownloadProgressBarSubClassMin"><s:layout><s:VerticalLayout/></s:layout><!-- Add a couple of controls that don't do anything. --><s:Button label="Click Me"/><s:TextInput text="This is a TextInput control."/></s:Application>
package myComponents{import mx.preloaders.*;import flash.events.ProgressEvent;public class SparkDownloadProgressBarSubClassMin extends SparkDownloadProgressBar{public function SparkDownloadProgressBarSubClassMin() {super();}// Embed the background image.[Embed(source="assets/auto_layout.png")][Bindable]public var imgCls:Class;// Override to set a background image.override public function get backgroundImage():Object{return imgCls;}// Override to set the size of the background image to 100%.override public function get backgroundSize():String{return "100%";}// Override to return true so progress bar appears// during initialization.override protected function showDisplayForInit(elapsedTime:int,count:int):Boolean {return true;}// Override to return true so progress bar appears during download.override protected function showDisplayForDownloading(elapsedTime:int, event:ProgressEvent):Boolean {return true;}}}
阅读全文
0 0
- Flex 学习之路之十三 用户接口user interface 实现进度条 preloader
- Flex 学习之路之三 用户接口user interface
- Flex 学习之路之四 用户接口user interface 的三种状态
- Flex 学习之路之五 用户接口user interface 应用风格
- Flex 学习之路之六 用户接口user interface 应用效果effect
- Flex 学习之路之八 用户接口user interface 位置大小的设置
- Flex 学习之路之九 用户接口user interface includeInLayout 和visible区别
- Flex 学习之路之十 用户接口user interface整体布局
- Flex 学习之路之十一 用户接口user interface控制栏
- Flex 学习之路之十二 用户接口user interface 使用parentDocument 属性
- User Interface 用户接口
- Flex学习之路之二十三 List的使用
- Android学习之接口Interface
- User Interface(UI)之Layouts学习
- FLEX中Preloader预加载进度条
- Golang 学习之路九:接口(Interface)
- Java学习笔记之接口Interface
- TypeScript学习笔记之 接口(Interface)
- Notification
- 【面向JS--内置对象与包装类型】
- 从运维角度看中大型网站架构的演变之路
- SVN Unable to connect to a repositoryat URL Error running context 由于目标计算机积极拒绝,无法连接
- 赤裸裸的逆袭:小学生都用大数据分析苏轼了!
- Flex 学习之路之十三 用户接口user interface 实现进度条 preloader
- 系统工程师 常用 工具 命令
- 2017大数据产业链的大变化:数据应用仍在奋斗 淘金路上见曙光
- bzoj 1226: [SDOI2009]学校食堂Dining
- 腾讯面试经验
- eclipse中使用maven打包出错
- Shell 增加server rsync 控制脚本
- mongo索引sort排序字段复合索引升序和降序索引创建规则
- FastDFS 配置文件 client.conf storage_ids.conf