|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.button.ButtonSound
public final class ButtonSound
ButtonSound defines the sounds that are played when an event occurs in a button. Sounds are only played for the RollOver, RollOut, Press and Release events.
For each event a SoundInfo object identifies the sound and controls
how it is played. For events where no sound should be played simply specify a
null value instead of a SoundInfo object.
DefineButton,
DefineButton2| Constructor Summary | |
|---|---|
ButtonSound(ButtonSound object)
Creates and initialises a ButtonSound object using the values copied from another ButtonSound object. |
|
ButtonSound(int uid,
Event eventCode,
SoundInfo aSound)
Creates a ButtonSound object that defines the sound played for a single button event. |
|
ButtonSound(SWFDecoder coder)
Creates and initialises a ButtonSound object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
ButtonSound |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
int |
getIdentifier()
Get the unique identifier of the button that this object applies to. |
SoundInfo |
getSoundInfo(Event event)
Returns the SoundInfo object for the specified event. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setIdentifier(int uid)
Sets the identifier of the button that this object applies to. |
void |
setSoundInfo(Event event,
SoundInfo info)
Sets the SoundInfo object for the specified button event. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonSound(SWFDecoder coder)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.
IOException - if an error occurs while decoding the data.
public ButtonSound(int uid,
Event eventCode,
SoundInfo aSound)
uid - the unique identifier of the DefineButton or DefineButton2
object that defines the button. Must be in the range 1..65535.eventCode - the event that identifies when the sound id played, must be
either Event.EventType.rollOver,
Event.EventType.rollOut, Event.EventType.press or
Event.EventType.release.aSound - an SoundInfo object that identifies a sound and controls how
it is played.public ButtonSound(ButtonSound object)
object - a ButtonSound object from which the values will be
copied.| Method Detail |
|---|
public int getIdentifier()
public SoundInfo getSoundInfo(Event event)
event - The button event, must be one of Event.ROLL_OVER,
Event.ROLL_OUT, Event.PRESS, Event.RELEASE.
public void setIdentifier(int uid)
uid - the unique identifier of the button which this object applies
to. Must be in the range 1..65535.
public void setSoundInfo(Event event,
SoundInfo info)
event - the code representing the button event, must be either
Event.EventType.RollOver, Event.EventType.RollOut,
Event.EventType.Press or Event.EventType.Release.info - an SoundInfo object that identifies and controls how the sound
is played.public ButtonSound copy()
copy in interface Copyable<MovieTag>public String toString()
toString in class Objectpublic int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder,
Context context)
throws IOException
encode in interface SWFEncodeablecoder - an SWFEncoder object.context - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException - if an error occurs while encoding the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||