ActionScript 3 API Support

What the AVM2 runtime in Paintapp's SWF player offers a movie's own ActionScript 3 code. Each class links to its page in the official ActionScript 3 reference; the names after it are its members, colored by what the player does with them: plain text is implemented, yellow is partial, and red is not implemented. A class shown in red with no members after it has no implementation at all. Members that exist only inside the player are left out.

74 classes, 465 members implemented, 38 partial, 152 missing, and 84 classes absent entirely. The AVM2 globals — Math, Array, String, Number, Boolean, int, uint, RegExp — are backed by the JavaScript built-ins and are not listed here.

flash.display

ActionScriptVersion ACTIONSCRIPT2, ACTIONSCRIPT3

AVM1MovieAn AVM1 movie loaded into an AVM2 host does not play. The class exists so that referencing it does not throw.

Bitmap bitmapData, smoothing, pixelSnapping

BitmapData clone, dispose, encode, fillRect, floodFill, getPixel, getPixel32, height, rect, setPixel, setPixel32, transparent, width, draw, lock, unlock, applyFilter, colorTransform, copyChannel, copyPixels, hitTest, scroll, thresholdlock and unlock are accepted and ignored: they only ever suppressed intermediate redraws. Pixel reads and writes go through a CPU mirror — one readback and one upload per pixel loop.

BitmapDataChannel ALPHA, BLUE, GREEN, RED

BitmapEncodingColorSpace COLORSPACE_4_2_0, COLORSPACE_4_2_2, COLORSPACE_4_4_4, COLORSPACE_AUTO

BlendMode ADD, ALPHA, DARKEN, DIFFERENCE, ERASE, HARDLIGHT, INVERT, LAYER, LIGHTEN, MULTIPLY, NORMAL, OVERLAY, SCREEN, SHADER, SUBTRACT

DisplayObject alpha, blendMode, getBounds, height, hitTestPoint, loaderInfo, name, parent, root, rotation, scaleX, scaleY, stage, transform, visible, width, x, y, cacheAsBitmap, filters, mask, opaqueBackground, scrollRect, accessibilityProperties, hitTestObject, mouseX, mouseY, rotationX, rotationY, rotationZ, scale9Grid, z

DisplayObjectContainer addChild, addChildAt, contains, getChildAt, getChildByName, mouseChildren, numChildren, tabChildren, removeChild, removeChildAt, getChildIndex, getObjectsUnderPoint, removeChildren, setChildIndex, swapChildren, swapChildrenAt

FrameLabel

GradientType LINEAR, RADIALBoth kinds are drawn for gradients defined in the file. The constants themselves are only read by beginGradientFill, which is a stub.

Graphics beginFill, beginGradientFill, clear, curveTo, drawCircle, drawRect, endFill, lineTo, moveTo, beginBitmapFill, lineStyle, copyFrom, cubicCurveTo, drawEllipse, drawPath, drawRoundRect, drawTriangles, lineBitmapStyle, lineGradientStyle

GraphicsBitmapFill

GraphicsPath

GraphicsSolidFill

IDrawCommand

InteractiveObject contextMenu, doubleClickEnabled, focusRect, mouseEnabled, tabEnabled, tabIndex, needsSoftKeyboard, softKeyboardInputAreaOfInterest

InterpolationMethod LINEAR_RGB, RGBNames only: every gradient interpolates in RGB, so LINEAR_RGB is accepted and ignored.

JPEGEncoderOptions quality

JPEGXREncoderOptions colorSpace, quantization, trimFlexBits

Loader addChild, addChildAt, close, content, removeChild, removeChildAt, setChildIndex, unload, unloadAndStop, load, loadBytes, contentLoaderInfo, loaderInfoaddChild, addChildAt, removeChild, removeChildAt and setChildIndex are present only to throw, as the API requires.

LoaderInfo actionScriptVersion, childAllowsParent, content, dispatchEvent, loaderURL, parameters, parentAllowsChild, sharedEvents, swfVersion, url, applicationDomain, bytes, bytesLoaded, bytesTotal, contentType, frameRate, height, isURLInaccessible, loader, width

