Actions

Actions Contents

Actions Contents........................................................................................................ 1

Actions........................................................................................................................... 1

SWF3 Action Model....................................................................................................... 1

SWF4 Action Model....................................................................................................... 5

Stack Operations................................................................................................................ 6

Arithmetic Operators.......................................................................................................... 7

Numerical Comparison....................................................................................................... 8

Logical Operators.............................................................................................................. 9

String Manipulation......................................................................................................... 10

Type Conversion.............................................................................................................. 12

Control Flow.................................................................................................................. 13

Variables........................................................................................................................ 14

Movie Control................................................................................................................. 15

Utilities.......................................................................................................................... 18

 

Actions

 

Actions are an essential part of an interactive Flash movie.  Actions allow a movie to react to events such as mouse movements of mouse clicks.  SWF version 3 (and earlier) supports a simple action model.  SWF version 4 supports a greatly enhanced action model including an expression evaluator, variables, and conditional branching and looping.

SWF3 Action Model

 

The SWF Version 3 action model consists of eleven simple instructions for the player:

 

Play – start playing at the current frame.

Stop – stop playing at the current frame.

NextFrame – go to the next frame

PreviousFrame – go to the previous frame

GotoFrame – go to the specified frame

GotoLabel – go to the frame with the specified label

WaitForFrame – wait for the specified frame

GetURL – get the specified URL.

StopSounds – stop all sounds playing

ToggleQuality – toggle the display between high and low quality.

SetTarget – change the context of subsequent actions to a named object.

 

An action (or list of actions) can be triggered by a button state transition, or by a DoAction tag. The action is not executed immediately, but is added to a list of actions to be processed.  The list is executed on a ShowFrame tag, or after the button state has changed. An action can cause other actions to be triggered, in which case, the action is added to the list of actions to be processed. Actions are processed until the action list is empty.

 

By default, timeline actions such as Stop, Play and GoToFrame apply to movie that contains them. However, the SetTarget action (called ‘Tell Target’ in the Flash user-interface) can be used to send an action command to another movie or sprite (see DefineSprite)

 

There are 127 possible actions of which 55 are currently defined.

 

 

DoAction Tag

The DoAction flag tells the Flash player to perform a list of actions when the current frame is complete.  The actions are performed when the ShowFrame tag is encountered.

 

(See class FCTDoAction in the Flash File Format SDK)

 

Field

Type

Comment

Header

RECORDHEADER

Tag ID = 12

Actions

ACTIONRECORD[zero or more]

List of actions to perform - see below

ActionEndFlag

UI8 = 0

Always set to 0

ActionRecord

An action record consists of a 1-byte action code. If the high bit of the action code is set, then there is a 16-bit length that describes the amount of data used by the action. If the high bit is clear, the action has no data.

 

(See class FActionRecord in the Flash File Format SDK)

 

ACTIONRECORD

 

 

Field

Type

Comment

ActionCode

code = UI8

An action code as specified below

Length

If code >= 0x80 UI16

The number of bytes (after this) in the ACTIONRECORD.

ActionGotoFrame

Instructs the player to go to the specified frame in the current movie.

 

(See class FActionGotoFrame in the Flash File Format SDK)

 

Field

Type

Comment

ActionGotoFrame

UI8

Action = 0x81

Length

UI16

Always 2

Frame

UI16

Frame index

ActionGetURL

Instructs the player to get the URL specified by UrlString.  The URL can be of any type, including an HTML file, an image or another SWF movie.  If the movie is playing in a browser, the URL will be displayed in the frame specified by TargetString.  The special target names “_level0” and “_level1” are used to load another SWF movie into levels 0 and 1 respectively.

 

(See class FActionGetURL in the Flash File Format SDK)

 

 

Field

Type

Comment

ActionGetURL

UI8

Action = 0x83

Length

UI16

Combined length of strings

UrlString

STRING

Target URL string

TargetString

STRING

Target string

