C# Класс 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.

Наследование: BaseTag, DefineTag
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
GetSizeOf ( ) : int

Gets the size of.

Приватные методы

Метод Описание
Init ( ) : void

Inits this instance.

Описание методов

DefineButton2Tag() публичный Метод

Creates a new DefineButton2Tag instance.
public DefineButton2Tag ( ) : System
Результат System

GetSizeOf() защищенный Метод

Gets the size of.
protected GetSizeOf ( ) : int
Результат int

ReadData() публичный Метод

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
Результат void

Serialize() публичный Метод

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
Результат void

UpdateData() публичный Метод

see base class
public UpdateData ( byte version ) : void
version byte
Результат void