Actionscript Cheat Sheet
Explore key concepts, syntax, and usage examples for Actionscript — perfect for quick reference.
Resource
Online Related
Global
OO
arguments
- 💡 An arguments object is used to store and access a function's arguments.
- callee:Function
- length:Number
- 💡 A Boolean object is a data type that can have one of two values, either true or false, used for logical operations.
- Boolean()
- toString():String
- valueOf():Boolean
- 💡 The Namespace class contains methods and properties for defining and working with namespaces.
- prefix
- uri
- Namespace()
- Namespace()
- toString()
- valueOf()
- 💡 The Object class is at the root of the ActionScript runtime class hierarchy.
- Object()
- hasOwnProperty()
- isPrototypeOf()
- propertyIsEnumerable()
- setPropertyIsEnumerable()
- toLocaleString()
- toString()
- valueOf()
Array
Date
Properties
- 💡 The Date class represents date and time information.
- date
- dateUTC
- day
- dayUTC
- fullYear
- fullYearUTC
- hours
- hoursUTC
- milliseconds
- millisecondsUTC
- minutes
- minutesUTC
- month
- monthUTC
- seconds
- secondsUTC
- time
- timezoneOffset
- Date()
- getDate()
- getDay()
- getFullYear()
- getHours()
- getMilliseconds()
- getMinutes()
- getMonth()
- getSeconds()
- getTime()
- getTimezoneOffset()
- getUTCDate()
- getUTCDay()
- getUTCFullYear()
- getUTCHours()
- getUTCMilliseconds()
- getUTCMinutes()
- getUTCMonth()
- getUTCSeconds()
- parse()
- setDate()
- setFullYear()
- setHours()
- setMilliseconds()
- setMinutes()
- setMonth()
- setSeconds()
- setTime()
- setUTCDate()
- setUTCFullYear()
- setUTCHours()
- setUTCMilliseconds()
- setUTCMinutes()
- setUTCMonth()
- setUTCSeconds()
- toDateString()
- toJSON()
- toLocaleDateString()
- toLocaleString()
- toLocaleTimeString()
- toString()
- toTimeString()
- toUTCString()
- UTC()
- valueOf()
Error
Error
- errorID : int
- message : String
- name : String
- Error(message:String = "", id:int = 0)
- getStackTrace():String
- toString():String
- 💡 The ArgumentError class represents an error that occurs when the arguments supplied in a function do not match the arguments defined for that function.
- ArgumentError(message:String = "")
- 💡 A RangeError exception is thrown when a numeric value is outside the acceptable range.
- RangeError()
- 💡 A ReferenceError exception is thrown when a reference to an undefined property is attempted on a sealed (nondynamic) object.
- ReferenceError()
- 💡 The SecurityError exception is thrown when some type of security violation takes place.
- SecurityError()
- 💡 A SyntaxError exception is thrown when a parsing error occurs, for one of the following reasons:.
- SyntaxError()
- 💡 A TypeError exception is thrown when the actual type of an operand is different from the expected type.
- TypeError()
- 💡 A URIError exception is thrown when one of the global URI handling functions is used in a way that is incompatible with its definition.
- URIError()
- 💡 The VerifyError class represents an error that occurs when a malformed or corrupted SWF file is encountered.
- VerifyError()
XML
XML Properties
- ignoreComments
💡 [static] Determines whether XML comments are ignored when XML objects parse the source XML data. - ignoreProcessingInstructions
💡 [static] Determines whether XML processing instructions are ignored when XML objects parse the source XML data. - ignoreWhitespace
💡 [static] Determines whether white space characters at the beginning and end of text nodes are ignored during parsing. - prettyIndent
💡 [static] Determines the amount of indentation applied by the toString() and toXMLString() methods when the XML.prettyPrinting property is set to true. - prettyPrinting
💡 [static] Determines whether the toString() and toXMLString() methods normalize white space characters between some tags.
- XML()
- addNamespace()
- appendChild()
- attribute()
- attributes()
- child()
- childIndex()
- children()
- comments()
- contains()
- copy()
- defaultSettings()
- descendants()
- elements()
- hasComplexContent()
- hasOwnProperty()
- hasSimpleContent()
- inScopeNamespaces()
- insertChildAfter()
- insertChildBefore()
- length()
- localName()
- name()
- namespace()
- namespaceDeclarations()
- nodeKind()
- normalize()
- parent()
- prependChild()
- processingInstructions()
- propertyIsEnumerable()
- removeNamespace()
- replace()
- setChildren()
- setLocalName()
- setName()
- setNamespace()
- setSettings()
- settings()
- text()
- toJSON()
- toString()
- toXMLString()
- valueOf()
int
Math
Methods
- 💡 The Math class contains methods and constants that represent common mathematical functions and values.
- abs()
- acos()
- asin()
- atan()
- atan2()
- ceil()
- cos()
- exp()
- floor()
- log()
- max()
- min()
- pow()
- random()
- round()
- sin()
- sqrt()
- tan()
- E
💡 [static] A mathematical constant for the base of natural logarithms, expressed as e. - LN10
💡 [static] A mathematical constant for the natural logarithm of 10, expressed as loge10, with an approximate value of 2.302585092994046. - LN2
💡 [static] A mathematical constant for the natural logarithm of 2, expressed as loge2, with an approximate value of 0.6931471805599453. - LOG10E
💡 [static] A mathematical constant for the base-10 logarithm of the constant e (Math.E), expressed as log10e, with an approximate value of 0.4342944819032518. - LOG2E
💡 [static] A mathematical constant for the base-2 logarithm of the constant e, expressed as log2e, with an approximate value of 1.442695040888963387. - PI
💡 [static] A mathematical constant for the ratio of the circumference of a circle to its diameter, expressed as pi, with a value of 3.141592653589793. - SQRT1_2
💡 [static] A mathematical constant for the square root of one-half, with an approximate value of 0.7071067811865476. - SQRT2
💡 [static] A mathematical constant for the square root of 2, with an approximate value of 1.4142135623730951.
Number
Methods
- 💡 A data type representing an IEEE-754 double-precision floating-point number.
- Number()
- toExponential()
- toFixed()
- toPrecision()
- toString()
- valueOf()
- MAX_VALUE
💡 [static] The largest representable number (double-precision IEEE-754). - MIN_VALUE
💡 [static] The smallest representable non-negative, non-zero, number (double-precision IEEE-754). - NaN
💡 [static] The IEEE-754 value representing Not a Number (NaN). - NEGATIVE_INFINITY
💡 [static] Specifies the IEEE-754 value representing negative infinity. - POSITIVE_INFINITY
💡 [static] Specifies the IEEE-754 value representing positive infinity.