|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.DoAction
public final class DoAction
DoAction is used to add a set of actions to a frame in a movie. The actions will be triggered when the Flash Player executes the ShowFrame command.
Only one DoAction object can be used to specify the actions for a given frame. If more than one DoAction object is added in a single frame only the actions contained in the last DoAction object (before the ShowFrame object) will be executed when the frame is displayed. The other DoAction objects will be ignored.
IMPORTANT: The last action in the list must be BasicAction.END otherwise the object will not be encoded correctly.
When decoding a movie, if the decode actions flag is set to false then the actions will be decoded as a single ActionData object containing the encoded actions.
DoAction can only be used in movies that contain Actionscript 1.x or Actionscript 2.x code. For Actionscript 3.0 use the DoABC class.
Constructor Summary | |
---|---|
DoAction()
Creates a new DoAction class with an empty list. |
|
DoAction(DoAction object)
Creates a DoAction object with a copy of the actions from another DoAction object. |
|
DoAction(List<Action> list)
Creates a DoAction object with a list of actions. |
|
DoAction(SWFDecoder coder,
Context context)
Creates and initialises a DoAction object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
DoAction |
add(Action anAction)
Adds the action object to the list of actions. |
DoAction |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
List<Action> |
getActions()
Returns the list of actions that are executed when the frame is displayed. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setActions(List<Action> list)
Set the list of actions that will be executed when the next ShowFrame tag is executed by the Flash Player. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DoAction(SWFDecoder coder, Context context) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.context
- a Context object used to pass values when decoding objects.
IOException
- if an error occurs while decoding the data.public DoAction()
public DoAction(List<Action> list)
list
- the list of action objects. Cannot be null.public DoAction(DoAction object)
object
- a DoAction object to copy.Method Detail |
---|
public DoAction add(Action anAction)
anAction
- an object belonging to a class derived from Action. The
argument cannot be null.
public List<Action> getActions()
public void setActions(List<Action> list)
list
- the list of action objects. May be empty but cannot be null.public DoAction copy()
copy
in interface Copyable<MovieTag>
public String toString()
toString
in class Object
public int prepareToEncode(Context context)
prepareToEncode
in interface SWFEncodeable
context
- 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 SWFEncodeable
coder
- 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 |