下表说明了 ActionScript 2.0 和 3.0 之间的差异。
| ActionScript 2.0 | ActionScript 3.0 | 注释 | |
|---|---|---|---|
| Accessibility class | flash.accessibility.Accessibility | ||
| isActive() | flash.accessibility.Accessibility.active | 已从函数更改为存取器属性。名称已从 isActive 更改为 active。 |
|
| updateProperties() | flash.accessibility.Accessibility.updateProperties() | ||
| arguments class | arguments | ||
| caller | 已删除。 | 您可以通过将 arguments.callee 作为参数从调用函数传递到被调用函数来实现相同的功能。有关示例,请参见 arguments.callee 的“示例”部分。 |
|
| Array class | |||
| CASEINSENSITIVE | Array.CASEINSENSITIVE | 数据类型已更改为 uint。 | |
| DESCENDING | Array.DESCENDING | 数据类型已更改为 uint。 | |
| length | Array.length | 数据类型已更改为 uint。 | |
| NUMERIC | Array.NUMERIC | 数据类型已更改为 uint。 | |
| RETURNINDEXEDARRAY | Array.RETURNINDEXEDARRAY | 数据类型已更改为 uint。 | |
| UNIQUESORT | Array.UNIQUESORT | 数据类型已更改为 uint。 | |
| Array | Array.Array() | 参数已更改为使用 ...(rest) 参数格式。 | |
| push() | Array.push() | 参数已更改为使用 ...(rest) 参数格式。 | |
| sort() | Array.sort() | options 参数的数据类型已更改为 uint。 |
|
| sortOn() | Array.sortOn() | options 参数的数据类型已更改为 uint。ActionScript 3.0 版还增加了功能;现在可以通过为 fieldName 参数传递对象数组来对多个字段名进行排序,如果还为 options 参数传递匹配的选项标签数组,则每个排序字段都可以有与自己匹配的 options 参数。 |
|
| splice() | Array.splice() | 参数可以具有任何数据类型,但首选的数据类型是 int 和 uint。value 参数已更改为 ...(rest) 参数格式。 |
|
| unshift() | Array.unshift() | value 参数已更改为 ...(rest) 格式。返回值的数据类型已更改为 uint。 |
|
| AsBroadcaster class | flash.events.EventDispatcher | ||
| _listeners | flash.events.EventDispatcher.willTrigger() | 不是直接的等效项。willTrigger() 方法可告诉您是否注册了任何侦听器,但不告诉您注册了多少个。 |
|
| addListener() | flash.events.EventDispatcher.addEventListener() | 不是直接等效项,因为 ActionScript 3.0 事件模型允许将事件侦听器添加到事件流中的任何对象,而不仅仅是广播对象。 | |
| broadcastMessage() | flash.events.EventDispatcher.dispatchEvent() | 不是直接等效项,因为 ActionScript 3.0 事件模型的工作方式不同。dispatchEvent() 方法将一个事件对象调度到事件流中,而 broadcastMessage() 方法将消息直接发送到每个已注册的侦听器对象。 |
|
| initialize() | 已删除。 | ActionScript 3.0 中没有直接的等效项,但可通过创建 EventDispatcher 类的子类实现类似的功能。例如,DisplayObject 类扩展 EventDispatcher,因此 DisplayObject 和 DisplayObject 子类的所有实例都能够发送和接收事件对象。 | |
| removeListener() | flash.events.EventDispatcher.removeEventListener() | 不是直接的等效项,因为 ActionScript 3.0 事件模型允许在事件流中的任何对象(而不仅仅是广播对象)中添加和删除事件侦听器。 | |
| BitmapData class | flash.display.BitmapData | ActionScript 3.0 使用 BitmapDataChannel 类作为指示使用哪个通道的常量值枚举。 | |
| height | flash.display.BitmapData.height | 数据类型已从 Number 更改为 int。 | |
| rectangle | flash.display.BitmapData.rect | 为了与其它 API 成员保持一致,属性已重命名。 | |
| width | flash.display.BitmapData.width | 数据类型已从 Number 更改为 int。 | |
| copyChannel() | flash.display.BitmapData.copyChannel() | sourceChannel 和 destChannel 参数现在是 uint 数据类型。 |
|
| draw() | flash.display.BitmapData.draw() | source 参数现在是 IBitmapDrawable;DisplayObject 和 BitmapData 都实现 IBitmapDrawable 接口,因此您可以将 DisplayObject 或 BitmapData 对象传递到 source 参数。 |
|
| fillRect() | flash.display.BitmapData.fillRect() | color 参数现在是 uint 值。 |
|
| floodFill() | flash.display.BitmapData.floodFill() | 现在 x 和 y 参数接受 int 值,color 接受 int 值。 |
|
| getColorBoundsRect() | flash.display.BitmapData.getColorBoundsRect() | 现在 mask 和 color 参数接受 uint 值。 |
|
| getPixel() | flash.display.BitmapData.getPixel() | 现在接受 int 参数值,并返回一个 uint 值。 |
|
| getPixel32() | flash.display.BitmapData.getPixel32() | 现在接受 int 参数值,并返回一个 uint 值。 |
|
| hitTest() | flash.display.BitmapData.hitTest() | 现在 firstAlphaThreshold 和 secondAlphaThreshold 参数接受 uint 值。 |
|
| loadBitmap() | 已删除。 | 此功能已不再需要,因为 ActionScript 3.0 中提供了新的位图支持。 | |
| merge() | flash.display.BitmapData.merge() | 现在乘数参数接受 uint 值。 | |
| noise() | flash.display.BitmapData.noise() | 现在 randomSeed 参数接受 int 值,low、high 和 channelOptions 参数接受 uint 值。 |
|
| perlinNoise() | flash.display.BitmapData.perlinNoise() | 现在 randomSeed 参数接受 int 值,numOctaves 和 channelOptions 参数接受 uint 值。 |
|
| pixelDissolve() | flash.display.BitmapData.pixelDissolve() | 现在 randomSeed 和 numPixels 参数接受 int 值,fillColor 参数接受 uint 值。(numPixels 参数在 ActionScript 2.0 中名为 numberOfPixels。) |
|
| scroll() | flash.display.BitmapData.scroll() | 现在 x 和 y 参数接受 int 值。 |
|
| setPixel() | flash.display.BitmapData.setPixel() | 现在 x 和 y 参数接受 int 值,color 接受 uint 值。 |
|
| setPixel32() | flash.display.BitmapData.setPixel32() | 现在 x 和 y 参数接受 int 值,color 接受 uint 值。 |
|
| threshold() | flash.display.BitmapData.threshold() | 现在 threshold、color 和 mask 参数接受 uint 值,并返回一个 uint 值。 |
|
| BlurFilter class | |||
| quality | flash.filters.BlurFilter.quality | quality 属性的数据类型已从 Number 改为 uint。 |
|
| Button class | flash.display.SimpleButton | ||
| _alpha | flash.display.DisplayObject.alpha | ||
| blendMode | flash.display.DisplayObject.blendMode | ||
| cacheAsBitmap | flash.display.DisplayObject.cacheAsBitmap | ||
| enabled | flash.display.SimpleButton.enabled | ||
| filters | flash.display.DisplayObject.filters | 在 ActionScript 3.0 中,数据类型是 Array。 | |
| _focusrect | flash.display.InteractiveObject.focusRect | ||
| _height | flash.display.DisplayObject.height | ||
| _highquality | 已删除。 | 请参见 Stage.quality。 | |
| _name | flash.display.DisplayObject.name | ||
| _parent | flash.display.DisplayObject.parent | ||
| _quality | 已删除。 | 您可以使用 flash.display.Stage.quality 为所有显示对象设置呈现品质。 |
|
| _rotation | flash.display.DisplayObject.rotation | ||
| scale9Grid | flash.display.DisplayObject.scale9Grid | ||
| _soundbuftime | flash.media.SoundMixer.bufferTime | 已移至 SoundMixer 类,该类用于全局声音控制。已重命名,未使用缩写词。已从名称中删除开头的下划线。 | |
| tabEnabled | flash.display.InteractiveObject.tabEnabled | ||
| tabIndex | flash.display.InteractiveObject.tabIndex | ||
| _target | 已删除。 | ActionScript 3.0 直接标识显示对象;因此,已不再需要根据路径来标识显示对象。 | |
| trackAsMenu | flash.display.SimpleButton.trackAsMenu | ||
| _url | 已删除。 | 请参见 DisplayObject.loaderInfo.url。 | |
| useHandCursor | flash.display.SimpleButton.useHandCursor | ||
| _visible | flash.display.DisplayObject.visible | ||
| _width | flash.display.DisplayObject.width | ||
| _x | flash.display.DisplayObject.x | ||
| _xmouse | flash.display.DisplayObject.mouseX | ||
| _xscale | flash.display.DisplayObject.scaleX | ||
| _y | flash.display.DisplayObject.y | ||
| _ymouse | flash.display.DisplayObject.mouseY | ||
| _yscale | flash.display.DisplayObject.scaleY | ||
| getDepth() | flash.display.DisplayObjectContainer.getChildIndex() | ActionScript 3.0 提供对显示列表的直接访问,因此对深度的处理方式不同。 | |
| onDragOut() | flash.display.InteractiveObject dispatches event: mouseOut | 在新的事件模型中替换为 mouseOut 事件。 |
|
| onDragOver() | flash.display.InteractiveObject dispatches event: mouseOver | 在新的事件模型中替换为 mouseOver 事件。 |
|
| onKeyDown() | flash.display.InteractiveObject dispatches event: keyDown | 在新的事件模型中替换为 keyDown 事件。 |
|
| onKeyUp() | flash.display.InteractiveObject dispatches event: keyUp | 在新的事件模型中替换为 keyUp 事件。 |
|
| onKillFocus() | flash.display.InteractiveObject dispatches event: focusOut | 在新的事件模型中替换为 focusOut 事件。 |
|
| onPress() | flash.display.InteractiveObject dispatches event: mouseDown | 在新的事件模型中替换为 mouseDown 事件。 |
|
| onRelease() | flash.display.InteractiveObject dispatches event: mouseUp | 在新的事件模型中替换为 mouseUp 事件。 |
|
| onReleaseOutside() | flash.display.InteractiveObject dispatches event: mouseUp | 在新的事件模型中替换为 mouseUp 事件。 |
|
| onRollOut() | flash.display.InteractiveObject dispatches event: mouseOut | 在新的事件模型中替换为 mouseOut 事件。 |
|
| onRollOver() | flash.display.InteractiveObject dispatches event: mouseOver | 在新的事件模型中替换为 mouseOver 事件。 |
|
| onSetFocus() | flash.display.InteractiveObject dispatches event: focusIn | 在新的事件模型中替换为 focusIn 事件。 |
|
| Camera class | flash.media.Camera | ||
| activityLevel | flash.media.Camera.activityLevel | ||
| bandwidth | flash.media.Camera.bandwidth | ||
| currentFps | flash.media.Camera.currentFPS | FPS 的大小写发生更改。 | |
| fps | flash.media.Camera.fps | ||
| height | flash.media.Camera.height | 数据类型已从 Number 更改为 int。 | |
| index | flash.media.Camera.index | 数据类型已从 String 更改为 int。 | |
| motionLevel | flash.media.Camera.motionLevel | 数据类型已从 Number 更改为 int。 | |
| motionTimeOut | flash.media.Camera.motionTimeout | 数据类型已从 Number 更改为 int。 | |
| muted | flash.media.Camera.muted | ||
| name | flash.media.Camera.name | ||
| names | flash.media.Camera.names | ||
| quality | flash.media.Camera.quality | 数据类型已从 Number 更改为 int。 | |
| width | flash.media.Camera.width | 数据类型已从 Number 更改为 int。 | |
| get() | flash.media.Camera.getCamera() | ||
| onActivity() | flash.events.ActivityEvent.ACTIVITY | ||
| onStatus() | flash.media.Camera dispatches event: status | 在新的事件模型中替换为 status StatusEvent 对象。 |
|
| setMode() | flash.media.Camera.setMode() | width 和 height 参数已更改为 int 数据类型。 |
|
| setMotionLevel() | flash.media.Camera.setMotionLevel() | 两个参数均已更改为 int 数据类型。 | |
| setQuality() | flash.media.Camera.setQuality() | 两个参数均已更改为 int 数据类型。 | |
| capabilities class | flash.system.Capabilities | 类名已从小写形式更改为首字母大写形式。 | |
| Color class | flash.geom.ColorTransform | Color 类已删除,因为它的所有功能都可以通过 flash.geom.ColorTransform 类来实现。可通过使用 ColorTransform 类构造函数或属性来直接赋予颜色值。然后可以将 ColorTransform 对象赋予 Transform 对象的 colorTransform 属性,而接下来可以将该属性赋予 DisplayObject 实例的 transform 属性。 |
|
| Color | flash.geom.ColorTransform.ColorTransform() | 已删除。可以使用 ColorTransform() 构造函数指定颜色值。 |
|
| getRGB() | flash.geom.ColorTransform.color | 可以使用 ColorTransform 类的 color 存取器属性访问 RGB 颜色值。 |
|
| getTransform() | 已删除。 | 使用 ColorTransform() 类构造函数或属性可直接赋予颜色值。 |
|
| setRGB() | flash.geom.ColorTransform.color | 可以使用 ColorTransform 类的 color 存取器属性来设置 RGB 颜色值。 |
|
| setTransform() | 已删除。 | 使用 ColorTransform() 类构造函数或属性可直接赋予颜色值。 |
|
| ContextMenu class | flash.ui.ContextMenu | ContextMenu 类现在是 flash.ui 包的一部分。 | |
| builtInItems | flash.ui.ContextMenu.builtInItems | ||
| customItems | flash.ui.ContextMenu.customItems | ||
| ContextMenu | flash.ui.ContextMenu.ContextMenu() | ||
| copy() | flash.ui.ContextMenu.clone() | ||
| hideBuiltInItems() | flash.ui.ContextMenu.hideBuiltInItems() | ||
| onSelect() | flash.ui.ContextMenu dispatches event: menuSelect | ActionScript 3.0 类调度 menuSelect 事件,而不是调用 onSelect() 事件处理函数。 |
|
| ContextMenuItem class | flash.ui.ContextMenuItem | ContextMenuItem 类现在是 flash.ui 包的一部分。 | |
| caption | flash.ui.ContextMenuItem.caption | ||
| enabled | flash.ui.ContextMenuItem.enabled | ||
| separatorBefore | flash.ui.ContextMenuItem.separatorBefore | ||
| visible | flash.ui.ContextMenuItem.visible | ||
| ContextMenuItem | flash.ui.ContextMenuItem.ContextMenuItem() | ||
| copy() | flash.ui.ContextMenuItem.clone() | ||
| onSelect() | flash.ui.ContextMenuItem dispatches event: menuItemSelect | ActionScript 3.0 类调度 menuSelect 事件,而不是调用 onSelect() 事件处理函数。 |
|
| ConvolutionFilter class | |||
| clone() | flash.filters.ConvolutionFilter.clone() | 现在返回一个 BitmapFilter 对象。 | |
| Date class | Date | ActionScript 3.0 新增一组适用于以 getxxx() 开头的所有方法的读存取器。例如,在 ActionScript 3.0 中,Date.getDate() 和 Date.date 返回相同的值。 |
|
| getUTCYear() | Date.getUTCFullYear() | 此方法已删除,因为它不是 ECMAScript 的一部分。改为使用 Date.getUTCFullYear()。 |
|
| getYear() | Date.getFullYear() | 此方法已删除,因为它不是 ECMAScript 的一部分。改为使用 Date.getFullYear()。 |
|
| setYear() | Date.setFullYear() | 此方法已删除,因为它不是 ECMAScript 的一部分。改为使用 Date.setFullYear()。 |
|
| DisplacementMapFilter class | flash.filters.DisplacementMapFilter | 几个参数的数据类型已从 Number 改为 uint。 | |
| color | flash.filters.DisplacementMapFilter.color | 此参数的数据类型现在为 uint。 | |
| componentX | flash.filters.DisplacementMapFilter.componentX | 此参数的数据类型现在为 uint。 | |
| componentY | flash.filters.DisplacementMapFilter.componentY | 此参数的数据类型现在为 uint。 | |
| DisplacementMapFilter | flash.filters.DisplacementMapFilter.DisplacementMapFilter() | componentX、componentY 和 color 参数的数据类型现在为 uint。 |
|
| clone() | flash.filters.DisplacementMapFilter.clone() | 现在返回一个 BitmapFilter 对象。 | |
| DropShadowFilter class | flash.filters.DropShadowFilter | ||
| color | flash.filters.DropShadowFilter.color | 此参数的数据类型已从 Number 改为 uint。 | |
| quality | flash.filters.DropShadowFilter.quality | 此参数的数据类型已从 Number 改为 uint。 | |
| DropShadowFilter | flash.filters.DropShadowFilter.DropShadowFilter() | 所有参数现在都具有默认值,某些参数类型已更改。 | |
| clone() | flash.filters.DropShadowFilter.clone() | 现在返回一个 BitmapFilter 对象而非 DropShadowFilter 对象。 | |
| Error class | Error | 添加了一个新的 getStackTrace() 方法来帮助调试。 |
|
| ExternalInterface class | flash.external.ExternalInterface | 此类中的两个方法的参数已更改。 | |
| addCallback() | flash.external.ExternalInterface.addCallback() | 此方法的 ActionScript 3.0 版本不接受 instance 参数。method 参数替换为 closure 参数,后者可以引用函数、类方法或特定类实例的方法。此外,如果调用代码由于安全原因无法访问 closure 引用,则会引发 SecurityError 异常。 |
|
| call() | flash.external.ExternalInterface.call() | 如果出现问题,此方法的 ActionScript 3.0 版本除了返回 null 之外,还引发错误或 SecurityError 异常。 |
|
| FileReference class | flash.net.FileReference | ActionScript 3.0 版从 EventDispatcher 类继承 addEventListener() 和 removeEventListener() 方法。调度的事件取代了事件处理函数。 |
|
| postData | flash.net.URLRequest.data | Flash Player 9 的 ActionScript 2.0 中添加了 postData 属性,这样可以通过文件上载或下载来发送 POST 数据。在 ActionScript 3.0 中,使用 URLRequest 类的 data 属性来发送 POST 或 GET 数据。有关详细信息,请参见本语言参考中的 flash.net.URLRequest.data。 |
|
| size | flash.net.FileReference.size | 返回 uint 数据类型,而不是 Number 数据类型。 | |
| addListener() | flash.events.EventDispatcher.addEventListener() | 在新的事件模型中,不需要具有类特定的 addListener() 方法,因为该类从 EventDispatcher 类继承 addEventListener() 方法。 |
|
| browse() | flash.net.FileReference. | browse() 在 ActionScript 2.0 中,当出现错误时,将返回 false。在 ActionScript 3.0 中,则引发 IllegalOperationError 或 ArgumentError 异常。但是,如果参数无效、文件浏览对话框未打开或者其它浏览器会话正在进行,则该方法仍返回 false。同时,typelist 参数已更改。在 ActionScript 2.0 中,可将字符串数组传递给 browse() 方法以指定文件过滤器。在 ActionScript 3.0 中,可传递 FileFilter 对象数组。 |
|
| download() | flash.net.FileReference.download() | 出现错误时引发异常,而不是返回 false。第一个参数的数据类型已更改。在 ActionScript 2.0 中,传递给 download() 的第一个参数是一个字符串。在 ActionScript 3.0 中,可传递 URLRequest 对象。 |
|
| removeListener() | flash.events.EventDispatcher.removeEventListener() | 在新的事件模型中,不需要具有类特定的 removeListener() 方法,因为该类从 EventDispatcher 类继承 removeEventListener() 方法。 |
|
| upload() | flash.net.FileReference.upload() | 发生了各种更改:
|
|
| onCancel | flash.net.FileReference dispatches event: cancel | 在 ActionScript 3.0 中,该类调度名为 cancel 的事件,而不是调用 onCancel() 事件处理函数。 |
|
| onComplete | flash.net.FileReference dispatches event: complete | 在 ActionScript 3.0 中,该类调度名为 complete 的事件,而不是调用 onComplete() 事件处理函数。 |
|
| onHTTPError | flash.net.FileReference dispatches event: httpStatus | 在 ActionScript 3.0 中,该类调度名为 httpStatus 的事件,而不是调用 onHTTPError() 事件处理函数。 |
|
| onIOError | flash.net.FileReference dispatches event: ioError | 在 ActionScript 3.0 中,该类调度名为 ioError 的事件,而不是调用 onIOError() 事件处理函数。 |
|
| onOpen | flash.net.FileReference dispatches event: open | 在 ActionScript 3.0 中,该类调度名为 open 的事件,而不是调用 onOpen() 事件处理函数。 |
|
| onProgress | flash.net.FileReference dispatches event: progress | 在 ActionScript 3.0 中,该类调度名为 progress 的事件,而不是调用 onProgress() 事件处理函数。 |
|
| onSecurityError | flash.net.FileReference dispatches event: securityError | 在 ActionScript 3.0 中,该类调度名为 securityError 的事件,而不是调用 onSecurityError() 事件处理函数。 |
|
| onSelect | flash.net.FileReference dispatches event: select | 在 ActionScript 3.0 中,该类调度名为 select 的事件,而不是调用 onSelect() 事件处理函数。 |
|
| onUploadCompleteData | flash.net.FileReference dispatches event: complete | 在 ActionScript 3.0 中,该类调度名为 uploadCompleteData 的事件,而不是调用 onUploadCompleteData() 事件处理函数。 |
|
| FileReferenceList class | flash.net.FileReferenceList | ActionScript 3.0 类从 EventDispatcher 类继承 addEventListener() 和 removeEventListener() 方法。ActionScript 3.0 类使用名为 cancel 和 select 的事件,而不是使用 onCancel() 和 onSelect() 事件处理函数。 |
|
| addListener() | flash.events.EventDispatcher.addEventListener() | 在新的事件模型中,不需要具有类特定的 addListener() 方法,因为该类从 EventDispatcher 类继承 addEventListener() 方法。 |
|
| browse() | flash.net.FileReferenceList.browse() | 在 ActionScript 3.0 中,当存在错误时,该方法引发一个 IllegalOperationError 异常,而不是返回 false。同时,typelist 参数已更改。在 ActionScript 2.0 中,可将字符串数组传递给 browse() 方法以指定文件过滤器。在 ActionScript 3.0 中,可传递 FileFilter 对象数组。 |
|
| removeListener() | flash.events.EventDispatcher.removeEventListener() | 在新的事件模型中,不需要具有类特定的 removeListener() 方法,因为该类从 EventDispatcher 类继承 removeEventListener() 方法。 |
|
| onCancel | flash.net.FileReferenceList dispatches event: cancel | 在 ActionScript 3.0 中,该类调度名为 cancel 的事件,而不是调用 onCancel() 事件处理函数。 |
|
| onSelect | flash.net.FileReferenceList dispatches event: select | 在 ActionScript 3.0 中,该类调度名为 select 的事件,而不是调用 onSelect() 事件处理函数。 |
|
| Function class | |||
| apply() | Function.apply() | No Change | |
| GlowFilter class | flash.filters.GlowFilter | 几个属性的数据类型已从 Number 改为 unit。 | |
| color | flash.filters.GlowFilter.color | 此属性的数据类型已从 Number 改为 unit。 | |
| quality | flash.filters.GlowFilter.quality | 此属性的数据类型已从 Number 改为 unit。 | |
| GlowFilter | flash.filters.GlowFilter.GlowFilter() | color 和 quality 参数现在分别为 uint 和 int 数据类型,而非 Number 数据类型。所有参数现在都分配有默认值。 |
|
| clone() | flash.filters.GlowFilter.clone() | 返回一个 BitmapFilter 对象而非 GlowFilter 对象。 | |
| GradientBevelFilter class | flash.filters.GradientBevelFilter | ||
| quality | flash.filters.GradientBevelFilter.quality | 此属性的数据类型已从 Number 改为 int。 | |
| clone() | flash.filters.GradientBevelFilter.clone() | 返回一个 BitmapFilter 对象而非 GradientBevelFilter 对象。 | |
| GradientGlowFilter class | flash.filters.GradientGlowFilter | ||
| quality | flash.filters.GradientGlowFilter.quality | 此属性的数据类型已从 Number 改为 int。 | |
| GradientGlowFilter | flash.filters.GradientGlowFilter.GradientGlowFilter() | 为所有参数添加了默认值,且 quality 参数的数据类型已从 Number 改为 int。 |
|
| clone() | flash.filters.GradientGlowFilter.clone() | 返回一个 BitmapFilter 对象而非 GradientGlowFilter 对象。 | |
| IME class | flash.system.IME | 此类已移至 flash.system 包。 | |
| ALPHANUMERIC_FULL | flash.system.IMEConversionMode.ALPHANUMERIC_FULL | ||
| ALPHANUMERIC_HALF | flash.system.IMEConversionMode.ALPHANUMERIC_HALF | ||
| CHINESE | flash.system.IMEConversionMode.CHINESE | ||
| JAPANESE_HIRAGANA | flash.system.IMEConversionMode.JAPANESE_HIRAGANA | ||
| JAPANESE_KATAKANA_FULL | flash.system.IMEConversionMode.JAPANESE_KATAKANA_FULL | ||
| JAPANESE_KATAKANA_HALF | flash.system.IMEConversionMode.JAPANESE_KATAKANA_HALF | ||
| KOREAN | flash.system.IMEConversionMode.KOREAN | ||
| UNKNOWN | flash.system.IMEConversionMode.UNKNOWN | ||
| addListener() | flash.events.EventDispatcher.addEventListener() | 在新的事件模型中,不需要具有类特定的 addListener() 方法,因为该类从 EventDispatcher 类继承 addEventListener() 方法。 |
|
| getConversionMode() | flash.system.IME.conversionMode | 已更改为存取器属性。 | |
| getEnabled() | flash.system.IME.enabled | 已更改为存取器属性。 | |
| removeListener() | flash.events.EventDispatcher.removeEventListener() | 在新的事件模型中,不需要具有类特定的 removeListener() 方法,因为该类从 EventDispatcher 类继承 removeEventListener() 方法。 |
|
| setConversionMode() | flash.system.IME.conversionMode | 已更改为存取器属性。 | |
| setEnabled() | flash.system.IME.enabled | 已更改为存取器属性。 | |
| onIMEComposition | flash.system.IME dispatches event: imeComposition | 在 ActionScript 3.0 中,该类调度名为 imeComposition 的事件,而不是调用 onIMEComposition() 事件处理函数。 |
|
| Key class | flash.ui.Keyboard | 该类在 ActionScript 3.0 中拥有一个新的名称,以匹配与 Keyboard 类有关的其它类,如 KeyboardEvent。 | |
| BACKSPACE | flash.ui.Keyboard.BACKSPACE | 在 ActionScript 3.0 中声明为常量并且数据类型已更改为 unit。 | |
| CAPSLOCK | flash.ui.Keyboard.CAPS_LOCK | 在 ActionScript 3.0 中声明为常量,添加了下划线并且数据类型更改为 uint。 | |
| CONTROL | flash.ui.Keyboard.CONTROL | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| DELETEKEY | flash.ui.Keyboard.DELETE | 在 ActionScript 3.0 中名称已更改为 DELETE,声明为常量并且数据类型已更改为 uint。 |
|
| DOWN | flash.ui.Keyboard.DOWN | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| END | flash.ui.Keyboard.END | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| ENTER | flash.ui.Keyboard.ENTER | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| ESCAPE | flash.ui.Keyboard.ESCAPE | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| HOME | flash.ui.Keyboard.HOME | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| INSERT | flash.ui.Keyboard.INSERT | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| LEFT | flash.ui.Keyboard.LEFT | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| _listeners | flash.events.EventDispatcher.willTrigger() | 不是直接的等效项。willTrigger() 方法可告诉您是否注册了任何侦听器,但不告诉您注册了多少个侦听器。 |
|
| PGDN | flash.ui.Keyboard.PAGE_DOWN | 在 ActionScript 3.0 中名称已更改为 PAGE_DOWN,声明为常量并且数据类型已更改为 uint。 |
|
| PGUP | flash.ui.Keyboard.PAGE_UP | Name 在 ActionScript 3.0 中名称已更改为 PAGE_UP,声明为常量并且数据类型已更改为 uint。 |
|
| RIGHT | flash.ui.Keyboard.RIGHT | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| SHIFT | flash.ui.Keyboard.SHIFT | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| SPACE | flash.ui.Keyboard.SPACE | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| TAB | flash.ui.Keyboard.TAB | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| UP | flash.ui.Keyboard.UP | 在 ActionScript 3.0 中声明为常量,并且数据类型已更改为 uint。 | |
| addListener() | flash.events.EventDispatcher.addEventListener() | 在 ActionScript 3.0 中,不需要具有类特定的 addListener() 方法,因为所有显示对象都从 EventDispatcher 类继承 addEventListener() 方法。 |
|
| getAscii() | flash.events.KeyboardEvent.charCode | ||
| getCode() | flash.events.KeyboardEvent.keyCode | ||
| isAccessible() | flash.ui.Keyboard.isAccessible() | ||
| isDown() | 已删除。 | 因安全原因而被删除。 | |
| isToggled() | 已删除。 | 因安全原因而被删除。 | |
| removeListener() | flash.events.EventDispatcher.removeEventListener() | 在 ActionScript 3.0 中,不需要具有类特定的 removeListener() 方法,因为所有显示对象都从 EventDispatcher 类继承 removeEventListener() 方法。 |
|
| onKeyDown | flash.display.InteractiveObject dispatches event: keyDown | 在 ActionScript 3.0 中,InteractiveObject 类调度 keyDown KeyboardEvent 对象,而不是调用 onKeyDown 事件处理函数。 |
|
| onKeyUp | flash.display.InteractiveObject dispatches event: keyUp | 在 ActionScript 3.0 中,InteractiveObject 类调度 keyUp KeyboardEvent 对象,而不是调用 onKeyUp 事件处理函数。 |
|
| LoadVars class | flash.net.URLLoader | LoadVars 类功能替换为 URLLoader、URLRequest、URLStream 和 URLVariables 类。 | |
| contentType | flash.net.URLRequest.contentType | ||
| loaded | 已删除。 | 在 ActionScript 3.0 中没有对应的布尔值属性,但您可以使用 flash.events.Event.COMPLETE 来设置侦听器,以便在加载数据时接收通知。 |
|
| LoadVars | flash.net.URLLoader.URLLoader() | ||
| addRequestHeader() | flash.net.URLRequestHeader | ||
| decode() | flash.net.URLVariables.decode() | ||
| getBytesLoaded() | flash.net.URLLoader.bytesLoaded | 类更改为 URLLoader;从函数更改为属性存取器;名称从 getBytesLoaded 更改为 bytesLoaded。 |
|
| getBytesTotal() | flash.net.URLLoader.bytesTotal | 类更改为 URLLoader;从函数更改为属性存取器;名称从 getBytesTotal 更改为 bytesTotal。 |
|
| load() | flash.net.URLLoader.load() | ||
| onData() | flash.net.URLLoader dispatches event: complete | 请参见 URLLoader 类。在下载操作完成后、但在分析任何数据之前调度 complete 事件。 |
|
| onHTTPStatus() | flash.net.URLLoader dispatches event: httpStatus | 在 ActionScript 3.0 中,URLLoader 类调度名为 httpStatus 的 HTTPStatusEvent 对象,而不是调用 onHTTPStatus 事件处理函数。 |
|
| onLoad() | flash.net.URLLoader dispatches event: complete | 请参见 URLLoader 类。在下载操作完成后调度 complete 事件。 |
|
| send() | flash.net.sendToURL() | ||
| sendAndLoad() | flash.net.sendToURL() | sendToURL() 方法向服务器发送一个 URL 请求,但忽略响应。要接收响应,请使用 flash.net.sendToURL()。 |
|
| toString() | 已删除。 | 在 ActionScript 3.0 中已不再需要该方法。 | |
| LocalConnection class | flash.net.LocalConnection | 此类已移至 flash.net 包。 | |
| LocalConnection | flash.net.LocalConnection.LocalConnection() | ||
| allowDomain() | flash.net.LocalConnection.allowDomain() | 在 ActionScript 3.0 中已更改为常规方法,而不再是事件处理函数。参数已更改为使用 ...(rest) 参数格式。返回值已更改为 void。 |
|
| allowInsecureDomain() | flash.net.LocalConnection.allowInsecureDomain() | 在 ActionScript 3.0 中已更改为常规方法,不再是事件处理函数。参数已更改为使用 ...(rest) 参数格式。返回值已更改为 void。 |
|
| close() | flash.net.LocalConnection.close() | ||
| connect() | flash.net.LocalConnection.connect() | ||
| domain() | flash.net.LocalConnection.domain | 已更改为属性存取器。 | |
| onStatus() | flash.net.LocalConnection dispatches event: status | 在新的事件模型中,回调函数替换为事件对象。 | |
| send() | flash.net.LocalConnection.send() | 第三个参数已改为使用 ...(rest) 参数格式。返回类型已更改为 void。 |
|
| Microphone class | flash.media.Microphone | 此类已移至 flash.media 包。 | |
| index | flash.media.Microphone.index | 数据类型已更改为 uint。 | |
| rate | flash.media.Microphone.rate | 数据类型已更改为 uint。 | |
| silenceTimeOut | flash.media.Microphone.silenceTimeout | “Timeout”的大小写发生更改。数据类型已更改为 int。 | |
| get() | flash.media.Microphone.getMicrophone() | 名称从 get() 更改为 getMicrophone()。参数的数据类型更改为 uint。 |
|
| onActivity() | flash.media.Microphone dispatches event: activity | 在 ActionScript 3.0 中,该类调度 activity 事件,而不是调用 onActivity 事件处理函数。 |
|
| onStatus() | flash.media.Microphone dispatches event: status | 在 ActionScript 3.0 中,该类调度 status 事件,而不是调用 onStatus 事件处理函数。 |
|
| setGain() | flash.media.Microphone.gain | 将 gain 属性和 setGain() 方法合并为一个名为 gain 的 get/set 属性存取器。数据类型已更改为 uint。 |
|
| setRate() | flash.media.Microphone.rate | 将 rate 属性和 setRate() 方法合并为一个名为 rate 的 get/set 属性存取器。数据类型已更改为 uint。 |
|
| setSilenceLevel() | flash.media.Microphone.setSilenceLevel() | timeOut 参数的数据类型已更改为 int。timeOut 参数的大小写已更改为 timeout。 |
|
| setUseEchoSuppression() | flash.media.Microphone.setUseEchoSuppression() | ||
| Mouse class | flash.ui.Mouse | ||
| addListener() | flash.events.EventDispatcher.addEventListener() | 在新的 ActionScript 3.0 事件模型中,不需要具有类特定的 addListener() 方法,因为所有显示对象都从 EventDispatcher 类继承 addEventListener() 方法。 |
|
| hide() | flash.ui.Mouse.hide() | 已改为返回 void。 |
|
| removeListener() | flash.events.EventDispatcher.removeEventListener() | 在新的 ActionScript 3.0 事件模型中,不需要具有类特定的 removeListener() 方法,因为所有显示对象都从 EventDispatcher 类继承 removeEventListener() 方法。 |
|
| show() | flash.ui.Mouse.show() | 已改为返回 void。 |
|
| onMouseDown | flash.display.InteractiveObject dispatches event: mouseDown | 在新的事件模型中替换为 mouseDown 事件。 |
|
| onMouseMove | flash.display.InteractiveObject dispatches event: mouseMove | 在新的事件模型中替换为 mouseMove 事件。 |
|
| onMouseUp | flash.display.InteractiveObject dispatches event: mouseUp | 在新的事件模型中替换为 mouseUp 事件。 |
|
| onMouseWheel | flash.display.InteractiveObject dispatches event: mouseWheel | 在新的事件模型中替换为 mouseWheel 事件。 |
|
| MovieClip class | flash.display.MovieClip | 在 ActionScript 3.0 中,许多 MovieClip 方法都已移至其它类中。所有事件处理函数都已替换为新的事件模型中的事件对象。 | |
| _alpha | flash.display.DisplayObject.alpha | 已移至 DisplayObject 类并已删除名称开头的下划线。 | |
| blendMode | flash.display.DisplayObject.blendMode | ||
| cacheAsBitmap | flash.display.DisplayObject.cacheAsBitmap | ||
| _currentframe | flash.display.MovieClip.currentFrame | 已删除名称开头的下划线。 | |
| _droptarget | flash.display.Sprite.dropTarget | 已移至 Sprite 类,已删除名称开头的下划线并已改为混合大小写形式。 | |
| filters | flash.display.DisplayObject.filters | ||
| focusEnabled | 已删除。 | 在 ActionScript 3.0 中,所有交互式对象都是已启用的焦点,因此不再需要该属性。 | |
| _focusrect | flash.display.InteractiveObject.focusRect | 已移至 InteractiveObject 类,已删除名称开头的下划线并已改为混合大小写形式。 | |
| _framesloaded | flash.display.MovieClip.framesLoaded | 已删除名称开头的下划线并已改为混合大小写形式。 | |
| _height | flash.display.DisplayObject.height | 已移至 DisplayObject 类并已删除名称开头的下划线。 | |
| _highquality | 已删除。 | 请参见 Stage.quality。 | |
| hitArea | flash.display.Sprite.hitArea | 已移至 Sprite 类。 | |
| _lockroot | 已删除。 | 在 ActionScript 3.0 中,显示对象的根是自动设置的;因此,_lockroot 属性有效地始终处于打开状态。有关详细信息,请参见 flash.display.DisplayObject.root。 |
|
| menu | 已删除。 | 请参见 InteractiveObject.contextMenu。 | |
| _name | flash.display.DisplayObject.name | 已移至 DisplayObject 类并已删除名称开头的下划线。 | |
| opaqueBackground | flash.display.DisplayObject.opaqueBackground | ||
| _parent | flash.display.DisplayObject.parent | 已移至 DisplayObject 类并已删除名称开头的下划线。 | |
| _quality | flash.display.Stage.quality | ||
| _rotation | flash.display.DisplayObject.rotation | 已移至 DisplayObject 类并已删除名称开头的下划线。 | |
| scale9Grid | flash.display.DisplayObject.scale9Grid | ||
| scrollRect | flash.display.DisplayObject.scrollRect | 已更改为 Rectangle 数据类型。 | |
| _soundbuftime | flash.media.SoundMixer.bufferTime | 已移至 SoundMixer 类(该类用于全局声音控件),已重命名(不使用缩写词)并已删除名称开头的下划线。 | |
| tabChildren | flash.display.DisplayObjectContainer.tabChildren | ||
| tabEnabled | |||