|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.FSFrame
public final class FSFrame
The Frame class is used to provide a higher level view of a movie. Rather than viewing movies as a sequence of individual objects each representing a given data structure in the encoded Flash file, objects can be grouped together in frames which presents a more logical view of a movie and makes movie manipulation and search for specific objects easier to handle. Each Frame object has the following attributes: number - The position in the movie when the frame will be displayed. label - An optional name assigned to a frame. The FSGotoFrame2 object can be used to move to a named frame when playing a movie or movie clip. definitions - An array containing objects that define items for display in a movie. Definitions are sub-classes of the FSDefineObject class and define shapes, fonts, images and sounds that are displayed or played by the Flash Player. commands - An array containing objects that define commands that affect the display list or the Flash Player directly. actions - An array that define actions that are executed when a frame is displayed. Frame objects simplify the handling of movies. FSDoAction, FSFrameLabel and FSShowFrame classes can now "hidden" from view. They are generated automatically by the FSFrame object when it is added to an FSMovie object. The framesFromMovie(FSMovie aMovie) method allows an existing movie to be viewed as an array of FSFrame objects. Objects from the movie are copied into each frame so changes made to the attributes of each object are reflected in the movie. The frame objects are not synchronised with the movie, so any objects added to a frame are not added to the FSMovie. The easiest way to do this is to remove the existing objects from the movie and add all the frames. ArrayList frames = FSFrame.framesFromMovie(aMovie); ... ... aMovie.getObjects().clear(); for (Iterator i = frames.iterator(); i.hasNext();) ((FSFrame)i.next()).addToMovie(aMovie); When the contents of an FSFrame object is added to a movie if a label defined then an FSFrameLabel object will be added. Similarly if actions are defined then an FSDoAction object will be added. An FSShowFrame object which instructs the Flash Player to update the display list with all the changes is added.
Constructor Summary | |
---|---|
FSFrame()
Constructs an empty frame with no label defined and the definitions, commands and actions arrays empty. |
|
FSFrame(java.lang.String label,
java.util.ArrayList definitions,
java.util.ArrayList commands,
java.util.ArrayList actions)
Constructs a frame with with the specified label, definitions, commands and actions. |
Method Summary | |
---|---|
void |
addAction(FSActionObject anObject)
Adds the action object to the frame. |
void |
addCommand(FSMovieObject anObject)
Adds the display list command to the frame. |
void |
addDefinition(FSDefineObject anObject)
Adds an object to the frame that defines an object to be displayed in the movie. |
void |
addToMovie(FSMovie aMovie)
Add the objects in the frame to the movie. |
static java.util.ArrayList |
framesFromMovie(FSMovie aMovie)
Create a frame based view of a movie. |
java.util.ArrayList |
getActions()
Gets the array of action objects that will be execute when the frame is displayed. |
java.util.ArrayList |
getCommands()
Gets the array of commands that update the display list. |
java.util.ArrayList |
getDefinitions()
Gets the array of definition objects contained in the frame. |
java.lang.String |
getLabel()
Gets the label assigned to the frame. |
void |
setActions(java.util.ArrayList anArray)
Sets the array of action objects for the frame. |
void |
setCommands(java.util.ArrayList anArray)
Sets the array of commands that updated the display list for the frame. |
void |
setDefinitions(java.util.ArrayList anArray)
Sets the array of action objects for the frame. |
void |
setLabel(java.lang.String aString)
Sets the label for the frame. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FSFrame()
public FSFrame(java.lang.String label, java.util.ArrayList definitions, java.util.ArrayList commands, java.util.ArrayList actions)
label
- a label for the frame. Maybe null if no label is defined.definitions
- an array of definition objects. Maybe null if no definitions
are defined.commands
- an array of objects used to manipulate the display list. Maybe
null if no display list commands are defined.actions
- an array of action objects that will be executed when the
frame is displayed. Maybe null if no actions are defined.Method Detail |
---|
public static java.util.ArrayList framesFromMovie(FSMovie aMovie)
aMovie
- an FSMovie object.
public void addAction(FSActionObject anObject)
anObject
- the action object to be added to the frame.public void addDefinition(FSDefineObject anObject)
anObject
- a sub-class of FSDefineObject.public void addCommand(FSMovieObject anObject)
anObject
- an FSMovieObject the manipulates the display list.public java.lang.String getLabel()
public java.util.ArrayList getDefinitions()
public java.util.ArrayList getCommands()
public java.util.ArrayList getActions()
public void setLabel(java.lang.String aString)
aString
- the label.public void setDefinitions(java.util.ArrayList anArray)
anArray
- the array of actions.public void setCommands(java.util.ArrayList anArray)
anArray
- the array of command objects.public void setActions(java.util.ArrayList anArray)
anArray
- the array of actions.public void addToMovie(FSMovie aMovie)
aMovie
- an FSMovie object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |