|
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.*; |
37 |
| -import com.anotherbigidea.flash.structs.*; |
38 |
| - |
39 |
| -/** |
40 |
| - * Interface for passing SWF tag types that can be used in a movie or a sprite |
41 |
| - */ |
42 |
| -public interface SWFSpriteTagTypes extends SWFTags |
43 |
| -{ /** |
44 |
| - * Start/stop playing a sound |
45 |
| - */ |
46 |
| - public void tagStartSound( int soundId, SoundInfo info ) throws IOException; |
47 |
| - |
48 |
| - /** |
49 |
| - * Only allows ADPCM encoding. |
50 |
| - * |
51 |
| - * @param streamFormat must be SWFConstants.SOUND_FORMAT_ADPCM |
52 |
| - * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants |
53 |
| - * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants |
54 |
| - */ public void tagSoundStreamHead( int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount ) throws IOException; |
55 |
| - |
56 |
| - /** |
57 |
| - * Allows any encoding. |
58 |
| - * |
59 |
| - * @param streamFormat one of the SWFConstants.SOUND_FORMAT_* constants |
60 |
| - * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants |
61 |
| - * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants |
62 |
| - */ public void tagSoundStreamHead2( int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount ) throws IOException; |
63 |
| - /** |
64 |
| - * @param soundData format-dependent sound data |
65 |
| - */ |
66 |
| - public void tagSoundStreamBlock( byte[] soundData ) throws IOException; |
67 |
| - |
68 |
| - public void tagEnd() throws IOException; |
69 |
| - |
70 |
| - public void tagShowFrame() throws IOException; |
71 |
| - |
72 |
| - /** |
73 |
| - * @return SWFActions to receive actions - or null to skip the data |
74 |
| - */ public SWFActions tagDoAction() throws IOException; |
75 |
| - |
76 |
| - /** |
77 |
| - * @param spriteId the sprite that the actions relate to. |
78 |
| - * @return SWFActions to receive actions - or null to skip the data |
79 |
| - */ |
80 |
| - public SWFActions tagDoInitAction( int spriteId ) throws IOException; |
81 |
| - |
82 |
| - public void tagFreeCharacter( int charId ) throws IOException; /** |
83 |
| - * @param cxform may be null |
84 |
| - */ |
85 |
| - public void tagPlaceObject( int charId, int depth, Matrix matrix, AlphaTransform cxform ) throws IOException; |
86 |
| - public void tagRemoveObject( int charId, int depth ) throws IOException; /** |
87 |
| - * @param clipDepth < 1 if not relevant |
88 |
| - * @param charId < 1 if not relevant |
89 |
| - * @param name of sprite instance - null if not relevant |
90 |
| - * @param ratio < 0 if not relevant |
91 |
| - * @param matrix null if not relevant |
92 |
| - * @param cxform null if not relevant |
93 |
| - * @param clipActionFlags == 0 if there are no clip actions - otherwise |
94 |
| - * this is the OR of the condition flags on all the clip action blocks |
95 |
| - * @return null if there are no clip actions or they are irrelevant |
96 |
| - */ |
97 |
| - public SWFActions tagPlaceObject2( boolean isMove, |
98 |
| - int clipDepth, |
99 |
| - int depth, |
100 |
| - int charId, |
101 |
| - Matrix matrix, |
102 |
| - AlphaTransform cxform, |
103 |
| - int ratio, |
104 |
| - String name, |
105 |
| - int clipActionFlags ) throws IOException; |
106 |
| - public void tagRemoveObject2( int depth ) throws IOException; |
107 |
| - /** |
108 |
| - * Define the label for the current frame |
109 |
| - */ |
110 |
| - public void tagFrameLabel( String label ) throws IOException; |
111 |
| - |
112 |
| - /** |
113 |
| - * Define the label for the current frame |
114 |
| - * @param isAnchor true if this is an anchor frame (for browser navigation), |
115 |
| - * Flash MX+ only. |
116 |
| - */ |
117 |
| - public void tagFrameLabel( String label, boolean isAnchor ) throws IOException; |
118 |
| -} |
| 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.*; |
| 37 | +import com.anotherbigidea.flash.structs.*; |
| 38 | + |
| 39 | +/** |
| 40 | + * Interface for passing SWF tag types that can be used in a movie or a sprite |
| 41 | + */ |
| 42 | +public interface SWFSpriteTagTypes extends SWFTags |
| 43 | +{ |
| 44 | + /** |
| 45 | + * Start/stop playing a sound |
| 46 | + */ |
| 47 | + public void tagStartSound( int soundId, SoundInfo info ) throws IOException; |
| 48 | + |
| 49 | + /** |
| 50 | + * Only allows ADPCM encoding. |
| 51 | + * |
| 52 | + * @param streamFormat must be SWFConstants.SOUND_FORMAT_ADPCM |
| 53 | + * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants |
| 54 | + * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants |
| 55 | + */ |
| 56 | + public void tagSoundStreamHead( |
| 57 | + int playbackFrequency, boolean playback16bit, boolean playbackStereo, |
| 58 | + int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, |
| 59 | + int averageSampleCount ) throws IOException; |
| 60 | + |
| 61 | + /** |
| 62 | + * Allows any encoding. |
| 63 | + * |
| 64 | + * @param streamFormat one of the SWFConstants.SOUND_FORMAT_* constants |
| 65 | + * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants |
| 66 | + * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants |
| 67 | + */ |
| 68 | + public void tagSoundStreamHead2( |
| 69 | + int playbackFrequency, boolean playback16bit, boolean playbackStereo, |
| 70 | + int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, |
| 71 | + int averageSampleCount ) throws IOException; |
| 72 | + |
| 73 | + /** |
| 74 | + * @param soundData format-dependent sound data |
| 75 | + */ |
| 76 | + public void tagSoundStreamBlock( byte[] soundData ) throws IOException; |
| 77 | + |
| 78 | + public void tagEnd() throws IOException; |
| 79 | + |
| 80 | + public void tagShowFrame() throws IOException; |
| 81 | + |
| 82 | + /** |
| 83 | + * @return SWFActions to receive actions - or null to skip the data |
| 84 | + */ |
| 85 | + public SWFActions tagDoAction() throws IOException; |
| 86 | + |
| 87 | + /** |
| 88 | + * @param spriteId the sprite that the actions relate to. |
| 89 | + * @return SWFActions to receive actions - or null to skip the data |
| 90 | + */ |
| 91 | + public SWFActions tagDoInitAction( int spriteId ) throws IOException; |
| 92 | + |
| 93 | + public void tagFreeCharacter( int charId ) throws IOException; |
| 94 | + |
| 95 | + /** |
| 96 | + * @param cxform may be null |
| 97 | + */ |
| 98 | + public void tagPlaceObject( int charId, int depth, Matrix matrix, AlphaTransform cxform ) throws IOException; |
| 99 | + |
| 100 | + public void tagRemoveObject( int charId, int depth ) throws IOException; |
| 101 | + |
| 102 | + /** |
| 103 | + * @param clipDepth < 1 if not relevant |
| 104 | + * @param charId < 1 if not relevant |
| 105 | + * @param name of sprite instance - null if not relevant |
| 106 | + * @param ratio < 0 if not relevant |
| 107 | + * @param matrix null if not relevant |
| 108 | + * @param cxform null if not relevant |
| 109 | + * @param clipActionFlags == 0 if there are no clip actions - otherwise |
| 110 | + * this is the OR of the condition flags on all the clip action blocks |
| 111 | + * @return null if there are no clip actions or they are irrelevant |
| 112 | + */ |
| 113 | + public SWFActions tagPlaceObject2( boolean isMove, |
| 114 | + int clipDepth, |
| 115 | + int depth, |
| 116 | + int charId, |
| 117 | + Matrix matrix, |
| 118 | + AlphaTransform cxform, |
| 119 | + int ratio, |
| 120 | + String name, |
| 121 | + int clipActionFlags ) throws IOException; |
| 122 | + |
| 123 | + public void tagRemoveObject2( int depth ) throws IOException; |
| 124 | + |
| 125 | + /** |
| 126 | + * Define the label for the current frame |
| 127 | + */ |
| 128 | + public void tagFrameLabel( String label ) throws IOException; |
| 129 | + |
| 130 | + /** |
| 131 | + * Define the label for the current frame |
| 132 | + * @param isAnchor true if this is an anchor frame (for browser navigation), |
| 133 | + * Flash MX+ only. |
| 134 | + */ |
| 135 | + public void tagFrameLabel( String label, boolean isAnchor ) throws IOException; |
| 136 | +} |
0 commit comments