Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.flagstone.transform
Class FSPlaceObject2

    java.lang.Object
      com.flagstone.transform.FSTransformObject
          com.flagstone.transform.FSMovieObject
              com.flagstone.transform.FSPlaceObject2

All Implemented Interfaces:
  java.lang.Cloneable

    public class FSPlaceObject2

extends FSMovieObject

FSPlaceObject2 is used to add and manipulate objects (shape, button, etc.) on the Flash Player's display list.

FSPlaceObject2 supersedes the FSPlaceObject class providing more functionality and easier manipulation of objects in the display list through the following operations:

- Place a new shape on the display list.
- Change an existing shape by moving it to new location or changing its appearance.
- Replace an existing shape with a another.
- Define clipping layers to mask objects displayed in front of a shape.
- Control the morphing process that changes one shape into another.
- Assign names to objects rather than using their identifiers.
- Define the sequence of actions that are executed when an event occurs in movie clip.

Clipping Depth
With the introduction of Flash 3 the display list supported a clipping layer. This allowed the outline of an object to define a clipping path that is used to mask other objects placed in front of it. The clipping depth can be set to mask objects between the layer containing the clipping path and a specified layer.

Shape Morphing
Shapes that will be morphed are defined using the FSDefineMorphShape class which defines a start and end shape. The Flash Player performs the interpolation that transforms one shape into another. The progress of the morphing process is controlled by a ratio which ranges from 0.0 to 1.0, where 0 generates a shape identical to the starting shape in the FSDefineMorphShape object and 1.0 generates the shape at the end of the morphing process. Movie Clip Events
With the introduction of Flash 5, movie clips (defined using the FSDefineMovieClip class) could specify sequences of actions that would be performed in response to mouse or keyboard events. The actions are specified using FSClipEvent objects and the FSPlaceObject2 class is used to register the actions in response to a particular event with the Flash player. Multiple events can be handled by defining an FSClipEvent for each type of event. For more information see the FSClipEvent class.

Attributes
type | Identifies the data structure when it is encoded. Read-only.
place | Indicates whether a new object is being placed in the display list or an existing object is being modified or replaced.
identifier | The identifier of the object to added to the display list.
layer | Defines the order in which objects are displayed.
transform | Optional. A coordinate transform defines the position, scale and rotation of the object.
colorTransform | Optional. A colour transform defines any colour changes such as transparency effects.
depth | Optional. The layer number up to which objects will be clipped by this object's outline.
ratio | Optional. The point for the morphing process of a shape.
name | Optional. A name to assign to the object.
events | Optional. An array of FSClipEvent objects that define the actions that are performed when a specific movie clip event occurs.
encodedEvents | An array of bytes containing encoded clip events can also be set. The encoded objects are typically generated by the parser in the Translate framework. The events array and encodedEvents cannot both be valid at the same time. Accessor methods used to set either of the attributes will set the other to null.

Since only one object can be placed on a given layer an existing object on the display list can be identified by the layer it is displayed on rather than its identifier. Therefore Layer is the only required attribute. The remaining attributes are optional according to the different operation being performed:

