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

Quick Search    Search Deep

com.anotherbigidea.flash.movie
Class Movie  view Movie download Movie.java

java.lang.Object
  extended bycom.anotherbigidea.flash.movie.Movie
All Implemented Interfaces:
TimeLine

public class Movie
extends java.lang.Object
implements TimeLine

A Flash Movie


Field Summary
protected  com.anotherbigidea.flash.structs.Color backColor
           
protected  java.util.HashMap definedSymbols
           
protected  int depth
           
protected  java.util.Vector exportedSymbols
           
protected  int frameCount
           
protected  int frameRate
           
protected  java.util.SortedMap frames
           
protected  int height
           
protected  java.util.Map importLibraries
           
protected  boolean isProtected
           
protected  int maxId
           
protected  int version
           
protected  int width
           
 
Constructor Summary
Movie()
          Create a movie with the default values - (550x400), 12 frames/sec, white backcolor, Flash version 5.
Movie(int width, int height, int frameRate, int version, com.anotherbigidea.flash.structs.Color backColor)
          Create a movie with the given properties
 
Method Summary
 Frame appendFrame()
          Append a frame to the end of the timeline
 void clearExports()
          Clear all the symbol exports
 void clearImports()
          Clear all the defined library imports
 void exportSymbols(java.lang.String[] exportNames, Symbol[] symbols)
          Export a number of symbols with the given names so that other movies can import and use them.
 int getAvailableDepth()
          Get the next available depth in the timeline
 com.anotherbigidea.flash.structs.Color getBackColor()
           
 ExportedSymbol[] getExportedSymbols()
          Get the symbols exported from the movie
 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.
 int getFrameRate()
           
 int getHeight()
           
 ImportedSymbol[] getImportedSymbols()
          Access the imported symbols.
 int getVersion()
           
 int getWidth()
           
 ImportedSymbol[] importSymbols(java.lang.String libraryName, java.lang.String[] symbolNames)
          Import symbols from another movie (Flash 5 only)
 boolean isProtected()
          Return the protection flag.
 void protect(boolean isProtected)
           
 void setAvailableDepth(int depth)
          Set the next available depth in the timeline
 void setBackColor(com.anotherbigidea.flash.structs.Color color)
           
 void setFrameRate(int rate)
           
 void setHeight(int height)
           
 void setVersion(int version)
           
 void setWidth(int width)
           
 void write(java.io.OutputStream out)
          Write the movie in uncompressed SWF format to the given output stream.
 void write(java.io.OutputStream out, boolean compressed)
          Write the movie in SWF format to the given output stream.
 void write(java.lang.String filename)
          Write the movie in uncompressed SWF format to the given file.
 void write(java.lang.String filename, boolean compressed)
          Write the movie in SWF format to the given file.
 void write(com.anotherbigidea.flash.interfaces.SWFTagTypes tagwriter)
          Write the movie in SWF format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected int width

height

protected int height

frameRate

protected int frameRate

backColor

protected com.anotherbigidea.flash.structs.Color backColor

version

protected int version

isProtected

protected boolean isProtected

importLibraries

protected java.util.Map importLibraries

exportedSymbols

protected java.util.Vector exportedSymbols

frames

protected java.util.SortedMap frames

frameCount

protected int frameCount

definedSymbols

protected java.util.HashMap definedSymbols

depth

protected int depth

maxId

protected int maxId
Constructor Detail

Movie

public Movie()
Create a movie with the default values - (550x400), 12 frames/sec, white backcolor, Flash version 5.


Movie

public Movie(int width,
             int height,
             int frameRate,
             int version,
             com.anotherbigidea.flash.structs.Color backColor)
Create a movie with the given properties

Method Detail

getWidth

public int getWidth()

getHeight

public int getHeight()

getFrameRate

public int getFrameRate()

getVersion

public int getVersion()

getBackColor

public com.anotherbigidea.flash.structs.Color getBackColor()

setWidth

public void setWidth(int width)

setHeight

public void setHeight(int height)

setFrameRate

public void setFrameRate(int rate)

setVersion

public void setVersion(int version)

setBackColor

public void setBackColor(com.anotherbigidea.flash.structs.Color color)

isProtected

public boolean isProtected()
Return the protection flag. If true then the movie cannot be imported into the Flash Author. The existence of tools such as JavaSWF makes this kind of protection almost worthless.


protect

public void protect(boolean isProtected)

getFrameCount

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

Specified by:
getFrameCount in interface TimeLine

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

appendFrame

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

Specified by:
appendFrame in interface TimeLine

getAvailableDepth

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

Specified by:
getAvailableDepth in interface TimeLine

setAvailableDepth

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

Specified by:
setAvailableDepth in interface TimeLine

importSymbols

public ImportedSymbol[] importSymbols(java.lang.String libraryName,
                                      java.lang.String[] symbolNames)
Import symbols from another movie (Flash 5 only)


clearImports

public void clearImports()
Clear all the defined library imports


getImportedSymbols

public ImportedSymbol[] getImportedSymbols()
Access the imported symbols.


exportSymbols

public void exportSymbols(java.lang.String[] exportNames,
                          Symbol[] symbols)
Export a number of symbols with the given names so that other movies can import and use them. Flash version 5 only.


getExportedSymbols

public ExportedSymbol[] getExportedSymbols()
Get the symbols exported from the movie


clearExports

public void clearExports()
Clear all the symbol exports


write

public void write(com.anotherbigidea.flash.interfaces.SWFTagTypes tagwriter)
           throws java.io.IOException
Write the movie in SWF format.


write

public void write(java.lang.String filename)
           throws java.io.IOException
Write the movie in uncompressed SWF format to the given file.


write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Write the movie in uncompressed SWF format to the given output stream.


write

public void write(java.lang.String filename,
                  boolean compressed)
           throws java.io.IOException
Write the movie in SWF format to the given file.


write

public void write(java.io.OutputStream out,
                  boolean compressed)
           throws java.io.IOException
Write the movie in SWF format to the given output stream.