C# Class SwfDotNet.IO.Tags.PlaceObject2Tag

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

PlaceObject2Tag supersedes the PlaceObjectTag 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.

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 PlaceObjectTag 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 ClipEvent 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.

This tag was introduced in Flash 3.

Inheritance: BaseTag, DefineTargetTag
Afficher le fichier Open project: bladecoding/SwfExport Class Usage Examples

Méthodes publiques

Méthode Description
GetSizeOf ( byte version ) : int

Gets the size of.

PlaceObject2Tag ( ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( int depth, CXFormWithAlphaData colorTransform ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( ushort characterId, int depth ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( ushort characterId, int depth, CXFormWithAlphaData colorTransform ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( ushort characterId, int depth, Matrix transformMatrix ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( ushort characterId, int depth, float ratio, int xLocation, int yLocation ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( ushort characterId, int depth, int xLocation, int yLocation ) : System

Creates a new PlaceObject2Tag instance.

PlaceObject2Tag ( ushort characterId, int depth, int xLocation, int yLocation, bool placeFlagMove ) : System

Creates a new PlaceObject2Tag instance.

ReadData ( byte version, BufferedBinaryReader binaryReader ) : void

see base class

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

UpdateData ( byte version ) : void

see base class

this ( int index ) : byte[]

see base class

Private Methods

Méthode Description
HasCharacter ( ) : bool

Determines whether this instance has character.

HasClipActions ( ) : bool

Determines whether [has clip actions].

HasClipDepth ( ) : bool

Determines whether [has clip depth].

HasColorTransform ( ) : bool

Determines whether [has color transform].

HasMatrix ( ) : bool

Determines whether this instance has matrix.

HasName ( ) : bool

Determines whether this instance has name.

HasRatio ( ) : bool

Determines whether this instance has ratio.

Method Details

GetSizeOf() public méthode

Gets the size of.
public GetSizeOf ( byte version ) : int
version byte
Résultat int

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ) : System
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( int depth, CXFormWithAlphaData colorTransform ) : System
depth int Depth.
colorTransform SwfDotNet.IO.Tags.Types.CXFormWithAlphaData Color transform.
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ushort characterId, int depth ) : System
characterId ushort Character id.
depth int Depth.
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ushort characterId, int depth, CXFormWithAlphaData colorTransform ) : System
characterId ushort Character id.
depth int Depth.
colorTransform SwfDotNet.IO.Tags.Types.CXFormWithAlphaData Color transform.
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ushort characterId, int depth, Matrix transformMatrix ) : System
characterId ushort Character id.
depth int Depth.
transformMatrix Matrix Transform matrix.
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ushort characterId, int depth, float ratio, int xLocation, int yLocation ) : System
characterId ushort Character id.
depth int Depth.
ratio float Ratio.
xLocation int X location.
yLocation int Y location.
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ushort characterId, int depth, int xLocation, int yLocation ) : System
characterId ushort Character id.
depth int Depth.
xLocation int X location.
yLocation int Y location.
Résultat System

PlaceObject2Tag() public méthode

Creates a new PlaceObject2Tag instance.
public PlaceObject2Tag ( ushort characterId, int depth, int xLocation, int yLocation, bool placeFlagMove ) : System
characterId ushort Character id.
depth int Depth.
xLocation int X location.
yLocation int Y location.
placeFlagMove bool Place flag move.
Résultat System

ReadData() public méthode

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
Résultat void

Serialize() public méthode

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
Résultat void

UpdateData() public méthode

see base class
public UpdateData ( byte version ) : void
version byte
Résultat void

this() public méthode

see base class
public this ( int index ) : byte[]
index int
Résultat byte[]