6
ActionScript 3.0 www.actionscriptcheatsheet.com [email protected] AS3 Migration Global functions asfunction call() chr() clearInterval() clearTimeout() duplicateMovieClip() eval() fscommand() getProperty() getTimer() getURL() getVersion() gotoAndPlay() gotoAndStop() ifFrameLoaded() int() length() loadMovie() loadMovieNum() loadVariables() loadVariablesNum() mbchr() mblength() mbord() mbsubstring() nextFrame() nextScene() on() onClipEvent() ord() parseInt() play() prevFrame() prevScene() print() printAsBitmap() printAsBitmapNum() printNum() random() removeMovieClip() setInterval() setProperty() setTimeout() showRedrawRegions() startDrag() stop() stopAllSounds() stopDrag() substring() targetPath() tellTarget() toggleHighQuality() trace() unloadMovie() unloadMovieNum() updateAfterEvent() flash.text.TextField dispatches event: link Removed Removed flash.utils.clearInterval() flash.utils.clearTimeout() flash.display.MovieClip.MovieClip() Removed flash.system.fscommand() Removed flash.utils.getTimer() flash.net.navigateToURL() flash.system.Capabilities.version flash.display.MovieClip.gotoAndPlay() flash.display.MovieClip.gotoAndStop() flash.display.MovieClip.framesLoaded int() String.length flash.display.Loader flash.display.Loader flash.net.URLLoader flash.net.URLLoader String.fromCharCode() String.length String.charCodeAt() String.substr() flash.display.MovieClip.nextFrame() flash.display.MovieClip.nextScene() flash.events.EventDispatcher flash.events.EventDispatcher String parseInt() flash.display.MovieClip.play() flash.display.MovieClip.prevFrame() flash.display.MovieClip.prevScene() flash.printing.PrintJob flash.printing.PrintJob flash.printing.PrintJob flash.printing.PrintJob Math.random() Removed flash.utils.setInterval() Removed flash.utils.setTimeout() flash.profiler.showRedrawRegions() flash.display.Sprite.startDrag() flash.display.MovieClip.stop() flash.media.SoundMixer.stopAll() flash.display.Sprite.stopDrag() String.substring() Removed Removed flash.display.Stage.quality trace() flash.display.Loader.unload() flash.display.Loader.unload() flash.events.TimerEvent.updateAfterEvent() AS3 Global properties _accProps _focusrect _global _highquality _level maxscroll _parent _quality _root scroll _soundbuftime this flash.accessibility.AccessibilityProperties flash.display.InteractiveObject.focusRect Removed flash.display.Stage.quality Removed flash.text.TextField flash.display.DisplayObject.parent flash.display.Stage.quality flash.display.DisplayObject.stage flash.text.TextField flash.media.SoundMixer.bufferTime this AS3 Accessibility class isActive() updateProperties() flash.accessibility.Accessibility.active flash.accessibility.Accessibility.updateProperties() Array class CASEINSENSITIVE Constant DESCENDING Constant length Property NUMERIC Constant RETURNINDEXEDARRAY:Cnst UNIQUESORT Constant Array Constructor push() Method sort() Method sortOn() Method splice() Method unshift() Method Array.CASEINSENSITIVE Array.DESCENDING Array.length Array.NUMERIC Array.RETURNINDEXEDARRAY Array.UNIQUESORT Array.Array() Array.push() Array.sort() Array.sortOn() Array.splice() Array.unshift() AsBroadcaster class _listeners Property[read-only] addListener() Method broadcastMessage() Method initialize() Method removeListener() Method flash.events.EventDispatcher.willTrigger() flash.events.EventDispatcher.addEventListener() flash.events.EventDispatcher.dispatchEvent() Removed flash.events.EventDispatcher.removeEventListener() BitmapData class height Property[read-only] rectangle Property[read-only] width Property[read-only] copyChannel() Method draw() Method fillRect() Method floodFill() Method getColorBoundsRect() Method getPixel() Method getPixel32() Method hitTest() Method loadBitmap() Method merge() Method noise() Method perlinNoise() Method pixelDissolve() Method scroll() Method setPixel() Method setPixel32() Method threshold() Method flash.display.BitmapData.height flash.display.BitmapData.rect flash.display.BitmapData.width flash.display.BitmapData.copyChannel() flash.display.BitmapData.draw() flash.display.BitmapData.fillRect() flash.display.BitmapData.floodFill() flash.display.BitmapData.getColorBoundsRect() flash.display.BitmapData.getPixel() flash.display.BitmapData.getPixel32() flash.display.BitmapData.hitTest() Removed flash.display.BitmapData.merge() flash.display.BitmapData.noise() flash.display.BitmapData.perlinNoise() flash.display.BitmapData.pixelDissolve() flash.display.BitmapData.scroll() flash.display.BitmapData.setPixel() flash.display.BitmapData.setPixel32() flash.display.BitmapData.threshold() BlurFilter class quality Property flash.filters.BlurFilter.quality flash.accessibility.Accessibility flash.events.EventDispatcher flash.display.BitmapData capabilities class flash.system.Capabilities Color class flash.geom.ColorTransform Color Constructor getRGB() Method getTransform() Method setRGB() Method setTransform() Method flash.geom.ColorTransform.ColorTransform() flash.geom.ColorTransform.color Removed flash.geom.ColorTransform.color Removed ConvolutionFilter class clone() Method flash.filters.ConvolutionFilter.clone() Date class getUTCYear() Method getYear() Method setYear() Method Date.getUTCFullYear() Date.getFullYear() Date.setFullYear() Date AS2 AS2 Operators add eq gt ge <> instanceof lt le and not or ne Removed Removed Removed Removed Removed is Removed Removed Removed Removed Removed Removed AS3 Compiler Directives #endinitclip #include #initclip Removed Removed Removed Constants false NaN newline null undefined false NaN Removed null undefined Statements delete import intrinsic private set variable super delete import Removed private Removed super arguments class caller Property Removed AS2 AS3 AS2 AS3 AS2

ActionScript 3 Migration Cheat sheet

Embed Size (px)

Citation preview

Page 1: ActionScript 3 Migration Cheat sheet

ActionScript [email protected]

AS3 Migration

Global functionsasfunctioncall()chr()clearInterval()clearTimeout()duplicateMovieClip()eval()fscommand()getProperty()getTimer()getURL()getVersion()gotoAndPlay()gotoAndStop()ifFrameLoaded()int()length()loadMovie()loadMovieNum()loadVariables()loadVariablesNum()mbchr()mblength()mbord()mbsubstring()nextFrame()nextScene()on()onClipEvent()ord()parseInt()play()prevFrame()prevScene()print()printAsBitmap()printAsBitmapNum()printNum()random()removeMovieClip()setInterval()setProperty()setTimeout()showRedrawRegions()startDrag()stop()stopAllSounds()stopDrag()substring()targetPath()tellTarget()toggleHighQuality()trace()unloadMovie()unloadMovieNum()updateAfterEvent()

flash.text.TextField dispatches event: linkRemovedRemovedflash.utils.clearInterval()flash.utils.clearTimeout()flash.display.MovieClip.MovieClip()Removedflash.system.fscommand()Removedflash.utils.getTimer()flash.net.navigateToURL()flash.system.Capabilities.versionflash.display.MovieClip.gotoAndPlay()flash.display.MovieClip.gotoAndStop()flash.display.MovieClip.framesLoadedint()String.lengthflash.display.Loaderflash.display.Loaderflash.net.URLLoaderflash.net.URLLoaderString.fromCharCode()String.lengthString.charCodeAt()String.substr()flash.display.MovieClip.nextFrame()flash.display.MovieClip.nextScene()flash.events.EventDispatcherflash.events.EventDispatcherStringparseInt()flash.display.MovieClip.play()flash.display.MovieClip.prevFrame()flash.display.MovieClip.prevScene()flash.printing.PrintJobflash.printing.PrintJobflash.printing.PrintJobflash.printing.PrintJobMath.random()Removedflash.utils.setInterval()Removedflash.utils.setTimeout()flash.profiler.showRedrawRegions()flash.display.Sprite.startDrag()flash.display.MovieClip.stop()flash.media.SoundMixer.stopAll()flash.display.Sprite.stopDrag()String.substring()RemovedRemovedflash.display.Stage.qualitytrace()flash.display.Loader.unload()flash.display.Loader.unload()flash.events.TimerEvent.updateAfterEvent()

AS3

Global properties_accProps_focusrect_global_highquality_levelmaxscroll_parent_quality_rootscroll_soundbuftimethis

flash.accessibility.AccessibilityPropertiesflash.display.InteractiveObject.focusRectRemovedflash.display.Stage.qualityRemovedflash.text.TextFieldflash.display.DisplayObject.parentflash.display.Stage.qualityflash.display.DisplayObject.stageflash.text.TextFieldflash.media.SoundMixer.bufferTimethis

AS2

AS3

Accessibility classisActive()updateProperties()

flash.accessibility.Accessibility.activeflash.accessibility.Accessibility.updateProperties()

Array classCASEINSENSITIVE ConstantDESCENDING Constantlength PropertyNUMERIC ConstantRETURNINDEXEDARRAY:CnstUNIQUESORT ConstantArray Constructorpush() Methodsort() MethodsortOn() Methodsplice() Methodunshift() Method

Array.CASEINSENSITIVEArray.DESCENDINGArray.lengthArray.NUMERICArray.RETURNINDEXEDARRAYArray.UNIQUESORTArray.Array()Array.push()Array.sort()Array.sortOn()Array.splice()Array.unshift()

AsBroadcaster class_listeners Property[read-only]addListener() MethodbroadcastMessage() Methodinitialize() MethodremoveListener() Method

flash.events.EventDispatcher.willTrigger()flash.events.EventDispatcher.addEventListener()flash.events.EventDispatcher.dispatchEvent()Removedflash.events.EventDispatcher.removeEventListener()

BitmapData classheight Property[read-only]rectangle Property[read-only]width Property[read-only]copyChannel() Methoddraw() MethodfillRect() MethodfloodFill() MethodgetColorBoundsRect() MethodgetPixel() MethodgetPixel32() MethodhitTest() MethodloadBitmap() Methodmerge() Methodnoise() MethodperlinNoise() MethodpixelDissolve() Methodscroll() MethodsetPixel() MethodsetPixel32() Methodthreshold() Method

flash.display.BitmapData.heightflash.display.BitmapData.rectflash.display.BitmapData.widthflash.display.BitmapData.copyChannel()flash.display.BitmapData.draw()flash.display.BitmapData.fillRect()flash.display.BitmapData.floodFill()flash.display.BitmapData.getColorBoundsRect()flash.display.BitmapData.getPixel()flash.display.BitmapData.getPixel32()flash.display.BitmapData.hitTest()Removedflash.display.BitmapData.merge()flash.display.BitmapData.noise()flash.display.BitmapData.perlinNoise()flash.display.BitmapData.pixelDissolve()flash.display.BitmapData.scroll()flash.display.BitmapData.setPixel()flash.display.BitmapData.setPixel32()flash.display.BitmapData.threshold()

BlurFilter classquality Property flash.filters.BlurFilter.quality

flash.accessibility.Accessibility

flash.events.EventDispatcher

flash.display.BitmapData

capabilities class flash.system.Capabilities

Color class flash.geom.ColorTransformColor ConstructorgetRGB() MethodgetTransform() MethodsetRGB() MethodsetTransform() Method

flash.geom.ColorTransform.ColorTransform()flash.geom.ColorTransform.colorRemovedflash.geom.ColorTransform.colorRemoved

ConvolutionFilter classclone() Method flash.filters.ConvolutionFilter.clone()

Date classgetUTCYear() MethodgetYear() MethodsetYear() Method

Date.getUTCFullYear()Date.getFullYear()Date.setFullYear()

