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

InteractiveIcon 是一个抽象基类,它表示与应用程序关联的操作系统图标。

使用 NativeApplication 对象的 icon 属性可获取应用程序图标的实例。图标类型将是 InteractiveIcon 的子类之一,在 Mac OS X® 上为 DockIcon,在 Windows® 上为 SystemTrayIcon。

不能直接实例化 InteractiveIcon 类。调用 new InteractiveIcon() 构造函数将引发 ArgumentError 异常。

另请参见

NativeApplication.icon
NativeApplication.supportsDockIcon
NativeApplication.supportsSystemTrayIcon


属性
 属性定义方
  bitmaps : Array
作为不同大小的 BitmapData 对象数组的图标图像。
InteractiveIcon
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
  height : int
[只读 (read-only)] 图标的当前显示高度,以像素为单位。
InteractiveIcon
 Inheritedprototype : Object
[静态] 对类或函数对象的原型对象的引用。
Object
  width : int
[只读 (read-only)] 图标的当前显示宽度,以像素为单位。
InteractiveIcon
公共方法
 方法定义方
 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 格式完全不支持透明度。

height属性 
height:int  [只读 (read-only)]

图标的当前显示高度,以像素为单位。

某些图标上下文支持动态大小。height 属性指示从当前上下文的 bitmaps 数组中选择的图标的高度。如果操作系统已缩放了该图标,则实际显示高度可能会有所不同。

width属性 
width:int  [只读 (read-only)]

图标的当前显示宽度,以像素为单位。

某些图标上下文支持动态大小。width 属性指示从当前上下文的 bitmaps 数组中选择的图标的宽度。如果操作系统已缩放了该图标,则实际显示宽度可能会有所不同。