com.flagstone.transform
Class EnableDebugger2

java.lang.Object
  extended by com.flagstone.transform.EnableDebugger2
All Implemented Interfaces:
Copyable<MovieTag>, SWFEncodeable, MovieTag

public final class EnableDebugger2
extends Object
implements MovieTag

EnableDebugger2 is an updated version or the EnableDebugger instruction which enables a movie to be debugged.

In order to use the debugger a password must be supplied. When encrypted using the MD5 algorithm it must match the value stored in the password attribute.

The EnableDebugger2 2 data structure was introduced in Flash 6. It replaced EnableDebugger in Flash 5 with a different format to support internal changes in the Flash Player. The functionality was not changed.

See Also:
EnableDebugger

Constructor Summary
EnableDebugger2(EnableDebugger2 object)
          Creates and initialises an EnableDebugger2 object using the password from another EnableDebugger2 object.
EnableDebugger2(String pass)
          Creates a EnableDebugger2 object with an MD5 encrypted password.
EnableDebugger2(SWFDecoder coder)
          Creates and initialises an EnableDebugger2 object using values encoded in the Flash binary format.
 
Method Summary
 EnableDebugger2 copy()
          Creates a complete copy of this object.
 void encode(SWFEncoder coder, Context context)
          Encode an object to the Flash binary format.
 String getPassword()
          Get the MD5 hashed password.
 int prepareToEncode(Context context)
          Prepare an object for encoding, returning the expected size of an object when it is encoded.
 void setPassword(String aString)
          Sets the MD5 encrypted password.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnableDebugger2

public EnableDebugger2(SWFDecoder coder)
                throws IOException
Creates and initialises an EnableDebugger2 object using values encoded in the Flash binary format.

Parameters:
coder - an SWFDecoder object that contains the encoded Flash data.
Throws:
IOException - if an error occurs while decoding the data.

EnableDebugger2

public EnableDebugger2(String pass)
Creates a EnableDebugger2 object with an MD5 encrypted password.

Parameters:
pass - the string defining the password. The string must not be empty or null.

EnableDebugger2

public EnableDebugger2(EnableDebugger2 object)
Creates and initialises an EnableDebugger2 object using the password from another EnableDebugger2 object.

Parameters:
object - a EnableDebugger2 object from which the password will be copied.
Method Detail

getPassword

public String getPassword()
Get the MD5 hashed password.

Returns:
the password hash.

setPassword

public void setPassword(String aString)
Sets the MD5 encrypted password.

Parameters:
aString - the string defining the password. Must not be an empty string or null.

copy

public EnableDebugger2 copy()
Creates a complete copy of this object.

Specified by:
copy in interface Copyable<MovieTag>
Returns:
a deep-copy of this object. New instances of mutable objects are copied and immutable instances are shared.

toString

public String toString()

Overrides:
toString in class Object

prepareToEncode

public int prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. This method also used to initialise variables, such as offsets and flags that will be used when the object is encoded. Generally the method returns the size in bytes, however when called on objects that use bit fields such as shapes the methods will return the size in bits.

Specified by:
prepareToEncode in interface SWFEncodeable
Parameters:
context - an Context that allows information to be passed between objects to control how they are initialised for encoding.
Returns:
the size of the object when it is encoded.

encode

public void encode(SWFEncoder coder,
                   Context context)
            throws IOException
Encode an object to the Flash binary format.

Specified by:
encode in interface SWFEncodeable
Parameters:
coder - an SWFEncoder object.
context - an Context that allows information to be passed between objects to control how they are initialised for encoding.
Throws:
IOException - if an error occurs while encoding the object.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.