pt.tumba.parser.swf
Class MovieClip

java.lang.Object
  extended by pt.tumba.parser.swf.Symbol
      extended by pt.tumba.parser.swf.MovieClip
All Implemented Interfaces:
TimeLine

public class MovieClip
extends Symbol
implements TimeLine

A Movie Clip (aka Sprite) Symbol

Author:
unknown

Field Summary
protected  int depth
          Description of the Field
protected  int frameCount
          Description of the Field
protected  java.util.SortedMap frames
          Description of the Field
 
Fields inherited from class pt.tumba.parser.swf.Symbol
id
 
Constructor Summary
MovieClip()
          Constructor for the MovieClip object
 
Method Summary
 Frame appendFrame()
          Append a frame to the end of the timeline
protected  int defineSymbol(Movie movie, SWFTagTypes timelineWriter, SWFTagTypes definitionWriter)
          Description of the Method
 int getAvailableDepth()
          Get the next available depth in the timeline
 Frame getFrame(int frameNumber)
          Get the Frame object for the given frame number - or create one if none exists.
 int getFrameCount()
          Get the current number of frames in the timeline.
 void setAvailableDepth(int depth)
          Set the next available depth in the timeline
 
Methods inherited from class pt.tumba.parser.swf.Symbol
define, getId, getNextId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frames

protected java.util.SortedMap frames
Description of the Field


frameCount

protected int frameCount
Description of the Field


depth

protected int depth
Description of the Field

Constructor Detail

MovieClip

public MovieClip()
Constructor for the MovieClip object

Method Detail

getFrameCount

public int getFrameCount()
Get the current number of frames in the timeline.

Specified by:
getFrameCount in interface TimeLine
Returns:
The frameCount value

getFrame

public Frame getFrame(int frameNumber)
Get the Frame object for the given frame number - or create one if none exists. If the frame number is larger than the current frame count then the frame count is increased.

Specified by:
getFrame in interface TimeLine
Parameters:
frameNumber - must be 1 or larger
Returns:
The frame value

appendFrame

public Frame appendFrame()
Append a frame to the end of the timeline

Specified by:
appendFrame in interface TimeLine
Returns:
Description of the Return Value

getAvailableDepth

public int getAvailableDepth()
Get the next available depth in the timeline

Specified by:
getAvailableDepth in interface TimeLine
Returns:
The availableDepth value

setAvailableDepth

public void setAvailableDepth(int depth)
Set the next available depth in the timeline

Specified by:
setAvailableDepth in interface TimeLine
Parameters:
depth - must be >= 1

defineSymbol

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

Specified by:
defineSymbol in class Symbol
Parameters:
movie - Description of the Parameter
timelineWriter - Description of the Parameter
definitionWriter - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception