Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/anotherbigidea/flash/interfaces/SWFActions.java


1   /****************************************************************
2    * Copyright (c) 2001, David N. Main, All rights reserved.
3    *
4    * Redistribution and use in source and binary forms, with or
5    * without modification, are permitted provided that the
6    * following conditions are met:
7    *
8    * 1. Redistributions of source code must retain the above
9    * copyright notice, this list of conditions and the following
10   * disclaimer.
11   *
12   * 2. Redistributions in binary form must reproduce the above
13   * copyright notice, this list of conditions and the following
14   * disclaimer in the documentation and/or other materials
15   * provided with the distribution.
16   *
17   * 3. The name of the author may not be used to endorse or
18   * promote products derived from this software without specific
19   * prior written permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
22   * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23   * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24   * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25   * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
31   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33   ****************************************************************/
34  package com.anotherbigidea.flash.interfaces;
35  
36  import java.io.IOException;
37  
38  /**
39   * Interface for passing Action Codes
40   *
41   * Lifecycle is -
42   *  1. start(..) is called with any condition flags (e.g. event codes) for the
43   *               action array
44   *  2. action methods are called
45   *  3. end() is called to terminate array
46   *  4. 1..3 is repeated for any subsequent condition blocks
47   *  5. done() is called to terminate all action passing
48   */
49  public interface SWFActions
50  {
51      /**
52       * Start of actions
53       */
54      public void start( int flags ) throws IOException;
55  
56      /**
57       * End of all action blocks
58       */
59      public void done() throws IOException;
60  
61      /**
62       * End of actions
63       */
64      public void end() throws IOException;
65  
66      /**
67       * Pass through a blob of actions
68       */
69      public void blob( byte[] blob ) throws IOException;
70  
71      /**
72       * Unrecognized action code
73       * @param data may be null
74       */
75      public void unknown( int code, byte[] data ) throws IOException;
76  
77      /**
78       * Target label for a jump - this method call immediately precedes the
79       * target action.
80       */
81      public void jumpLabel( String label ) throws IOException;
82  
83      /**
84       * Comment Text - useful for debugging purposes
85       */
86      public void comment( String comment ) throws IOException;
87  
88      //--Flash 3 Actions:
89      public void gotoFrame( int frameNumber ) throws IOException;
90      public void gotoFrame( String label ) throws IOException;
91      public void getURL( String url, String target ) throws IOException;
92      public void nextFrame() throws IOException;
93      public void prevFrame() throws IOException;
94      public void play() throws IOException;
95      public void stop() throws IOException;
96      public void toggleQuality() throws IOException;
97      public void stopSounds() throws IOException;
98      public void waitForFrame( int frameNumber, String jumpLabel ) throws IOException;
99      public void setTarget( String target ) throws IOException;
100 
101     //--Flash 4 Actions:
102     public void push( String value ) throws IOException;
103     public void push( float  value ) throws IOException;
104     public void pop() throws IOException;
105 
106     public void add() throws IOException;
107     public void substract() throws IOException;
108     public void multiply() throws IOException;
109     public void divide() throws IOException;
110 
111     public void equals() throws IOException;
112     public void lessThan() throws IOException;
113 
114     public void and() throws IOException;
115     public void or() throws IOException;
116     public void not() throws IOException;
117 
118     public void stringEquals() throws IOException;
119     public void stringLength() throws IOException;
120     public void concat() throws IOException;
121     public void substring() throws IOException;
122     public void stringLessThan() throws IOException;
123     public void stringLengthMB() throws IOException;
124     public void substringMB() throws IOException;
125 
126     public void toInteger() throws IOException;
127     public void charToAscii() throws IOException;
128     public void asciiToChar() throws IOException;
129     public void charMBToAscii() throws IOException;
130     public void asciiToCharMB() throws IOException;
131 
132     public void jump( String jumpLabel ) throws IOException;
133     public void ifJump( String jumpLabel ) throws IOException;
134 
135     public void call() throws IOException;
136 
137     public void getVariable() throws IOException;
138     public void setVariable() throws IOException;
139 
140     //----------------------------------------------------------
141     public static final int GET_URL_SEND_VARS_NONE = 0;  //don't send variables
142     public static final int GET_URL_SEND_VARS_GET  = 1;  //send vars using GET
143     public static final int GET_URL_SEND_VARS_POST = 2;  //send vars using POST
144 
145     public static final int GET_URL_MODE_LOAD_MOVIE_INTO_LEVEL  = 0;
146     public static final int GET_URL_MODE_LOAD_MOVIE_INTO_SPRITE = 1;
147     public static final int GET_URL_MODE_LOAD_VARS_INTO_LEVEL   = 3;
148     public static final int GET_URL_MODE_LOAD_VARS_INTO_SPRITE  = 4;
149 
150     public void getURL( int sendVars, int loadMode ) throws IOException;
151     //----------------------------------------------------------
152 
153     public void gotoFrame( boolean play ) throws IOException;
154     public void setTarget() throws IOException;
155     public void getProperty() throws IOException;
156     public void setProperty() throws IOException;
157     public void cloneSprite() throws IOException;
158     public void removeSprite() throws IOException;
159     public void startDrag() throws IOException;
160     public void endDrag() throws IOException;
161     public void waitForFrame( String jumpLabel ) throws IOException;
162     public void trace() throws IOException;
163     public void getTime() throws IOException;
164     public void randomNumber() throws IOException;
165 
166     //--Flash 5 Actions
167     public void callFunction() throws IOException;
168     public void callMethod() throws IOException;
169     public void lookupTable( String[] values ) throws IOException;
170 
171     //startFunction(..) is terminated by matching endBlock()
172     public void startFunction( String name, String[] paramNames ) throws IOException;
173     public void endBlock() throws IOException;
174 
175     public void defineLocalValue() throws IOException;
176     public void defineLocal() throws IOException;
177 
178     public void deleteProperty() throws IOException;
179     public void deleteThreadVars() throws IOException;
180 
181     public void enumerate() throws IOException;
182     public void typedEquals() throws IOException;
183     public void getMember() throws IOException;
184 
185     public void initArray() throws IOException;
186     public void initObject() throws IOException;
187     public void newMethod() throws IOException;
188     public void newObject() throws IOException;
189     public void setMember() throws IOException;
190     public void getTargetPath() throws IOException;
191 
192     public void startWith() throws IOException;  //terminated by matching endBlock()
193 
194     public void convertToNumber() throws IOException;
195     public void convertToString() throws IOException;
196     public void typeOf() throws IOException;
197     public void typedAdd() throws IOException;
198     public void typedLessThan() throws IOException;
199     public void modulo() throws IOException;
200 
201     public void bitAnd() throws IOException;
202     public void bitOr() throws IOException;
203     public void bitXor() throws IOException;
204     public void shiftLeft() throws IOException;
205     public void shiftRight() throws IOException;
206     public void shiftRightUnsigned() throws IOException;
207 
208     public void decrement() throws IOException;
209     public void increment() throws IOException;
210 
211     public void duplicate() throws IOException;
212     public void returnValue() throws IOException;
213     public void swap() throws IOException;
214     public void storeInRegister( int registerNumber ) throws IOException;
215 
216     public void push( double value ) throws IOException;
217     public void pushNull() throws IOException;
218     public void pushRegister( int registerNumber ) throws IOException;
219     public void push( boolean value ) throws IOException;
220     public void push( int value ) throws IOException;
221     public void lookup( int dictionaryIndex ) throws IOException;
222     
223   //--Flash 6 Actions
224   public void instanceOf() throws IOException;
225   public void enumerateObject() throws IOException;
226   public void strictEquals() throws IOException;
227   public void greaterThan() throws IOException;
228   public void stringGreaterThan() throws IOException;    
229 }