MorphShapeInherits everything from DisplayObject; the class itself adds no members.

MovieClip addFrameScript, getBytesTotal, gotoAndPlay, gotoAndStop, nextFrame, play, prevFrame, stop, totalFrames, currentFrame, currentLabel, currentLabels, currentScene, framesLoaded, nextScene, prevScene, scenes

NativeMenu

PNGEncoderOptions fastCompression

Scene

Shader

ShaderData

ShaderJob

Shape graphics

SimpleButton dispatchEvent, downState, hitTestPoint, overState, upState, enabled, hitTestState, soundTransform, trackAsMenu, useHandCursor

SpreadMethod PAD, REFLECT, REPEATA gradient that comes from the file's own shape tags honors all three; a gradient a script builds does not paint at all yet, because beginGradientFill is a stub.

Sprite buttonMode, dropTarget, graphics, hitArea, useHandCursor, soundTransform, startDrag, stopDrag

Stage height, mouseX, mouseY, showDefaultContextMenu, stageFocusRect, stageHeight, stageWidth, width, align, displayState, quality, scaleMode, colorCorrection, focus, frameRate, fullScreenSourceRect, invalidate, nativeWindow, stage3Dsalign, scaleMode, quality and displayState are stored and readable; the renderer scales the movie to the node and does not act on them yet.

Stage3D

StageAlign BOTTOM, BOTTOM_LEFT, BOTTOM_RIGHT, LEFT, RIGHT, TOP, TOP_LEFT, TOP_RIGHT

StageDisplayState FULL_SCREEN, FULL_SCREEN_INTERACTIVE, NORMAL

StageQuality BEST, HIGH, HIGH_16X16, HIGH_16X16_LINEAR, HIGH_8X8, HIGH_8X8_LINEAR, LOW, MEDIUM

StageScaleMode EXACT_FIT, NO_BORDER, NO_SCALE, SHOW_ALL

flash.events

AsyncErrorEvent

ContextMenuEvent

ErrorEvent ERROR, errorID, text

Event ACTIVATE, ADDED, ADDED_TO_STAGE, CANCEL, CHANGE, CLEAR, CLOSE, COMPLETE, CONNECT, COPY, CUT, DEACTIVATE, ENTER_FRAME, EXIT_FRAME, FRAME_LABEL, FULLSCREEN, ID3, INIT, MOUSE_LEAVE, OPEN, PASTE, REMOVED, REMOVED_FROM_STAGE, RENDER, RESIZE, SCROLL, SELECT, SELECT_ALL, SOUND_COMPLETE, TAB_CHILDREN_CHANGE, TAB_ENABLED_CHANGE, TAB_INDEX_CHANGE, TEXT_INPUT, TIMER, TIMER_COMPLETE, UNLOAD, bubbles, cancelable, currentTarget, stopImmediatePropagation, stopPropagation, target, type, clone, eventPhase, formatToString, isDefaultPrevented, preventDefault, toString

EventDispatcher hasEventListener, removeEventListener, addEventListener, dispatchEvent, willTriggerListeners fire in the target and bubble phases; the capture phase and listener priority are ignored.

FocusEvent

IOErrorEvent IO_ERROR

KeyboardEvent

MouseEvent CLICK, DOUBLE_CLICK, MOUSE_DOWN, MOUSE_MOVE, MOUSE_OUT, MOUSE_OVER, MOUSE_UP, MOUSE_WHEEL, ROLL_OUT, ROLL_OVER, altKey, buttonDown, clickCount, commandKey, controlKey, ctrlKey, delta, relatedObject, shiftKey, stageX, stageY, localX, localY, movementX, movementY, updateAfterEventlocalX and localY carry STAGE coordinates: the dispatcher has no accumulated transform for the target to convert through, so they equal stageX and stageY. commandKey is always false, as it is on any platform that is not a Mac.

