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
Datei anzeigen Open project: bladecoding/SwfExport Class Usage Examples

Public Methods

Method 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

Protected Methods

Method Description
GetSizeOf ( ) : int

Gets the size of.

Private Methods

Method Description
Init ( ) : void

Inits this instance.

Method Details

DefineButton2Tag() public method

Creates a new DefineButton2Tag instance.
public DefineButton2Tag ( ) : System
return System

GetSizeOf() protected method

Gets the size of.
protected GetSizeOf ( ) : int
return int

ReadData() public method

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

Serialize() public method

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
return void

UpdateData() public method

see base class
public UpdateData ( byte version ) : void
version byte
return void