Date

AS2

AS2

AS2

Operatorsaddeqgtge<>instanceofltleandnotorne

RemovedRemovedRemovedRemovedRemovedisRemovedRemovedRemovedRemovedRemovedRemoved

AS3Compiler Directives#endinitclip#include#initclip

RemovedRemovedRemoved

ConstantsfalseNaNnewlinenullundefined

falseNaNRemovednullundefined

Statementsdeleteimportintrinsicprivateset variablesuper

deleteimportRemovedprivateRemovedsuper

arguments classcaller Property Removed

AS2

AS2

AS3

AS2

AS2

AS2

AS3

AS2

AS2

Page 2: ActionScript 3 Migration Cheat sheet

Act

ionS

crip

t 3.0

ww

w.a

ctio

nscr

iptc

heat

shee

t.com

info

@se

anth

efla

shgu

y.co

mAS3

Button class flash.display.SimpleButton

Error class ErrorExternalInterface classaddCallback() Methodcall() Method

flash.external.ExternalInterface.addCallback()flash.external.ExternalInterface.call()

flash.external.ExternalInterface

postData Propertysize Property[read-only]addListener() Methodbrowse() Methoddownload() MethodremoveListener() Methodupload() MethodonCancel ListeneronComplete ListeneronHTTPError ListeneronIOError ListeneronOpen ListeneronProgress ListeneronSecurityError ListeneronSelect ListeneronUploadCompleteData

flash.net.URLRequest.dataflash.net.FileReference.sizeflash.events.EventDispatcher.addEventListener()flash.net.FileReference.browse()flash.net.FileReference.download()flash.events.EventDispatcher.removeEventListener()flash.net.FileReference.upload()flash.net.FileReference dispatches event: cancelflash.net.FileReference dispatches event: completeflash.net.FileReference dispatches event: httpStatusflash.net.FileReference dispatches event: ioErrorflash.net.FileReference dispatches event: openflash.net.FileReference dispatches event: progressflash.net.FileReference dispatches event: securityErrorflash.net.FileReference dispatches event: selectflash.net.FileReference dispatches event: complete

FileReferenceList classaddListener() Methodbrowse() MethodremoveListener() MethodonCancel ListeneronSelect Listener

flash.events.EventDispatcher.addEventListener()flash.net.FileReferenceList.browse()flash.events.EventDispatcher.removeEventListener()flash.net.FileReferenceList dispatches event: cancelflash.net.FileReferenceList dispatches event: select

flash.net.FileReferenceList

GlowFilter classcolor Propertyquality PropertyGlowFilter Constructorclone() Method

flash.filters.GlowFilter.colorflash.filters.GlowFilter.qualityflash.filters.GlowFilter.GlowFilter()flash.filters.GlowFilter.clone()

flash.filters.GlowFilter

GradientBevelFilter classquality Propertyclone() Method

flash.filters.GradientBevelFilter.qualityflash.filters.GradientBevelFilter.clone()

flash.filters.GradientBevelFilter

GradientGlowFilter classquality PropertyGradientGlowFilter Constructorclone() Method

flash.filters.GradientGlowFilter.qualityflash.filters.GradientGlowFilter.GradientGlowFilter()flash.filters.GradientGlowFilter.clone()

flash.filters.GradientGlowFilter

Camera classactivityLevel Property[read-only]bandwidth Property[read-only]currentFps Property[read-only]fps Property[read-only]height Property[read-only]index Property[read-only]motionLevel Property[read-only]motionTimeOut Property[read-only]muted Property[read-only]name Property[read-only]names Property[read-only]quality Property[read-only]width Property[read-only]get() MethodonActivity() EventHandleronStatus() EventHandlersetMode() MethodsetMotionLevel() MethodsetQuality() Method

flash.media.Camera.activityLevelflash.media.Camera.bandwidthflash.media.Camera.currentFPSflash.media.Camera.fpsflash.media.Camera.heightflash.media.Camera.indexflash.media.Camera.motionLevelflash.media.Camera.motionTimeoutflash.media.Camera.mutedflash.media.Camera.nameflash.media.Camera.namesflash.media.Camera.qualityflash.media.Camera.widthflash.media.Camera.getCamera()flash.events.ActivityEvent.ACTIVITYflash.media.Camera dispatches event: statusflash.media.Camera.setMode()flash.media.Camera.setMotionLevel()flash.media.Camera.setQuality()

flash.media.Camera

ContextMenu classbuiltInItems PropertycustomItems PropertyContextMenu Constructorcopy() MethodhideBuiltInItems() MethodonSelect() EventHandler

flash.ui.ContextMenu.builtInItemsflash.ui.ContextMenu.customItemsflash.ui.ContextMenu.ContextMenu()flash.ui.ContextMenu.clone()flash.ui.ContextMenu.hideBuiltInItems()flash.ui.ContextMenu dispatches event: menuSelect

flash.ui.ContextMenu

AS2

_alpha PropertyblendMode PropertycacheAsBitmap Propertyenabled Propertyfilters Property_focusrect Property_height Property_highquality Property_name Property_parent Property_quality Property_rotation Propertyscale9Grid Property_soundbuftime PropertytabEnabled PropertytabIndex Property_target Property[read-only]trackAsMenu Property_url Property[read-only]useHandCursor Property_visible Property_width Property_x Property_xmouse Property[read-only]_xscale Property_y Property_ymouse Property[read-only]_yscale PropertygetDepth() MethodonDragOut() EventHandleronDragOver() EventHandleronKeyDown() EventHandleronKeyUp() EventHandleronKillFocus() EventHandleronPress() EventHandleronRelease() EventHandleronReleaseOutside() EventHandleronRollOut() EventHandleronRollOver() EventHandleronSetFocus() EventHandler

flash.display.DisplayObject.alphaflash.display.DisplayObject.blendModeflash.display.DisplayObject.cacheAsBitmapflash.display.SimpleButton.enabledflash.display.DisplayObject.filtersflash.display.InteractiveObject.focusRectflash.display.DisplayObject.heightRemovedflash.display.DisplayObject.nameflash.display.DisplayObject.parentRemovedflash.display.DisplayObject.rotationflash.display.DisplayObject.scale9Gridflash.media.SoundMixer.bufferTimeflash.display.InteractiveObject.tabEnabledflash.display.InteractiveObject.tabIndexRemovedflash.display.SimpleButton.trackAsMenuRemovedflash.display.SimpleButton.useHandCursorflash.display.DisplayObject.visibleflash.display.DisplayObject.widthflash.display.DisplayObject.xflash.display.DisplayObject.mouseXflash.display.DisplayObject.scaleXflash.display.DisplayObject.yflash.display.DisplayObject.mouseYflash.display.DisplayObject.scaleYflash.display.DisplayObjectContainer.getChildIndex()flash.display.InteractiveObject dispatches event: mouseOutflash.display.InteractiveObject dispatches event: mouseOverflash.display.InteractiveObject dispatches event: keyDownflash.display.InteractiveObject dispatches event: keyUpflash.display.InteractiveObject dispatches event: focusOutflash.display.InteractiveObject dispatches event: mouseDownflash.display.InteractiveObject dispatches event: mouseUpflash.display.InteractiveObject dispatches event: mouseUpflash.display.InteractiveObject dispatches event: mouseOutflash.display.InteractiveObject dispatches event: mouseOverflash.display.InteractiveObject dispatches event: focusIn

AS3AS2

FileReference class flash.net.FileReference

AS

3 M

igra

tion

Page 3: ActionScript 3 Migration Cheat sheet

AS

3 M

igra

tion

Act

ionS

crip

t 3.0

ww

w.a

ctio

nscr

iptc

heat

shee

t.com

info

@se

anth

efla

shgu

y.co

m

IME classALPHANUMERIC_FULL ConstantALPHANUMERIC_HALF ConstantCHINESE ConstantJAPANESE_HIRAGANA ConstantJAPANESE_KATAKANA_FULL ConstantJAPANESE_KATAKANA_HALF ConstantKOREAN ConstantUNKNOWN ConstantaddListener() MethodgetConversionMode() MethodgetEnabled() MethodremoveListener() MethodsetConversionMode() MethodsetEnabled() MethodonIMEComposition Listener

flash.system.IMEConversionMode.ALPHANUMERIC_FULLflash.system.IMEConversionMode.ALPHANUMERIC_HALFflash.system.IMEConversionMode.CHINESEflash.system.IMEConversionMode.JAPANESE_HIRAGANAflash.system.IMEConversionMode.JAPANESE_KATAKANA_FULLflash.system.IMEConversionMode.JAPANESE_KATAKANA_HALFflash.system.IMEConversionMode.KOREANflash.system.IMEConversionMode.UNKNOWNflash.events.EventDispatcher.addEventListener()flash.system.IME.conversionModeflash.system.IME.enabledflash.events.EventDispatcher.removeEventListener()flash.system.IME.conversionModeflash.system.IME.enabledflash.system.IME dispatches event: imeComposition

flash.system.IME

Key classBACKSPACE ConstantCAPSLOCK ConstantCONTROL ConstantDELETEKEY ConstantDOWN ConstantEND ConstantENTER ConstantESCAPE ConstantHOME ConstantINSERT ConstantLEFT Constant_listeners Property[read-only]PGDN ConstantPGUP ConstantRIGHT ConstantSHIFT ConstantSPACE ConstantTAB ConstantUP ConstantaddListener() MethodgetAscii() MethodgetCode() MethodisAccessible() MethodisDown() MethodisToggled() MethodremoveListener() MethodonKeyDown ListeneronKeyUp Listener

flash.ui.Keyboard.BACKSPACEflash.ui.Keyboard.CAPS_LOCKflash.ui.Keyboard.CONTROLflash.ui.Keyboard.DELETEflash.ui.Keyboard.DOWNflash.ui.Keyboard.ENDflash.ui.Keyboard.ENTERflash.ui.Keyboard.ESCAPEflash.ui.Keyboard.HOMEflash.ui.Keyboard.INSERTflash.ui.Keyboard.LEFTflash.events.EventDispatcher.willTrigger()flash.ui.Keyboard.PAGE_DOWNflash.ui.Keyboard.PAGE_UPflash.ui.Keyboard.RIGHTflash.ui.Keyboard.SHIFTflash.ui.Keyboard.SPACEflash.ui.Keyboard.TABflash.ui.Keyboard.UPflash.events.EventDispatcher.addEventListener()flash.events.KeyboardEvent.charCodeflash.events.KeyboardEvent.keyCodeflash.ui.Keyboard.isAccessible()RemovedRemovedflash.events.EventDispatcher.removeEventListener()flash.display.InteractiveObject dispatches event: keyDownflash.display.InteractiveObject dispatches event: keyUp

flash.ui.Keyboard

Mouse classaddListener() Methodhide() MethodremoveListener() Methodshow() MethodonMouseDown ListeneronMouseMove ListeneronMouseUp ListeneronMouseWheel Listener

flash.events.EventDispatcher.addEventListener()flash.ui.Mouse.hide()flash.events.EventDispatcher.removeEventListener()flash.ui.Mouse.show()flash.display.InteractiveObject dispatches event: mouseDownflash.display.InteractiveObject dispatches event: mouseMoveflash.display.InteractiveObject dispatches event: mouseUpflash.display.InteractiveObject dispatches event: mouseWheel

flash.ui.Mouse

LoadVars classcontentType Propertyloaded PropertyLoadVars ConstructoraddRequestHeader() Methoddecode() MethodgetBytesLoaded() MethodgetBytesTotal() Methodload() MethodonData() EventHandleronHTTPStatus() EventHandleronLoad() EventHandlersend() MethodsendAndLoad() MethodtoString() Method

