| Package | org.aswing.event |
| Class | public class ReleaseEvent |
| Inheritance | ReleaseEvent flash.events.MouseEvent |
Generally, if you need the target, you may need the pressTarget
indeed. The pressTarget property is the target of which object was
pressed and then released.
The target property is the object which was released, but maybe it
is not pressed, i mean, its child was press, not itself. So, use getPressTarget()
to get the right target.
| Method | Defined by | ||
|---|---|---|---|
|
ReleaseEvent(type:String, pressTarget:DisplayObject, releasedOutSide:Boolean, e:MouseEvent)
| ReleaseEvent | ||
|
clone():Event
| ReleaseEvent | ||
|
getPressTarget():DisplayObject
Returns the target for of the press phase.
| ReleaseEvent | ||
|
isReleasedOutSide():Boolean
Returns whether or not this release is acted out side of the pressed display object.
| ReleaseEvent | ||
| Constant | Defined by | ||
|---|---|---|---|
| RELEASE : String = "release" [static]
The
ReleaseEvent.RELEASE constant defines the value of the
type property of the event object for a release event. | ReleaseEvent | ||
| RELEASE_OUT_SIDE : String = "releaseOutSide" [static]
The
ReleaseEvent.RELEASE_OUT_SIDE constant defines the value of the
type property of the event object for a releaseOutSide event. | ReleaseEvent | ||
| ReleaseEvent | () | constructor |
public function ReleaseEvent(type:String, pressTarget:DisplayObject, releasedOutSide:Boolean, e:MouseEvent)Parameters
type:String |
|
pressTarget:DisplayObject |
|
releasedOutSide:Boolean |
|
e:MouseEvent |
| clone | () | method |
public override function clone():Event
Returns
Event |
| getPressTarget | () | method |
public function getPressTarget():DisplayObjectReturns the target for of the press phase.
ReturnsDisplayObject — the press target
|
| isReleasedOutSide | () | method |
public function isReleasedOutSide():BooleanReturns whether or not this release is acted out side of the pressed display object.
ReturnsBoolean — true if out side or false not.
|
| RELEASE | constant |
public static const RELEASE:String = "release"
The ReleaseEvent.RELEASE constant defines the value of the
type property of the event object for a release event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPressTarget() | The object that is the target which is pressed and then released |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
| RELEASE_OUT_SIDE | constant |
public static const RELEASE_OUT_SIDE:String = "releaseOutSide"
The ReleaseEvent.RELEASE_OUT_SIDE constant defines the value of the
type property of the event object for a releaseOutSide event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getPressTarget() | The object that is the target which is pressed and then released out side |
isReleasedOutSide() | true if this is released out side |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |