Button Class Extensions

hitTestDisable property

hitTestDisable:Boolean [read-write]

Scaleform version: 2.1.51

When set to true, the MovieClip.hitTest function will ignore this button during hit test detection. In addition, all other mouse events are not propagated to the button.

The default value is false.

See also:

TextField.hitTestDisable
MovieClip.hitTestDisable

topmostLevel property

topmostLevel:Boolean [read-write]

Scaleform version: 2.1.50

If the property is set to true then this character will be displayed on the top of all other ones regardless of its depth. This might be useful for implementing custom mouse cursors when the cursor should be drawn above objects from all levels. The default value is false.

In case of marking several characters as "topmostLevel", the draw order is as follows:

Note: Only transformation properties will be inherited from the character's current parent while this property is set to true. This means that other properties of the parent and ancestor nodes will no longer be applied to the topmostLevel node, including visibility, ColorTransform, filters, etc. If these properties are desired, they should be propagated on a case-by-case basis by querying them from the parent, and applying them to the topmostLevel child in Actionscript.

See also:

TextField.topmostLevel
MovieClip.topmostLevel

focusGroupMask property

focusGroupMask : Number

Scaleform version: 3.3.84

This property sets a bitmask to a stage character and ALL of its children. This bitmask assigns focus group ownership to the character, meaning only the controllers denoted in the bitmask are able to move focus into and within the character. Focus groups can be associated with controllers by using setControllerFocusGroup extension method.

For example, let’s assume that “button1” is to be focusable only by controller 0 and “movieclip2” by controllers 0 and 1. To achieve this behavior, associate focus groups with the controllers:

Selection.setControllerFocusGroup(0, 0);
Selection.setControllerFocusGroup(1, 1);

button1.focusGroupMask = 0x1; // bit 0 – focus group 0
movieclip2.focusGroupMask = 0x1 | 0x2 // bits 0 and 1 – focus groups 0 and 1

The “focusGroupMask” bitmask may be set to the parent movieclip. This will propogate the mask value to all of its children.