Creates a new instance with the given properties.
The padding towards the bottom.
The padding on the left side.
The padding on the right side.
The padding towards the top.
Registers an event listener at a certain object.
Creates a new instance with the exact same values.
Copies all properties from another Padding instance.
Pass null
to reset all values to zero.
Dispatches an event to all objects that have registered listeners for its type. If an event with enabled 'bubble' property is dispatched to a display object, it will travel up along the line of parents, until it either hits the root object or someone stops its propagation manually.
Dispatches an event with the given parameters to all objects that have registered listeners for the given type. The method uses an internal pool of event objects to avoid allocations.
If called with one argument, figures out if there are any listeners registered for the given event type. If called with two arguments, also determines if a specific listener is registered.
Removes an event listener from the object.
Removes all event listeners with a certain type, or all of them if type is null. Be careful when removing all event listeners: you never know who else was listening.
Sets all four values at once.
Sets left and right to horizontal
, top and bottom to vertical
.
Sets all four sides to the same value.
Generated using TypeDoc
The padding class stores one number for each of four directions, thus describing the padding around a 2D object.