com.flagstone.transform
Class Remove2

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

public final class Remove2
extends Object
implements MovieTag

RemoveObject2 removes an object from the display list, requiring only the layer number.

See Also:
Remove

Constructor Summary
Remove2(int level)
          Creates a RemoveObject2, specifying the layer in the display list where the object to be removed is currently displayed.
Remove2(Remove2 object)
          Creates and initialises a Remove2 object using the values copied from another Remove2 object.
Remove2(SWFDecoder coder)
          Creates and initialises a Remove2 object using values encoded in the Flash binary format.
 
Method Summary
 Remove2 copy()
          Creates a complete copy of this object.
 void encode(SWFEncoder coder, Context context)
          Encode an object to the Flash binary format.
 int getLayer()
          Get the layer in the display list where the object to be removed is currently displayed.
 int prepareToEncode(Context context)
          Prepare an object for encoding, returning the expected size of an object when it is encoded.
 void setLayer(int aLayer)
          Sets the layer in the display list from which the object will be removed.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Remove2

public Remove2(SWFDecoder coder)
        throws IOException
Creates and initialises a Remove2 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.

Remove2

public Remove2(int level)
Creates a RemoveObject2, specifying the layer in the display list where the object to be removed is currently displayed.

Parameters:
level - the layer number on which the object is displayed. Must be in the range 1.65535.

Remove2

public Remove2(Remove2 object)
Creates and initialises a Remove2 object using the values copied from another Remove2 object.

Parameters:
object - a Remove2 object from which the values will be copied.
Method Detail

getLayer

public int getLayer()
Get the layer in the display list where the object to be removed is currently displayed.

Returns:
the layer number.

setLayer

public void setLayer(int aLayer)
Sets the layer in the display list from which the object will be removed.

Parameters:
aLayer - the layer number on which the object is displayed. Must be in the range 1.65535.

copy

public Remove2 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.