NetStatusEvent

ProgressEvent PROGRESS, SOCKET_DATA, bytesLoaded, bytesTotal, updateAfterEvent

SecurityErrorEvent

StatusEvent

TextEvent

TimerEvent

flash.geom

ColorTransform alphaMultiplier, alphaOffset, blueMultiplier, blueOffset, clone, color, concat, greenMultiplier, greenOffset, redMultiplier, redOffset, toString

Matrix a, b, c, clone, concat, copyFrom, createBox, createGradientBox, d, deltaTransformPoint, identity, invert, rotate, scale, setTo, toString, transformPoint, translate, tx, ty

Matrix3D

Orientation3D

PerspectiveProjection

Point add, clone, copyFrom, distance, equals, interpolate, length, normalize, offset, polar, setTo, subtract, toString, x, y

Rectangle bottom, bottomRight, clone, contains, containsPoint, containsRect, copyFrom, equals, height, inflate, inflatePoint, intersection, intersects, isEmpty, left, offset, offsetPoint, right, setEmpty, setTo, size, toString, top, topLeft, union, width, x, y

Transform colorTransform, matrix, concatenatedColorTransform, concatenatedMatrix, matrix3D, perspectiveProjection, pixelBounds

Utils3D

Vector3D

flash.text

AntiAliasType

Font

GridFitType

StaticText text

StyleSheet

TextColorType

TextDisplayMode

TextField height, multiline, width, wordWrap, htmlText, text, antiAliasType, appendText, autoSize, background, backgroundColor, border, borderColor, defaultTextFormat, embedFonts, getLineText, getTextFormat, maxScrollV, numLines, scrollV, selectable, setTextFormat, textColor, typeA text field renders as static text from its initial string; it is not editable, selectable or scrollable.

TextFieldAutoSize

TextFieldType

TextFormat align, bold, color, font, indent, italic, leading, leftMargin, rightMargin, size, target, underline, url, blockIndent, bullet, display, kerning, letterSpacing, tabStopsThe fields are stored and readable; only font, size, color and bold / italic reach the renderer.

TextLineMetrics

TextSnapshot

flash.text.engine

ContentElement

ElementFormat

FontDescription

GroupElement

TextBlock

TextElement

TextJustifier

TextLine

flash.filters

BevelFilter

BitmapFilter cloneA base class only — clone() is present but throws.

BitmapFilterQuality HIGH, LOW, MEDIUM

BitmapFilterType FULL, INNER, OUTERNames only: every filter that takes a type — DropShadowFilter, GlowFilter, BevelFilter and the gradient ones — is unimplemented.

BlurFilter blurX, blurY, clone, qualityConstructed, read and written faithfully, but nothing draws with it. No filter renders yet by either route: DisplayObject.filters stores what it is given and nothing reads it, and a FilterList carried by the file's own tags is parsed and then dropped.

ColorMatrixFilter

ConvolutionFilter

DisplacementMapFilter

DropShadowFilter

GlowFilter

GradientBevelFilter

GradientGlowFilter

ShaderFilter

flash.utils

(package functions) setTimeout, clearTimeout, setInterval, clearInterval, getTimer, getDefinitionByName, describeType, escapeMultiByte, getQualifiedClassName, getQualifiedSuperclassName, unescapeMultiByte

ByteArray atomicCompareAndSwapIntAt, atomicCompareAndSwapLength, bytesAvailable, clear, endian, length, position, readBoolean, readByte, readBytes, readDouble, readFloat, readInt, readShort, readUTF, readUTFBytes, readUnsignedByte, readUnsignedInt, readUnsignedShort, toString, uncompress, writeBoolean, writeByte, writeBytes, writeDouble, writeFloat, writeInt, writeShort, writeUTF, writeUTFBytes, writeUnsignedInt, writeUnsignedShort, compress, objectEncoding, readMultiByte, readObject, writeMultiByte, writeObject, deflate, inflate, shareableuncompress does all three algorithms; compress does zlib and deflate, and throws on LZMA because the codec is decode-only. Reading past the end throws EOFError. The object methods handle JSON-shaped values, not AMF.

