Source code: com/anotherbigidea/flash/writers/SWFActionsImpl.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.writers;
35
36 import java.io.IOException;
37
38 import com.anotherbigidea.flash.interfaces.SWFActions;
39
40 /**
41 * A pass-through implementation of the SWFActions interface
42 */
43 public class SWFActionsImpl implements SWFActions
44 {
45 protected SWFActions acts;
46
47 /**
48 * @param acts may be null
49 */
50 public SWFActionsImpl( SWFActions acts )
51 {
52 this.acts = acts;
53 }
54
55 public SWFActionsImpl()
56 {
57 this( null );
58 }
59
60 /**
61 * Set the pass-through target
62 * @param acts may be null
63 */
64 public void setSWFActions( SWFActions acts )
65 {
66 this.acts = acts;
67 }
68
69 public void start( int conditions ) throws IOException
70 {
71 if( acts != null ) acts.start( conditions );
72 }
73
74 public void end() throws IOException
75 {
76 if( acts != null ) acts.end();
77 }
78
79 public void done() throws IOException
80 {
81 if( acts != null ) acts.done();
82 }
83
84 public void blob( byte[] blob ) throws IOException
85 {
86 if( acts != null ) acts.blob( blob );
87 }
88
89 public void unknown( int code, byte[] data ) throws IOException
90 {
91 if( acts != null ) acts.unknown( code, data );
92 }
93
94 public void initArray() throws IOException
95 {
96 if( acts != null ) acts.initArray();
97 }
98
99 public void jumpLabel( String label ) throws IOException
100 {
101 if( acts != null ) acts.jumpLabel( label );
102 }
103
104 public void gotoFrame( int frameNumber ) throws IOException
105 {
106 if( acts != null ) acts.gotoFrame( frameNumber );
107 }
108
109 public void gotoFrame( String label ) throws IOException
110 {
111 if( acts != null ) acts.gotoFrame( label );
112 }
113
114 public void getURL( String url, String target ) throws IOException
115 {
116 if( acts != null ) acts.getURL( url, target );
117 }
118
119 public void nextFrame() throws IOException
120 {
121 if( acts != null ) acts.nextFrame();
122 }
123
124 public void prevFrame() throws IOException
125 {
126 if( acts != null ) acts.prevFrame();
127 }
128
129 public void play() throws IOException
130 {
131 if( acts != null ) acts.play();
132 }
133
134 public void stop() throws IOException
135 {
136 if( acts != null ) acts.stop();
137 }
138
139 public void toggleQuality() throws IOException
140 {
141 if( acts != null ) acts.toggleQuality();
142 }
143
144 public void stopSounds() throws IOException
145 {
146 if( acts != null ) acts.stopSounds();
147 }
148
149 public void setTarget( String target ) throws IOException
150 {
151 if( acts != null ) acts.setTarget( target );
152 }
153
154 public void jump( String jumpLabel ) throws IOException
155 {
156 if( acts != null ) acts.jump( jumpLabel );
157 }
158
159 public void ifJump( String jumpLabel ) throws IOException
160 {
161 if( acts != null ) acts.ifJump( jumpLabel );
162 }
163
164 public void waitForFrame( int frameNumber, String jumpLabel ) throws IOException
165 {
166 if( acts != null ) acts.waitForFrame( frameNumber, jumpLabel );
167 }
168
169 public void waitForFrame( String jumpLabel ) throws IOException
170 {
171 if( acts != null ) acts.waitForFrame( jumpLabel );
172 }
173
174 public void pop() throws IOException
175 {
176 if( acts != null ) acts.pop();
177 }
178
179 public void push( String value ) throws IOException
180 {
181 if( acts != null ) acts.push( value );
182 }
183
184 public void push( float value ) throws IOException
185 {
186 if( acts != null ) acts.push( value );
187 }
188
189 public void push( double value ) throws IOException
190 {
191 if( acts != null ) acts.push( value );
192 }
193
194 public void pushNull() throws IOException
195 {
196 if( acts != null ) acts.pushNull();
197 }
198
199 public void pushRegister( int registerNumber ) throws IOException
200 {
201 if( acts != null ) acts.pushRegister( registerNumber );
202 }
203
204 public void push( boolean value ) throws IOException
205 {
206 if( acts != null ) acts.push( value );
207 }
208
209 public void push( int value ) throws IOException
210 {
211 if( acts != null ) acts.push( value );
212 }
213
214 public void lookup( int dictionaryIndex ) throws IOException
215 {
216 if( acts != null ) acts.lookup( dictionaryIndex );
217 }
218
219 public void add() throws IOException
220 {
221 if( acts != null ) acts.add();
222 }
223
224 public void substract() throws IOException
225 {
226 if( acts != null ) acts.substract();
227 }
228
229 public void multiply() throws IOException
230 {
231 if( acts != null ) acts.multiply();
232 }
233
234 public void divide() throws IOException
235 {
236 if( acts != null ) acts.divide();
237 }
238
239 public void equals() throws IOException
240 {
241 if( acts != null ) acts.equals();
242 }
243
244 public void lessThan() throws IOException
245 {
246 if( acts != null ) acts.lessThan();
247 }
248
249 public void and() throws IOException
250 {
251 if( acts != null ) acts.and();
252 }
253
254 public void or() throws IOException
255 {
256 if( acts != null ) acts.or();
257 }
258
259 public void not() throws IOException
260 {
261 if( acts != null ) acts.not();
262 }
263
264 public void stringEquals() throws IOException
265 {
266 if( acts != null ) acts.stringEquals();
267 }
268
269 public void stringLength() throws IOException
270 {
271 if( acts != null ) acts.stringLength();
272 }
273
274 public void concat() throws IOException
275 {
276 if( acts != null ) acts.concat();
277 }
278
279 public void substring() throws IOException
280 {
281 if( acts != null ) acts.substring();
282 }
283
284 public void stringLessThan() throws IOException
285 {
286 if( acts != null ) acts.stringLessThan();
287 }
288
289 public void stringLengthMB() throws IOException
290 {
291 if( acts != null ) acts.stringLengthMB();
292 }
293
294 public void substringMB() throws IOException
295 {
296 if( acts != null ) acts.substringMB();
297 }
298
299 public void toInteger() throws IOException
300 {
301 if( acts != null ) acts.toInteger();
302 }
303
304 public void charToAscii() throws IOException
305 {
306 if( acts != null ) acts.charToAscii();
307 }
308
309 public void asciiToChar() throws IOException
310 {
311 if( acts != null ) acts.asciiToChar();
312 }
313
314 public void charMBToAscii() throws IOException
315 {
316 if( acts != null ) acts.charMBToAscii();
317 }
318
319 public void asciiToCharMB() throws IOException
320 {
321 if( acts != null ) acts.asciiToCharMB();
322 }
323
324 public void call() throws IOException
325 {
326 if( acts != null ) acts.call();
327 }
328
329 public void getVariable() throws IOException
330 {
331 if( acts != null ) acts.getVariable();
332 }
333
334 public void setVariable() throws IOException
335 {
336 if( acts != null ) acts.setVariable();
337 }
338
339 public void getURL( int sendVars, int loadMode ) throws IOException
340 {
341 if( acts != null ) acts.getURL( sendVars, loadMode );
342 }
343
344 public void gotoFrame( boolean play ) throws IOException
345 {
346 if( acts != null ) acts.gotoFrame( play );
347 }
348
349 public void setTarget() throws IOException
350 {
351 if( acts != null ) acts.setTarget();
352 }
353
354 public void getProperty() throws IOException
355 {
356 if( acts != null ) acts.getProperty();
357 }
358
359 public void setProperty() throws IOException
360 {
361 if( acts != null ) acts.setProperty();
362 }
363
364 public void cloneSprite() throws IOException
365 {
366 if( acts != null ) acts.cloneSprite();
367 }
368
369 public void removeSprite() throws IOException
370 {
371 if( acts != null ) acts.removeSprite();
372 }
373
374 public void startDrag() throws IOException
375 {
376 if( acts != null ) acts.startDrag();
377 }
378
379 public void endDrag() throws IOException
380 {
381 if( acts != null ) acts.endDrag();
382 }
383
384 public void trace() throws IOException
385 {
386 if( acts != null ) acts.trace();
387 }
388
389 public void getTime() throws IOException
390 {
391 if( acts != null ) acts.getTime();
392 }
393
394 public void randomNumber() throws IOException
395 {
396 if( acts != null ) acts.randomNumber();
397 }
398
399 public void lookupTable( String[] values ) throws IOException
400 {
401 if( acts != null ) acts.lookupTable( values );
402 }
403
404 public void callFunction() throws IOException
405 {
406 if( acts != null ) acts.callFunction();
407 }
408
409 public void callMethod() throws IOException
410 {
411 if( acts != null ) acts.callMethod();
412 }
413
414 public void startFunction( String name, String[] paramNames ) throws IOException
415 {
416 if( acts != null ) acts.startFunction( name, paramNames );
417 }
418
419 public void endBlock() throws IOException
420 {
421 if( acts != null ) acts.endBlock();
422 }
423
424 public void comment( String comment ) throws IOException
425 {
426 if( acts != null ) acts.comment( comment );
427 }
428
429 public void defineLocalValue() throws IOException
430 {
431 if( acts != null ) acts.defineLocalValue();
432 }
433
434 public void defineLocal() throws IOException
435 {
436 if( acts != null ) acts.defineLocal();
437 }
438
439 public void deleteProperty() throws IOException
440 {
441 if( acts != null ) acts.deleteProperty();
442 }
443
444 public void deleteThreadVars() throws IOException
445 {
446 if( acts != null ) acts.deleteThreadVars();
447 }
448
449 public void enumerate() throws IOException
450 {
451 if( acts != null ) acts.enumerate();
452 }
453
454 public void typedEquals() throws IOException
455 {
456 if( acts != null ) acts.typedEquals();
457 }
458
459 public void getMember() throws IOException
460 {
461 if( acts != null ) acts.getMember();
462 }
463
464 public void initObject() throws IOException
465 {
466 if( acts != null ) acts.initObject();
467 }
468
469 public void newMethod() throws IOException
470 {
471 if( acts != null ) acts.newMethod();
472 }
473
474 public void newObject() throws IOException
475 {
476 if( acts != null ) acts.newObject();
477 }
478
479 public void setMember() throws IOException
480 {
481 if( acts != null ) acts.setMember();
482 }
483
484 public void getTargetPath() throws IOException
485 {
486 if( acts != null ) acts.getTargetPath();
487 }
488
489 public void startWith() throws IOException
490 {
491 if( acts != null ) acts.startWith();
492 }
493
494 public void duplicate() throws IOException
495 {
496 if( acts != null ) acts.duplicate();
497 }
498
499 public void returnValue() throws IOException
500 {
501 if( acts != null ) acts.returnValue();
502 }
503
504 public void swap() throws IOException
505 {
506 if( acts != null ) acts.swap();
507 }
508
509 public void storeInRegister( int registerNumber ) throws IOException
510 {
511 if( acts != null ) acts.storeInRegister( registerNumber );
512 }
513
514 public void convertToNumber() throws IOException
515 {
516 if( acts != null ) acts.convertToNumber();
517 }
518
519 public void convertToString() throws IOException
520 {
521 if( acts != null ) acts.convertToString();
522 }
523
524 public void typeOf() throws IOException
525 {
526 if( acts != null ) acts.typeOf();
527 }
528
529 public void typedAdd() throws IOException
530 {
531 if( acts != null ) acts.typedAdd();
532 }
533
534 public void typedLessThan() throws IOException
535 {
536 if( acts != null ) acts.typedLessThan();
537 }
538
539 public void modulo() throws IOException
540 {
541 if( acts != null ) acts.modulo();
542 }
543
544 public void bitAnd() throws IOException
545 {
546 if( acts != null ) acts.bitAnd();
547 }
548
549 public void bitOr() throws IOException
550 {
551 if( acts != null ) acts.bitOr();
552 }
553
554 public void bitXor() throws IOException
555 {
556 if( acts != null ) acts.bitXor();
557 }
558
559 public void shiftLeft() throws IOException
560 {
561 if( acts != null ) acts.shiftLeft();
562 }
563
564 public void shiftRight() throws IOException
565 {
566 if( acts != null ) acts.shiftRight();
567 }
568
569 public void shiftRightUnsigned() throws IOException
570 {
571 if( acts != null ) acts.shiftRightUnsigned();
572 }
573
574 public void decrement() throws IOException
575 {
576 if( acts != null ) acts.decrement();
577 }
578
579 public void increment() throws IOException
580 {
581 if( acts != null ) acts.increment();
582 }
583
584 public void enumerateObject() throws IOException {
585 if( acts != null ) acts.enumerateObject();
586 }
587
588 public void greaterThan() throws IOException {
589 if( acts != null ) acts.greaterThan();
590 }
591
592 public void instanceOf() throws IOException {
593 if( acts != null ) acts.instanceOf();
594 }
595
596 public void strictEquals() throws IOException {
597 if( acts != null ) acts.strictEquals();
598 }
599
600 public void stringGreaterThan() throws IOException {
601 if( acts != null ) acts.stringGreaterThan();
602 }
603 }
604