| java.lang.Object org.openlaszlo.iv.flash.api.action.ASAssembler
ASAssembler | public class ASAssembler (Code) | | ActionScript API assembler
Supports only Flash 5/MX actionscript.
author: Dmitry Skavish |
Inner Class :abstract public static class Expr | |
Method Summary | |
public void | add() Adds two values. | public void | addString() Concatenates two strings. | public void | callFunction(String func_name, Object[] args) | public void | callFunction(String func_name, Object arg) | public void | callFunction(String func_name, int arg) | public void | callFunction(String func_name, double arg) | public void | callFunction(String func_name, boolean arg) | public void | callMethod(String method, Object[] args) | public void | callMethod(String method, Object arg) | public void | callMethod(String method, int arg) | public void | callMethod(String method, double arg) | public void | callMethod(String method, boolean arg) | public void | callMethod() Calls a method of an object. | public void | chr() Converts ASCII to character code. | public void | defineFunction(String func_name, String[] parms) | public void | divide() Divides two numbers. | public void | dup() | public void | duplicateClip() Clones a movie clip. | public void | duplicateClip(String source, String target, int depth) Clones a movie clip. | public void | endDrag() Ends drag operation. | public void | endFunction() | public void | equal() Tests two values for equality. | public void | funcReturn() | public void | getArrayElement(String array_name, int index) | public void | getArrayElement(String array_name, Object index) | public void | getMember(String mem) | public void | getMember() Get member. | public void | getProperty() Gets a movie property
- Pops index off the stack.
| public void | getProperty(String target, int property) Gets a movie property. | public void | getTimer() Reports milliseconds since player started. | 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 | getVar() Gets a variable’s value. | public void | getVar(String var1) | public void | getVars(String var1, String var2) | public void | gotoFrame(int frame) Instructs the player to go to the specified frame in the current movie. | public void | gotoFrameAndPlay(int frame) | 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(int 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 | gotoFrameLabel(String label) Instructs the player to go to frame associated with the specified label. | public void | initObject(String[] props, Object[] values) | public void | jump(String label_name) | public void | jumpIfTrue(String label_name) | public void | label(String name) Creates label at current position
The label can be used for forward and backward jumps
For example:
as.getVar("i");
as.getVar("n");
as.equal();
as.jumpIfTrue("end10");
......
| public void | less() Tests if a value is less than another value. | public void | loadMovie(String url, String target, int method) | public void | loadMovie(String url, String target) | public void | loadMovieNum(String url, int level, int method) Loads movie from specified url into specified level
Parameters: url - movie url Parameters: level - level. | public void | loadMovieNum(String url, int level) Loads movie from specified url into specified level
Parameters: url - movie url Parameters: level - level. | public void | localVar(String var1) | public void | localVar(String var1, Object data) | 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 | newObject(String class_name, Object[] args) | public void | newObject(String class_name, Object arg) | public void | newObject(String class_name, int arg) | public void | newObject(String class_name, double arg) | public void | newObject(String class_name, boolean arg) | public void | nextFrame() Instructs the player to go to the next frame in the current movie. | 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 | 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(double data) Pushes an double to the stack. | public void | push(boolean data) Pushes an double to the stack. | public void | push(Object data) Pushes an double to the stack. | public void | random() Calculates a random number.
- Pops maximum off the stack.
- Calculates a random number, an integer in the range 0 ...
| public void | random(int maximum) Calculates (pushes it to the stack) a random number in the range 0 .. | public void | removeClip() Removes a movie clip. | public void | removeClip(String target) Removes a movie clip. | public void | setArrayElement(String array_name, Object index, Object value) | public void | setMember(String mem, Object value) | public void | setMember() Set member. | public void | setProperty() Sets a movie property. | public void | setProperty(String target, int property, Object value) Sets property on specified movie clip. | 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 | setVar(String var1, Object data) | 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 | swap() | public void | toInt() Converts to integer. | public Program | toProgram() | public void | toggleQuality() Toggle the display between high and low quality. | public void | trace() | public void | unloadMovie(String target) | public void | unloadMovieNum(int level) | public void | waitForFrame(int frame, int skip) Instructs the player to wait until the specified frame,
otherwise skip the specified number of actions. |
ASAssembler | public ASAssembler(FlashFile file)(Code) | | Creates new assembler
Requires flash version 5+
Parameters: file - flash file. |
add | public void add()(Code) | | Adds two values. Can be used for strings as well.
- Pops value A off the stack.
- Pops value B off the stack.
- Pushes the result, A+B, to the stack.
|
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 |
callFunction | public void callFunction(String func_name, Object[] args)(Code) | | Calls function with parameters
// sn = myfunc(10);
as.push("sn");
as.callFunction("myfunc", new Object[] {new Integer(10)});
as.setVar();
Parameters: func_name - function name Parameters: args - array of parameters |
callFunction | public void callFunction(String func_name, int arg)(Code) | | |
callFunction | public void callFunction(String func_name, double arg)(Code) | | |
callFunction | public void callFunction(String func_name, boolean arg)(Code) | | |
callMethod | public void callMethod(String method, Object[] args)(Code) | | Calls method with parameters
// sn = Math.sin(10);
as.push("sn");
as.callMember("Math.sin", new Object[] {new Integer(10)});
as.setVar();
// _root.myclip.play();
as.callMember("_root.myclip.play", null);
as.pop(); // remove resultat
Parameters: method - method name Parameters: args - array of parameters |
callMethod | public void callMethod(String method, int arg)(Code) | | |
callMethod | public void callMethod(String method, double arg)(Code) | | |
callMethod | public void callMethod(String method, boolean arg)(Code) | | |
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 |
defineFunction | public void defineFunction(String func_name, String[] parms)(Code) | | Defines new function
// function printmsg(msg, name) {
// trace(msg+", "+name);
// }
as.defineFunction("printmsg", new String[] {"msg", "name"});
as.getVar("name");
as.push(" = ");
as.getVar("msg");
as.add();
as.add();
as.trace();
as.endFunction();
Parameters: func_name - function name Parameters: parms - parameter names |
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 |
dup | public void dup()(Code) | | Duplicates top element of the stack
|
duplicateClip | public void duplicateClip()(Code) | | Clones a movie clip.
- Pops depth off the stack (has to be added to 16384)
- 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 |
duplicateClip | public void duplicateClip(String source, String target, int depth)(Code) | | Clones a movie clip.
Parameters: source - source movie clip path Parameters: target - target name Parameters: depth - depth (z-order) |
endDrag | public void endDrag()(Code) | | Ends drag operation.
- Ends the drag operation in progress, if any.
since: flash 4 |
endFunction | public void endFunction()(Code) | | End of function definition
See Also: defineFunction |
equal | public void equal()(Code) | | Tests two values for equality. Can be used for strings as well.
- Pops value A off the stack.
- Pops value B off the stack.
- If the values are equal, a true is pushed to the stack.
- Otherwise, a false is pushed to the stack.
|
funcReturn | public void funcReturn()(Code) | | Function/method return statement
|
getArrayElement | public void getArrayElement(String array_name, int index)(Code) | | Pushes element of an array into the stack
// a = myarray[2];
as.push("a");
as.getArrayElement("myarray", 2);
as.setVar();
Parameters: array_name - name of array variable Parameters: index - index |
getArrayElement | public void getArrayElement(String array_name, Object index)(Code) | | Pushes element of an array into the stack
// a = myarray[i];
as.push("a");
as.getArrayElement("myarray", new ASAssembler.Expr() {
public void eval( ASAssembler as ) {
as.getVar("i");
}
});
as.setVar();
Parameters: array_name - name of array variable Parameters: index - index expression |
getMember | public void getMember(String mem)(Code) | | Pushes member value on the stack
// sz = _root.myclip.mysize;
as.push("sz");
as.getMember("_root.myclip.mysize");
as.setVar();
// var sz = _root.myclip.mysize;
as.localVar("sz", new ASAssembler.Expr() {
public void eval( ASAssembler as ) {
as.getMember("_root.myclip.mysize");
}
});
Parameters: mem - member name |
getMember | public void getMember()(Code) | | Get member.
Stack state must be [ object, member name ]
since: flash 5 |
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 |
getProperty | public void getProperty(String target, int property)(Code) | | Gets a movie property. Leaves property value on the stack.
Parameters: target - movie clip's target path Parameters: property - property index |
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 |
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.
|
getVar | public void getVar()(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.
|
getVar | public void getVar(String var1)(Code) | | Pushes value of specified variable to the stack
Parameters: var1 - variable name |
getVars | public void getVars(String var1, String var2)(Code) | | Pushes values of specified variables to the stack
Parameters: var1 - variable name Parameters: var2 - variable name |
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(int frame)(Code) | | Instructs the player to go to the specified frame in the current movie and play
Parameters: frame - frame number |
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(int frame)(Code) | | Instructs the player to go to the specified frame in the current movie and stop
Parameters: frame - frame number |
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 |
gotoFrameLabel | public void gotoFrameLabel(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 |
initObject | public void initObject(String[] props, Object[] values)(Code) | | Initialize object
// a = {radius:5, angle:pi/2};
as.push("a");
as.initObject(
new String[] {"radius", "angle"},
new Object[] {
new Integer(5),
new ASAssembler.Expr() {
public void eval(ASAssembler as) {
as.getVar("pi");
as.push(2);
as.divide();
}
}
}
);
as.setVar();
Parameters: props - array of properties Parameters: values - array of values |
jump | public void jump(String label_name)(Code) | | Jumps to specified label
Label has to be defined using 'label' method
Parameters: label_name - label name |
jumpIfTrue | public void jumpIfTrue(String label_name)(Code) | | Pops top value off the stack and jumps to specified label if it's true
Label has to be defined using 'label' method
Parameters: label_name - label name |
label | public void label(String name)(Code) | | Creates label at current position
The label can be used for forward and backward jumps
For example:
as.getVar("i");
as.getVar("n");
as.equal();
as.jumpIfTrue("end10");
......
as.label("end10");
Parameters: name - name of label |
less | public void less()(Code) | | Tests if a value is less than another value. Can be used for strings as well.
- Pops value A off the stack.
- Pops value B off the stack.
- The values are compared for equality.
- If B < A, a true is pushed to the stack; otherwise, a false is pushed to the stack.
|
loadMovie | public void loadMovie(String url, String target, int method)(Code) | | Loads movie from specified url into specified target clip
Parameters: url - movie url Parameters: target - target movie clip Parameters: method - - 0 - does not send variables
- 1 - send variables using get
- 2 - send variables using post
|
loadMovie | public void loadMovie(String url, String target)(Code) | | Loads movie from specified url into specified level
Parameters: url - movie url Parameters: target - target movie clip |
loadMovieNum | public void loadMovieNum(String url, int level, int method)(Code) | | Loads movie from specified url into specified level
Parameters: url - movie url Parameters: level - level. starts from 0 Parameters: method - - 0 - does not send variables
- 1 - send variables using get
- 2 - send variables using post
|
loadMovieNum | public void loadMovieNum(String url, int level)(Code) | | Loads movie from specified url into specified level
Parameters: url - movie url Parameters: level - level. starts from 0 |
localVar | public void localVar(String var1)(Code) | | Defines local variable without init data
Parameters: var1 - name of the variable |
localVar | public void localVar(String var1, Object data)(Code) | | Defines local variable with init value
Parameters: var1 - name of the variable Parameters: data - init value |
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.
|
newObject | public void newObject()(Code) | | New Object
|
newObject | public void newObject(String class_name, Object[] args)(Code) | | Creates new object
// ok = new Boolean(true);
as.push("ok");
as.newObject("Boolean", new Object[] {new Boolean(true)});
as.setVar();
Parameters: class_name - class name Parameters: args - arguments |
newObject | public void newObject(String class_name, int arg)(Code) | | |
newObject | public void newObject(String class_name, double arg)(Code) | | |
newObject | public void newObject(String class_name, boolean arg)(Code) | | |
nextFrame | public void nextFrame()(Code) | | Instructs the player to go to the next frame in the current movie.
|
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.
|
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.
|
push | public void push(String data)(Code) | | Pushes a string to the stack.
Parameters: data - string to push |
push | public void push(float data)(Code) | | Pushes a float to the stack.
Parameters: data - float to push |
push | public void push(int data)(Code) | | Pushes an int to the stack.
Parameters: data - int to push |
push | public void push(double data)(Code) | | Pushes an double to the stack.
Parameters: data - double to push |
push | public void push(boolean data)(Code) | | Pushes an double to the stack.
Parameters: data - double to push |
push | public void push(Object data)(Code) | | Pushes an double to the stack.
Parameters: data - double to push |
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 |
random | public void random(int maximum)(Code) | | Calculates (pushes it to the stack) a random number in the range 0 .. (maximum-1)
Parameters: maximum - maximum |
removeClip | public void removeClip()(Code) | | Removes a movie clip.
- Pops target off the stack.
- Removes the clone movie clip identified by target path target.
since: flash 4 |
removeClip | public void removeClip(String target)(Code) | | Removes a movie clip.
Parameters: target - target movie clip path |
setArrayElement | public void setArrayElement(String array_name, Object index, Object value)(Code) | | Sets element of an array into the specified value
// myarray[i] = 10;
as.setArrayElement("myarray", new ASAssembler.Expr() {
public void eval( ASAssembler as ) {
as.getVar("i");
}
}, new Integer(10));
Parameters: array_name - name of array variable Parameters: index - index expression |
setMember | public void setMember(String mem, Object value)(Code) | | Sets member to the specified value
// _root.myclip.mysize = 10;
as.setMember("_root.myclip.mysize", 10);
// _root.myclip.mysize = Math.sin(i);
as.setMember("_root.myclip.mysize", new ASAssembler.Expr() {
public void eval( ASAssembler as ) {
as.callMethod("Math.sin", new ASAssembler.Expr() {
public void eval( ASAssembler as ) {
as.getVar("i");
}
});
}
});
Parameters: mem - member name Parameters: value - specified value |
setMember | public void setMember()(Code) | | Set member.
Stack state must be [ object, member name, value ]
since: flash 5 |
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 |
setProperty | public void setProperty(String target, int property, Object value)(Code) | | Sets property on specified movie clip.
Parameters: target - movie clip's target path Parameters: property - property index Parameters: value - property value |
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.
|
setVar | public void setVar(String var1, Object data)(Code) | | Sets value to a variable
Parameters: var1 - name of the variable Parameters: data - new value |
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.
|
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.
|
swap | public void swap()(Code) | | Swaps two topmost elements of the stack
|
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 |
toProgram | public Program toProgram()(Code) | | Creates Program object from this assembler
new Program object |
toggleQuality | public void toggleQuality()(Code) | | Toggle the display between high and low quality.
|
trace | public void trace()(Code) | | |
unloadMovie | public void unloadMovie(String target)(Code) | | Unload movie previously loaded into specified target clip
Parameters: target - target movie clip |
unloadMovieNum | public void unloadMovieNum(int level)(Code) | | Unloads movie from specified level
Parameters: level - level to unload the movie from |
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 |
|
|