pt.tumba.parser.swf
Class Frame

java.lang.Object
  extended by pt.tumba.parser.swf.Frame

public class Frame
extends java.lang.Object

A Movie or Movie Clip frame

Author:
unknown

Field Summary
protected  Actions actions
          Description of the Field
protected  int frameNumber
          Description of the Field
protected  java.lang.String label
          Description of the Field
protected  java.util.List placements
          Description of the Field
protected  boolean stop
          Description of the Field
protected  TimeLine timeline
          Description of the Field
 
Constructor Summary
protected Frame(int number, TimeLine timeline)
          Constructor for the Frame object
 
Method Summary
 Actions actions(int flashVersion)
          Reset the frame actions (if any) and return the new empty Actions object
 void alter(Instance instance, int x, int y)
          Alter the symbol instance by moving it to the new coordinates.
 void alter(Instance instance, Transform matrix, AlphaTransform cxform)
          Alter the symbol instance by applying the given transform and/or color transform.
 void alter(Instance instance, Transform matrix, AlphaTransform cxform, int ratio)
          Alter the symbol instance by applying the given properties.
protected  void flushDefinitions(Movie movie, SWFTagTypes timelineWriter, SWFTagTypes definitionWriter)
          Description of the Method
 Actions getActions()
          Get the frame actions
 int getFrameNumber()
          Get the frame number
 java.lang.String getLabel()
          Get the frame label
 Placement[] getPlacements()
          Get the placements in this frame
 Instance placeMovieClip(Symbol symbol, Transform matrix2, AlphaTransform cxform, java.lang.String name, Actions[] clipActions)
          Place a Movie Clip at the next available depth with the given properties.
 Instance placeSymbol(Symbol symbol, int x, int y)
          Place a symbol at the given coordinates at the next available depth.
 Instance placeSymbol(Symbol symbol, Transform matrix, AlphaTransform cxform)
          Place a symbol at the next available depth with the given matrix transform and color transform.
 Instance placeSymbol(Symbol symbol, Transform matrix2, AlphaTransform cxform, int ratio, int clipDepth)
          Place a symbol at the next available depth with the given properties.
 void remove(Instance instance)
          Remove the symbol instance from the stage
 Instance replaceMovieClip(Symbol symbol, int depth, Transform matrix2, AlphaTransform cxform, java.lang.String name, Actions[] clipActions)
          Replace the Symbol at the given depth with the new MovieClip
 Instance replaceSymbol(Symbol symbol, int depth, Transform matrix2, AlphaTransform cxform, int ratio, int clipDepth)
          Replace the symbol at the given depth with the new symbol
 void setActions(Actions actions)
          Set the frame actions (or null them out)
 void setLabel(java.lang.String label)
          Set the frame label - set to null to clear any label
 void stop()
          Set the stop flag - if true then the movie will stop at this frame.
protected  void write(Movie movie, SWFTagTypes movieTagWriter, SWFTagTypes timelineTagWriter)
          Write the frame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frameNumber

protected int frameNumber
Description of the Field


label

protected java.lang.String label
Description of the Field


placements

protected java.util.List placements
Description of the Field


stop

protected boolean stop
Description of the Field


timeline

protected TimeLine timeline
Description of the Field


actions

protected Actions actions
Description of the Field

Constructor Detail

Frame

protected Frame(int number,
                TimeLine timeline)
Constructor for the Frame object

Parameters:
number - Description of the Parameter
timeline - Description of the Parameter
Method Detail

getActions

public Actions getActions()
Get the frame actions

Returns:
The actions value

setActions

public void setActions(Actions actions)
Set the frame actions (or null them out)

Parameters:
actions - The new actions value

actions

public Actions actions(int flashVersion)
Reset the frame actions (if any) and return the new empty Actions object

Parameters:
flashVersion - Description of the Parameter
Returns:
Description of the Return Value

getFrameNumber

public int getFrameNumber()
Get the frame number

Returns:
The frameNumber value

getPlacements

public Placement[] getPlacements()
Get the placements in this frame

Returns:
The placements value

getLabel

public java.lang.String getLabel()
Get the frame label

Returns:
null if the frame has no label

setLabel

public void setLabel(java.lang.String label)
Set the frame label - set to null to clear any label

Parameters:
label - The new label value

stop

public void stop()
Set the stop flag - if true then the movie will stop at this frame. This can be set on the last frame to prevent the movie looping.


placeSymbol

public Instance placeSymbol(Symbol symbol,
                            int x,
                            int y)
Place a symbol at the given coordinates at the next available depth.