ActionNextFrame

Instructs the player to go to the next frame in the current movie.

(See class FActionNextFrame in the Flash File Format SDK)

 

Field

Type

Comment

ActionNextFrame

UI8

Action = 0x04

ActionPreviousFrame

Instructs the player to go to the previous frame of the current movie.

(See class FActionPrevFrame in the Flash File Format SDK)

 

Field

Type

Comment

ActionPrevFrame

UI8

Action = 0x05

ActionPlay

Instructs the player to start playing at the current frame.

 (See class FActionPlay in the Flash File Format SDK)

 

Field

Type

Comment

ActionPlay

UI8

Action = 0x06

ActionStop

Instructs the player to stop playing the movie at the current frame.

(See class FActionStop in the Flash File Format SDK)

 

Field

Type

Comment

ActionStop

UI8

Action = 0x07

ActionToggleQuality

Toggle the display between high and low quality.

(See class FActionToggleQuality in the Flash File Format SDK)

 

Field

Type

Comment

ActionToggleQualty

UI8

Action = 0x08

ActionStopSounds

Instructs the player to stop playing all sounds.

(See class FActionStopSounds in the Flash File Format SDK)

 

Field

Type

Comment

ActionStopSounds

UI8

Action = 0x09

 
ActionWaitForFrame

Instructs the player to wait until the specified frame, otherwise skip the specified number of actions.

(See class FActionWaitForFrame in the Flash File Format SDK)

 

Field

Type

Comment

ActionWaitForFrame

UI8

Action = 0x8A

Length

UI16

Always 3

Frame

UI16

Frame to wait for

SkipCount

UI8

Number of actions to skip if frame is not loaded

 

ActionSetTarget

Instructs the player to change the context of subsequent actions, so they apply to a named object (TargetName) rather than the current movie.

 

For example, the SetTarget action can be used to control the timeline of a sprite object.  The following sequence of actions sends a sprite called “spinner” to the first frame in its timeline:

 

1.     SetTarget “spinner”

2.     GotoFrame zero

3.     SetTarget “” (empty string)

4.     End of actions. (Action code = 0)

 

All actions following SetTarget “spinner” apply to the spinner object until SetTarget “”, which sets the action context back to the current movie.  For a complete discussion of target names see DefineSprite.

 

(See class FActionSetTarget in the Flash File Format SDK)

 

Field

Type

Comment

ActionSetTarget

UI8

Action = 0x8B

Length

U16

Length of record

TargetName

STRING

Target of action target

 

ActionGoToLabel

Instructs the player to go to frame associated with the specified label.  A label can be attached to a frame with the FrameLabel tag.

 

(See class FActionGoToLabel in the Flash File Format SDK)

 

Field

Type

Comment

ActionGoToLabel

UI8

Action = 0x8C

Length

U16

Length of record

Label

STRING

Frame label

SWF4 Action Model

 

SWF version 4 supports a greatly enhanced action model including an expression evaluator, variables, conditional branching and looping.

 

The Flash 4 player incorporates a stack machine that interprets and executes SWF4 actions.  The key SWF4 action is ActionPush.  This action is used to push parameters on to the stack.  Unlike SWF3 actions, SWF4 actions do not have parameters embedded in the tag, rather they push parameters onto the stack, and pop results off the stack.

 

The expression evaluator is also stack based.  Arithmetic operators include ActionAdd, ActionSubtract, ActionMuliply and ActionDivide.  The Flash authoring tool converts expressions to a series of stack operations.  For example, the expression 1+x*3 is represented as the following action sequence:

 

ActionPush “x”

ActionGetVariable

ActionPush “3”

ActionMultiply

ActionPush “1”

ActionAdd

 

The result of this expression is on the stack.  Note that all values on the stack, including numeric values, are stored as strings.  In the example above, the numeric values 3 and 1, are pushed on the stack as the strings “3” and “1”.

 

The Program Counter

The current point of execution of the player is called the Program Counter or ‘PC’.  The value of the PC is defined as the address of the action following the action currently being executed.  Control Flow actions such as ActionJump, change the value of the PC.  These actions are similar to ‘branch’ instructions in assembler, or ‘go to’ instructions in other languages.  For example, ActionJump tells the player to ‘jump’ to a new position in the action sequence.  The new PC is specified as an offset from the current PC.  There can be both positive and negative offsets, so the player can jump forward and backward in the action sequence.

 

SWF4 Actions

Below is an overview of SWF4 actions:

 
Arithmetic Operators

 

ActionAdd

ActionMultiply

ActionDivide

 

ActionSubtract

 

 

Numerical Comparison

 

ActionLess

ActionEquals

 

Logical Operators

 

ActionAnd 

ActionOr 

 ActionNot

String Manipulation

 

ActionStringAdd

ActionStringLength

ActionMBStringLength

ActionStringEquals

ActionStringLess

 

ActionStringExtract

ActionMBStringExtract

Stack Operations

 

 ActionPush

 ActionPop

 

Type Conversion

 

ActionToInteger

ActionCharToAscii

 ActionAsciiToChar

 

ActionMBCharToAscii

ActionMBAsciiToChar

 

 

Control Flow

 

 ActionJump

 ActionIf

 ActionCall

Variables

 

ActionGetVariable

ActionSetVariable

 

Movie Control

 

ActionGetURL

ActionGetProperty

ActionRemoveSprite

ActionWaitForFrame2

 ActionGotoFrame2

ActionSetProperty

ActionStartDrag

 

ActionSetTarget2

ActionCloneSprite

ActionEndDrag

 

Utilities

 

 ActionTrace

 

 ActionGetTime

 ActionRandomNumber

 

 

 

Stack Operations

ActionPush

Pushes a value to the stack

 (See class FActionPush in the Flash File Format SDK)

 

Field

Type

Comment

ActionPush

UI8

Action = 0x96

Type

UI8

0 = string literal
1 = floating-point literal

String

IF Type = 0, STRING

 Null terminated string

Float

IF Type = 1, FLOAT

 32-bit single-precision little-endian fp value

 

ActionPush pushes a value on to the stack. The Type field specifies the type of the value to be pushed.  If Type = 0, the value to be pushed is specified as a STRING.  If Type = 1, the value to be pushed is specified as a 32-bit IEEE single-precision little-endian floating-point value.

 

Most data types are pushed on the stack as STRINGs, including numerical values.  The numerical value 3.7, is stored as “3.7.  The True value is stored as "1" and False as "0". The NewLine value is stored as "\n".

 

PropertyIds are pushed as FLOATs.  PropertyIds are used by ActionGetProperty and ActionSetProperty to access the properties of named objects. 

 

 

ActionPop

Pop a value from the stack

(See class FActionPop in the Flash File Format SDK)

 

Field

Type

Comment

ActionPop

UI8

Action = 0x17

1.     Pops a value off the stack and discards the value.

 

 

Arithmetic Operators

ActionAdd

Add two numbers

(See class FActionAdd in the Flash File Format SDK)

 

Field

Type

Comment

ActionAdd

UI8

Action = 0x0A

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     The numbers are added.

5.     Pushes the result, A+B, to the stack.

 

ActionSubtract

 Subtract two numbers

(See class FActionSubtract in the Flash File Format SDK)

 

Field

Type

Comment

ActionSubtract

UI8

Action = 0x0B

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     A is subtracted from B.

5.     Pushes the result, B-A, to the stack.

 

ActionMultiply

Multiply two numbers

(See class FActionMultiply in the Flash File Format SDK)

 

Field

Type

Comment

ActionMultiply

UI8

Action = 0x0C

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     The numbers are multiplied.

5.     Pushes the result, A*B, to the stack.

ActionDivide

Divide two numbers

(See class FActionDivide in the Flash File Format SDK)

 