flash.net.URLRequest.contentTypeRemovedflash.net.URLLoader.URLLoader()flash.net.URLRequestHeaderflash.net.URLVariables.decode()flash.net.URLLoader.bytesLoadedflash.net.URLLoader.bytesTotalflash.net.URLLoader.load()flash.net.URLLoader dispatches event: completeflash.net.URLLoader dispatches event: httpStatusflash.net.URLLoader dispatches event: completeflash.net.sendToURL()flash.net.sendToURL()Removed

flash.net.URLLoader

LocalConnection classLocalConnection ConstructorallowDomain() EventHandlerallowInsecureDomain() EventHandlerclose() Methodconnect() Methoddomain() MethodonStatus() EventHandlersend() Method

flash.net.LocalConnection.LocalConnection()flash.net.LocalConnection.allowDomain()flash.net.LocalConnection.allowInsecureDomain()flash.net.LocalConnection.close()flash.net.LocalConnection.connect()flash.net.LocalConnection.domainflash.net.LocalConnection dispatches event: statusflash.net.LocalConnection.send()

flash.net.LocalConnection

Microphone classindex Property[read-only]rate Property[read-only]silenceTimeOut Property[read-only]get() MethodonActivity() EventHandleronStatus() EventHandlersetGain() MethodsetRate() MethodsetSilenceLevel() MethodsetUseEchoSuppression() Method

flash.media.Microphone.indexflash.media.Microphone.rateflash.media.Microphone.silenceTimeoutflash.media.Microphone.getMicrophone()flash.media.Microphone dispatches event: activityflash.media.Microphone dispatches event: statusflash.media.Microphone.gainflash.media.Microphone.rateflash.media.Microphone.setSilenceLevel()flash.media.Microphone.setUseEchoSuppression()

flash.media.Microphone

NetConnection classNetConnection Constructorconnect() Constructor

flash.net.NetConnection.NetConnection()flash.net.NetConnection.connect()

flash.net.NetConnection

NetStream classbytesLoaded Property[read-only]bytesTotal Property[read-only]currentFps Property[read-only]onStatus() EventHandlerpause() Methodplay() MethodsetBufferTime() Method

flash.net.NetStream.bytesLoadedflash.net.NetStream.bytesTotalflash.net.NetStream.currentFPSflash.net.NetStream dispatches event: netStatusflash.net.NetStream.pause()flash.net.NetStream.play()flash.net.NetStream.bufferTime

flash.net.NetStream

Number classNumber Constructor Number.Number()

Number

color PropertycomponentX PropertycomponentY PropertyDisplacementMapFilter Constructorclone() Method

flash.filters.DisplacementMapFilter.colorflash.filters.DisplacementMapFilter.componentXflash.filters.DisplacementMapFilter.componentYflash.filters.DisplacementMapFilter.DisplacementMapFilter()flash.filters.DisplacementMapFilter.clone()

AS3AS2

DisplacementMapFilter class flash.filters.DisplacementMapFilter

AS3AS2

Page 4: ActionScript 3 Migration Cheat sheet

Act

ionS

crip

t 3.0

ww

w.a

ctio

nscr

iptc

heat

shee

t.com

info

@se

anth

efla

shgu

y.co

m

MovieClip class_alpha PropertyblendMode PropertycacheAsBitmap Property_currentframe Property[read-only]_droptarget Property[read-only]filters PropertyfocusEnabled Property_focusrect Property_framesloaded Property[read-only]_height Property_highquality PropertyhitArea Property_lockroot Propertymenu Property_name PropertyopaqueBackground Property_parent Property_quality Property_rotation Propertyscale9Grid PropertyscrollRect Property_soundbuftime PropertytabChildren PropertytabEnabled PropertytabIndex Property_target Property[read-only]_totalframes Property[read-only]trackAsMenu Propertytransform Property_url Property[read-only]useHandCursor Property_visible Property_width Property_x Property_xmouse Property[read-only]_xscale Property_y Property_ymouse Property[read-only]_yscale PropertyattachAudio() MethodattachBitmap() MethodattachMovie() MethodbeginBitmapFill() MethodbeginFill() MethodbeginGradientFill() Methodclear() MethodcreateEmptyMovieClip() MethodcreateTextField() MethodcurveTo() MethodduplicateMovieClip() MethodendFill() MethodgetBounds() MethodgetBytesLoaded() MethodgetBytesTotal() MethodgetDepth() MethodgetInstanceAtDepth() MethodgetNextHighestDepth() MethodgetRect() MethodgetSWFVersion() MethodgetTextSnapshot() MethodgetURL() MethodglobalToLocal() MethodgotoAndStop() MethodhitTest() MethodlineGradientStyle() MethodlineStyle() MethodlineTo() Method

flash.display.DisplayObject.alphaflash.display.DisplayObject.blendModeflash.display.DisplayObject.cacheAsBitmapflash.display.MovieClip.currentFrameflash.display.Sprite.dropTargetflash.display.DisplayObject.filtersRemovedflash.display.InteractiveObject.focusRectflash.display.MovieClip.framesLoadedflash.display.DisplayObject.heightRemovedflash.display.Sprite.hitAreaRemovedRemovedflash.display.DisplayObject.nameflash.display.DisplayObject.opaqueBackgroundflash.display.DisplayObject.parentflash.display.Stage.qualityflash.display.DisplayObject.rotationflash.display.DisplayObject.scale9Gridflash.display.DisplayObject.scrollRectflash.media.SoundMixer.bufferTimeflash.display.DisplayObjectContainer.tabChildrenflash.display.InteractiveObject.tabEnabledflash.display.InteractiveObject.tabIndexRemovedflash.display.MovieClip.totalFramesflash.display.MovieClip.trackAsMenuflash.display.DisplayObject.transformflash.display.Loader.contentLoaderInfoflash.display.Sprite.useHandCursorflash.display.DisplayObject.visibleflash.display.DisplayObject.widthflash.display.DisplayObject.xflash.display.DisplayObject.mouseXflash.display.DisplayObject.scaleXflash.display.DisplayObject.yflash.display.DisplayObject.mouseYflash.display.DisplayObject.scaleYRemovedRemovedRemovedflash.display.Graphics.beginBitmapFill()flash.display.Graphics.beginFill()flash.display.Graphics.beginGradientFill()flash.display.Graphics.clear()RemovedRemovedflash.display.Graphics.curveTo()Removedflash.display.Graphics.endFill()flash.display.DisplayObject.getBounds()flash.net.URLLoader.bytesLoadedflash.net.URLLoader.bytesTotalflash.display.DisplayObjectContainer.getChildIndex()flash.display.DisplayObjectContainer.getChildAt()flash.display.DisplayObjectContainer.addChild()flash.display.DisplayObject.getRect()flash.display.LoaderInfo.swfVersionflash.display.DisplayObjectContainer.textSnapshotflash.net.navigateToURL()flash.display.DisplayObject.globalToLocal()flash.display.MovieClip.gotoAndStop()flash.display.DisplayObject.hitTestObject()flash.display.Graphics.lineGradientStyle()flash.display.Graphics.lineStyle()flash.display.Graphics.lineTo()

flash.display.MovieClip

MovieClipLoader classMovieClipLoader ConstructoraddListener() MethodgetProgress() MethodloadClip() MethodremoveListener() MethodunloadClip() MethodonLoadComplete ListeneronLoadError ListeneronLoadInit ListeneronLoadProgress ListeneronLoadStart Listener

flash.display.Loader.Loader()flash.events.EventDispatcher.addEventListener()flash.display.LoaderInfo dispatches event: progressflash.display.Loader.load()flash.events.EventDispatcher.removeEventListener()flash.display.Loader.unload()flash.display.LoaderInfo dispatches event: completeflash.display.LoaderInfo dispatches event: ioErrorflash.display.LoaderInfo dispatches event: initflash.display.LoaderInfo dispatches event: progressflash.display.LoaderInfo dispatches event: open

flash.display.Loader

MovieClip class flash.display.MovieClip

Sound classcheckPolicyFileduration Property[read-only]id3 Property[read-only]position Property[read-only]attachSound() MethodgetBytesLoaded() MethodgetBytesTotal() MethodgetPan() MethodgetTransform() MethodgetVolume() MethodloadSound() MethodonID3() EventHandleronLoad() EventHandleronSoundComplete() EventHandlersetPan() MethodsetTransform() MethodsetVolume() Methodstart() Methodstop() Method

flash.media.SoundChannel.stop()flash.media.Sound.lengthflash.media.Sound.id3flash.media.SoundChannel.positionRemovedflash.media.Sound.bytesLoadedflash.media.Sound.bytesTotalflash.media.SoundTransform.panflash.media.SoundMixer.soundTransformflash.media.SoundTransform.volumeflash.media.Sound.load()flash.media.Sound dispatches event: id3flash.media.Sound dispatches event: completeflash.media.SoundChannel dispatches event: soundCompleteflash.media.SoundTransform.panflash.media.SoundMixer.soundTransformflash.media.SoundChannelflash.media.Sound.play()flash.media.SoundChannel.stop()

flash.media.Sound

flash.display.Loader.load()flash.net.URLLoaderflash.display.DisplayObject.localToGlobal()flash.display.Graphics.moveTo()flash.display.MovieClip.nextFrame()flash.display.LoaderInfo dispatches event: completeflash.display.InteractiveObject dispatches event: mouseOutflash.display.InteractiveObject dispatches event: mouseOverflash.display.DisplayObject dispatches event: enterFrameflash.display.InteractiveObject dispatches event: keyDownflash.display.InteractiveObject dispatches event: keyUpflash.display.InteractiveObject dispatches event: focusOutflash.display.LoaderInfo dispatches event: completeflash.display.InteractiveObject dispatches event: mouseDownflash.display.InteractiveObject dispatches event: mouseMoveflash.display.InteractiveObject dispatches event: mouseUpflash.display.InteractiveObject dispatches event: mouseDownflash.display.InteractiveObject dispatches event: mouseUpflash.display.InteractiveObject dispatches event: mouseUpflash.display.InteractiveObject dispatches event: mouseOutflash.display.InteractiveObject dispatches event: mouseOverflash.display.InteractiveObject dispatches event: focusInflash.display.LoaderInfo dispatches event: unloadflash.display.MovieClip.play()flash.display.MovieClip.prevFrame()flash.display.DisplayObjectContainer.removeChild()flash.display.DisplayObject.maskflash.display.Sprite.startDrag()flash.display.MovieClip.stop()flash.display.Sprite.stopDrag()Removedflash.display.Loader.unload()

loadMovie() MethodloadVariables() MethodlocalToGlobal() MethodmoveTo() MethodnextFrame() MethodonData() EventHandleronDragOut() EventHandleronDragOver() EventHandleronEnterFrame() EventHandleronKeyDown() EventHandleronKeyUp() EventHandleronKillFocus() EventHandleronLoad() EventHandleronMouseDown() EventHandleronMouseMove() EventHandleronMouseUp() EventHandleronPress() EventHandleronRelease() EventHandleronReleaseOutside() EventHandleronRollOut() EventHandleronRollOver() EventHandleronSetFocus() EventHandleronUnload() EventHandlerplay() MethodprevFrame() MethodremoveMovieClip() MethodsetMask() MethodstartDrag() Methodstop() MethodstopDrag() MethodswapDepths() MethodunloadMovie() Method

AS3AS2A

S3

Mig

ratio

n

Page 5: ActionScript 3 Migration Cheat sheet

ActionScript [email protected]

AS3 Migration

String classconcat() Method String.concat()

String

StyleSheet class flash.text.StyleSheet

AS2

AS3Object class Object

PrintJob classorientation Property[read-only]pageHeight Property[read-only]pageWidth Property[read-only]paperHeight Property[read-only]paperWidth Property[read-only]PrintJob ConstructoraddPage() Methodsend() Methodstart() Method

