window.runtime 属性window.runtime.flash.desktop.Icon
继承Icon Inheritance EventDispatcher Inheritance Object

Icon 类表示操作系统图标。

Icon 对象只有一个属性 bitmaps,该属性是 BitmapData 对象的数组。一次只显示一个图像。操作系统选择大小最接近图标当前显示尺寸的图像,必要时进行缩放。

另请参见

File.icon
BitmapData


属性
 属性定义方
  bitmaps : Array
作为不同大小的 BitmapData 对象数组的图标图像。
Icon
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
 Inheritedprototype : Object
[静态] 对类或函数对象的原型对象的引用。
Object
公共方法
 方法定义方
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
dispatchEvent(event:Event):Boolean
将事件调度到事件流中。
EventDispatcher
 Inherited
hasEventListener(type:String):Boolean
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
hasOwnProperty(name:String):Boolean
指示对象是否已经定义了指定的属性。
Object
 Inherited
isPrototypeOf(theClass:Object):Boolean
指示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
propertyIsEnumerable(name:String):Boolean
指示指定的属性是否存在、是否可枚举。
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
设置循环操作动态属性的可用性。
Object
 Inherited
toString():String
返回指定对象的字符串表示形式。
Object
 Inherited
valueOf():Object
返回指定对象的原始值。
Object
 Inherited
willTrigger(type:String):Boolean
检查是否用此 EventDispatcher 对象或其任何始祖为指定事件类型注册了事件侦听器。
EventDispatcher
事件
 事件 摘要 定义方
 InheritedFlash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时调度。EventDispatcher
 InheritedFlash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时调度。EventDispatcher
属性详细信息
bitmaps属性
bitmaps:Array  [读写]

作为不同大小的 BitmapData 对象数组的图标图像。

当在给定的操作系统上下文中显示图标时,将使用数组中最接近所显示大小的位图(必要时进行缩放)。常用的大小包括 16x16、32x32、48x48 和 128x128。(在不远的将来,某些操作系统将可以使用 512x512 像素的图标。)

在某些上下文中,如果没有为 bitmaps 属性分配任何数据,则操作系统可以使用默认的系统图标。在其他上下文中,不显示图标。

若要设置或更改图标外观,请将 BitmapData 对象数组分配给 bitmaps 属性:

  icon.bitmaps = new Array(icon16x16.bitmapData, icon128x128.bitmapData);
  

直接修改 bitmaps 数组没有任何效果。

若要清除图标图像,请为 bitmaps 属性分配一个空数组。

注意:在为图标加载图像文件时,PNG 文件格式通常提供最佳 Alpha 混合。GIF 格式只支持打开或关闭透明度(无混合)。JPG 格式完全不支持透明度。

另请参见