|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.FSTransformObject
com.flagstone.transform.FSMovieObject
com.flagstone.transform.FSSetBackgroundColor
public class FSSetBackgroundColor
FSSetBackgroundColor sets the background colour displayed in every frame in the movie.
Attributes | |
---|---|
type | Identifies the data structure when it is encoded. Read-only. |
color | An FSColor object that defines the background colour. |
Although the colour is specified using an FSColor object the colour displayed is completely opaque - the alpha channel information in the object is ignored.
The background colour must be set before the first frame is displayed otherwise the background colour defaults to white. This is typically the first object in a coder. If more than one FSSetBackgroundColor object is added to a movie then only first one sets the background colour. Subsequent objects are ignored.
FSMovie movie = new FSMovie(); movie.setFrameSize(new FSBounds(0, 0, 8000, 8000)); // twips = 400 x 400 pixels movie.setFrameRate(1.0f); 1 frame per second. movie.add(new FSSetBackgroundColor(new FSColor(0xAD, 0xD8, 0xE6))); // light blue
The FSSetBackgroundColor class represents the SetBackgroundColor tag from the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 1.
Field Summary |
---|
Constructor Summary | |
---|---|
FSSetBackgroundColor(FSCoder coder)
Construct an FSSetBackgroundColor object, initialising it with values decoded from an encoded object. |
|
FSSetBackgroundColor(FSColor aColor)
Constructs an FSSetBackgroundColor object with a the specified colour. |
|
FSSetBackgroundColor(FSSetBackgroundColor obj)
Constructs an FSSetBackgroundColor object by copying values from an existing object. |
Method Summary | |
---|---|
void |
appendDescription(java.lang.StringBuffer buffer,
int depth)
AppendDescription is used to present a string description of the object including all nested objects up to a specified depth. |
java.lang.Object |
clone()
Creates a deep copy of the entire object. |
void |
decode(FSCoder coder)
|
void |
encode(FSCoder coder)
|
boolean |
equals(java.lang.Object anObject)
Returns true if anObject is equal to this one. |
FSColor |
getColor()
Gets the colour for the movie background. |
int |
length(FSCoder coder)
|
void |
setColor(FSColor aColor)
Sets the colour for the movie background. |
Methods inherited from class com.flagstone.transform.FSMovieObject |
---|
getType |
Methods inherited from class com.flagstone.transform.FSTransformObject |
---|
name, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FSSetBackgroundColor(FSCoder coder)
coder
- an FSCoder containing the binary data.public FSSetBackgroundColor(FSColor aColor)
aColor
- the colour for the background.public FSSetBackgroundColor(FSSetBackgroundColor obj)
obj
- an FSSetBackgroundColor object.Method Detail |
---|
public FSColor getColor()
public void setColor(FSColor aColor)
aColor
- the colour for the background.public java.lang.Object clone()
FSTransformObject
clone
in class FSTransformObject
public boolean equals(java.lang.Object anObject)
FSMovieObject
equals
in class FSMovieObject
public void appendDescription(java.lang.StringBuffer buffer, int depth)
FSTransformObject
appendDescription
in class FSMovieObject
buffer
- a StringBuffer to which the description of each object is
appended.depth
- the maximum level of nesting up to which objects will be
displayed.public int length(FSCoder coder)
length
in class FSMovieObject
public void encode(FSCoder coder)
encode
in class FSMovieObject
public void decode(FSCoder coder)
decode
in class FSMovieObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |