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

Quick Search    Search Deep

Source code: com/anotherbigidea/flash/interfaces/SWFSpriteTagTypes.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.*;
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 }