CompressionAlgorithm DEFLATE, LZMA, ZLIBZLIB and DEFLATE are honored by ByteArray; LZMA is uncompress only.

DictionaryUsed from ActionScript as a map with object keys, compared by identity.

Endian BIG_ENDIAN, LITTLE_ENDIAN

IDataInputAn interface has no members of its own to implement — ByteArray declares the methods. What it needed was type identity, and `bytes is IDataInput` now answers true; a movie's own class is credited from the interface list in its ABC.

IDataOutputAs IDataInput: the methods live on ByteArray, and is/as answer correctly.

ObjectInput

ObjectOutput

ProxySubclassing it works: the flash_proxy interception points are dispatched by the VM.

Timer

flash.net

FileReference

FileReferenceList

LocalConnection

NetConnection connected, connect, call, client, objectEncoding, proxyType, uriOnly the null connection used for progressive video playback works; there is no RTMP and no AMF.

NetGroup

NetStream bufferTime, pause, resume, onMetaData, onStatus, attachAudio, attachVideo, bytesLoaded, bytesTotal, client, close, play, publish, seek, send, soundTransform, time, togglePauseplay() needs a video decoder that nothing assigns, and the rest throw: no stream reaches the screen through this class. Timeline video (DefineVideoStream) is decoded on its own path and does play.

ObjectEncoding

Responder

SharedObject

Socket

URLLoader bytesLoaded, bytesTotal, close, data, dataFormat, loadload() reads a file beside the .swf, from the folder the movie was opened from. An absolute URL is refused rather than fetched.

URLRequest contentType, data, digest, method, requestHeaders, urlA value holder: nothing here opens a connection, and the URLLoader that would does not.

URLRequestMethod DELETE, GET, HEAD, OPTIONS, POST, PUT

URLStream bytesAvailable, close, connected, endian, load, objectEncoding, readBoolean, readByte, readBytes, readDouble, readFloat, readInt, readMultiByte, readObject, readShort, readUTF, readUTFBytes, readUnsignedByte, readUnsignedInt, readUnsignedShort, diskCacheEnabled, httpResponseStatus, httpStatus, securityErrorStreams a file beside the .swf: bytes are readable as they arrive, and reading past what has arrived throws EOFError. An absolute URL is refused rather than fetched.

URLVariables decode, toString

XMLSocket

flash.system

ApplicationDomain

Capabilities hasAudio, hasVideo, language, os, playerType, screenResolutionX, screenResolutionY, version, isDebugger, manufacturer, pixelAspectRatio, screenDPI, serverStringFixed values that describe a generic desktop plug-in, not the real browser.

IME

JPEGLoaderContext

LoaderContext

MessageChannel messageAvailable, receive, send, toString, close, state

Security allowDomain, allowInsecureDomain, loadPolicyFile, sandboxTypeEvery call is a no-op: the player has no cross-domain sandbox to configure.

SecurityDomain

SecurityPanel

System

Worker createMessageChannel, current, getSharedProperty, isSupported, setSharedProperty, start, state, terminate, toString

WorkerDomain createWorker, current, listWorkers, toString

flash.media

AudioDecoder

Camera

ID3Info

Microphone

Sound

SoundChannel

SoundLoaderContext

SoundMixer

SoundTransform

StageVideo

Video attachCamera, attachNetStream, deblocking, smoothing, videoHeight, videoWidthBoth attach methods throw. Video on the timeline plays; video driven from ActionScript does not.

flash.external

ExternalInterface available, addCallback, call, marshallExceptions, objectIDavailable correctly reports false — there is no container to call into — and the other two are no-ops.

flash.errors

EOFError name

IllegalOperationError name

InvalidSWFError

IOError errorID, name

MemoryError

ScriptTimeoutError errorID, name

StackOverflowError

flash.crypto

(package functions) generateRandomBytes