pt.tumba.parser.swf
Class Placement

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

public class Placement
extends java.lang.Object

A Placement holds the transformation and other values relating to the "placement" of a Symbol Instance within a particular frame.

Author:
unknown

Field Summary
protected  Actions[] clipActions
          Description of the Field
protected  int clipDepth
          Description of the Field
protected  AlphaTransform cxform
          Description of the Field
protected  int frameNumber
          Description of the Field
protected  Instance instance
          Description of the Field
protected  boolean isAlteration
          Description of the Field
protected  boolean isRemove
          Description of the Field
protected  boolean isReplacement
          Description of the Field
protected  Transform matrix
          Description of the Field
protected  java.lang.String name
          Description of the Field
protected  int ratio
          Description of the Field
 
Constructor Summary
protected Placement(Instance instance, int frameNumber)
          Constructor for the Placement object
protected Placement(Instance instance, Transform matrix, AlphaTransform cxform, java.lang.String name, int ratio, int clipDepth, int frameNumber, boolean alteration, boolean replacement, Actions[] clipActions)
          Constructor for the Placement object
 
Method Summary
protected  void flushDefinitions(Movie movie, SWFTagTypes timelineWriter, SWFTagTypes definitionWriter)
          Description of the Method
 Actions[] getClipActions()
          Get the actions for a movie clip
 int getClipDepth()
          The clip depth defines the range of depths which will be clipped by this symbol.
 AlphaTransform getColorTransform()
          The color transform may be null
 int getFrameNumber()
          Get the number of the frame within which this placement takes place
 Instance getInstance()
          Get the Symbol Instance represented by this Placement
 java.lang.String getName()
          The name only relates to MovieClip instances and may be null.
 int getRatio()
          The ratio only relates to Morph Shapes and will be -1 otherwise.
 Transform getTransform()
          The transform may be null
 boolean isAlteration()
          Return true if this placement is an alteration to an Instance that was placed in a previous frame.
 boolean isRemove()
          If true then this Placement denotes the removal of the Instance from the stage.
 boolean isReplacement()
          Return true if the placement is replacing the symbol at a given depth with a new symbol
 void setClipActions(Actions[] clipActions)
          Set the actions for a movie clip
protected  void write(Movie movie, SWFTagTypes movieTagWriter, SWFTagTypes timelineTagWriter)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isAlteration

protected boolean isAlteration
Description of the Field


isReplacement

protected boolean isReplacement
Description of the Field


frameNumber

protected int frameNumber
Description of the Field


instance

protected Instance instance
Description of the Field


matrix

protected Transform matrix
Description of the Field


cxform

protected AlphaTransform cxform
Description of the Field


name

protected java.lang.String name
Description of the Field


ratio

protected int ratio
Description of the Field


clipDepth

protected int clipDepth
Description of the Field


isRemove

protected boolean isRemove
Description of the Field


clipActions

protected Actions[] clipActions
Description of the Field

Constructor Detail

Placement

protected Placement(Instance instance,
                    int frameNumber)
Constructor for the Placement object

Parameters:
instance - Description of the Parameter
frameNumber - Description of the Parameter

Placement

protected Placement(Instance instance,
                    Transform matrix,
                    AlphaTransform cxform,
                    java.lang.String name,
                    int ratio,
                    int clipDepth,
                    int frameNumber,
                    boolean alteration,
                    boolean replacement,
                    Actions[] clipActions)
Constructor for the Placement object

Parameters:
instance - Description of the Parameter
matrix - Description of the Parameter
cxform - Description of the Parameter
name - Description of the Parameter
ratio - Description of the Parameter
clipDepth - Description of the Parameter
frameNumber - Description of the Parameter
alteration - Description of the Parameter
replacement - Description of the Parameter
clipActions - Description of the Parameter
Method Detail

isReplacement

public boolean isReplacement()
Return true if the placement is replacing the symbol at a given depth with a new symbol

Returns:
The replacement value

isAlteration

public boolean isAlteration()
Return true if this placement is an alteration to an Instance that was placed in a previous frame.

Returns:
The alteration value

getFrameNumber

public int getFrameNumber()
Get the number of the frame within which this placement takes place

Returns:
The frameNumber value

getInstance

public Instance getInstance()
Get the Symbol Instance represented by this Placement

Returns:
The instance value

getTransform

public Transform getTransform()
The transform may be null

Returns:
The transform value

getColorTransform

public AlphaTransform getColorTransform()
The color transform may be null

Returns:
The colorTransform value

getName

public java.lang.String getName()
The name only relates to MovieClip instances and may be null. The name is only present on the first Placement of an Instance.

Returns:
The name value

getRatio

public int getRatio()
The ratio only relates to Morph Shapes and will be -1 otherwise. The ratio is from zero to 65535 and denotes the degree of the morph from the initial shape to the final shape.

Returns:
The ratio value

getClipDepth

public int getClipDepth()
The clip depth defines the range of depths which will be clipped by this symbol. All symbols placed at depths from depth+1 to clipDepth (inclusive) will be clipped. If this symbol is not a clipping symbol then the clip depth will be -1. The clip depth is only present on the first Placement of an Instance.

Returns:
The clipDepth value

isRemove

public boolean isRemove()
If true then this Placement denotes the removal of the Instance from the stage.

Returns:
The remove value

getClipActions

public Actions[] getClipActions()
Get the actions for a movie clip

Returns:
The clipActions value

setClipActions

public void setClipActions(Actions[] clipActions)
Set the actions for a movie clip

Parameters:
clipActions - The new clipActions value

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
Description of the Method

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