Parameters:
symbol - Description of the Parameter
x - Description of the Parameter
y - Description of the Parameter
Returns:
Description of the Return Value

placeSymbol

public Instance placeSymbol(Symbol symbol,
                            Transform matrix,
                            AlphaTransform cxform)
Place a symbol at the next available depth with the given matrix transform and color transform.

Parameters:
matrix - may be null to place the symbol at (0,0)
cxform - may be null if no color transform is required
symbol - Description of the Parameter
Returns:
Description of the Return Value

placeSymbol

public Instance placeSymbol(Symbol symbol,
                            Transform matrix2,
                            AlphaTransform cxform,
                            int ratio,
                            int clipDepth)
Place a symbol at the next available depth with the given properties.

Parameters:
matrix - may be null to place the symbol at (0,0)
cxform - may be null if no color transform is required
ratio - only for a MorphShape - the morph ratio from 0 to 65535, should be -1 for a non-MorphShape
clipDepth - the top depth that will be clipped by the symbol, should be -1 if this is not a clipping symbol
symbol - Description of the Parameter
Returns:
Description of the Return Value

replaceSymbol

public Instance replaceSymbol(Symbol symbol,
                              int depth,
                              Transform matrix2,
                              AlphaTransform cxform,
                              int ratio,
                              int clipDepth)
Replace the symbol at the given depth with the new symbol

Parameters:
matrix - may be null to place the symbol at (0,0)
cxform - may be null if no color transform is required
ratio - only for a MorphShape - the morph ratio from 0 to 65535, should be -1 for a non-MorphShape
clipDepth - the top depth that will be clipped by the symbol, should be -1 if this is not a clipping symbol
symbol - Description of the Parameter
depth - Description of the Parameter
Returns:
Description of the Return Value

placeMovieClip

public Instance placeMovieClip(Symbol symbol,
                               Transform matrix2,
                               AlphaTransform cxform,
                               java.lang.String name,
                               Actions[] clipActions)
Place a Movie Clip at the next available depth with the given properties.

Parameters:
matrix - may be null to place the symbol at (0,0)
cxform - may be null if no color transform is required
name - the instance name of a MovieClip - should be null if this is not a MovieClip
symbol - Description of the Parameter
clipActions - Description of the Parameter
Returns:
Description of the Return Value

replaceMovieClip

public Instance replaceMovieClip(Symbol symbol,
                                 int depth,
                                 Transform matrix2,
                                 AlphaTransform cxform,
                                 java.lang.String name,
                                 Actions[] clipActions)
Replace the Symbol at the given depth with the new MovieClip

Parameters:
matrix - may be null to place the symbol at (0,0)
cxform - may be null if no color transform is required
name - the instance name of a MovieClip - should be null if this is not a MovieClip
symbol - Description of the Parameter
depth - Description of the Parameter
clipActions - Description of the Parameter
Returns:
Description of the Return Value

remove

public void remove(Instance instance)
Remove the symbol instance from the stage

Parameters:
instance - Description of the Parameter

alter

public void alter(Instance instance,
                  int x,
                  int y)
Alter the symbol instance by moving it to the new coordinates. Only one alteration may be made to an Instance in any given frame.

Parameters:
instance - Description of the Parameter
x - Description of the Parameter
y - Description of the Parameter

alter

public void alter(Instance instance,
                  Transform matrix,
                  AlphaTransform cxform)
Alter the symbol instance by applying the given transform and/or color transform. Only one alteration may be made to an Instance in any given frame.

Parameters:
matrix - may be null if no positional change is to be made.
cxform - may be null if no color change is required.
instance - Description of the Parameter

alter

public void alter(Instance instance,
                  Transform matrix,
                  AlphaTransform cxform,
                  int ratio)
Alter the symbol instance by applying the given properties. Only one alteration may be made to an Instance in any given frame.

Parameters:
matrix - may be null if no positional change is to be made.
cxform - may be null if no color change is required.
ratio - only for a MorphShape - the morph ratio from 0 to 65535, should be -1 for a non-MorphShape
instance - Description of the Parameter

flushDefinitions

protected void flushDefinitions(Movie movie,
                                SWFTagTypes timelineWriter,
                                SWFTagTypes definitionWriter)
                         throws java.io.IOException
Description of the Method

Parameters:
movie - Description of the Parameter
timelineWriter - Description of the Parameter
definitionWriter - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

write

protected void write(Movie movie,
                     SWFTagTypes movieTagWriter,
                     SWFTagTypes timelineTagWriter)
              throws java.io.IOException
Write the frame

Parameters:
movie - Description of the Parameter
movieTagWriter - Description of the Parameter
timelineTagWriter - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception