diff --git a/src/main/java/com/anotherbigidea/flash/interfaces/SWFSpriteTagTypes.java b/src/main/java/com/anotherbigidea/flash/interfaces/SWFSpriteTagTypes.java index da3c895..66f6c15 100644 --- a/src/main/java/com/anotherbigidea/flash/interfaces/SWFSpriteTagTypes.java +++ b/src/main/java/com/anotherbigidea/flash/interfaces/SWFSpriteTagTypes.java @@ -1,118 +1,136 @@ -/**************************************************************** - * Copyright (c) 2001, David N. Main, All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the - * following conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * 3. The name of the author may not be used to endorse or - * promote products derived from this software without specific - * prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ****************************************************************/ -package com.anotherbigidea.flash.interfaces; - -import java.io.*; -import com.anotherbigidea.flash.structs.*; - -/** - * Interface for passing SWF tag types that can be used in a movie or a sprite - */ -public interface SWFSpriteTagTypes extends SWFTags -{ /** - * Start/stop playing a sound - */ - public void tagStartSound( int soundId, SoundInfo info ) throws IOException; - - /** - * Only allows ADPCM encoding. - * - * @param streamFormat must be SWFConstants.SOUND_FORMAT_ADPCM - * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants - * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants - */ public void tagSoundStreamHead( int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount ) throws IOException; - - /** - * Allows any encoding. - * - * @param streamFormat one of the SWFConstants.SOUND_FORMAT_* constants - * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants - * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants - */ public void tagSoundStreamHead2( int playbackFrequency, boolean playback16bit, boolean playbackStereo, int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, int averageSampleCount ) throws IOException; - /** - * @param soundData format-dependent sound data - */ - public void tagSoundStreamBlock( byte[] soundData ) throws IOException; - - public void tagEnd() throws IOException; - - public void tagShowFrame() throws IOException; - - /** - * @return SWFActions to receive actions - or null to skip the data - */ public SWFActions tagDoAction() throws IOException; - - /** - * @param spriteId the sprite that the actions relate to. - * @return SWFActions to receive actions - or null to skip the data - */ - public SWFActions tagDoInitAction( int spriteId ) throws IOException; - - public void tagFreeCharacter( int charId ) throws IOException; /** - * @param cxform may be null - */ - public void tagPlaceObject( int charId, int depth, Matrix matrix, AlphaTransform cxform ) throws IOException; - public void tagRemoveObject( int charId, int depth ) throws IOException; /** - * @param clipDepth < 1 if not relevant - * @param charId < 1 if not relevant - * @param name of sprite instance - null if not relevant - * @param ratio < 0 if not relevant - * @param matrix null if not relevant - * @param cxform null if not relevant - * @param clipActionFlags == 0 if there are no clip actions - otherwise - * this is the OR of the condition flags on all the clip action blocks - * @return null if there are no clip actions or they are irrelevant - */ - public SWFActions tagPlaceObject2( boolean isMove, - int clipDepth, - int depth, - int charId, - Matrix matrix, - AlphaTransform cxform, - int ratio, - String name, - int clipActionFlags ) throws IOException; - public void tagRemoveObject2( int depth ) throws IOException; - /** - * Define the label for the current frame - */ - public void tagFrameLabel( String label ) throws IOException; - - /** - * Define the label for the current frame - * @param isAnchor true if this is an anchor frame (for browser navigation), - * Flash MX+ only. - */ - public void tagFrameLabel( String label, boolean isAnchor ) throws IOException; -} +/**************************************************************** + * Copyright (c) 2001, David N. Main, All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the + * following conditions are met: + * + * 1. Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * 3. The name of the author may not be used to endorse or + * promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************/ +package com.anotherbigidea.flash.interfaces; + +import java.io.*; +import com.anotherbigidea.flash.structs.*; + +/** + * Interface for passing SWF tag types that can be used in a movie or a sprite + */ +public interface SWFSpriteTagTypes extends SWFTags +{ + /** + * Start/stop playing a sound + */ + public void tagStartSound( int soundId, SoundInfo info ) throws IOException; + + /** + * Only allows ADPCM encoding. + * + * @param streamFormat must be SWFConstants.SOUND_FORMAT_ADPCM + * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants + * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants + */ + public void tagSoundStreamHead( + int playbackFrequency, boolean playback16bit, boolean playbackStereo, + int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, + int averageSampleCount ) throws IOException; + + /** + * Allows any encoding. + * + * @param streamFormat one of the SWFConstants.SOUND_FORMAT_* constants + * @param playbackFrequency one of the SWFConstants.SOUND_FREQ_* constants + * @param streamFrequency one of the SWFConstants.SOUND_FREQ_* constants + */ + public void tagSoundStreamHead2( + int playbackFrequency, boolean playback16bit, boolean playbackStereo, + int streamFormat, int streamFrequency, boolean stream16bit, boolean streamStereo, + int averageSampleCount ) throws IOException; + + /** + * @param soundData format-dependent sound data + */ + public void tagSoundStreamBlock( byte[] soundData ) throws IOException; + + public void tagEnd() throws IOException; + + public void tagShowFrame() throws IOException; + + /** + * @return SWFActions to receive actions - or null to skip the data + */ + public SWFActions tagDoAction() throws IOException; + + /** + * @param spriteId the sprite that the actions relate to. + * @return SWFActions to receive actions - or null to skip the data + */ + public SWFActions tagDoInitAction( int spriteId ) throws IOException; + + public void tagFreeCharacter( int charId ) throws IOException; + + /** + * @param cxform may be null + */ + public void tagPlaceObject( int charId, int depth, Matrix matrix, AlphaTransform cxform ) throws IOException; + + public void tagRemoveObject( int charId, int depth ) throws IOException; + + /** + * @param clipDepth < 1 if not relevant + * @param charId < 1 if not relevant + * @param name of sprite instance - null if not relevant + * @param ratio < 0 if not relevant + * @param matrix null if not relevant + * @param cxform null if not relevant + * @param clipActionFlags == 0 if there are no clip actions - otherwise + * this is the OR of the condition flags on all the clip action blocks + * @return null if there are no clip actions or they are irrelevant + */ + public SWFActions tagPlaceObject2( boolean isMove, + int clipDepth, + int depth, + int charId, + Matrix matrix, + AlphaTransform cxform, + int ratio, + String name, + int clipActionFlags ) throws IOException; + + public void tagRemoveObject2( int depth ) throws IOException; + + /** + * Define the label for the current frame + */ + public void tagFrameLabel( String label ) throws IOException; + + /** + * Define the label for the current frame + * @param isAnchor true if this is an anchor frame (for browser navigation), + * Flash MX+ only. + */ + public void tagFrameLabel( String label, boolean isAnchor ) throws IOException; +} diff --git a/src/main/java/com/anotherbigidea/flash/movie/EditField.java b/src/main/java/com/anotherbigidea/flash/movie/EditField.java index 0e786d3..df3e086 100644 --- a/src/main/java/com/anotherbigidea/flash/movie/EditField.java +++ b/src/main/java/com/anotherbigidea/flash/movie/EditField.java @@ -134,7 +134,7 @@ public void setProperties( boolean isSelectable, boolean hasBorder, * Create an Edit Field with black text and default settings * * @param fieldName may be null - * @param intialText may be null + * @param initialText may be null */ public EditField( String fieldName, String initialText, Font font, double fontSize, diff --git a/src/main/java/com/anotherbigidea/flash/movie/Font.java b/src/main/java/com/anotherbigidea/flash/movie/Font.java index a4c8d53..b3740f6 100644 --- a/src/main/java/com/anotherbigidea/flash/movie/Font.java +++ b/src/main/java/com/anotherbigidea/flash/movie/Font.java @@ -100,11 +100,7 @@ public class Chars /** * @param chars the characters to display (displayable chars only - i.e. no newlines, tabs etc..) - * @param font may be null if no change of font is required * @param size point-size - only relevant if font is not null - * @param color may be null if no color change is required. May be AlphaColor. - * @param x new X position for text - only valid if hasX is true - * @param y new Y position for text - only valid if hasY is true */ protected Chars( String chars, double size ) throws NoGlyphException { diff --git a/src/main/java/com/anotherbigidea/flash/movie/Frame.java b/src/main/java/com/anotherbigidea/flash/movie/Frame.java index cc3ef6f..acf096f 100644 --- a/src/main/java/com/anotherbigidea/flash/movie/Frame.java +++ b/src/main/java/com/anotherbigidea/flash/movie/Frame.java @@ -251,7 +251,7 @@ public void undefineSymbol( Symbol symbol ) * @param cxform may be null if no color transform is required * @param name the instance name of a MovieClip - should be null if this is * not a MovieClip - * @param clipAction an array of Actions (with clipAction conditions) + * @param clipActions an array of Actions (with clipAction conditions) */ public Instance placeMovieClip( Symbol symbol, Transform matrix, AlphaTransform cxform, String name, @@ -278,7 +278,7 @@ public Instance placeMovieClip( Symbol symbol, Transform matrix, * @param cxform may be null if no color transform is required * @param name the instance name of a MovieClip - should be null if this is * not a MovieClip - * @param clipAction an array of Actions (with clipAction conditions) + * @param clipActions an array of Actions (with clipAction conditions) */ public Instance replaceMovieClip( Symbol symbol, int depth, Transform matrix, diff --git a/src/main/java/com/anotherbigidea/flash/movie/Symbol.java b/src/main/java/com/anotherbigidea/flash/movie/Symbol.java index 4ac452f..8c146a8 100644 --- a/src/main/java/com/anotherbigidea/flash/movie/Symbol.java +++ b/src/main/java/com/anotherbigidea/flash/movie/Symbol.java @@ -64,7 +64,6 @@ protected Symbol( int id ) /** * Make sure that the Symbol is fully defined in the given Movie and * return the character id - * @param tags a vector into which to place any definition tags required */ protected int define( Movie movie, SWFTagTypes timelineWriter, diff --git a/src/main/java/com/anotherbigidea/flash/movie/Text.java b/src/main/java/com/anotherbigidea/flash/movie/Text.java index a75b28e..2f5a769 100644 --- a/src/main/java/com/anotherbigidea/flash/movie/Text.java +++ b/src/main/java/com/anotherbigidea/flash/movie/Text.java @@ -131,7 +131,7 @@ public Text( Transform matrix ) * and vertical position. * * @param chars the characters to display) - * @param may be AlphaColor. + * @param color may be AlphaColor. * @param x new X position for text - only valid if hasX is true * @param y new Y position for text - only valid if hasY is true *