C# Class SwfDotNet.IO.Tags.DefineButton2Tag

DefineButton2Tag defines the appearance and actions of push and menu buttons.

It provides a more sophisticated model for creating buttons:

  • Two types of button are supported, Push and Menu.
  • The number of events that a button can respond to is increased.
  • Actions can be executed for any button event.

Push and Menu buttons behave slightly differently in tracking mouse movements when the button is clicked. A Push button 'captures' the mouse so if the cursor is dragged outside of the active area of the button and the mouse click is released then the Release Outside event is still sent to the button. A Menu button does not 'capture' the mouse so if the cursor is dragged out of the active area the button returns to its 'inactive' state.

A DefineButton2Tag object must contain at least one ButtonRecord object. If more than one button record is defined for a given button state then each shape will be displayed by the button. The order in which the shapes are displayed is determined by the layer assigned to each button record.

Each ButtonRecord object can contain an CXFormWithAlphaData object which can be used to change the color of the shape being displayed without changing the original definition.

Actions do not need to be specified for every button event. Indeed actions do not need to be specified at all.

This tag was introduced in Flash 3.

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

Méthodes publiques

Méthode Description
DefineButton2Tag ( ) : System

Creates a new DefineButton2Tag 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

Méthodes protégées

Méthode Description
GetSizeOf ( ) : int

Gets the size of.

Private Methods

Méthode Description
Init ( ) : void

Inits this instance.

Method Details

DefineButton2Tag() public méthode

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

GetSizeOf() protected méthode

Gets the size of.
protected GetSizeOf ( ) : int
Résultat int

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