Field

Type

Comment

ActionDivide

UI8

Action = 0x0D

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     B is divided by A.

5.     Pushes the result, B/A, to the stack.

6.     If A is zero, the result is the string #ERROR#.

 

 

Numerical Comparison

ActionEquals

Tests two numbers for equality

(See class FActionEquals in the Flash File Format SDK)

 

Field

Type

Comment

ActionEquals

UI8

Action = 0x0E

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     The numbers are compared for equality.

5.     If the numbers are equal, a 1 (TRUE) is pushed to the stack.

6.     Otherwise, a 0 is pushed to the stack.

 

ActionLess

Tests if a number is less than another number.

(See class FActionLess in the Flash File Format SDK)

 

Field

Type

Comment

ActionLess

UI8

Action = 0x0F

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     If B < A, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.

 

 

Logical Operators

ActionAnd

Performs a logical AND of two numbers.

(See class FActionAnd in the Flash File Format SDK)

 

Field

Type

Comment

ActionAnd

UI8

Action = 0x10

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     If both numbers are nonzero, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.

 

 

ActionOr

Performs a logical OR of two numbers.

(See class FActionOr in the Flash File Format SDK)

 

Field

Type

Comment

ActionOr

UI8

Action = 0x11

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are converted to floating-point; non-numeric values evaluate to 0.

4.     If either numbers is nonzero, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.

 

 

ActionNot

Performs a logical NOT of a number.

(See class FActionNot in the Flash File Format SDK)

 

Field

Type

Comment

ActionNot

UI8

Action = 0x12

1.     Pops a value off the stack.

2.     The value is converted to floating-point; non-numeric values evaluate to 0.

3.     If the value is zero, a 1 is pushed on the stack.

4.     If the value is nonzero, a 0 is pushed on the stack.

 

 

String Manipulation

ActionStringEquals

Tests two strings for equality

(See class FActionStringEquals in the Flash File Format SDK)

 

Field

Type

Comment

ActionStringEquals

UI8

Action = 0x13

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     A and B are compared as strings. The comparison is case-sensitive.

4.     If the strings are equal, a 1 (TRUE) is pushed to the stack.

5.     Otherwise, a 0 is pushed to the stack.

 

ActionStringLength

Computes the length of a string.

(See class FActionStringLength in the Flash File Format SDK)

 

Field

Type

Comment

ActionStringLength

UI8

Action = 0x14

1.     Pops a string off the stack.

2.     The length of the string is calculated and pushed to the stack.

 

ActionStringAdd

Concatenates two strings

(See class FActionStringAdd in the Flash File Format SDK)

 

Field

Type

Comment

ActionStringAdd

UI8

Action = 0x21

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     The concatenation BA is pushed to the stack.

ActionStringExtract

Extracts a substring from a string

(See class FActionStringExtract in the Flash File Format SDK)

 

Field

Type

Comment

ActionStringExtract

UI8

Action = 0x15

1.     Pops number count off the stack.

2.     Pops number index off the stack.

3.     Pops string string off the stack.

4.     The substring of string starting at the index’th character and count characters in length is pushed to the stack.

5.     If either index or count do not evaluate to integers, the result is the empty string.

 

ActionStringLess

Test if a string is less than another string

(See class FActionStringLess in the Flash File Format SDK)

 

Field

Type

Comment

ActionStringLess

UI8

Action = 0x29

1.     Pops value A off the stack.

2.     Pops value B off the stack.

3.     If B < A using a byte-by-byte comparison, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.

 

ActionMBStringLength

Computes the length of a string, multi-byte aware.

(See class FActionMBStringLength in the Flash File Format SDK)

 

Field

Type

Comment

ActionMBStringLength

UI8

Action = 0x31

1.     Pops a string off the stack.

2.     The length of the string in characters is calculated and pushed to the stack.

3.     This is a multi-byte aware version of ActionStringLength. On systems with double-byte support, a double-byte character is counted as a single character.

 