flash.printing.PrintJob.orientationflash.printing.PrintJob.pageHeightflash.printing.PrintJob.pageWidthflash.printing.PrintJob.paperHeightflash.printing.PrintJob.paperWidthflash.printing.PrintJob.PrintJob()flash.printing.PrintJob.addPage()flash.printing.PrintJob.send()flash.printing.PrintJob.start()

flash.printing.PrintJob

Rectangle classcontainsRectangle() Method flash.geom.Rectangle.containsRect()

flash.printing.PrintJob

security class flash.system.Security

Selection class Removed

SharedObject classflush() MethodgetSize() MethodonStatus() EventHandler

flash.net.SharedObject.flush()flash.net.SharedObject.sizeflash.net.SharedObject dispatches event: netStatus

flash.net.SharedObject

Stage classalign Propertyheight PropertyscaleMode PropertyshowMenu Propertywidth PropertyaddListener() MethodremoveListener() MethodonResize Listener

flash.display.Stage.alignflash.display.Stage.stageHeightflash.display.Stage.scaleModeflash.display.Stage.showDefaultContextMenuflash.display.Stage.stageWidthflash.events.EventDispatcher.addEventListener()flash.events.EventDispatcher.removeEventListener()flash.display.Stage dispatches event: resize

flash.display.Stage

System classexactSettings PropertyuseCodepage PropertyonStatus() EventHandlersetClipboard() MethodshowSettings() Method

flash.system.Security.exactSettingsflash.system.System.useCodePageRemovedflash.system.System.setClipboard()flash.system.Security.showSettings()

flash.system.System

TextFormat class flash.text.TextFormat

TextRenderer classmaxLevel PropertysetAdvancedAntialiasingTable() Method

flash.text.TextRenderer.maxLevelflash.text.TextRenderer.setAdvancedAntiAliasingTable()

flash.text.TextRenderer

TextSnapshot class flash.text.TextSnapshot

Video class_alpha Propertydeblocking Property_height Propertyheight Property[read-only]_name Property_parent Property_rotation Propertysmoothing Property_visible Property_width Propertywidth Property[read-only]_x Property_xmouse Property[read-only]_xscale Property_y Property_ymouse Property[read-only]_yscale PropertyattachVideo() Methodclear() Method

flash.display.DisplayObject.alphaflash.media.Video.deblockingflash.display.DisplayObject.heightflash.media.Video.videoHeightflash.display.DisplayObject.nameflash.display.DisplayObject.parentflash.display.DisplayObject.rotationflash.media.Video.smoothingflash.display.DisplayObject.visibleflash.display.DisplayObject.widthflash.media.Video.videoWidthflash.display.DisplayObject.xflash.display.DisplayObject.mouseXflash.display.DisplayObject.scaleXflash.display.DisplayObject.yflash.display.DisplayObject.mouseYflash.display.DisplayObject.scaleYflash.media.Video.attachNetStream()flash.media.Video.clear()

flash.media.Video

StyleSheet Constructorclear() MethodgetStyle() MethodgetStyleNames() Methodload() MethodonLoad() EventHandlerparseCSS() MethodsetStyle() Methodtransform() Method

flash.text.StyleSheet.StyleSheet()flash.text.StyleSheet.clear()flash.text.StyleSheet.getStyle()flash.text.StyleSheet.styleNamesflash.net.URLLoader.load()flash.net.URLLoader dispatches event: completeflash.text.StyleSheet.parseCSS()flash.text.StyleSheet.setStyle()flash.text.StyleSheet.transform()

addListener() MethodgetBeginIndex() MethodgetCaretIndex() MethodgetEndIndex() MethodgetFocus() MethodremoveListener() MethodsetFocus() MethodsetSelection() MethodonSetFocus Listener

flash.events.EventDispatcher.addEventListener()flash.text.TextField.selectionBeginIndexflash.text.TextField.caretIndexflash.text.TextField.selectionEndIndexflash.display.Stage.focusflash.events.EventDispatcher.removeEventListener()flash.display.Stage.focusflash.text.TextField.setSelection()flash.display.InteractiveObject dispatches event: focusIn

align PropertyblockIndent Propertybold Propertybullet Propertycolor Propertyfont Propertyindent Propertyitalic Propertykerning Propertyleading PropertyleftMargin PropertyletterSpacing PropertyrightMargin Propertysize Propertyunderline Propertyurl PropertyTextFormat ConstructorgetTextExtent() Method

flash.text.TextFormat.alignflash.text.TextFormat.blockIndentflash.text.TextFormat.boldflash.text.TextFormat.bulletflash.text.TextFormat.colorflash.text.TextFormat.fontflash.text.TextFormat.indentflash.text.TextFormat.bulletflash.text.TextFormat.kerningflash.text.TextFormat.leadingflash.text.TextFormat.leftMarginflash.text.TextFormat.letterSpacingflash.text.TextFormat.rightMarginflash.text.TextFormat.sizeflash.text.TextFormat.underlineflash.text.TextFormat.urlflash.text.TextFormat.TextFormat()Removed

findText() MethodgetCount() MethodgetSelected() MethodgetSelectedText() MethodgetText() MethodgetTextRunInfo() MethodhitTestTextNearPos() MethodsetSelectColor() MethodsetSelected() Method

flash.text.TextSnapshot.findText()flash.text.TextSnapshot.charCountflash.text.TextSnapshot.getSelected()flash.text.TextSnapshot.getSelectedText()flash.text.TextSnapshot.getText()flash.text.TextSnapshot.getTextRunInfo()flash.text.TextSnapshot.hitTestTextNearPos()flash.text.TextSnapshot.setSelectColor()flash.text.TextSnapshot.setSelected()

AS2

AS2

__proto__ Property__resolve PropertyaddProperty() MethodregisterClass() Methodunwatch() Methodwatch() Method

Removedflash.utils.ProxyRemovedRemovedRemovedRemoved

AS2

AS3

AS2

AS2

AS2

AS3

AS2

AS2

Page 6: ActionScript 3 Migration Cheat sheet