- If an existing object on the display list is being modified then only the layer number is required. Previously in the FSPlaceObject class both the identifier and the layer number were required.
- If no coordinate transform is applied to the shape (the default is a unity transform that does not change the shape) then it is not encoded.
- Similarly if no colour transform is applied to the shape (the default is a unity transform that does not change the shape's colour) then it is not encoded.
- If a shape is not being morphed then the ratio attribute may be left at its default value (-1.0).
- If a shape is not used to define a clipping area then the depth attribute may be left at its default value (0).
- If a name is net assigned to an object the name attribute may be left its default value (an empty string).
- If no events are being defined for a movie clip then the array of FSClipEvent object may be left empty.

The class provides a range of constructors which define different subsets of the attributes according to the type of operation that will be performed on an object in the Flash Player's display list. If an attribute is not specified in a constructor then it will be assigned a default value and will be omitted when the object is encoded.

# Examples

The following code samples illustrate how to use the FSPlaceObject2 class to manipulate objects on the display list. These examples use constructors with the most convenient (simplest) arguments. To define more complex place operations constructors are provided that take larger numbers of arguments and allow more complex transformations to be specified.

1. Display an object.
To display an object at a given location the placeType, identifier, layer number and x,y coordinates are required.

      // Add the shape to the display list - on layer 1 at coordinates (400, 400)
      // The constructor allows just the x and y coordinate to be defined, the
      // FSCoordTransform object is constructed internally.

      FSDefineShape shape = new FSDefineShape(movie.newIdentifier(), ......);

      movie.add(new FSPlaceObject2(shape.getIdentifier(), 1, 400, 400));
      movie.add(new FSShowFrame());

2. Move an object.
To move an object only the layer number is required. This simplifies the code required to manipulate existing objects when compared to the original FSPlaceObject class.

     // Add the shape to the display list.
     movie.add(new FSPlaceObject2(shape.getIdentifier(), 1, 400, 400));
     movie.add(new FSShowFrame());

     // Move shape to a new location.
     movie.add(new FSPlaceObject2(1, 250, 300));
     movie.add(new FSShowFrame());

3. Replace an existing object with another.
To move an object only the layer number is required. This simplifies the code required to manipulate existing objects when compared to the original FSPlaceObject class.

     // Add the shape to the display list.
     movie.add(new FSPlaceObject2(shape.getIdentifier(), 1, 400, 400));
     movie.add(new FSShowFrame());

     // Replace the shape.
     movie.add(new FSPlaceObject2(newShape.getIdentifier(), 1));
     movie.add(new FSShowFrame());

4. Defining a clipping layer.
The number of layers to clip using the outline of the shape as a path can be specified when placing the shape on the display list.

     // Add the shape to the display list and clip objects on the next two layers

     currentLayer = 1;
     clipTo = currentLayer + 2;

     movie.add(new FSPlaceObject2(shape.getIdentifier(), currentLayer, clipTo, 400,
                                    400));
     movie.add(new FSShowFrame());

5. Controlling the morphing process.
The ratio attribute controls the progress as an FSDefineMorphShape object changes from one shape into another.

      FSShape triangle = new FSShape(....);
      FSShape hexagon = new FSShape(....);

      FSDefineMorphShape shape = new FSDefineMorphShape(movie.newIdentifier(), ...., triangle, hexagon);

      movie.add(new FSPlaceObject2(shape.getIdentifier(), 1, 0.0, 400, 400));

      // Morph the shapes over 10 frames

      for (float i=0.1; i<1.0; i+= 0.1)
      {
      movie.add(new FSPlaceObject(1, i));
      movie.add(new FSShowFrame());
      }

6. Defining a movie clip event.
FSClipEvent objects are ONLY used to define the sequence of actions executed when a particular event occurs in a movie clip.

      // Define an array of clip events that will contain one event that defines the
      // behaviour of the movie clip in response to a mouse down event.

      ArrayList events = new ArrayList();

      FSClipEvent clipEvent = new FSClipEvent(FSClipEvent.MouseDown);

      // Add one or more actions for the mouse down event.

      clipEvent.add(...);
      ...

      // Add the clip event to the array of events for the movie clip.

      events.add(clipEvent);

      // Create the commands to animate the movie clip.

      ArrayList commands = new ArrayList();

      commands.add(...);

      FSDefineMovieClip movieClip = new FSDefineMovieClip(movie.newIdentifier(), commands);

      // Now place the movie clip on the screen on layer 1 at (400, 400).

      movie.add(new FSPlaceObject2(movieClip.getIdentifier(), 1, events, 400, 400));

# History

The FSPlaceObject2 class represents the PlaceObject2 tag from the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 3.

Field Summary
`static int` | `Modify`
`static int` | `New`
`static int` | `Replace`

Fields inherited from class com.flagstone.transform.FSMovieObject
`ButtonColorTransform, ButtonSound, DefineBitsPtr, DefineButton, DefineButton2, DefineFont, DefineFont2, DefineImage, DefineImage2, DefineJPEGImage, DefineJPEGImage2, DefineJPEGImage3, DefineMorphShape, DefineMovieClip, DefineShape, DefineShape2, DefineShape3, DefineSound, DefineText, DefineText2, DefineTextField, DefineVideo, DoAction, EnableDebugger, EnableDebugger2, Export, extendLength, FontInfo, FontInfo2, FrameLabel, Free, Import, Initialize, JPEGTables, length, LimitScript, PathsArePostscript, PlaceObject, PlaceObject2, Protect, QuicktimeMovie, RemoveObject, RemoveObject2, SerialNumber, SetBackgroundColor, ShowFrame, SoundStreamBlock, SoundStreamHead, SoundStreamHead2, StartSound, TabOrder, type, VideoFrame`

Constructor Summary
`FSPlaceObject2(FSCoder coder)` Construct an FSPlaceObject2 object, initialising it with values decoded from an encoded object.
`FSPlaceObject2(FSPlaceObject2 obj)` Constructs an FSPlaceObject2 object by copying values from an existing object.
`FSPlaceObject2(int aLayer, float aRatio, FSCoordTransform transform)` Constructs an FSPlaceObject2 object that modifies the morphing shape located on layer, aLayer in the display list.
`FSPlaceObject2(int aLayer, float aRatio, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object that changes the location of the object in the display list at layer, aLayer to the coordinates (x,y).
`FSPlaceObject2(int aLayer, FSColorTransform colorTransform)` Constructs an FSPlaceObject2 object that applied the specified colour transform to the object in the display list at layer, aLayer.
`FSPlaceObject2(int aLayer, FSCoordTransform transform)` Constructs an FSPlaceObject2 object that applies the specified coordinate transform to the object in the display list at layer, aLayer.
`FSPlaceObject2(int aLayer, FSCoordTransform transform, FSColorTransform colorTransform)` Constructs an FSPlaceObject2 object that applies the specified coordinate and colour transforms to the object in the display list at layer, aLayer.
`FSPlaceObject2(int anIdentifier, int aLayer)` Constructs an FSPlaceObject2 object that replaces the object at the specified layer in the display list, aLayer with the object with the identifier, anIdentifier.
`FSPlaceObject2(int anIdentifier, int aLayer, java.util.ArrayList anArray, java.lang.String aName, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object that places a new, named movie clip on the display list at the coordinates on the screen.
`FSPlaceObject2(int anIdentifier, int aLayer, byte[] bytes, java.lang.String aName, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object that places a new, named movie clip on the display list at the coordinates on the screen.
`FSPlaceObject2(int anIdentifier, int aLayer, float aRatio, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object to place new morphing shape on the display list at the coordinates on the screen.
`FSPlaceObject2(int anIdentifier, int aLayer, FSCoordTransform aTransform)` Constructs an FSPlaceObject2 object to place a new shape on the display list with the specified coordinate and optional colour transform.
`FSPlaceObject2(int anIdentifier, int aLayer, FSCoordTransform aTransform, FSColorTransform aColorTransform)` Constructs an FSPlaceObject2 object to place a new shape on the display list with the specified coordinate and optional colour transform.
`FSPlaceObject2(int aLayer, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object that changes the location of the object in the display list at layer, aLayer to the coordinates (x,y).
`FSPlaceObject2(int aPlace, int anIdentifier, int aLayer, FSCoordTransform transform, FSColorTransform colorTransform)` Constructs an FSPlaceObject2 object with the specified placement type, object identifier, layer number, coordinate transform and colour transform.
`FSPlaceObject2(int anIdentifier, int aLayer, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object to place a new object on the display list at the coordinates on the screen.
`FSPlaceObject2(int anIdentifier, int aLayer, int aDepth, int xLocation, int yLocation)` Constructs an FSPlaceObject2 object to place a new shape on the display list at the coordinates on the screen that defines a clipping path that will clip objects for the specified number of layers.

Method Summary
`void` | `add(FSClipEvent aClipEvent)` Adds a clip event to the array of clip events.
`void` | `appendDescription(java.lang.StringBuffer buffer, int depth)` AppendDescription is used to present a string description of the object including all nested objects up to a specified depth.
`java.lang.Object` | `clone()` Creates a deep copy of the entire object.
`void` | `decode(FSCoder coder)`
`void` | `encode(FSCoder coder)`
`boolean` | `equals(java.lang.Object anObject)` Returns true if anObject is equal to this one.
`java.util.ArrayList` | `getClipEvents()` Gets the array of FSClipEvent object that define the actions that will be executed in response to events that occur in the FSDefineMovieClip being placed.
`int` | `getClippingDepth()` Gets the number of layers that will be clipped by the object placed on the layer specified in this object.
`FSColorTransform` | `getColorTransform()` Gets the colour transform.
`int` | `getIdentifier()` Gets the identifier of the object to be placed.
`int` | `getLayer()` Gets the Layer on which the object will be displayed in the display list.
`java.lang.String` | `getName()` Gets the name of the object.
`int` | `getPlaceType()` Gets the type of place operation being performed.
`float` | `getRatio()` Gets the morph ratio, in the range 0.0 to 1.0 that defines the progress in the morphing process performed by the Flash Player from the defined start and end shapes.
`FSCoordTransform` | `getTransform()` Gets the coordinate transform.
`int` | `length(FSCoder coder)`
`void` | `setClipEvents(java.util.ArrayList anArray)` Set the array of Clip events.
`void` | `setClippingDepth(int aNumber)` Sets the number of layers that this object will mask.
`void` | `setColorTransform(FSColorTransform aTransform)` Sets the colour transform that defines the colour effects applied to the object.
`void` | `setEncodedEvents(byte[] bytes)` Set the encoded clip event objects generated by the classes in the Translate framework.
`void` | `setIdentifier(int anIdentifier)` Sets the identifier of the object.
`void` | `setLayer(int aLayer)` Sets the layer at which the object will be placed.
`void` | `setName(java.lang.String aString)` Set the name of an object to be displayed.
`void` | `setPlaceType(int aType)` Sets the type of placement.
`void` | `setRatio(float aNumber)` Sets point of the morphing process for a morph shape in the range 0..1.
`void` | `setTransform(FSCoordTransform aTransform)` Sets the coordinate transform that defines the position where the object will be displayed.

Methods inherited from class com.flagstone.transform.FSMovieObject
`getType`

Methods inherited from class com.flagstone.transform.FSTransformObject
`name, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### Modify

    public static final int Modify

See Also:
  Constant Field Values

### New

    public static final int New

See Also:
  Constant Field Values

### Replace

    public static final int Replace

See Also:
  Constant Field Values

Constructor Detail

### FSPlaceObject2

    public FSPlaceObject2(FSCoder coder)

  Construct an FSPlaceObject2 object, initialising it with values decoded from an encoded object.

  Parameters:
    `coder` - an FSCoder containing the binary data.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object to place a new object on the display list at the coordinates on the screen.

  Parameters:
    `anIdentifier` - the identifier of a new object to be displayed.
    `aLayer` - the layer number on which an object is being displayed.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          float aRatio,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object to place new morphing shape on the display list at the coordinates on the screen.

  Parameters:
    `anIdentifier` - the identifier of a new object to be displayed.
    `aLayer` - the layer number on which an object is being displayed.
    `aRatio` - the ratio of the progress in morphing the shape.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          FSCoordTransform aTransform)

  Constructs an FSPlaceObject2 object to place a new shape on the display list with the specified coordinate and optional colour transform.

  Parameters:
    `anIdentifier` - the identifier of a new object to be displayed.
    `aLayer` - the layer number on which an object is being displayed.
    `aTransform` - an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          FSCoordTransform aTransform,
                          FSColorTransform aColorTransform)

  Constructs an FSPlaceObject2 object to place a new shape on the display list with the specified coordinate and optional colour transform.

  Parameters:
    `anIdentifier` - the identifier of a new object to be displayed.
    `aLayer` - the layer number on which an object is being displayed.
    `aTransform` - an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.
    `aColorTransform` - a FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          int aDepth,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object to place a new shape on the display list at the coordinates on the screen that defines a clipping path that will clip objects for the specified number of layers.

  Parameters:
    `anIdentifier` - the identifier of a new object to be displayed.
    `aLayer` - the layer number on which an object is being displayed.
    `aDepth` - the layer number up to which objects will be clipped by this object's outline.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          java.util.ArrayList anArray,
                          java.lang.String aName,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object that places a new, named movie clip on the display list at the coordinates on the screen.

  Parameters:
    `anIdentifier` - the identifier of a new movie clip to be displayed.
    `aLayer` - the layer number on which the clip is being displayed.
    `anArray` - an array of FSClipEvent objects that define the events responded to by the movie clip.
    `aName` - a c-string that define a name for the movie clip.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer,
                          byte[] bytes,
                          java.lang.String aName,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object that places a new, named movie clip on the display list at the coordinates on the screen. The array of bytes contains the encoded FSClipEvent objects which specify the events and actions that the movie clip will respond to. These are typically generated using the classes in the Translate framework.

  Parameters:
    `anIdentifier` - the identifier of a new movie clip to be displayed.
    `aLayer` - the layer number on which the clip is being displayed.
    `bytes` - an array of encoded clip event objects.
    `aName` - a c-string that define a name for the movie clip.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int anIdentifier,
                          int aLayer)

  Constructs an FSPlaceObject2 object that replaces the object at the specified layer in the display list, aLayer with the object with the identifier, anIdentifier. The location and transforms currently applied to the object being replaced will be preserved.

  Parameters:
    `anIdentifier` - the identifier of the object that will replaced the one current displayed on aLayer.
    `aLayer` - the layer number on which the object being replaced is displayed.

### FSPlaceObject2

    public FSPlaceObject2(int aLayer,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object that changes the location of the object in the display list at layer, aLayer to the coordinates (x,y).

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int aLayer,
                          FSCoordTransform transform)

  Constructs an FSPlaceObject2 object that applies the specified coordinate transform to the object in the display list at layer, aLayer.

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.
    `transform` - an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.

### FSPlaceObject2

    public FSPlaceObject2(int aLayer,
                          FSColorTransform colorTransform)

  Constructs an FSPlaceObject2 object that applied the specified colour transform to the object in the display list at layer, aLayer.

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.
    `colorTransform` - an FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.

### FSPlaceObject2

    public FSPlaceObject2(int aLayer,
                          FSCoordTransform transform,
                          FSColorTransform colorTransform)

  Constructs an FSPlaceObject2 object that applies the specified coordinate and colour transforms to the object in the display list at layer, aLayer.

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.
    `transform` - an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.
    `colorTransform` - an FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.

### FSPlaceObject2

    public FSPlaceObject2(int aLayer,
                          float aRatio,
                          int xLocation,
                          int yLocation)

  Constructs an FSPlaceObject2 object that changes the location of the object in the display list at layer, aLayer to the coordinates (x,y).

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.
    `aRatio` - the ratio of the progress in morphing the shape.
    `xLocation` - the x-coordinate where the object will be displayed.
    `yLocation` - the y-coordinate where the object will be displayed.

### FSPlaceObject2

    public FSPlaceObject2(int aLayer,
                          float aRatio,
                          FSCoordTransform transform)

  Constructs an FSPlaceObject2 object that modifies the morphing shape located on layer, aLayer in the display list. The progress of the morphing process is controlled by aRatio.

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.
    `aRatio` - the ratio of the progress in morphing the shape.
    `transform` - an FSCoordTransform object that will be applied to the object displayed.

### FSPlaceObject2

    public FSPlaceObject2(int aPlace,
                          int anIdentifier,
                          int aLayer,
                          FSCoordTransform transform,
                          FSColorTransform colorTransform)

  Constructs an FSPlaceObject2 object with the specified placement type, object identifier, layer number, coordinate transform and colour transform. The exact operation performed is dependent on the placement type specified.

  Parameters:
    `aPlace` - the type of operation to be performed, either New, Modify or Replace.
    `anIdentifier` - the identifier of a new object to be displayed.
    `aLayer` - the layer number on which an object is being displayed.
    `transform` - an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.
    `colorTransform` - an FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.

### FSPlaceObject2

    public FSPlaceObject2(FSPlaceObject2 obj)

  Constructs an FSPlaceObject2 object by copying values from an existing object.

  Parameters:
    `obj` - an FSPlaceObject2 object.

Method Detail

### add

    public void add(FSClipEvent aClipEvent)

  Adds a clip event to the array of clip events. If the object already contains a set of encoded clip event objects they will be deleted.

  Parameters:
    `aClipEvent` - a clip event object.

### getClipEvents

    public java.util.ArrayList getClipEvents()

  Gets the array of FSClipEvent object that define the actions that will be executed in response to events that occur in the FSDefineMovieClip being placed.

  Returns:
    the array of clip events

### setClipEvents

    public void setClipEvents(java.util.ArrayList anArray)

  Set the array of Clip events. Clip Events are only valid for movie clips and the argument should be set to null when placing other types of object. If the object already contains a set of encoded clip event objects they will be deleted.

  Parameters:
    `anArray` - an array of FSClipEvent objects.

### setEncodedEvents

    public void setEncodedEvents(byte[] bytes)

  Set the encoded clip event objects generated by the classes in the Translate framework. If the object already contains an array of clip events objects then they will be deleted.

  Parameters:
    `bytes` - the array of encoded clip events.

### getPlaceType

    public int getPlaceType()

  Gets the type of place operation being performed.

  Returns:
    the placement type.

### getLayer

    public int getLayer()

  Gets the Layer on which the object will be displayed in the display list.

  Returns:
    the layer number being referenced.

### getIdentifier

    public int getIdentifier()

  Gets the identifier of the object to be placed. This is only required when placing an object for the first time. Subsequent references to the object on this layer can simply use the layer number.

  Returns:
    the identifier of an object being placed on the display list.

### getTransform

    public FSCoordTransform getTransform()

  Gets the coordinate transform.

  Returns:
    the FSCoordTransform that will be applied to an object in the display list.

### getColorTransform

    public FSColorTransform getColorTransform()

  Gets the colour transform.

  Returns:
    the FSColorTransform that will be applied to an object in the display list.

### getRatio

    public float getRatio()

  Gets the morph ratio, in the range 0.0 to 1.0 that defines the progress in the morphing process performed by the Flash Player from the defined start and end shapes. A value of 0 indicates the start of the process and 65535 the end.

  Returns:
    the morph ratio, in the range 0.0..1.0.

### getClippingDepth

    public int getClippingDepth()

  Gets the number of layers that will be clipped by the object placed on the layer specified in this object.

  Returns:
    the number of layers that will be clipped.

### getName

    public java.lang.String getName()

  Gets the name of the object.

  Returns:
    the name assigned to an object.

### setPlaceType

    public void setPlaceType(int aType)

  Sets the type of placement.

  Parameters:
    `aType` - the type of operation to be performed, either New, Modify or Replace.

### setLayer

    public void setLayer(int aLayer)

  Sets the layer at which the object will be placed.

  Parameters:
    `aLayer` - the layer number on which the object is being displayed.

### setIdentifier

    public void setIdentifier(int anIdentifier)

  Sets the identifier of the object.

  Parameters:
    `anIdentifier` - the identifier of a new object to be displayed.

### setTransform

    public void setTransform(FSCoordTransform aTransform)

  Sets the coordinate transform that defines the position where the object will be displayed. The argument may be null if the location of the object is not being changed.

  Parameters:
    `aTransform` - an FSCoordTransform object that will be applied to the object displayed.

### setColorTransform

    public void setColorTransform(FSColorTransform aTransform)

  Sets the colour transform that defines the colour effects applied to the object. The argument may be null if the color of the object is not being changed.

  Parameters:
    `aTransform` - an FSColorTransform object that will be applied to the object displayed.

### setRatio

    public void setRatio(float aNumber)

  Sets point of the morphing process for a morph shape in the range 0..1. May be set to zero if the shape being placed is not being morphed.

  Parameters:
    `aNumber` - the progress in the morphing process.

### setClippingDepth

    public void setClippingDepth(int aNumber)

  Sets the number of layers that this object will mask. May be set to zero if the shape being placed does not define a clipping area.

  Parameters:
    `aNumber` - the number of layers clipped.

### setName

    public void setName(java.lang.String aString)

  Set the name of an object to be displayed. If a shape is not being assigned a name then setting the argument to null will omit the attribute when the object is encoded.

  Parameters:
    `aString` - the name assigned to the object.

### clone

    public java.lang.Object clone()

  Description copied from class: `FSTransformObject`
  Creates a deep copy of the entire object.

  Overrides:
    `clone` in class `FSTransformObject`
  Returns:
    a copy of the object.

### equals

    public boolean equals(java.lang.Object anObject)

  Description copied from class: `FSMovieObject`
  Returns true if anObject is equal to this one. Objects are considered equal if they would generate identical binary data when they are encoded to a Flash file.

  Overrides:
    `equals` in class `FSMovieObject`
  Returns:
    true if this object would be identical to anObject when encoded.

### appendDescription

    public void appendDescription(java.lang.StringBuffer buffer,
                                  int depth)

  Description copied from class: `FSTransformObject`
  AppendDescription is used to present a string description of the object including all nested objects up to a specified depth. This method provide a more controlled way of creating a string representation of an object since large objects such as font or shape definitions can contain dozens of nested objects. The representation of the object is appended to the StringBuffer, showing the name of the class and values of the attributes it contains. If the object contains any attributes that are objects then the object graph will be traversed up to the specified depth. If objects are nested at a level less than specified depth then the full string representation of the object is displayed. For objects at the specified depth only the name of the class is displayed. Any objects below this depth are not displayed.

  Overrides:
    `appendDescription` in class `FSMovieObject`
  Parameters:
    `buffer` - a StringBuffer to which the description of each object is appended.
    `depth` - the maximum level of nesting up to which objects will be displayed.

### length

    public int length(FSCoder coder)

  Overrides:
    `length` in class `FSMovieObject`

### encode

    public void encode(FSCoder coder)

  Overrides:
    `encode` in class `FSMovieObject`

### decode

    public void decode(FSCoder coder)

  Overrides:
    `decode` in class `FSMovieObject`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD