| java.lang.Object org.openlaszlo.iv.flash.api.FlashItem org.openlaszlo.iv.flash.api.FlashObject org.openlaszlo.iv.flash.api.action.Program
Program | final public class Program extends FlashObject (Code) | | Wrapper of ActionScript bytecode.
The bytecodes are not parsed into some objects but rather
kept in their "bytecoded" form. Parsing the stuff is very
simple and straightforward and due to the nature of JGenerator
this is what we need most of the time.
author: Dmitry Skavish |
Inner Class :static class ForwardRef | |
Constructor Summary | |
public | Program() Creates empty program of default capacity. | public | Program(FlashBuffer body) Creates program from specified flashbuffer. | public | Program(byte[] buf, int start, int end) Creates program from specified buffer of bytecodes. |
Method Summary | |
protected boolean | _isConstant() | public void | add() Adds two numbers. | public void | addConstantPool(String[] constants) | public void | addString() Concatenates two strings. | public void | apply(Context context) Applies specified context to this program
Searches for all possible generator variables in this program
data and applies specified context to them.
Since changing the data may change the offsets used in the program
to perform gotos and jumps the special care taken to resolve forward
references in the bytecode. | public FlashBuffer | body() | public void | callFrame() Calls a subroutine. | public void | callFunction() Calls a function. | public void | callMethod() Calls a method of an object. | public void | chr() Converts ASCII to character code. | public void | cloneClip() Clones a sprite. | public void | divide() Divides two numbers. | public void | endDrag() Ends drag operation. | public void | equal() Tests two numbers for equality. | public void | eval() Gets a variable’s value. | final protected int | getByte() | public FlashItem | getCopy(ScriptCopier copier) | final protected int | getDWord() | public int | getLength() | public void | getMember() Get member. | final protected int | getPos() | public void | getProperty() Gets a movie property
- Pops index off the stack.
| final protected String | getString() | public int | getTag() | public void | getTimer() Reports milliseconds since player started. | final protected int | getUByte() | final protected int | getUDWord() | public void | getURL(String url, String target) 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. | public void | getURL(int method) Get URL, stack-based.
- Pops window off the stack.
| public void | getURL_GET() Get URL using GET method, stack-based.
- Pops window off the stack.
| public void | getURL_POST() Get URL using POST method, stack-based.
- Pops window off the stack.
| final protected int | getUWord() | public void | getVar() An equivalent of
Program.eval . | final protected int | getWord() | public void | gotoFrame(int frame) Instructs the player to go to the specified frame in the current movie. | public void | gotoFrameAndPlay() Go to frame and play, stack-based.
- Pops frame off the stack.
- 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.
- 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.
| public void | gotoFrameAndStop() Go to frame and stop, stack-based.
- Pops frame off the stack.
- 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.
- 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.
| public void | gotoLabel(String label) Instructs the player to go to frame associated with the specified label. | public void | jump(int offset) Unconditional branch. | public void | jumpIfTrue(int offset) Conditional Test and Branch. | public void | lessThan() Tests if a number is less than another number. | public void | logicalAnd() Performs a logical AND of two numbers. | public void | logicalNot() Performs a logical NOT of a number. | public void | logicalOr() Performs a logical OR of two numbers. | public void | mbChr() Converts ASCII to character code, multi-byte aware. | public void | mbLength() Computes the length of a string, multi-byte aware. | public void | mbOrd() Converts character code to ASCII, multi-byte aware. | public void | mbSubString() Extracts a substring from a string, multi-byte aware.
- Pops number count off the stack.
- Pops number index off the stack.
- Pops string string off the stack.
- The substring of string starting at the index’th character and
count characters in length is pushed to the stack.
- If either index or count do not evaluate to integers, the result
is the empty string.
- This is a multi-byte aware version of ActionStringExtract.
| public void | multiply() Multiplies two numbers. | public void | newObject() | public void | nextFrame() Instructs the player to go to the next frame in the current movie. | public void | none() | public void | ord() Converts character code to ASCII. | public void | play() Instructs the player to start playing at the current frame. | public void | pop() Pops a value from the stack. | public void | prevFrame() Instructs the player to go to the previous frame in the current movie. | public void | printContent(PrintStream out, String indent) | public void | push(String data) Pushes a string to the stack. | public void | push(float data) Pushes a float to the stack. | public void | push(int data) Pushes an int to the stack. | public void | push(Short const_idx) | public void | push(Object[] data) | public void | push(Object o) | public void | random() Calculates a random number.
- Pops maximum off the stack.
- Calculates a random number, an integer in the range 0 ...
| public void | removeClip() Removes a clone sprite. | public void | setMember() Set member. | final protected void | setPos(int pos) | public void | setProperty() Sets a movie property. | public void | setTarget() Set current context, stack-based
- Pops target off the stack and makes it the current active context.
| public void | setTarget(String target) 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. | public void | setVar() Sets a variable.
- Pops value off the stack.
- Pops name off the stack, which is a string naming the variable to set.
- 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. | public void | startDrag() Starts dragging a movie clip.
- Pops target off the stack.
| public void | stop() Instructs the player to stop playing the movie at the current frame. | public void | stopSounds() Instructs the player to stop playing all sounds. | public void | stringEqual() Tests two strings for equality.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are compared as strings.
| public void | stringLength() Computes the length of a string. | public void | stringLessThan() Tests if a string is less than another string. | public void | subString() Extracts a substring from a string. | public void | subtract() Subtracts two numbers. | public void | toInt() Converts to integer. | public void | toggleQuality() Toggle the display between high and low quality. | public void | waitForFrame(int frame, int skip) Instructs the player to wait until the specified frame,
otherwise skip the specified number of actions. | public void | waitForFrameAndSkip(int skip) Wait for a frame to be loaded, stack-based. | public void | write(FlashOutput fob) |
PROP_ALPHA | final public static int PROP_ALPHA(Code) | | |
PROP_CURRENTFRAME | final public static int PROP_CURRENTFRAME(Code) | | |
PROP_DROPTARGET | final public static int PROP_DROPTARGET(Code) | | |
PROP_FOCUSRECT | final public static int PROP_FOCUSRECT(Code) | | |
PROP_FRAMESLOADED | final public static int PROP_FRAMESLOADED(Code) | | |
PROP_HEIGHT | final public static int PROP_HEIGHT(Code) | | |
PROP_HIGHQUALITY | final public static int PROP_HIGHQUALITY(Code) | | |
PROP_NAME | final public static int PROP_NAME(Code) | | |
PROP_QUALITY | final public static int PROP_QUALITY(Code) | | |
PROP_ROTATION | final public static int PROP_ROTATION(Code) | | |
PROP_SOUNDBUFTIME | final public static int PROP_SOUNDBUFTIME(Code) | | |
PROP_TARGET | final public static int PROP_TARGET(Code) | | |
PROP_TOTALFRAMES | final public static int PROP_TOTALFRAMES(Code) | | |
PROP_URL | final public static int PROP_URL(Code) | | |
PROP_VISIBLE | final public static int PROP_VISIBLE(Code) | | |
PROP_WIDTH | final public static int PROP_WIDTH(Code) | | |
PROP_X | final public static int PROP_X(Code) | | |
PROP_XMOUSE | final public static int PROP_XMOUSE(Code) | | |
PROP_XSCALE | final public static int PROP_XSCALE(Code) | | |
PROP_Y | final public static int PROP_Y(Code) | | |
PROP_YMOUSE | final public static int PROP_YMOUSE(Code) | | |
PROP_YSCALE | final public static int PROP_YSCALE(Code) | | |
Program | public Program()(Code) | | Creates empty program of default capacity.
|
Program | public Program(FlashBuffer body)(Code) | | Creates program from specified flashbuffer.
Specified flashbuffer is not copied but directly used.
Parameters: body - flashbuffer containing actionscript bytecode |
Program | public Program(byte[] buf, int start, int end)(Code) | | Creates program from specified buffer of bytecodes.
The bytecodes from the buffer copied into internal flashbuffer
Parameters: buf - buffer containing bytecodes Parameters: start - offset in the buffer Parameters: end - end offset in the buffer |
_isConstant | protected boolean _isConstant()(Code) | | |
add | public void add()(Code) | | Adds two numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- The numbers are added.
- Pushes the result, A+B, to the stack.
since: flash 4 |
addConstantPool | public void addConstantPool(String[] constants)(Code) | | Creates constant pool
Parameters: constants - array of constants to be created since: flash 5 |
addString | public void addString()(Code) | | Concatenates two strings.
- Pops value A off the stack.
- Pops value B off the stack.
- The concatenation BA is pushed to the stack.
since: flash 4 |
apply | public void apply(Context context)(Code) | | Applies specified context to this program
Searches for all possible generator variables in this program
data and applies specified context to them.
Since changing the data may change the offsets used in the program
to perform gotos and jumps the special care taken to resolve forward
references in the bytecode.
Parameters: context - specified generator context |
callFrame | public void callFrame()(Code) | | Calls a subroutine.
- Pops a value off the stack.
- This value should be either a string matching a frame label, or a number
indicating a frame number.
- The value may be prefixed by a target string identifying the movie clip that
contains the frame being called.
- 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.
- If the frame cannot be found, nothing happens.
- 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.
since: flash 4 |
callFunction | public void callFunction()(Code) | | Calls a function.
Stack state must be [ arguments, argCount, methodName ]
since: flash 5 |
callMethod | public void callMethod()(Code) | | Calls a method of an object.
Stack state must be [ arguments, argCount, object, methodName ]
since: flash 5 |
chr | public void chr()(Code) | | Converts ASCII to character code.
- Pops value off the stack.
- The value is converted from a number to the corresponding ASCII character..
- The resulting character is pushed to the stack.
since: flash 4 |
cloneClip | public void cloneClip()(Code) | | Clones a sprite.
- Pops depth off the stack.
- Pops target off the stack.
- Pops source off the stack.
- Duplicates movie clip source, giving the new instance
the name target, at z-order depth depth.
since: flash 4 |
divide | public void divide()(Code) | | Divides two numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- B is divided by A.
- Pushes the result, B/A, to the stack.
- If A is zero, the result is the string #ERROR#.
Note: When playing a Flash 5 .SWF, NaN, Infinity or –Infinity is pushed to the stack instead of #ERROR#.
since: flash 4 |
endDrag | public void endDrag()(Code) | | Ends drag operation.
- Ends the drag operation in progress, if any.
since: flash 4 |
equal | public void equal()(Code) | | Tests two numbers for equality.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- The numbers are compared for equality.
- If the numbers are equal, a 1 (TRUE) is pushed to the stack.
- Otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
eval | public void eval()(Code) | | Gets a variable’s value.
- Pops name off the stack, which is a string naming the variable to get.
- Pushes the value of the variable to the stack.
since: flash 4 |
getByte | final protected int getByte()(Code) | | |
getDWord | final protected int getDWord()(Code) | | |
getLength | public int getLength()(Code) | | Gets length of the program
length of the program |
getMember | public void getMember()(Code) | | Get member.
Stack state must be [ object, member name ]
since: flash 5 |
getPos | final protected int getPos()(Code) | | |
getProperty | public void getProperty()(Code) | | Gets a movie property
- Pops index off the stack.
- Pops target off the stack.
- Retrieves the value of the property enumerated as index from
the movie clip with target path target and pushes the value to the stack.
since: flash 4 |
getTag | public int getTag()(Code) | | |
getTimer | public void getTimer()(Code) | | Reports milliseconds since player started.
- Calculates the number of milliseconds since the Player was started (an integer).
- This number is pushed to the stack.
since: flash 4 |
getUByte | final protected int getUByte()(Code) | | |
getUDWord | final protected int getUDWord()(Code) | | |
getURL | public void getURL(String url, String target)(Code) | | 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.
Parameters: url - specified url Parameters: target - target since: flash 3 |
getURL | public void getURL(int method)(Code) | | Get URL, stack-based.
- Pops window off the stack. window specifies the target window,
which may be an empty string to indicate the current window.
- Pops url off the stack. url which specifies the URL to be retrieved.
Parameters: method - Method specifies the method to use for the HTTP request. If (method and 0x40) != 0 then target is movie clip target,NOT browser window target!- A value of 0 indicates that this is not a form request,so the movie clip’s variables should not be encoded and submitted.
- A value of 1 specifies a HTTP GET request.
- A value of 2 specifies a HTTP POST request.
- If method is 1 (GET) or 2 (POST), the variables in the currentmovie clip are submitted to the URL using the standardx-www-urlencoded encoding and the HTTP request method specified by method.
since: flash 4 |
getURL_GET | public void getURL_GET()(Code) | | Get URL using GET method, stack-based.
- Pops window off the stack. window specifies the target window,
which may be an empty string to indicate the current window.
- Pops url off the stack. url which specifies the URL to be retrieved.
See Also: Program.getURL(int) since: flash 4 |
getURL_POST | public void getURL_POST()(Code) | | Get URL using POST method, stack-based.
- Pops window off the stack. window specifies the target window,
which may be an empty string to indicate the current window.
- Pops url off the stack. url which specifies the URL to be retrieved.
See Also: Program.getURL(int) since: flash 4 |
getUWord | final protected int getUWord()(Code) | | |
getWord | final protected int getWord()(Code) | | |
gotoFrame | public void gotoFrame(int frame)(Code) | | Instructs the player to go to the specified frame in the current movie.
Parameters: frame - frame number since: flash 3 |
gotoFrameAndPlay | public void gotoFrameAndPlay()(Code) | | Go to frame and play, stack-based.
- Pops frame off the stack.
- 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.
- 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.
- Either a frame or a number may be prefixed by a target path, e.g. /MovieClip:3 or /MovieClip:FrameLabel
since: flash 4 |
gotoFrameAndStop | public void gotoFrameAndStop()(Code) | | Go to frame and stop, stack-based.
- Pops frame off the stack.
- 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.
- 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.
- Either a frame or a number may be prefixed by a target path, e.g. /MovieClip:3 or /MovieClip:FrameLabel
since: flash 4 |
gotoLabel | public void gotoLabel(String label)(Code) | | Instructs the player to go to frame associated with the specified label.
A label can be attached to a frame with the FrameLabel tag.
Parameters: label - specified frame label since: flash 3 |
jump | public void jump(int offset)(Code) | | Unconditional branch.
- BranchOffset bytes are added to the instruction pointer in the execution stream.
- The offsets is a signed quantity, enabling branches from –32,768 bytes to 32,767 bytes.
- An offset of 0 points to the action directly after the ActionJump action.
Parameters: offset - specified offset since: flash 4 |
jumpIfTrue | public void jumpIfTrue(int offset)(Code) | | Conditional Test and Branch.
- Pops Condition, a number, off the stack.
- Tests if Condition is nonzero: If Condition is nonzero,
BranchOffset bytes are added to the instruction pointer in the execution stream.
Note: When playing a Macromedia Flash 5 .SWF, Condition is converted to a boolean and compared to true, not 0.
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.
Parameters: offset - specified offset since: flash 4 |
lessThan | public void lessThan()(Code) | | Tests if a number is less than another number.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- The numbers are compared for equality.
- If B < A, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
logicalAnd | public void logicalAnd()(Code) | | Performs a logical AND of two numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- If both numbers are nonzero, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
logicalNot | public void logicalNot()(Code) | | Performs a logical NOT of a number.
Note that in Macromedia Flash 5 .SWF files, the ActionNot action
converts its argument to a boolean, and pushes a result of type boolean.
In Macromedia Flash 4 .SWF files, the argument and result are numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- The numbers are compared for equality.
- If the numbers are equal, a 1 (TRUE) is pushed to the stack.
- Otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
logicalOr | public void logicalOr()(Code) | | Performs a logical OR of two numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- If either numbers is nonzero, a 1 is pushed to the stack; otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
mbChr | public void mbChr()(Code) | | Converts ASCII to character code, multi-byte aware.
- Pops value off the stack.
- 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.
- The resulting character is pushed to the stack.
since: flash 4 |
mbLength | public void mbLength()(Code) | | Computes the length of a string, multi-byte aware.
- Pops a string off the stack.
- The length of the string in characters is calculated and pushed to the stack.
- 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.
since: flash 4 |
mbOrd | public void mbOrd()(Code) | | Converts character code to ASCII, multi-byte aware.
- Pops value off the stack.
- 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.
- The resulting character code is pushed to the stack.
since: flash 4 |
mbSubString | public void mbSubString()(Code) | | Extracts a substring from a string, multi-byte aware.
- Pops number count off the stack.
- Pops number index off the stack.
- Pops string string off the stack.
- The substring of string starting at the index’th character and
count characters in length is pushed to the stack.
- If either index or count do not evaluate to integers, the result
is the empty string.
- This is a multi-byte aware version of ActionStringExtract. index and count are
treated as character indices, counting double-byte characters as single characters.
since: flash 4 |
multiply | public void multiply()(Code) | | Multiplies two numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- The numbers are multiplied.
- Pushes the result, A*B, to the stack.
since: flash 4 |
newObject | public void newObject()(Code) | | New Object
since: flash 5 |
nextFrame | public void nextFrame()(Code) | | Instructs the player to go to the next frame in the current movie.
since: flash 3 |
none | public void none()(Code) | | End of the program
since: flash 3 |
ord | public void ord()(Code) | | Converts character code to ASCII.
- Pops value off the stack.
- The first character of value is converted to a numeric ASCII character code.
- The resulting character code is pushed to the stack.
since: flash 4 |
play | public void play()(Code) | | Instructs the player to start playing at the current frame.
since: flash 3 |
pop | public void pop()(Code) | | Pops a value from the stack.
since: flash 4 |
prevFrame | public void prevFrame()(Code) | | Instructs the player to go to the previous frame in the current movie.
since: flash 3 |
push | public void push(String data)(Code) | | Pushes a string to the stack.
Parameters: data - string to push since: flash 4 |
push | public void push(float data)(Code) | | Pushes a float to the stack.
Parameters: data - float to push since: flash 4 |
push | public void push(int data)(Code) | | Pushes an int to the stack.
Parameters: data - int to push since: flash 4 |
push | public void push(Short const_idx)(Code) | | Pushes constant index to the stack
since: flash 5 |
push | public void push(Object[] data)(Code) | | Pushes array of data to the stack
- String - is pushed as string
- Integer - is pushed as int
- Double - is pushed as double
- Float - is pushed as float
- Boolean - is pushed as bool
- Byte - is pushed as index in constant pool
- Short - is pushed as index in constant pool
- null - is pushed as null
Parameters: data - array of data since: flash 5 |
push | public void push(Object o)(Code) | | Pushes an object to the stack
- String - is pushed as string
- Integer - is pushed as int
- Double - is pushed as double
- Float - is pushed as float
- Boolean - is pushed as bool
- Byte - is pushed as index in constant pool
- Short - is pushed as index in constant pool
- null - is pushed as null
Parameters: o - data since: flash 5 |
random | public void random()(Code) | | Calculates a random number.
- Pops maximum off the stack.
- Calculates a random number, an integer in the range 0 ... (maximum-1)
- This random number is pushed to the stack.
since: flash 4 |
removeClip | public void removeClip()(Code) | | Removes a clone sprite.
- Pops target off the stack.
- Removes the clone movie clip identified by target path target.
since: flash 4 |
setMember | public void setMember()(Code) | | Set member.
Stack state must be [ object, member name, value ]
since: flash 5 |
setPos | final protected void setPos(int pos)(Code) | | |
setProperty | public void setProperty()(Code) | | Sets a movie property.
- Pops value off the stack.
- Pops index off the stack.
- Pops target off the stack.
- Sets the property enumerated as index in the movie clip
with target path target to the value value.
since: flash 4 |
setTarget | public void setTarget()(Code) | | Set current context, stack-based
- Pops target off the stack and makes it the current active context.
- This action behaves exactly like the original ActionSetTarget from
Macromedia Flash 3, but is stack-based to enable the target path to be the
result of expression evaluation.
since: flash 4 |
setTarget | public void setTarget(String target)(Code) | | 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:
- SetTarget "spinner"
- GotoFrame zero
- SetTarget "" (empty string)
- 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.
Parameters: target - name of the target since: flash 3 |
setVar | public void setVar()(Code) | | Sets a variable.
- Pops value off the stack.
- Pops name off the stack, which is a string naming the variable to set.
- 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.
since: flash 4 |
startDrag | public void startDrag()(Code) | | Starts dragging a movie clip.
- Pops target off the stack. target identifies the movie clip to be dragged.
- 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.
- Pops constrain off the stack.
- If constrain evaluates to a nonzero value:
- Pops y2 off the stack.
- Pops x2 off the stack.
- Pops y1 off the stack.
- Pops x1 off the stack.
since: flash 4 |
stop | public void stop()(Code) | | Instructs the player to stop playing the movie at the current frame.
since: flash 3 |
stopSounds | public void stopSounds()(Code) | | Instructs the player to stop playing all sounds.
since: flash 3 |
stringEqual | public void stringEqual()(Code) | | Tests two strings for equality.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are compared as strings. The comparison is case-sensitive.
- If the strings are equal, a 1 (TRUE) is pushed to the stack.
- Otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
stringLength | public void stringLength()(Code) | | Computes the length of a string.
- Pops a string off the stack.
- The length of the string is calculated and pushed to the stack.
since: flash 4 |
stringLessThan | public void stringLessThan()(Code) | | Tests if a string is less than another string.
- Pops value A off the stack.
- Pops value B off the stack.
- If B < A using a byte-by-byte comparison, a 1 is pushed to the stack;
otherwise, a 0 is pushed to the stack.
Note: When playing a Macromedia Flash 5 .SWF, true is pushed to the stack instead of 1,
and false is pushed to the stack instead of 0.
since: flash 4 |
subString | public void subString()(Code) | | Extracts a substring from a string.
- Pops number count off the stack.
- Pops number index off the stack.
- Pops string string off the stack.
- The substring of string starting at the index’th character and
count characters in length is pushed to the stack.
- If either index or count do not evaluate to integers, the result
is the empty string.
since: flash 4 |
subtract | public void subtract()(Code) | | Subtracts two numbers.
- Pops value A off the stack.
- Pops value B off the stack.
- A and B are converted to floating-point; non-numeric values evaluate to 0.
- A is subtracted from B.
- Pushes the result, A-B, to the stack.
since: flash 4 |
toInt | public void toInt()(Code) | | Converts to integer.
- Pops a value off the stack.
- The value is converted to a number.
- Next, any digits after the decimal point are discarded, resulting in an integer.
- The resulting integer is pushed to the stack.
since: flash 4 |
toggleQuality | public void toggleQuality()(Code) | | Toggle the display between high and low quality.
since: flash 3 |
waitForFrame | public void waitForFrame(int frame, int skip)(Code) | | Instructs the player to wait until the specified frame,
otherwise skip the specified number of actions.
Parameters: frame - specified frame Parameters: skip - specified number of actions to skip since: flash 3 |
waitForFrameAndSkip | public void waitForFrameAndSkip(int skip)(Code) | | Wait for a frame to be loaded, stack-based.
- Pops frame off the stack.
- If the frame identified by frame has been loaded, SkipCount
actions following the current one are skipped.
- frame is evaluated in the same way as the
Program.gotoFrameAndPlay action.
Parameters: skip - specified number of actions to skip since: flash 4 |
|
|