ActionScript [email protected]

AS3 Migration

TextField class flash.text.TextField XML class flash.xml.XMLDocument

XMLNode class flash.xml.XMLNode

XMLSocket class flash.net.XMLSocket

AS3AS2

_alpha PropertyantiAliasType PropertyautoSize Propertybackground PropertybackgroundColor Propertyborder PropertyborderColor PropertybottomScroll Property[read-only]condenseWhite PropertyembedFonts Propertyfilters PropertygridFitType Property_height Property_highquality Propertyhscroll Propertyhtml PropertyhtmlText Propertylength Property[read-only]maxChars Propertymaxhscroll Property[read-only]maxscroll Property[read-only]menu PropertymouseWheelEnabled Propertymultiline Property_name Property_parent Propertypassword Property_quality Propertyrestrict Property_rotation Propertyscroll Propertyselectable Propertysharpness Property_soundbuftime PropertystyleSheet PropertytabEnabled PropertytabIndex Property_target Property[read-only]text PropertytextColor PropertytextHeight PropertytextWidth Propertythickness Propertytype Property_url Property[read-only]variable Property_visible Property_width PropertywordWrap Property_x Property_xmouse Property[read-only]_xscale Property_y Property_ymouse Property[read-only]_yscale PropertyaddListener() MethodgetDepth() MethodgetFontList() MethodgetNewTextFormat() MethodgetTextFormat() MethodonChanged() EventHandleronKillFocus() EventHandleronScroller() EventHandleronSetFocus() EventHandlerremoveListener() MethodremoveTextField() MethodreplaceSel() MethodreplaceText() MethodsetNewTextFormat() MethodsetTextFormat() Method

flash.display.DisplayObject.alphaflash.text.TextField.antiAliasTypeflash.text.TextField.autoSizeflash.text.TextField.backgroundflash.text.TextField.backgroundColorflash.text.TextField.borderflash.text.TextField.borderColorflash.text.TextField.bottomScrollVflash.text.TextField.condenseWhiteflash.text.TextField.embedFontsflash.display.DisplayObject.filtersflash.text.TextField.gridFitTypeflash.display.DisplayObject.heightflash.display.Stage.qualityflash.text.TextField.scrollHflash.text.TextField.htmlTextflash.text.TextField.htmlTextflash.text.TextField.lengthflash.text.TextField.maxCharsflash.text.TextField.maxScrollHflash.text.TextField.maxScrollVflash.display.InteractiveObject.contextMenuflash.text.TextField.mouseWheelEnabledflash.text.TextField.multilineflash.display.DisplayObject.nameflash.display.DisplayObject.parentflash.text.TextField.displayAsPasswordflash.display.Stage.qualityflash.text.TextField.restrictflash.display.DisplayObject.rotationflash.text.TextField.scrollVflash.text.TextField.selectableflash.text.TextField.sharpnessflash.media.SoundMixer.bufferTimeflash.text.TextField.styleSheetflash.display.InteractiveObject.tabEnabledflash.display.InteractiveObject.tabIndexRemovedflash.text.TextField.textflash.text.TextField.textColorflash.text.TextField.textHeightflash.text.TextField.textWidthflash.text.TextField.thicknessflash.text.TextField.typeflash.display.LoaderInfo.urlRemovedflash.display.DisplayObject.visibleflash.display.DisplayObject.widthflash.text.TextField.wordWrapflash.display.DisplayObject.xflash.display.DisplayObject.mouseXflash.display.DisplayObject.scaleXflash.display.DisplayObject.yflash.display.DisplayObject.mouseYflash.display.DisplayObject.scaleYflash.events.EventDispatcher.addEventListener()flash.display.DisplayObjectContainerflash.text.Font.enumerateFonts()flash.text.TextField.defaultTextFormatflash.text.TextField.getTextFormat()flash.text.TextField dispatches event: changeflash.display.InteractiveObject dispatches event: focusOutflash.text.TextField dispatches event: scrollflash.display.InteractiveObject dispatches event: focusInflash.events.EventDispatcher.removeEventListener()flash.display.DisplayObjectContainer.removeChild()flash.text.TextField.replaceSelectedText()flash.text.TextField.replaceText()flash.text.TextField.defaultTextFormatflash.text.TextField.setTextFormat()

contentType PropertydocTypeDecl PropertyidMap PropertyignoreWhite Propertyloaded Propertystatus PropertyxmlDecl PropertyXML ConstructoraddRequestHeader() MethodcreateElement() MethodcreateTextNode() MethodgetBytesLoaded() MethodgetBytesTotal() Methodload() MethodonData() EventHandleronHTTPStatus() EventHandleronLoad() EventHandlerparseXML() Methodsend() MethodsendAndLoad() Method

flash.net.URLRequest.contentTypeflash.xml.XMLDocument.docTypeDeclflash.xml.XMLDocument.idMapflash.xml.XMLDocument.ignoreWhiteRemovedRemovedflash.xml.XMLDocument.xmlDeclflash.xml.XMLDocument.XMLDocument()flash.net.URLRequest.requestHeadersflash.xml.XMLDocument.createElement()flash.xml.XMLDocument.createTextNode()flash.net.URLLoader.bytesLoadedflash.net.URLLoader.bytesTotalRemovedflash.net.URLLoader dispatches event: completeflash.net.URLLoader dispatches event: httpStatusflash.net.URLLoader dispatches event: completeflash.xml.XMLDocument.parseXML()RemovedRemoved

nodeType Property[read-only]XMLNode Constructor

flash.xml.XMLNode.nodeTypeflash.xml.XMLNode.XMLNode()

XMLSocket Constructorconnect() MethodonClose() EventHandleronConnect() EventHandleronData() EventHandleronXML() EventHandler

flash.net.XMLSocket.XMLSocket()flash.net.XMLSocket.connect()flash.net.XMLSocket dispatches event: closeflash.net.XMLSocket dispatches event: connectflash.net.XMLSocket dispatches event: dataRemoved