Java Doc for ASAssembler.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » iv » flash » api » action » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » Laszlo 4.0.10 » org.openlaszlo.iv.flash.api.action 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Constructor Summary
public  ASAssembler(FlashFile file)
    

Method Summary
public  voidadd()
     Adds two values.
public  voidaddString()
     Concatenates two strings.
public  voidcallFunction(String func_name, Object[] args)
    
public  voidcallFunction(String func_name, Object arg)
    
public  voidcallFunction(String func_name, int arg)
    
public  voidcallFunction(String func_name, double arg)
    
public  voidcallFunction(String func_name, boolean arg)
    
public  voidcallMethod(String method, Object[] args)
    
public  voidcallMethod(String method, Object arg)
    
public  voidcallMethod(String method, int arg)
    
public  voidcallMethod(String method, double arg)
    
public  voidcallMethod(String method, boolean arg)
    
public  voidcallMethod()
     Calls a method of an object.
public  voidchr()
     Converts ASCII to character code.
public  voiddefineFunction(String func_name, String[] parms)
    
public  voiddivide()
     Divides two numbers.
public  voiddup()
    
public  voidduplicateClip()
     Clones a movie clip.
public  voidduplicateClip(String source, String target, int depth)
     Clones a movie clip.
public  voidendDrag()
     Ends drag operation.
public  voidendFunction()
    
public  voidequal()
     Tests two values for equality.
public  voidfuncReturn()
    
public  voidgetArrayElement(String array_name, int index)
    
public  voidgetArrayElement(String array_name, Object index)
    
public  voidgetMember(String mem)
    
public  voidgetMember()
     Get member.
public  voidgetProperty()
     Gets a movie property

  1. Pops index off the stack.
public  voidgetProperty(String target, int property)
     Gets a movie property.
public  voidgetTimer()
     Reports milliseconds since player started.
