|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.LimitScript
public final class LimitScript
The LimitScript is used to define the execution environment of the Flash Player, limiting the resources available when executing actions and improving performance.
LimitScript can be used to limit the maximum recursion depth and limit the time a sequence of actions can execute for. This provides a rudimentary mechanism for people viewing a movie to regain control of the Flash Player should a script fail.
| Constructor Summary | |
|---|---|
LimitScript(int stackDepth,
int timeLimit)
Creates a LimitScript object that limits the recursion depth to depth levels and specifies that any sequence of actions will timeout after timeout seconds. |
|
LimitScript(LimitScript object)
Creates and initialises a LimitScript object using the values copied from another LimitScript object. |
|
LimitScript(SWFDecoder coder)
Creates and initialises a LimitScript object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
LimitScript |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
int |
getDepth()
Get the maximum stack depth for function execution. |
int |
getTimeout()
Get the maximum time a sequence of actions will execute before the Flash Player present a dialog box asking whether the script should be terminated. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setDepth(int stackDepth)
Sets the maximum recursion level. |
void |
setTimeout(int time)
Sets the maximum time a sequence of actions will execute before the Flash Player present a dialog box asking whether the script should be terminated. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LimitScript(SWFDecoder coder)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.
IOException - if an error occurs while decoding the data.
public LimitScript(int stackDepth,
int timeLimit)
stackDepth - the maximum depth a sequence of actions can recurse to. Must
be in the range 0..65535.timeLimit - the time in seconds that a sequence of actions is allowed to
execute before the Flash Player displays a dialog box asking
whether the script should be terminated. Must be in the range
0..65535.public LimitScript(LimitScript object)
object - a LimitScript object from which the values will be
copied.| Method Detail |
|---|
public int getDepth()
public void setDepth(int stackDepth)
stackDepth - the maximum depth a sequence of actions can recurse to. Must
be in the range 0..65535.public int getTimeout()
public void setTimeout(int time)
time - the time in seconds that a sequence of actions is allowed to
execute. Must be in the range 0..65535.public LimitScript 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 | |||||||||