|
|||||||||
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.FSButtonSound
public class FSButtonSound
FSButtonSound defines the sounds that are played when an event occurs in a button.
A sound is played for only a subset of the events that a button responds to:
rollOut | The cursor exits the active area of the button. |
rollOver | The cursor enters the active area of the button. |
press | The mouse button is clicked and the cursor is inside the active area of the button. |
release | The mouse button is released while the cursor is inside the active area of the button. |
Attributes | |
---|---|
type | Identifies the data structure when it is encoded. The type attribute is read-only and may be used when iterating through the objects in an FSMovie object to identify the object class without using run-time type checking. |
identifier | the identifier of an FSDefineButton or FSDefineButton2 object that define the button. |
sound[rollOut] | An FSSound object that describes how the sound will be played for a rollOver event. |
sound[rollOver] | An FSSound object that describes how the sound will be played for a rollOver event. |
sound[press] | An FSSound object that describes how the sound will be played for a press event. |
sound[release] | An FSSound object that describes how the sound will be played for a release event. |
Important: If the identifier in the FSSound object for an event is set to zero then the corresponding FSSound object will not be encoded when the object is encoded to a Flash file. This compresses the object when the sounds for only a sub-set of the events are defined.
The FSButtonSound class represents the DefineButtonSound structure from the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 2.
Field Summary |
---|
Constructor Summary | |
---|---|
FSButtonSound(FSButtonSound obj)
Constructs an FSButtonSound object by copying values from an existing object. |
|
FSButtonSound(FSCoder coder)
Construct an FSButtonSound object, initialising it with values decoded from an encoded object. |
|
FSButtonSound(int anIdentifier,
int eventCode,
FSSound aSound)
Constructs an FSButtonSound object that defines the sound played for a single button event. |
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. |
int |
getIdentifier()
Gets the identifier of the button that this object applies to. |
FSSound |
getSoundForEvent(int eventCode)
Gets the FSSound object for the specified event. |
int |
length(FSCoder coder)
|
void |
setIdentifier(int anIdentifier)
Sets the identifier of the button that this object applies to. |
void |
setSoundForEvent(int eventCode,
FSSound aSound)
Sets the FSSound object for the specified button event. |
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 FSButtonSound(FSCoder coder)
coder
- an FSCoder containing the binary data.public FSButtonSound(int anIdentifier, int eventCode, FSSound aSound)
anIdentifier
- the identifier of the FSDefineButton or FSDefineButton2 object
that defines the button.eventCode
- the event that identifies when the sound id played, must be
either FSButtonEvent.rollOver, FSButtonEvent.rollOut,
FSButtonEvent.press or FSButtonEvent.release.aSound
- an FSSound object that identifies a sound and controls how it
is played.public FSButtonSound(FSButtonSound obj)
obj
- an FSButtonSound object.Method Detail |
---|
public int getIdentifier()
public FSSound getSoundForEvent(int eventCode)
eventCode
- the code representing the button event, must be either
FSButtonEvent.RollOver, FSButtonEvent.RollOut,
FSButtonEvent.Press or FSButtonEvent.Release.
public void setIdentifier(int anIdentifier)
anIdentifier
- the identifier of the button which this object applies to.public void setSoundForEvent(int eventCode, FSSound aSound)
eventCode
- the code representing the button event, must be either
FSButtonEvent.RollOver, FSButtonEvent.RollOut,
FSButtonEvent.Press or FSButtonEvent.Release.aSound
- an FSSound object that identifies and controls how the sound
is played.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 |