View comments | RSS feed

The following table describes the differences between ActionScript 2.0 and 3.0.


 ActionScript 2.0ActionScript 3.0Comments
 Compiler directives
 #endinitclip RemovedThe #endinitclip directive identifies the end of initialization code in ActionScript 2.0, but has no use in ActionScript 3.0.
 #include RemovedSee the include statement for similar functionality.
 #initclip RemovedThe #initclip directive identifies the beginning of initialization code in ActionScript 2.0, but has no use in ActionScript 3.0.
 
 Constants
 false falseThe value false, rather than undefined, is the default value of a Boolean object.
 NaN NaNThe value NaN, rather than undefined, is the default value of a Number object.
 newline RemovedUse the escape sequence composed of the backslash character followed by the character "n" (\n).
 null nullThe value null, rather than undefined, is the default value of the Object and String classes.
 undefined undefinedThe value undefined can be assigned only to untyped variables; it is not the default value of any typed object.
 
 Global functions
 asfunction flash.text.TextField dispatches event: linkReplaced by the new event handling model. You now get the same functionality by using the syntax Event: instead of asfunction:. When a user clicks the link, Flash Player dispatches a TextEvent object of type TextEvent.LINK, which your code can listen for with the addEventListener() method. Any text that you decide to include is stored in the event object's text property.
 call() RemovedThe call() function was deprecated. > Use the function statement for similar functionality.
 chr() RemovedUse String.fromCharCode() instead.
 clearInterval() flash.utils.clearInterval()Moved to flash.utils package.
 clearTimeout() flash.utils.clearTimeout()Moved to flash.utils package.
 duplicateMovieClip() flash.display.MovieClip.MovieClip()Replaced by new MovieClip class constructor function.
 eval() RemovedThere is no equivalent in ActionScript 3.0.
 fscommand() flash.system.fscommand()Moved to flash.system package. Also, see flash.external.ExternalInterface class for JavaScript/ActionScript communication.
 getProperty() RemovedTo directly access properties, use the dot (.) operator.
 getTimer() flash.utils.getTimer()Moved to flash.utils package.
 getURL() flash.net.navigateToURL()Replaced by the navigateToURL() function.
 getVersion() flash.system.Capabilities.versionMoved to Capabilities class and changed to accessor property.
 gotoAndPlay() flash.display.MovieClip.gotoAndPlay()This function is no longer a global function, but is still available as a method of the MovieClip class.
 gotoAndStop() flash.display.MovieClip.gotoAndStop()This function is no longer a global function, but it is still available as a method of the MovieClip class.
 ifFrameLoaded() flash.display.MovieClip.framesLoaded 
 int() int()Resurrected from deprecated status as a conversion function for the new int data type.
 length() String.lengthThis property is no longer a global property, but it is still available as a property of the String class.
 loadMovie() flash.display.LoaderUse the Loader class instead.
 loadMovieNum() flash.display.LoaderUse the Loader class instead.
 loadVariables() flash.net.URLLoaderUse the URLLoader class instead.
 loadVariablesNum() flash.net.URLLoaderUse the URLLoader class instead.
 mbchr() String.fromCharCode()Removed. Use the static String.fromCharCode() method instead.
 mblength() String.lengthRemoved. Use String.length instead.
 mbord() String.charCodeAt()Removed. Use String.charCodeAt() instead.
 mbsubstring() String.substr()Removed. Use String.substr() instead.
 nextFrame() flash.display.MovieClip.nextFrame()This function is no longer a global function, but it is still available as a method of the MovieClip class.
 nextScene() flash.display.MovieClip.nextScene()This function is no longer a global function, but it is still available as a method of the MovieClip class.
 on() flash.events.EventDispatcherRemoved. Use the new event handling system in the flash.events package instead.
 onClipEvent() flash.events.EventDispatcherRemoved. Use the new event handling system in the flash.events package instead.
 ord() StringRemoved. Use String class methods instead.
 parseInt() parseInt()A string with a leading 0 is interpreted as decimal rather than octal. For octal numbers, pass the number 8 for the radix parameter.
 play() flash.display.MovieClip.play()This function is no longer a global function, but it is still available as a method of the MovieClip class.
 prevFrame() flash.display.MovieClip.prevFrame()This function is no longer a global function, but it is still available as a method of the MovieClip class.
 prevScene() flash.display.MovieClip.prevScene()This function is no longer a global function, but it is still available as a method of the MovieClip class.
 print() flash.printing.PrintJobRemoved. Use the PrintJob class instead.
 printAsBitmap() flash.printing.PrintJobRemoved. Use the PrintJob class instead.
 printAsBitmapNum() flash.printing.PrintJobRemoved. Use the PrintJob class instead.
 printNum() flash.printing.PrintJobRemoved. Use the PrintJob class instead.
 random() Math.random()Removed. Use Math.random() instead.
 removeMovieClip() RemovedSet all references to a movie clip to null to make the movie clip eligible for garbage collection.
 setInterval() flash.utils.setInterval()Moved to flash.utils package. Consider using the Timer class instead.
 setProperty() RemovedTo set the value of a writable property, use the dot (.) operator.
 setTimeout() flash.utils.setTimeout()Moved to flash.utils package.
 showRedrawRegions() flash.profiler.showRedrawRegions()Moved to flash.profiler package.
 startDrag() flash.display.Sprite.startDrag()This is no longer a global function, but it is still available as a method of the Sprite class.
 stop() flash.display.MovieClip.stop()This is no longer a global function, but it is still available as a method of the MovieClip class.
 stopAllSounds() flash.media.SoundMixer.stopAll()This is no longer a global function, but it is still available as a method of the SoundMixer class, which provides global sound control.
 stopDrag() flash.display.Sprite.stopDrag()This is no longer a global function, but it is still available as a method of the Sprite class.
 substring() String.substring()This is no longer a global function, but it is still available as a method of the String class.
 targetPath() RemovedActionScript 3.0 identifies display objects directly; therefore, identifying a > display object by its path is no longer necessary.
 tellTarget() RemovedUse the dot (.) operator or the with statement instead.
 toggleHighQuality() flash.display.Stage.qualityRemoved as a global property. Use the Stage class version instead.
 trace() trace()The trace() method accepts a comma-delimited list of arguments.
 unloadMovie() flash.display.Loader.unload()Removed. Use Loader.unload() instead.
 unloadMovieNum() flash.display.Loader.unload()Removed. Use Loader.unload() instead.
 updateAfterEvent() flash.events.TimerEvent.updateAfterEvent()This is no longer a global function, but it is still available as a method of the TimerEvent, MouseEvent, and KeyboardEvent classes.
 
 Global properties
 _accProps flash.accessibility.AccessibilityPropertiesReplaced by the AccessibilityProperties class.
 _focusrect flash.display.InteractiveObject.focusRectReplaced by the focusRect property of the InteractiveObject class.
 _global RemovedUse a static member of a class instead.
 _highquality flash.display.Stage.qualityReplaced by the quality property of the Stage class.
 _level RemovedThe concept of levels does not exist in ActionScript 3.0, which instead provides direct access to the display list. See the flash.display package for details.
 maxscroll flash.text.TextFieldReplaced by the maxScrollH and maxScrollV properties of the TextField class.
 _parent flash.display.DisplayObject.parentReplaced by the parent property of the DisplayObject class.
 _quality flash.display.Stage.qualityReplaced by the quality property of the Stage class.
 _root flash.display.DisplayObject.stageRemoved. The closest equivalent is the Stage, which serves as the root of the ActionScript 3.0 display list.
 scroll flash.text.TextFieldRemoved. Replaced by the scrollH and scrollV properties of the TextField class.
 _soundbuftime flash.media.SoundMixer.bufferTimeReplaced by the bufferTime property of the SoundMixer class.
 this thisInstance methods are bound to the instance that implemented the method; therefore, the this reference inside the body of an instance method always refers to the instance that implemented the method.
 
 Operators
 add (concatenation (strings))RemovedUse the concatenation (+) operator instead.
 eq (equality (strings))RemovedUse the equality (==) operator instead.
 gt (greater than (strings))RemovedUse the greater than (>) operator instead.
 ge (greater than or equal to (strings))RemovedUse the greater than or equal to (>=) operator instead.
 <> (inequality)RemovedUse the inequality (!=) operator instead.
 instanceofisAlthough the instanceof operator is available, it only checks the prototype chain, which is not the primary inheritance mechanism in ActionScript 3.0. Use the is operator to check whether an object is a member of a specific data type.
 lt (less than (strings))RemovedUse the less than (<) operator instead.
 le (less than or equal to (strings))RemovedUse the less than or equal to (<=) operator instead.
 and (logical AND)RemovedUse the logical AND (&&) operator instead.
 not (logical NOT)RemovedUse the logical NOT (!) operator instead.
 or (logical OR)RemovedUse the logical OR (||) operator instead.
 ne (not equal (strings))RemovedUse the inequality (!=) operator instead.
 
 Statements
 deletedeleteThe delete operator works only on properties of objects, but not on variables that hold references to objects.
 importimportThe import statement is not optional. To use a class, you must import it, whether or not you use a fully qualified name.
 intrinsicRemovedActionScript 3.0 has a similar, but not identical, keyword named native. The native keyword is similar to intrinsic in that it directs the compiler not to expect a function body, but is dissimilar in that native has no effect on compile-time type checking.
 privateprivateThe ActionScript 3.0 private keyword specifies that an identifier is visible only within a class, and does not extend to subclasses. Moreover, in ActionScript 3.0 the private keyword is enforced at both compile time and run time.
 set variableRemovedUse the assignment (=) operator instead.
 supersuperIn ActionScript 3.0, the call to super() in a subclass constructor does not have to be the first statement in the constructor body.
 
 Accessibility classflash.accessibility.Accessibility 
 isActive() Method flash.accessibility.Accessibility.activeChanged from function to accessor property. Name changed from isActive to active.
 updateProperties() Method flash.accessibility.Accessibility.updateProperties() 
 
 arguments classarguments 
 caller Property RemovedYou can achieve the same functionality by passing arguments.callee from the caller function as an argument to the callee function. See the Examples section of arguments.callee for an example.
 
 Array class 
 CASEINSENSITIVE Constant Array.CASEINSENSITIVEData type changed to uint.
 DESCENDING Constant Array.DESCENDINGData type changed to uint.
 length Property Array.lengthData type changed to uint.
 NUMERIC Constant Array.NUMERICData type changed to uint.
 RETURNINDEXEDARRAY Constant Array.RETURNINDEXEDARRAYData type changed to uint.
 UNIQUESORT Constant Array.UNIQUESORTData type changed to uint.
 Array Constructor Array.Array()Parameter changed to use the ...(rest) parameter format.
 push() Method Array.push()Parameter changed to use the ...(rest) parameter format.
 sort() Method Array.sort()Data type of the options parameter changed to uint.
 sortOn() Method Array.sortOn()Data type of the options parameter changed to uint. The ActionScript 3.0 version also has added functionality; you can now sort on more than one field name by passing an array of objects for the fieldName parameter, and each sort field can have its own matching options parameter if you also pass in a matching array of options flags for the options parameter.
 splice() Method Array.splice()The parameters can have any data type, but the preferred data types are int and uint. The value parameter changed to the ...(rest) parameter format.
 unshift() Method Array.unshift()The value parameter changed to the ...(rest) format. Data type of the return value changed to uint.
 
 AsBroadcaster classflash.events.EventDispatcher 
 _listeners Property[read-only] flash.events.EventDispatcher.willTrigger()Not a direct equivalent. The willTrigger() method tells you whether any listeners are registered, but not how many.
 addListener() Method flash.events.EventDispatcher.addEventListener()Not a direct equivalent, because the ActionScript 3.0 event model lets you add event listeners to any object in the event flow, not just to the broadcasting object.
 broadcastMessage() Method flash.events.EventDispatcher.dispatchEvent()Not a direct equivalent, because the ActionScript 3.0 event model works differently. The dispatchEvent() method dispatches an event object into the event flow, while the broadcastMessage() method sends messages directly to each registered listener object.
 initialize() Method RemovedThere is no direct equivalent in ActionScript 3.0, but similar functionality is achieved by subclassing the EventDispatcher class. For example, the DisplayObject class extends EventDispatcher, so all instances of the DisplayObject and DisplayObject subclasses are capable of sending and receiving event objects.
 removeListener() Method flash.events.EventDispatcher.removeEventListener()Not a direct equivalent, because the ActionScript 3.0 event model lets you add event listeners to and remove them from any object in the event flow, not just the broadcasting object.
 
 BitmapData classflash.display.BitmapDataActionScript 3.0 uses the BitmapDataChannel class as an enumeration of constants that indicate which channel to use.
 height Property[read-only] flash.display.BitmapData.heightData type changed from Number to int.
 rectangle Property[read-only] flash.display.BitmapData.rectProperty renamed for consistency with other members of the API.
 width Property[read-only] flash.display.BitmapData.widthData type changed from Number to int.
 copyChannel() Method flash.display.BitmapData.copyChannel()The sourceChannel and destChannel parameters are now uint data types.
 draw() Method flash.display.BitmapData.draw()The source parameter is now IBitmapDrawable; DisplayObject and BitmapData both implement the IBitmapDrawable interface, so you can pass either a DisplayObject or a BitmapData object to the source parameter.
 fillRect() Method flash.display.BitmapData.fillRect()The color parameter is now a uint value.
 floodFill() Method flash.display.BitmapData.floodFill()Now accepts int values for the x and y parameters and a uint value for color.
 getColorBoundsRect() Method flash.display.BitmapData.getColorBoundsRect()Now accepts uint values for the mask and color parameters.
 getPixel() Method flash.display.BitmapData.getPixel()Now accepts int parameter values and returns a uint value.
 getPixel32() Method flash.display.BitmapData.getPixel32()Now accepts int parameter values and returns a uint value.
 hitTest() Method flash.display.BitmapData.hitTest()Now accepts uint values for the firstAlphaThreshold and secondAlphaThreshold parameters.
 loadBitmap() Method RemovedThis function is no longer needed because of the new bitmap support in ActionScript 3.0.
 merge() Method flash.display.BitmapData.merge()Now accepts uint values for the multiplier parameters.
 noise() Method flash.display.BitmapData.noise()Now accepts an int value for the randomSeed parameter and uint values for the low, high, and channelOptions parameters.
 perlinNoise() Method flash.display.BitmapData.perlinNoise()Now accepts an int value for the randomSeed parameter and uint values for the numOctaves and channelOptions parameters.
 pixelDissolve() Method flash.display.BitmapData.pixelDissolve()Now accepts an int value for the randomSeed and numPixels parameters and a uint value for the fillColor parameter. (The numPixels parameter is named numberOfPixels in ActionScript 2.0.)
 scroll() Method flash.display.BitmapData.scroll()Now accepts int values for the x and y parameters.
 setPixel() Method flash.display.BitmapData.setPixel()Now accepts int values for the x and y parameters and a uint value for color.
 setPixel32() Method flash.display.BitmapData.setPixel32()Now accepts int values for the x and y parameters and a unit value for color.
 threshold() Method flash.display.BitmapData.threshold()Now accepts uint values for the threshold, color, and mask parameters, and returns a uint value.
 
 BlurFilter class 
 quality Property flash.filters.BlurFilter.qualityThe quality property data type changed from a Number to uint.
 
 Button classflash.display.SimpleButton 
 _alpha Property flash.display.DisplayObject.alpha 
 blendMode Property flash.display.DisplayObject.blendMode 
 cacheAsBitmap Property flash.display.DisplayObject.cacheAsBitmap 
 enabled Property flash.display.SimpleButton.enabled 
 filters Property flash.display.DisplayObject.filtersIn ActionScript 3.0, the data type is Array.
 _focusrect Property flash.display.InteractiveObject.focusRect 
 _height Property flash.display.DisplayObject.height 
 _highquality Property RemovedSee Stage.quality.
 _name Property flash.display.DisplayObject.name 
 _parent Property flash.display.DisplayObject.parent 
 _quality Property RemovedYou can set rendering quality for all display objects by using flash.display.Stage.quality.
 _rotation Property flash.display.DisplayObject.rotation 
 scale9Grid Property flash.display.DisplayObject.scale9Grid 
 _soundbuftime Property flash.media.SoundMixer.bufferTimeMoved to the SoundMixer class, which is used for global sound control. Renamed without abbreviations. Removed the initial underscore from the name.
 tabEnabled Property flash.display.InteractiveObject.tabEnabled 
 tabIndex Property flash.display.InteractiveObject.tabIndex 
 _target Property[read-only] RemovedActionScript 3.0 identifies display objects directly; therefore, identifying a display object by its path is no longer necessary.
 trackAsMenu Property flash.display.SimpleButton.trackAsMenu 
 _url Property[read-only] RemovedSee DisplayObject.loaderInfo.url.
 useHandCursor Property flash.display.SimpleButton.useHandCursor 
 _visible Property flash.display.DisplayObject.visible 
 _width Property flash.display.DisplayObject.width 
 _x Property flash.display.DisplayObject.x 
 _xmouse Property[read-only] flash.display.DisplayObject.mouseX 
 _xscale Property flash.display.DisplayObject.scaleX 
 _y Property flash.display.DisplayObject.y 
 _ymouse Property[read-only] flash.display.DisplayObject.mouseY 
 _yscale Property flash.display.DisplayObject.scaleY 
 getDepth() Method flash.display.DisplayObjectContainer.getChildIndex()ActionScript 3.0 provides direct access to the display list, so depth is handled differently.
 onDragOut() EventHandler flash.display.InteractiveObject dispatches event: mouseOutReplaced in the new event model by a mouseOut event.
 onDragOver() EventHandler flash.display.InteractiveObject dispatches event: mouseOverReplaced in the new event model by a mouseOver event.
 onKeyDown() EventHandler flash.display.InteractiveObject dispatches event: keyDownReplaced in the new event model by a keyDown event.
 onKeyUp() EventHandler flash.display.InteractiveObject dispatches event: keyUpReplaced in the new event model by a keyUp event.
 onKillFocus() EventHandler flash.display.InteractiveObject dispatches event: focusOutReplaced in the new event model by a focusOut event.
 onPress() EventHandler flash.display.InteractiveObject dispatches event: mouseDownReplaced in the new event model by a mouseDown event.
 onRelease() EventHandler flash.display.InteractiveObject dispatches event: mouseUpReplaced in the new event model by a mouseUp event.
 onReleaseOutside() EventHandler flash.display.InteractiveObject dispatches event: mouseUpReplaced in the new event model by a mouseUp event.
 onRollOut() EventHandler flash.display.InteractiveObject dispatches event: mouseOutReplaced in the new event model by a mouseOut event.
 onRollOver() EventHandler flash.display.InteractiveObject dispatches event: mouseOverReplaced in the new event model by a mouseOver event.
 onSetFocus() EventHandler flash.display.InteractiveObject dispatches event: focusInReplaced in the new event model by a focusIn event.
 
 Camera classflash.media.Camera 
 activityLevel Property[read-only] flash.media.Camera.activityLevel 
 bandwidth Property[read-only] flash.media.Camera.bandwidth 
 currentFps Property[read-only] flash.media.Camera.currentFPSChange in capitalization of FPS.
 fps Property[read-only] flash.media.Camera.fps 
 height Property[read-only] flash.media.Camera.heightData type changed from Number to int.
 index Property[read-only] flash.media.Camera.indexData type changed from String to int.
 motionLevel Property[read-only] flash.media.Camera.motionLevelData type changed from Number to int.
 motionTimeOut Property[read-only] flash.media.Camera.motionTimeoutData type changed from Number to int.
 muted Property[read-only] flash.media.Camera.muted 
 name Property[read-only] flash.media.Camera.name 
 names Property[read-only] flash.media.Camera.names 
 quality Property[read-only] flash.media.Camera.qualityData type changed from Number to int.
 width Property[read-only] flash.media.Camera.widthData type changed from Number to int.
 get() Method flash.media.Camera.getCamera() 
 onActivity() EventHandler flash.events.ActivityEvent.ACTIVITY 
 onStatus() EventHandler flash.media.Camera dispatches event: statusReplaced in the new event model by a status StatusEvent object.
 setMode() Method flash.media.Camera.setMode()The width and height parameters changed to data type int.
 setMotionLevel() Method flash.media.Camera.setMotionLevel()Both parameters changed to data type int.
 setQuality() Method flash.media.Camera.setQuality()Both parameters changed to data type int.
 
 capabilities classflash.system.CapabilitiesThe class name changed from lowercase to initial capitalization.
 
 Color classflash.geom.ColorTransformThe Color class has been removed because all of its functionality can be achieved with the flash.geom.ColorTransform class. Color values can be assigned directly by using the ColorTransform class constructor or properties. ColorTransform objects can then be assigned to the colorTransform property of a Transform object, which in turn can be assigned to the transform property of a DisplayObject instance.
 Color Constructor flash.geom.ColorTransform.ColorTransform()Removed. You can specify color values by using the ColorTransform() constructor.
 getRGB() Method flash.geom.ColorTransform.colorThe RGB color value can be accessed by using the color accessor property of the ColorTransform class.
 getTransform() Method RemovedColor values can be assigned directly by using the ColorTransform() class constructor or properties.
 setRGB() Method flash.geom.ColorTransform.colorThe RGB color value can be set by using the color accessor property of the ColorTransform class.
 setTransform() Method RemovedColor values can be assigned directly by using the ColorTransform() class constructor or properties.
 
 ContextMenu classflash.ui.ContextMenuThe ContextMenu class is now part of the flash.ui package.
 builtInItems Property flash.ui.ContextMenu.builtInItems 
 customItems Property flash.ui.ContextMenu.customItems 
 ContextMenu Constructor flash.ui.ContextMenu.ContextMenu() 
 copy() Method flash.ui.ContextMenu.clone() 
 hideBuiltInItems() Method flash.ui.ContextMenu.hideBuiltInItems() 
 onSelect() EventHandler flash.ui.ContextMenu dispatches event: menuSelectInstead of invoking the onSelect() event handler, the ActionScript 3.0 class dispatches a menuSelect event.
 
 ContextMenuItem classflash.ui.ContextMenuItemThe ContextMenuItem class is now part of the flash.ui package.
 caption Property flash.ui.ContextMenuItem.caption 
 enabled Property flash.ui.ContextMenuItem.enabled 
 separatorBefore Property flash.ui.ContextMenuItem.separatorBefore 
 visible Property flash.ui.ContextMenuItem.visible 
 ContextMenuItem Constructor flash.ui.ContextMenuItem.ContextMenuItem() 
 copy() Method flash.ui.ContextMenuItem.clone() 
 onSelect() EventHandler flash.ui.ContextMenuItem dispatches event: menuItemSelectInstead of invoking the onSelect() event handler, the ActionScript 3.0 class dispatches a menuSelect event.
 
 ConvolutionFilter class 
 clone() Method flash.filters.ConvolutionFilter.clone()Now returns a BitmapFilter object.
 
 Date classDateActionScript 3.0 includes a new set of read accessors for all the methods that start with getxxx(). For example, in ActionScript 3.0, Date.getDate() and Date.date return the same value.
 getUTCYear() Method Date.getUTCFullYear()This method was removed because it is not part of ECMAScript. Use Date.getUTCFullYear() instead.
 getYear() Method Date.getFullYear()This method was removed because it is not part of ECMAScript. Use Date.getFullYear() instead.
 setYear() Method Date.setFullYear()This method was removed because it is not part of ECMAScript. Use Date.setFullYear() instead.
 
 DisplacementMapFilter classflash.filters.DisplacementMapFilterThe data type of several parameters changed from Number to uint.
 color Property flash.filters.DisplacementMapFilter.colorThe data type of this parameter is now uint.
 componentX Property flash.filters.DisplacementMapFilter.componentXThe data type of this parameter is now uint.
 componentY Property flash.filters.DisplacementMapFilter.componentYThe data type of this parameter is now uint.
 DisplacementMapFilter Constructor flash.filters.DisplacementMapFilter.DisplacementMapFilter()The data type of the componentX, componentY, and color parameters is now uint.
 clone() Method flash.filters.DisplacementMapFilter.clone()Now returns a BitmapFilter object.
 
 DropShadowFilter classflash.filters.DropShadowFilter 
 color Property flash.filters.DropShadowFilter.colorThe data type of this parameter changed from Number to uint.
 quality Property flash.filters.DropShadowFilter.qualityThe data type of this parameter changed from Number to uint.
 DropShadowFilter Constructor flash.filters.DropShadowFilter.DropShadowFilter()All parameters now have a default value, and some parameter types have changed.
 clone() Method flash.filters.DropShadowFilter.clone()Now returns a BitmapFilter object instead of a DropShadowFilter object.
 
 Error classErrorAdded a new getStackTrace() method to assist in debugging.
 
 ExternalInterface classflash.external.ExternalInterfaceParameters changed for two methods in this class.
 addCallback() Method flash.external.ExternalInterface.addCallback()The ActionScript 3.0 version of this method does not accept the instance parameter. The method parameter is replaced by a closure parameter, which can take a reference to a function, a class method, or a method of a particular class instance. In addition, if the calling code cannot access the closure reference for security reasons, a SecurityError exception is thrown.
 call() Method flash.external.ExternalInterface.call()If a problem occurs, the ActionScript 3.0 version of this method throws an Error or SecurityError exception, in addition to returning null.
 
 FileReference classflash.net.FileReferenceThe ActionScript 3.0 version inherits the addEventListener() and removeEventListener() methods from the EventDispatcher class. Dispatched events replace the event handler functions.
 postData Property flash.net.URLRequest.dataThe postData property is added to ActionScript 2.0 in Flash Player 9 to send POST data with the file upload or download. In ActionScript 3.0, use the data property of the URLRequest class to send either POST or GET data. See flash.net.URLRequest.data in this language reference for details.
 size Property[read-only] flash.net.FileReference.sizeReturns a uint data type instead of a Number data type.
 addListener() Method flash.events.EventDispatcher.addEventListener()In the new event model, there is no need to have a class-specific addListener() method, because the class inherits the addEventListener() method from the EventDispatcher class.
 browse() Method flash.net.FileReference.browse()In ActionScript 2.0, returns false when there is an error. In ActionScript 3.0, throws an IllegalOperationError or ArgumentError exception. However, the method still returns false if the parameters are invalid, the file-browsing dialog box does not open, or another browser session is in progress. Also, the typelist parameter changed. In ActionScript 2.0, you can pass the browse() method an array of strings to specify a file filter. In ActionScript 3.0, you pass an array of FileFilter objects.
 download() Method flash.net.FileReference.download()When an error occurs, throws exceptions instead of returning false. The data type for the first parameter has changed. In ActionScript 2.0, the first parameter you pass to download() is a string. In ActionScript 3.0, you pass a URLRequest object.
 removeListener() Method flash.events.EventDispatcher.removeEventListener()In the new event model, there is no need to have a class-specific removeListener() method, because the class inherits the removeEventListener() method from the EventDispatcher class.
 upload() Method flash.net.FileReference.upload()Various changes have occurred:
  • The data type for the first parameter has changed. In ActionScript 2.0, the first parameter you pass to upload() is a string. In ActionScript 3.0, you pass a URLRequest object.
  • In ActionScript 3.0, there is a new second parameter, uploadDataFieldName, which is the field name that precedes the file data in the upload POST operation.
  • In ActionScript 3.0, there is a new third parameter, testUpload, that lets you control whether Flash Player performs a test upload before uploading the file.
  • When an error occurs, browse() throws exceptions instead of returning false.
 onCancel Listener flash.net.FileReference dispatches event: cancelIn ActionScript 3.0, instead of invoking the onCancel() event handler, this class dispatches an event named cancel.
 onComplete Listener flash.net.FileReference dispatches event: completeIn ActionScript 3.0, instead of invoking the onComplete() event handler, this class dispatches an event named complete.
 onHTTPError Listener flash.net.FileReference dispatches event: httpStatusIn ActionScript 3.0, instead of invoking the onHTTPError() event handler, this class dispatches an event named httpStatus.
 onIOError Listener flash.net.FileReference dispatches event: ioErrorIn ActionScript 3.0, instead of invoking the onIOError() event handler, this class dispatches an event named ioError.
 onOpen Listener flash.net.FileReference dispatches event: openIn ActionScript 3.0, instead of invoking the onOpen() event handler, this class dispatches an event named open.
 onProgress Listener flash.net.FileReference dispatches event: progressIn ActionScript 3.0, instead of invoking the onProgress() event handler, this class dispatches an event named progress.
 onSecurityError Listener flash.net.FileReference dispatches event: securityErrorIn ActionScript 3.0, instead of invoking the onSecurityError() event handler, this class dispatches an event named securityError.
 onSelect Listener flash.net.FileReference dispatches event: selectIn ActionScript 3.0, instead of invoking the onSelect() event handler, this class dispatches an event named select.
 onUploadCompleteData flash.net.FileReference dispatches event: completeIn ActionScript 3.0, instead of invoking the onUploadCompleteData() event handler, this class dispatches an event named uploadCompleteData.
 
 FileReferenceList classflash.net.FileReferenceListThe ActionScript 3.0 class inherits the addEventListener() and removeEventListener() methods from the EventDispatcher class. Instead of the onCancel() and onSelect() event handlers, the ActionScript 3.0 class uses events named cancel and select.
 addListener() Method flash.events.EventDispatcher.addEventListener()In the new event model, there is no need to have a class-specific addListener() method, because the class inherits the addEventListener() method from the EventDispatcher class.
 browse() Method flash.net.FileReferenceList.browse()In ActionScript 3.0, instead of returning false when there is an error, this method throws an IllegalOperationError exception. Also, the typelist parameter changed. In ActionScript 2.0, you can pass the browse() method an array of strings to specify a file filter. In ActionScript 3.0, you pass an array of FileFilter objects.
 removeListener() Method flash.events.EventDispatcher.removeEventListener()In the new event model, there is no need to have a class-specific removeListener() method, because the class inherits the removeEventListener() method from the EventDispatcher class.
 onCancel Listener flash.net.FileReferenceList dispatches event: cancelIn ActionScript 3.0, instead of invoking the onCancel() event handler, this class dispatches an event named cancel.
 onSelect Listener flash.net.FileReferenceList dispatches event: selectIn ActionScript 3.0, instead of invoking the onSelect() event handler, this class dispatches an event named select.
 
 GlowFilter classflash.filters.GlowFilterThe data type of several properties changed from Number to unit.
 color Property flash.filters.GlowFilter.colorThe data type of this property changed from Number to unit.
 quality Property flash.filters.GlowFilter.qualityThe data type of this property changed from Number to unit.
 GlowFilter Constructor flash.filters.GlowFilter.GlowFilter()The color and quality parameters are now uint and int data types, respectively, instead of Number. All parameters are now assigned a default value.
 clone() Method flash.filters.GlowFilter.clone()Returns a BitmapFilter object instead of a GlowFilter object.
 
 GradientBevelFilter classflash.filters.GradientBevelFilter 
 quality Property flash.filters.GradientBevelFilter.qualityThe data type of this property changed from Number to int.
 clone() Method flash.filters.GradientBevelFilter.clone()Returns a BitmapFilter object instead of a GradientBevelFilter object.
 
 GradientGlowFilter classflash.filters.GradientGlowFilter 
 quality Property flash.filters.GradientGlowFilter.qualityThe data type of this property changed from Number to int.
 GradientGlowFilter Constructor flash.filters.GradientGlowFilter.GradientGlowFilter()Default values added to all parameters and the data type of the quality parameter changed from Number to int.
 clone() Method flash.filters.GradientGlowFilter.clone()Returns a BitmapFilter object instead of a GradientGlowFilter object.
 
 IME classflash.system.IMEThis class has been moved to the flash.system package.
 ALPHANUMERIC_FULL Constant flash.system.IMEConversionMode.ALPHANUMERIC_FULL 
 ALPHANUMERIC_HALF Constant flash.system.IMEConversionMode.ALPHANUMERIC_HALF 
 CHINESE Constant flash.system.IMEConversionMode.CHINESE 
 JAPANESE_HIRAGANA Constant flash.system.IMEConversionMode.JAPANESE_HIRAGANA 
 JAPANESE_KATAKANA_FULL Constant flash.system.IMEConversionMode.JAPANESE_KATAKANA_FULL 
 JAPANESE_KATAKANA_HALF Constant flash.system.IMEConversionMode.JAPANESE_KATAKANA_HALF 
 KOREAN Constant flash.system.IMEConversionMode.KOREAN 
 UNKNOWN Constant flash.system.IMEConversionMode.UNKNOWN 
 addListener() Method flash.events.EventDispatcher.addEventListener()In the new event model, there is no need to have a class-specific addListener() method, because the class inherits the addEventListener() method from the EventDispatcher class.
 getConversionMode() Method flash.system.IME.conversionModeChanged to an accessor property.
 getEnabled() Method flash.system.IME.enabledChanged to an accessor property.
 removeListener() Method flash.events.EventDispatcher.removeEventListener()In the new event model, there is no need to have a class-specific removeListener() method, because the class inherits the removeEventListener() method from the EventDispatcher class.
 setConversionMode() Method flash.system.IME.conversionModeChanged to an accessor property.
 setEnabled() Method flash.system.IME.enabledChanged to an accessor property.
 onIMEComposition Listener flash.system.IME dispatches event: imeCompositionIn ActionScript 3.0, instead of invoking the onIMEComposition() event handler, this class dispatches an event named imeComposition.
 
 Key classflash.ui.KeyboardThis class has a new name in ActionScript 3.0 to match other classes that pertain to the Keyboard class, such as KeyboardEvent.
 BACKSPACE Constant flash.ui.Keyboard.BACKSPACEDeclared as a constant in ActionScript 3.0 and data type changed to unit.
 CAPSLOCK Constant flash.ui.Keyboard.CAPS_LOCKDeclared as a constant in ActionScript 3.0, underscore added, and data type changed to uint.
 CONTROL Constant flash.ui.Keyboard.CONTROLDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 DELETEKEY Constant flash.ui.Keyboard.DELETEName changed to DELETE in ActionScript 3.0, declared as a constant, and data type changed to uint.
 DOWN Constant flash.ui.Keyboard.DOWNDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 END Constant flash.ui.Keyboard.ENDDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 ENTER Constant flash.ui.Keyboard.ENTERDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 ESCAPE Constant flash.ui.Keyboard.ESCAPEDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 HOME Constant flash.ui.Keyboard.HOMEDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 INSERT Constant flash.ui.Keyboard.INSERTDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 LEFT Constant flash.ui.Keyboard.LEFTDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 _listeners Property[read-only] flash.events.EventDispatcher.willTrigger()Not a direct equivalent. The willTrigger() method tells you whether any listeners are registered, but not how many.
 PGDN Constant flash.ui.Keyboard.PAGE_DOWNName changed to PAGE_DOWN in ActionScript 3.0, declared as a constant, and data type changed to uint.
 PGUP Constant flash.ui.Keyboard.PAGE_UPName changed to PAGE_UP in ActionScript 3.0, declared as a constant, and data type changed to uint.
 RIGHT Constant flash.ui.Keyboard.RIGHTDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 SHIFT Constant flash.ui.Keyboard.SHIFTDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 SPACE Constant flash.ui.Keyboard.SPACEDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 TAB Constant flash.ui.Keyboard.TABDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 UP Constant flash.ui.Keyboard.UPDeclared as a constant in ActionScript 3.0 and data type changed to uint.
 addListener() Method flash.events.EventDispatcher.addEventListener()In ActionScript 3.0, there is no need to have a class-specific addListener() method, because all display objects inherit the addEventListener() method from the EventDispatcher class.
 getAscii() Method flash.events.KeyboardEvent.charCode 
 getCode() Method flash.events.KeyboardEvent.keyCode 
 isAccessible() Method flash.ui.Keyboard.isAccessible() 
 isDown() Method RemovedRemoved for security reasons.
 isToggled() Method RemovedRemoved for security reasons.
 removeListener() Method flash.events.EventDispatcher.removeEventListener()In ActionScript 3.0, there is no need to have a class-specific removeListener() method, because all display objects inherit the removeEventListener() method from the EventDispatcher class.
 onKeyDown Listener flash.display.InteractiveObject dispatches event: keyDownIn ActionScript 3.0, instead of invoking the onKeyDown event handler, the InteractiveObject class dispatches a keyDown KeyboardEvent object.
 onKeyUp Listener flash.display.InteractiveObject dispatches event: keyUpIn ActionScript 3.0, instead of invoking the onKeyUp event handler, the InteractiveObject class dispatches a keyUp KeyboardEvent object.
 
 LoadVars classflash.net.URLLoaderThe LoadVars class functionality is replaced by the URLLoader, URLRequest, URLStream, and URLVariables classes.
 contentType Property flash.net.URLRequest.contentType 
 loaded Property RemovedThere is no corresponding Boolean property in ActionScript 3.0, but you can use flash.events.Event.COMPLETE to set up listeners that receive notification when data is loaded.
 LoadVars Constructor flash.net.URLLoader.URLLoader() 
 addRequestHeader() Method flash.net.URLRequestHeader 
 decode() Method flash.net.URLVariables.decode() 
 getBytesLoaded() Method flash.net.URLLoader.bytesLoadedClass changed to URLLoader; changed from function to property accessor; and name changed from getBytesLoaded to bytesLoaded.
 getBytesTotal() Method flash.net.URLLoader.bytesTotalClass changed to URLLoader; changed from function to property accessor; and name changed from getBytesTotal to bytesTotal.
 load() Method flash.net.URLLoader.load() 
 onData() EventHandler flash.net.URLLoader dispatches event: completeSee the URLLoader class. A complete event is dispatched when the download operation is complete but before any data is parsed.
 onHTTPStatus() EventHandler flash.net.URLLoader dispatches event: httpStatusIn ActionScript 3.0, instead of invoking the onHTTPStatus event handler, the URLLoader class dispatches an HTTPStatusEvent object named httpStatus.
 onLoad() EventHandler flash.net.URLLoader dispatches event: completeSee the URLLoader class. A complete event is dispatched when the download operation is complete.
 send() Method flash.net.sendToURL() 
 sendAndLoad() Method flash.net.sendToURL()The sendToURL() method sends a URL request to the server, but ignores the response. To receive the response, use flash.net.sendToURL().
 toString() Method RemovedThis method is no longer necessary in ActionScript 3.0.
 
 LocalConnection classflash.net.LocalConnectionThis class has been moved to the flash.net package.
 LocalConnection Constructor flash.net.LocalConnection.LocalConnection() 
 allowDomain() EventHandler flash.net.LocalConnection.allowDomain()Changed to a regular method in ActionScript 3.0, no longer an event handler. Parameter changed to use the ...(rest) parameter format. Return value changed to void.
 allowInsecureDomain() EventHandler flash.net.LocalConnection.allowInsecureDomain()Changed to a regular method in ActionScript 3.0, no longer an event handler. Parameter changed to use the ...(rest) parameter format. Return value changed to void.
 close() Method flash.net.LocalConnection.close() 
 connect() Method flash.net.LocalConnection.connect() 
 domain() Method flash.net.LocalConnection.domainChanged to a property accessor.
 onStatus() EventHandler flash.net.LocalConnection dispatches event: statusIn the new event model, callback functions are replaced by event objects.
 send() Method flash.net.LocalConnection.send()Third parameter changed to use the ...(rest) parameter format. Return type changed to void.
 
 Microphone classflash.media.MicrophoneThis class has been moved to the flash.media package.
 index Property[read-only] flash.media.Microphone.indexData type changed to uint.
 rate Property[read-only] flash.media.Microphone.rateData type changed to uint.
 silenceTimeOut Property[read-only] flash.media.Microphone.silenceTimeoutChange in capitalization to "Timeout." Data type changed to int.
 get() Method flash.media.Microphone.getMicrophone()Name changed from get() to getMicrophone(). Data type of parameter changed to uint.
 onActivity() EventHandler flash.media.Microphone dispatches event: activityIn ActionScript 3.0, instead of invoking the onActivity event handler, this class dispatches an activity event.
 onStatus() EventHandler flash.media.Microphone dispatches event: statusIn ActionScript 3.0, instead of invoking the onStatus event handler, this class dispatches a status event.
 setGain() Method flash.media.Microphone.gainCombined gain property and setGain() method into a get/set property accessor named gain. Data type changed to uint.
 setRate() Method flash.media.Microphone.rateCombined rate property and setRate() method into a get/set property accessor named rate. Data type changed to uint.
 setSilenceLevel() Method flash.media.Microphone.setSilenceLevel()Data type of timeOut parameter changed to int. Capitalization of the timeOut parameter changed to timeout.
 setUseEchoSuppression() Method flash.media.Microphone.setUseEchoSuppression() 
 
 Mouse classflash.ui.Mouse 
 addListener() Method flash.events.EventDispatcher.addEventListener()In the new ActionScript 3.0 event model, there is no need to have a class-specific addListener() method, because all display objects inherit the addEventListener() method from the EventDispatcher class.
 hide() Method flash.ui.Mouse.hide()Changed to return void.
 removeListener() Method flash.events.EventDispatcher.removeEventListener()In the new ActionScript 3.0 event model, there is no need to have a class-specific removeListener() method, because all display objects inherit the removeEventListener() method from the EventDispatcher class.
 show() Method flash.ui.Mouse.show()Changed to return void.
 onMouseDown Listener flash.display.InteractiveObject dispatches event: mouseDownReplaced in the new event model by a mouseDown event.
 onMouseMove Listener flash.display.InteractiveObject dispatches event: mouseMoveReplaced in the new event model by a mouseMove event.
 onMouseUp Listener flash.display.InteractiveObject dispatches event: mouseUpReplaced in the new event model by a mouseUp event.
 onMouseWheel Listener flash.display.InteractiveObject dispatches event: mouseWheelReplaced in the new event model by a mouseWheel event.
 
 MovieClip classflash.display.MovieClipMany of the MovieClip methods have been moved to other classes in ActionScript 3.0. All event handlers have been replaced by event objects in the new event model.
 _alpha Property flash.display.DisplayObject.alphaMoved to DisplayObject class and removed initial underscore from name.
 blendMode Property flash.display.DisplayObject.blendMode 
 cacheAsBitmap Property flash.display.DisplayObject.cacheAsBitmap 
 _currentframe Property[read-only] flash.display.MovieClip.currentFrameRemoved initial underscore from name.
 _droptarget Property[read-only] flash.display.Sprite.dropTargetMoved to Sprite class, removed initial underscore from name, and changed to mixed case.
 filters Property flash.display.DisplayObject.filters 
 focusEnabled Property RemovedIn ActionScript 3.0, all interactive objects are focus enabled; therefore, this property is no longer needed.
 _focusrect Property flash.display.InteractiveObject.focusRectMoved to InteractiveObject class, removed initial underscore from name, and changed to mixed case.
 _framesloaded Property[read-only] flash.display.MovieClip.framesLoadedRemoved initial underscore from name and changed to mixed case.
 _height Property flash.display.DisplayObject.heightMoved to DisplayObject class and removed initial underscore from name.
 _highquality Property RemovedSee Stage.quality.
 hitArea Property flash.display.Sprite.hitAreaMoved to Sprite class.
 _lockroot Property RemovedIn ActionScript 3.0, the root of a display object is set automatically; therefore, the _lockroot property is effectively always on. See flash.display.DisplayObject.root for details.
 menu Property RemovedSee InteractiveObject.contextMenu.
 _name Prope