public  voidgetURL(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  voidgetURL(int method)
     Get URL, stack-based.

  1. Pops window off the stack.
public  voidgetVar()
     Gets a variable’s value.
public  voidgetVar(String var1)
    
public  voidgetVars(String var1, String var2)
    
public  voidgotoFrame(int frame)
     Instructs the player to go to the specified frame in the current movie.
public  voidgotoFrameAndPlay(int frame)
    
public  voidgotoFrameAndPlay()
     Go to frame and play, stack-based.

  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.
public  voidgotoFrameAndStop(int frame)
    
public  voidgotoFrameAndStop()
     Go to frame and stop, stack-based.

  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.
public  voidgotoFrameLabel(String label)
     Instructs the player to go to frame associated with the specified label.
public  voidinitObject(String[] props, Object[] values)
    
public  voidjump(String label_name)
    
public  voidjumpIfTrue(String label_name)
    
public  voidlabel(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  voidless()
     Tests if a value is less than another value.
public  voidloadMovie(String url, String target, int method)
    
public  voidloadMovie(String url, String target)
    
public  voidloadMovieNum(String url, int level, int method)
     Loads movie from specified url into specified level
Parameters:
  url - movie url
Parameters:
  level - level.
public  voidloadMovieNum(String url, int level)
     Loads movie from specified url into specified level
Parameters:
  url - movie url
Parameters:
  level - level.
public  voidlocalVar(String var1)
    
public  voidlocalVar(String var1, Object data)
    
public  voidlogicalAnd()
     Performs a logical AND of two numbers.
public  voidlogicalNot()
     Performs a logical NOT of a number.
public  voidlogicalOr()
     Performs a logical OR of two numbers.
public  voidmbChr()
     Converts ASCII to character code, multi-byte aware.
public  voidmbLength()
     Computes the length of a string, multi-byte aware.
public  voidmbOrd()
     Converts character code to ASCII, multi-byte aware.
public  voidmbSubString()
     Extracts a substring from a string, multi-byte aware.

  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.
public  voidmultiply()
     Multiplies two numbers.
public  voidnewObject()
    
public  voidnewObject(String class_name, Object[] args)
    
public  voidnewObject(String class_name, Object arg)
    
public  voidnewObject(String class_name, int arg)
    
public  voidnewObject(String class_name, double arg)
    
public  voidnewObject(String class_name, boolean arg)
    
public  voidnextFrame()
     Instructs the player to go to the next frame in the current movie.
public  voidord()
     Converts character code to ASCII.
public  voidplay()
     Instructs the player to start playing at the current frame.
public  voidpop()
     Pops a value from the stack.
public  voidprevFrame()
     Instructs the player to go to the previous frame in the current movie.
public  voidpush(String data)
     Pushes a string to the stack.
public  voidpush(float data)
     Pushes a float to the stack.
public  voidpush(int data)
     Pushes an int to the stack.
public  voidpush(double data)
     Pushes an double to the stack.
public  voidpush(boolean data)
     Pushes an double to the stack.
public  voidpush(Object data)
     Pushes an double to the stack.
public  voidrandom()
     Calculates a random number.

  1. Pops maximum off the stack.
  2. Calculates a random number, an integer in the range 0 ...
public  voidrandom(int maximum)
     Calculates (pushes it to the stack) a random number in the range 0 ..
public  voidremoveClip()
     Removes a movie clip.
public  voidremoveClip(String target)
     Removes a movie clip.
public  voidsetArrayElement(String array_name, Object index, Object value)
    
public  voidsetMember(String mem, Object value)
    
public  voidsetMember()
     Set member.
public  voidsetProperty()
     Sets a movie property.
public  voidsetProperty(String target, int property, Object value)
     Sets property on specified movie clip.
public  voidsetTarget(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  voidsetVar()
     Sets a variable.

  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.
public  voidsetVar(String var1, Object data)
    
public  voidstartDrag()
     Starts dragging a movie clip.

  1. Pops target off the stack.
public  voidstop()
     Instructs the player to stop playing the movie at the current frame.
public  voidstopSounds()
     Instructs the player to stop playing all sounds.
public  voidstringEqual()
     Tests two strings for equality.

  1. Pops value A off the stack.
  2. Pops value B off the stack.
  3. A and B are compared as strings.
public  voidstringLength()
     Computes the length of a string.
public  voidstringLessThan()
     Tests if a string is less than another string.
public  voidsubString()
     Extracts a substring from a string.
public  voidsubtract()
     Subtracts two numbers.
public  voidswap()
    
public  voidtoInt()
     Converts to integer.
public  ProgramtoProgram()
    
public  voidtoggleQuality()
     Toggle the display between high and low quality.
public  voidtrace()
    
public  voidunloadMovie(String target)
    
public  voidunloadMovieNum(int level)
    
public  voidwaitForFrame(int frame, int skip)
     Instructs the player to wait until the specified frame, otherwise skip the specified number of actions.


Constructor Detail
ASAssembler
public ASAssembler(FlashFile file)(Code)
Creates new assembler

Requires flash version 5+
Parameters:
  file - flash file.





Method Detail
add
public void add()(Code)
Adds two values. Can be used for strings as well.

  1. Pops value A off the stack.
  2. Pops value B off the stack.
  3. Pushes the result, A+B, to the stack.



addString
public void addString()(Code)
Concatenates two strings.

  1. Pops value A off the stack.
  2. Pops value B off the stack.
  3. 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, Object arg)(Code)



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, Object arg)(Code)



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.

  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.

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.

  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#.
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.

  1. Pops depth off the stack (has to be added to 16384)
  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.

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.

  1. 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.

  1. Pops value A off the stack.
  2. Pops value B off the stack.
  3. If the values are equal, a true is pushed to the stack.
  4. 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

  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.

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.

  1. Calculates the number of milliseconds since the Player was started (an integer).
  2. 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.

  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.

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.

  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.



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.

  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

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.

  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

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.

  1. Pops value A off the stack.
  2. Pops value B off the stack.
  3. The values are compared for equality.
  4. 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.

  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.
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.

  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.
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.

  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.
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.

  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.

since:
   flash 4



mbLength
public void mbLength()(Code)
Computes the length of a string, multi-byte aware.

  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.

since:
   flash 4



mbOrd
public void mbOrd()(Code)
Converts character code to ASCII, multi-byte aware.

  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.

since:
   flash 4



mbSubString
public void mbSubString()(Code)
Extracts a substring from a string, multi-byte aware.

  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.

since:
   flash 4



multiply
public void multiply()(Code)
Multiplies two numbers.

  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.



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, Object arg)(Code)



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.

  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.

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.

  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.

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.

  1. Pops target off the stack.
  2. 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.

  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.

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:

  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.
Parameters:
  target - name of the target
since:
   flash 3




setVar
public void setVar()(Code)
Sets a variable.

  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.



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.

  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.

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.

  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.
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.

  1. Pops a string off the stack.
  2. 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.

  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.
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.

  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.

since:
   flash 4



subtract
public void subtract()(Code)
Subtracts two numbers.

  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, 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.

  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.

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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.