ActionMBStringExtract

Extracts a substring from a string, multi-byte aware

(See class FActionMBStringExtract in the Flash File Format SDK)

 

Field

Type

Comment

ActionMBStringExtract

UI8

Action = 0x35

1.     Pops number count off the stack.

2.     Pops number index off the stack.

3.     Pops string string off the stack.

4.     The substring of string starting at the index’th character and count characters in length is pushed to the stack.

5.     If either index or count do not evaluate to integers, the result is the empty string.

6.     This is a multi-byte aware version of ActionStringExtract. index and count are treated as character indices, counting double-byte characters as single characters.

 

Type Conversion

ActionToInteger

Convert to integer

(See class FActionToInteger in the Flash File Format SDK)

 

Field

Type

Comment

ActionToInteger

UI8

Action = 0x18

1.     Pops a value off the stack.

2.     The value is converted to a number.

3.     Next, any digits after the decimal point are discarded, resulting in an integer.

4.     The resulting integer is pushed to the stack.

 

ActionCharToAscii

Convert character code to ASCII

(See class FActionCharToAscii in the Flash File Format SDK)

 

Field

Type

Comment

ActionCharToAscii

UI8

Action = 0x32

1.     Pops value off the stack.

2.     The first character of value is converted to a numeric ASCII character code.

3.     The resulting character code is pushed to the stack.

 

ActionAsciiToChar

Convert ASCII to character code

(See class FActionAsciiToChar in the Flash File Format SDK)

 

Field

Type

Comment

ActionAsciiToChar

UI8

Action = 0x33

1.     Pops value off the stack.

2.     The value is converted from a number to the corresponding ASCII character..

3.     The resulting character is pushed to the stack.

ActionMBCharToAscii

Convert character code to ASCII, multi-byte aware

(See class FActionMBCharToAscii in the Flash File Format SDK)

 

Field

Type

Comment

ActionMBCharToAscii

UI8

Action = 0x36

1.     Pops value off the stack.

2.     The first character of value is converted to a numeric character code. If the first character of value is a double-byte character, a 16-bit value is constructed with the first byte as the high order byte and the second byte as the low order byte.

3.     The resulting character code is pushed to the stack.

 

ActionMBAsciiToChar

Convert ASCII to character code, multi-byte aware

(See class FActionMBAsciiToChar in the Flash File Format SDK)

 

Field

Type

Comment

ActionMBAsciiToChar

UI8

Action = 0x37

1.     Pops value off the stack.

2.     The value is converted from a number to the corresponding character. If the character is a 16-bit value (>= 256), a double-byte character is constructed with the first byte containing the high-order byte, and the second byte containing the low-order byte.

3.     The resulting character is pushed to the stack.

 

Control Flow

ActionJump

Unconditional branch

(See class FActionJump in the Flash File Format SDK)

 

Field

Type

Comment

ActionJump

UI8

Action = 0x99

BranchOffset

I16

 

1.     BranchOffset bytes are added to the instruction pointer in the execution stream.

2.     The offsets is a signed quantity, enabling branches from –32,768 bytes to 32,767 bytes.

3.     An offset of 0 points to the action directly after the ActionJump action.

 

ActionIf

Conditional Test and Branch

(See class FActionIf in the Flash File Format SDK)

 

Field

Type

Comment

ActionIf

UI8

Action = 0x9A

BranchOffset

I16

 

1.     Pops Condition, a number, off the stack.

2.     Tests if Condition is nonzero: If Condition is nonzero, BranchOffset bytes are added to the instruction pointer in the execution stream.

3.     The offset is a signed quantity, enabling branches from –32768 bytes to 32767 bytes. An offset of 0 points to the action directly after the ActionIf action.

 

ActionCall

Call a subroutine

(See class FActionCall in the Flash File Format SDK)

 

Field

Type

Comment

ActionCall

UI8

Action = 0x9E

1.     Pops a value off the stack.

2.     This value should be either a string matching a frame label, or a number indicating a frame number.

3.     The value may be prefixed by a target string identifying the movie clip that contains the frame being called.

4.     If the frame is successfully located, the actions in the target frame are executed. After the actions in the target frame are executed, execution resumes at the instruction after the ActionCall instruction.

5.     If the frame cannot be found, nothing happens.

6.     NOTE: This action's tag (0x9E) has the high bit set, which will waste a few bytes in SWF file size. This is a bug.

 

Variables

ActionGetVariable

Gets a variable’s value

(See class FActionGetVariable in the Flash File Format SDK)

 

Field

Type

Comment

ActionGetVariable

UI8

Action = 0x1C

1.     Pops name off the stack, which is a string naming the variable to get.

2.     Pushes the value of the variable to the stack.

 

A variable in another execution context may be referenced by prefixing the variable name with the target path and a colon.  For example: /A/B:FOO references variable FOO in movie clip with target path /A/B.

 

ActionSetVariable

Sets a variable

(See class FActionSetVariable in the Flash File Format SDK)

Field

Type

Comment

ActionSetVariable

UI8

Action = 0x1D

1.     Pops value off the stack.

2.     Pops name off the stack, which is a string naming the variable to set.

3.     Sets the variable name in the current execution context to value.

 

A variable in another execution context may be referenced by prefixing the variable name with the target path and a colon. For example: /A/B:FOO references variable FOO in movie clip with target path /A/B.

 

Movie Control

ActionGetURL2

Get URL, stack-based

(See class FActionGetURL2 in the Flash File Format SDK)

 

Field

Type

Comment

ActionGetURL2

UI8

Action = 0x9A

Method

UI8

0 = None
1 = GET
2 = POST

1.     Pops window off the stack. window specifies the target window, which may be an empty string to indicate the current window.

2.     Pops url off the stack. url which specifies the URL to be retrieved.

3.     Method specifies the method to use for the HTTP request.

o      A value of 0 indicates that this is not a form request, so the movie clip’s variables should not be encoded and submitted.

o      A value of 1 specifies a HTTP GET request.

o      A value of 2 specifies a HTTP POST request.

o      If method is 1 (GET) or 2 (POST), the variables in the current movie clip are submitted to the URL using the standard x-www-urlencoded encoding and the HTTP request method specified by method.

 

ActionGotoFrame2

Go to frame, stack-based.

(See class FActionGotoFrame2 in the Flash File Format SDK)

 

Field

Type

Comment

ActionGotoFrame2

UI8

Action = 0x9F

Play

UB[1]

 

1.     Pops frame off the stack.

2.     If frame is a number, the next frame of the movie to be displayed will be the frame’th frame in the current movie clip.

3.     If frame is a string, frame is treated as a frame label. If the specified label exists in the current movie clip, the labeled frame will become the current frame. Otherwise, the action is ignored.

4.     Either a frame or a number may be prefixed by a target path, e.g. /MovieClip:3 or /MovieClip:FrameLabel

5.     If the Play flag is set, the action goes to the specified frame and begins playing the enclosing movie clip. Otherwise, the action goes to the specified frame and stops.

 

ActionSetTarget2

Set current context, stack-based

(See class FActionSetTarget2 in the Flash File Format SDK)

 

Field

Type

Comment

ActionSetTarget2

UI8

Action = 0x20

1.     Pops target off the stack and makes it the current active context.

2.     This action behaves exactly like the original ActionSetTarget from Flash 3, but is stack-based to enable the target path to be the result of expression evaluation.

 

ActionGetProperty

Gets a movie property

(See class FActionGetProperty in the Flash File Format SDK)

 

Field

Type

Comment

ActionGetProperty

UI8

Action = 0x22

1.     Pops index off the stack.

2.     Pops target off the stack.

3.     Retrieves the value of the property enumerated as index from the movie clip with target path target and pushes the value to the stack.

 

The Property index values are as follows:

 

Property

Value

_X

0

_Y

1

_xscale

2

_yscale

3

_currentframe

4

_totalframes

5

_alpha

6

_visible

7

_width

8

_height

9

_rotation

10

_target

11

_framesloaded

12

_name

13

_droptarget

14

_url

15

_highquality

16

_focusrect

17

_soundbuftime

18

 

ActionSetProperty

Sets a movie property

(See class FActionSetProperty in the Flash File Format SDK)

 

Field

Type

Comment

ActionSetProperty

UI8

Action = 0x23

1.     Pops value off the stack.

2.     Pops index off the stack.

3.     Pops target off the stack.

4.     Sets the property enumerated as index in the movie clip with target path target to the value value.

 

ActionCloneSprite

Clones a sprite

(See class FActionCloneSprite in the Flash File Format SDK)

 

Field

Type

Comment

ActionCloneSprite

UI8

Action = 0x24

1.     Pops depth off the stack.

2.     Pops target off the stack.

3.     Pops source off the stack.

4.     Duplicates movie clip source, giving the new instance the name target, at z-order depth depth.

 

ActionRemoveSprite

Removes a clone sprite

(See class FActionRemoveSprite in the Flash File Format SDK)

 

Field

Type

Comment

ActionRemoveSprite

UI8

Action = 0x25

1.     Pops target off the stack.

2.     Removes the clone movie clip identified by target path target.

 

ActionStartDrag

Starts dragging a movie clip

(See class FActionStartDrag in the Flash File Format SDK)

 

Field

Type

Comment

ActionStartDrag

UI8

Action = 0x27

1.     Pops target off the stack. target identifies the movie clip to be dragged.

2.     Pops lockcenter off the stack. If lockcenter evaluates to a nonzero value, the center of the dragged movie clip is locked to the mouse position. Otherwise, the movie clip moves relatively to the mouse position when the drag started.

3.     Pops constrain off the stack.

4.     If constrain evaluates to a nonzero value:

1.     Pops y2 off the stack.

2.     Pops x2 off the stack.

3.     Pops y1 off the stack.

4.     Pops x1 off the stack.

 

ActionEndDrag

Ends drag operation

(See class FActionEndDrag in the Flash File Format SDK)

 

Field

Type

Comment

ActionEndDrag

UI8

Action = 0x28

1.     Ends the drag operation in progress, if any.

 

ActionWaitForFrame2

Wait for a frame to be loaded, stack-based

(See class FActionWaitForFrame2 in the Flash File Format SDK)

 

Field

Type

Comment

ActionWaitForFrame2

UI8

Action = 0x8D

SkipCount

UI8

 

1.     Pops frame off the stack.

2.     If the frame identified by frame has been loaded, SkipCount actions following the current one are skipped.

3.     frame is evaluated in the same way as the Goto Frame 2 action.

 

 

Utilities

ActionTrace

Sends debugging output string

(See class FActionTrace in the Flash File Format SDK)

 

Field

Type

Comment

ActionTrace

UI8

Action = 0x26

1.     Pops value off the stack.

2.     In the Test Movie mode of the Flash editor, appends value to the output window if the debugging level is not set to None.

3.     In the Player, nothing happens.

 

ActionGetTime

Reports milliseconds since player started

(See class FActionGetTime in the Flash File Format SDK)

 

Field

Type

Comment

ActionGetTime

UI8

Action = 0x34

1.     Calculates the number of milliseconds since the Player was started (an integer).

2.     This number is pushed to the stack.

 

ActionRandomNumber

Calculates a random number

(See class FActionRandomNumber in the Flash File Format SDK)

 

Field

Type

Comment

ActionGetTime

UI8

Action = 0x30

1.     Pops maximum off the stack.

2.     Calculates a random number, an integer in the range 0 ... (maximum-1)

3.     This random number is pushed to the stack.