Beyond the top level, the runtime’s API is in the flash packages, built
into Flash Player and AIR. Each class must be imported by its package. Libraries that
are compiled into the SWF, such as the Flash components and the Flex framework, add
further packages. Adobe’s
package
list gives every class.
The flash packages
| Package | Holds | Main classes |
|---|---|---|
flash.accessibility | Support for screen readers. | Accessibility, AccessibilityProperties |
flash.concurrent | Locks for code shared between workers. | Mutex, Condition |
flash.crypto | Cryptographically strong random bytes. | generateRandomBytes() |
flash.data | AIR only: local SQLite databases and the encrypted store. | SQLConnection, SQLStatement, EncryptedLocalStore |
flash.desktop | AIR only: the clipboard, drag and drop, the application and native processes. | NativeApplication, Clipboard, NativeDragManager, NativeProcess |
flash.display | The display list, drawing, bitmaps and loading SWFs and images. | Sprite, MovieClip, Shape, Bitmap, BitmapData, Graphics, Loader, LoaderInfo, Stage, NativeWindow |
flash.display3D | Stage3D: GPU rendering with shader programs (Flash Player 11, AIR 3). | Context3D, Program3D, VertexBuffer3D, IndexBuffer3D |
flash.display3D.textures | Textures for Stage3D. | Texture, CubeTexture, RectangleTexture, VideoTexture |
flash.errors | Runtime error classes. | IOError, EOFError, IllegalOperationError and the rest; see Errors |
flash.events | The event model and the event classes. | EventDispatcher, Event, MouseEvent, KeyboardEvent, TimerEvent, ProgressEvent, IOErrorEvent |
flash.external | Calls between ActionScript and the page or program that holds the player. | ExternalInterface |
flash.filesystem | AIR only: files and folders. | File, FileStream, FileMode |
flash.filters | Bitmap filters for display objects. | BlurFilter, DropShadowFilter, GlowFilter, BevelFilter, ColorMatrixFilter, ConvolutionFilter, DisplacementMapFilter, ShaderFilter |
flash.geom | Geometry and transformations. | Point, Rectangle, Matrix, Matrix3D, Vector3D, ColorTransform, Transform |
flash.globalization | Locale-aware sorting, formatting and parsing. | Collator, DateTimeFormatter, NumberFormatter, CurrencyFormatter |
flash.html | AIR only: HTML content in an application. | HTMLLoader |
flash.media | Sound, video, cameras and microphones. | Sound, SoundChannel, SoundTransform, SoundMixer, Video, StageVideo, Camera, Microphone |
flash.net | Networking, loading data and local storage. | URLLoader, URLRequest, URLVariables, URLStream, Socket, XMLSocket, NetConnection, NetStream, SharedObject, FileReference, LocalConnection |
flash.net.dns | DNS lookups. | DNSResolver |
flash.net.drm | Protected content. | DRMManager |
flash.notifications | Remote notifications on iOS. | RemoteNotifier |
flash.permissions | The state of a permission request. | PermissionStatus |
flash.printing | Printing. | PrintJob |
flash.profiler | Debugging helpers. | showRedrawRegions() |
flash.sampler | Memory and performance sampling, for profilers in debug players. | getSamples(), startSampling() |
flash.security | AIR only: XML signature checking. | XMLSignatureValidator |
flash.sensors | Device sensors. | Accelerometer, Geolocation |
flash.system | The runtime: security, application domains, capabilities, workers. | Capabilities, Security, ApplicationDomain, LoaderContext, System, Worker, MessageChannel |
flash.text | Text fields, formatting and fonts. | TextField, TextFormat, StyleSheet, Font |
flash.text.engine | The Flash Text Engine: low-level text layout and bidirectional text (Flash Player 10). | TextBlock, TextLine, ElementFormat, FontDescription |
flash.text.ime | Inline input-method editing for the text engine. | IIMEClient |
flash.ui | Mouse, keyboard, menus, touch and game controllers. | Mouse, Keyboard, ContextMenu, Multitouch, GameInput |
flash.utils | Utility classes and functions. | ByteArray, Dictionary, Timer, Proxy, Endian, getTimer(), describeType() |
flash.xml | The XML classes of ActionScript 2.0, kept for old code. | XMLDocument, XMLNode |
A class used on a runtime that lacks it fails when the code runs, not when it is
compiled, so code for both Flash Player and AIR checks first, for example with
ApplicationDomain.currentDomain.hasDefinition("flash.filesystem.File").
Libraries compiled into the SWF
| Packages | From | Holds |
|---|---|---|
fl.* | Flash authoring | The Flash user-interface components (fl.controls: Button, List, DataGrid), video playback (fl.video.FLVPlayback), motion tweens and easing (fl.motion, fl.transitions), inverse kinematics (fl.ik). |
flashx.textLayout, flashx.undo | The Text Layout Framework | Rich text, columns and editing, built on the Flash Text Engine. |
mx.*, spark.* | The Flex SDK | The Flex framework: MX and Spark components, collections, data binding, effects, styles, RPC services. |
air.net, air.update, air.desktop | The AIR SDK | Network monitoring, the application update framework, and file promises for drag and drop, for AIR applications. |
adobe.utils | Built in | Functions for extensions to the Flash authoring tool. |