This page was saved using jaction on 2006-09-04 8:33:40.
Address: http://flexdocs.kr/docs/flex2/langref/flash/events/Event.html
Title: flash.events.Event (Flex™ 2 레퍼런스 가이드)  •  Size: 102638
Packageflash.events
Classpublic class Event
InheritanceEvent Inheritance Object
SubclassesActivityEvent , CalendarLayoutChangeEvent , ChannelEvent , ChildExistenceChangedEvent , CloseEvent , CollectionEvent , ColorPickerEvent , ContextMenuEvent , CuePointEvent , DataConflictEvent , DataGridEvent , DateChooserEvent , DividerEvent , DropdownEvent , DynamicEvent , EffectEvent , FlexEvent , FocusEvent , HTTPStatusEvent , IndexChangedEvent , ItemClickEvent , KeyboardEvent , ListEvent , LoadEvent , LogEvent , MessageEvent , MessageFaultEvent , MouseEvent , MoveEvent , NetStatusEvent , NumericStepperEvent , ProgressEvent , PropertyChangeEvent , ResizeEvent , ScrollEvent , SliderEvent , StateChangeEvent , StatusEvent , SyncEvent , TextEvent , TimerEvent , ToolTipEvent , TreeEvent , TweenEvent , ValidationResultEvent , VideoEvent

Event 클래스는, Event object를 작성하기 위한 기본 클래스로서 사용됩니다. 이러한 Event object는, 이벤트의 발생시에 event listener에게 Parameters로서 건네받습니다.

Event 클래스의 property는, 이벤트의 타입이나 이벤트의 디폴트 동작을 캔슬할 수 있을지 어떨지라고 한, 이벤트의 기본 정보를 보관 유지하고 있습니다. Event 클래스 정수가 나타내는 event 등 많은 이벤트에서는, 이 기본 정보로 충분합니다. 다만, 한층 더 자세한 정보가 필요한 이벤트도 있습니다. 예를 들어, 마우스 클릭에 관련하는 이벤트는, 클릭 이벤트의 장소나 클릭시의 키 압하의 유무에 관한 추가 정보를 포함할 필요가 있습니다. 이러한 추가 정보는, Event 클래스를 확장하는 것으로 event listener에게 건네줄 수가 있습니다. 이것은 MouseEvent 클래스에 의해 행해집니다. Flash® Player API 에 의해, 추가 정보를 필요로 하는 일반적인 이벤트를 위해서(때문에) 몇개의 Event 서브 클래스가 정의되고 있습니다. 각 Event 서브 클래스에 관련하는 이벤트의 설명은, 각 클래스의 문서를 참조해 주세요.

Event 클래스의 Methods는, event listener 함수로 사용해 event object의 동작에 영향을 줄 수가 있습니다. 일부의 이벤트에는 디폴트의 동작을 관련지을 수 있고 있습니다. 예를 들어,doubleClick 이벤트에 관련지을 수 있고 있는 디폴트 동작에서는, 이벤트시에 마우스 포인터 위치의 단어가 하이라이트 표시됩니다. event listener로 preventDefault() Methods를 호출해 이 동작을 캔슬할 수 있습니다. 또,stopPropogation() Methods 또는 stopImmediatePropogation() Methods를 호출하면, 현재의 event listener를, 이벤트를 처리하는 마지막 event listener로 할 수 있습니다.

View the examples

See also

flash.events.EventDispatcher
이벤트에 대해
Event 클래스에 도착해
이벤트의 사용
수동에 의한 이벤트의 dispatch
이벤트의 전파
이벤트의 우선도
이벤트의 서브 클래스의 사용
키보드 이벤트에 대해

event object
flash.events.EventDispatcher
About events
About the Event class
Using events
Manually dispatching events
Event propagation
Event priorities
Using event subclasses
About keyboard events
Event objects


Public property
 property정의
  bubbles : Boolean
[read-only] 이벤트가 바브 링 이벤트인 가 어떤가를 나타냅니다.
Event
  cancelable : Boolean
[read-only] 이벤트에 관련지을 수 있었던 행동을 회피할 수 있을지 어떨지를 나타냅니다.
Event
 Inheritedconstructor : Object
특정의 object 인스턴스의 클래스 object 또는 constructor    함수에의 참조입니다.
Object
  currentTarget : Object
[read-only] event listener로 Event object를 액티브하게 처리하고 있는 object입니다.
Event
  eventPhase : uint
[read-only] event 플로우(flow)의 현재의 단계입니다.
Event
 Inheritedprototype : Object
[static] 클래스 또는 함수 object의 prototype object에의 참조입니다.
Object
  target : Object
[read-only] event 타겟입니다.
Event
  type : String
[read-only] 이벤트의 형태입니다.
Event
Public Methods
 Methods정의
  Event (type:String , bubbles:Boolean = false, cancelable:Boolean = false)
event listener에게 Parameters로서 건네주는 Event object를 작성합니다.
Event
  clone ():Event
Event 서브 클래스의 인스턴스를 복제합니다.
Event
  formatToString (className:String , ... arguments):String
custom Event 클래스에 toString() Methods를 Implements하기 위한 유틸리티 함수입니다.
Event
 InheritedhasOwnProperty (name:String ):Boolean
object로 지정된 property가 정의되고 있는지 어떤지를 나타냅니다.
Object
  isDefaultPrevented ():Boolean
이벤트로 preventDefault() 가 불려 갔는지 어떠했는지를 체크합니다.
Event
 InheritedisPrototypeOf (theClass:Object ):Boolean
Object 클래스의 인스턴스가, Parameters로서 지정된 object의 prototype 체인내에 있을지 어떨지를 나타냅니다.
Object
  preventDefault ():void
이벤트의 디폴트 행동을 캔슬할 수 있는 경우에, 그 행동을 캔슬합니다.
Event
 InheritedpropertyIsEnumerable (name:String ):Boolean
지정된 property가 존재해, 열거 가능한가 어떤가를 나타냅니다.
Object
 InheritedsetPropertyIsEnumerable (name:String , isEnum:Boolean = true):void
루프 처리에 대한 다이나믹 property의 가용성을 설정합니다.
Object
  stopImmediatePropagation ():void
event 플로우(flow)의 현재의 노드 및 후속 하는 노드로, event listener가 처리되지 않게 합니다.
Event
  stopPropagation ():void
event 플로우(flow)의 현재의 노드에 후속 하는 노드로, event listener가 처리되지 않게 합니다.
Event
  toString ():String
Event object의 모든 property를 포함한 string를 돌려줍니다.
Event
 InheritedvalueOf ():Object
지정된 object의 원시적치를 돌려줍니다.
Object
Public 정수
 정수정의
  ACTIVATE : String = "activate"
[static] activate event object의 type property의 값을 정의합니다.
Event
  ADDED : String = "added"
[static] added event object의 type property의 값을 정의합니다.
Event
  CANCEL : String = "cancel"
[static] cancelevent object의 type property의 값을 정의합니다.
Event
  CHANGE : String = "change"
[static] change event object의 type property의 값을 정의합니다.
Event
  CLOSE : String = "close"
[static] close event object의 type property의 값을 정의합니다.
Event
  COMPLETE : String = "complete"
[static] complete event object의 type property의 값을 정의합니다.
Event
  CONNECT : String = "connect"
[static] connect event object의 type property의 값을 정의합니다.
Event
  DEACTIVATE : String = "deactivate"
[static] deactivate event object의 type property의 값을 정의합니다.
Event
  ENTER_FRAME : String = "enterFrame"
[static] enterFrame event object의 type property의 값을 정의합니다.
Event
  ID3 : String = "id3"
[static] id3 event object의 type property의 값을 정의합니다.
Event
  INIT : String = "init"
[static] init event object의 type property의 값을 정의합니다.
Event
  MOUSE_LEAVE : String = "mouseLeave"
[static] mouseLeave event object의 type property의 값을 정의합니다.
Event
  OPEN : String = "open"
[static] open event object의 type property의 값을 정의합니다.
Event
  REMOVED : String = "removed"
[static] removed event object의 type property의 값을 정의합니다.
Event
  RENDER : String = "render"
[static] render event object의 type property의 값을 정의합니다.
Event
  RESIZE : String = "resize"
[static] resize event object의 type property의 값을 정의합니다.
Event
  SCROLL : String = "scroll"
[static] scroll event object의 type property의 값을 정의합니다.
Event
  SELECT : String = "select"
[static] select event object의 type property의 값을 정의합니다.
Event
  SOUND_COMPLETE : String = "soundComplete"
[static] soundComplete event object의 type property의 값을 정의합니다.
Event
  TAB_CHILDREN_CHANGE : String = "tabChildrenChange"
[static] tabChildrenChange event object의 type property의 값을 정의합니다.
Event
  TAB_ENABLED_CHANGE : String = "tabEnabledChange"
[static] tabEnabledChange event object의 type property의 값을 정의합니다.
Event
  TAB_INDEX_CHANGE : String = "tabIndexChange"
[static] tabIndexChange event object의 type property의 값을 정의합니다.
Event
  UNLOAD : String = "unload"
[static] unload event object의 type property의 값을 정의합니다.
Event
property의 상세
bubblesproperty
bubbles:Boolean   [read-only]

이벤트가 바브 링 이벤트인 가 어떤가를 나타냅니다. 이벤트가 버블 가능한 경우, 이 값은 true 입니다. 버블 불가능한 경우는,false 입니다.

이벤트가 발생하면, event 플로우(flow)의 3 개의 단계로 나아갑니다. 표시 리스트의 맨 위의 계층으로부터 타겟 노드의 직전까지의 capther 단계, 타겟 노드에 대응하는 타겟 단계, 타겟 노드의 다음의 노드로부터 표시 리스트 계층으로 돌아갈 때까지의 바브 링 단계가 있습니다.

activate 이벤트나 unload event 등 일부의 이벤트에는 바브 링 단계가 없습니다. 바브 링 단계가 없는 이벤트의 bubbles property의 값은 false 입니다.

Implements
    public function get bubbles():Boolean

See also

cancelableproperty 
cancelable:Boolean   [read-only]

이벤트에 관련지을 수 있었던 행동을 회피할 수 있을지 어떨지를 나타냅니다. 동작이 캔슬 가능한 경우, 이 값은 true 입니다. 캔슬 불가능한 경우는,false 입니다.

Implements
    public function get cancelable():Boolean

See also

currentTargetproperty 
currentTarget:Object   [read-only]

event listener로 Event object를 액티브하게 처리하고 있는 object입니다. 예를 들어, 유저가 [OK] 버튼을 클릭했을 경우, currentTarget 는, 그 버튼 또는, 그 이벤트에 대해서 event listener를 등록하고 있는 조상의 1 개를 포함한 노드가 됩니다.

Implements
    public function get currentTarget():Object

See also

eventPhaseproperty 
eventPhase:uint   [read-only]

event 플로우(flow)의 현재의 단계입니다. 이 property에는, 다음의 수치가 포함됩니다.

Implements
    public function get eventPhase():uint

See also

targetproperty 
target:Object   [read-only]

event 타겟입니다. 이 property에는 타겟 노드가 포함됩니다. 예를 들어, 유저가 [OK] 버튼을 클릭했을 경우, 타겟 노드는 그 버튼을 포함한 표시 리스트 노드입니다.

Implements
    public function get target():Object

See also

typeproperty 
type:String   [read-only]

이벤트의 형태입니다. 타입에서는 대소 캐릭터가 구별됩니다.

Implements
    public function get type():String

See also

constructor    의 상세
Event()constructor   
public 함수 Event(type:String , bubbles:Boolean = false, cancelable:Boolean = false)

event listener에게 Parameters로서 건네주는 Event object를 작성합니다.

Parameters
type:String Event.type 로서 액세스 가능한 event 타입입니다.
 
bubbles:Boolean (default = false) — Event object가 event 플로우(flow)의 바브 링 단계에서 처리될지 어떨지를 판단합니다. 디폴트치는 false 입니다.
 
cancelable:Boolean (default = false) — Event object가 캔슬 가능한가 어떤가를 판단합니다. 디폴트치는 false 입니다
Methods의 상세
clone()Methods
public function clone():Event

Event 서브 클래스의 인스턴스를 복제합니다.

Event object의 원의 인스턴스의 복사인, 새로운 Event object를 돌려줍니다. 통상,clone() 는 호출하지 말아 주세요. 이벤트를 재발dispatch 하면 (즉,event 를 처리하고 있는 핸들러로부터 dispatchEvent(event) 를 호출하면), EventDispatcher 클래스가 clone() 를 자동적으로 호출합니다.

새로운 Event object에는, 원의 object의 모든 property가 포함됩니다.

커스텀 Event 클래스를 작성하는 경우는, custom 클래스의 property가 복제되도록(듯이), Inheritance된 Event.clone() Methods를 재정의(override) 할 필요가 있습니다. event 서브 클래스에 추가하는 모든 property를 설정하지 않았던 경우, 재발송 나온 이벤트를 listener가 처리할 경우에, property에 올바른 값이 포함되지 않습니다.

이 예에서는,PingEventEvent 의 서브 클래스이기 (위해)때문에, 독자적인 버젼의 clone() 를 Implements합니다.

class PingEvent extends Event {
var URL:String;
   
public override function clone() :Event {
return new PingEvent(type, bubbles, cancelable, URL);
     }
  }
  

반환값
Event — 원의 object와 동일한 새로운 Event object입니다.

See also

formatToString()Methods 
public function formatToString(className:String , ... arguments):String

custom Event 클래스에 toString() Methods를 Implements하기 위한 유틸리티 함수입니다. toString() Methods의 재정의(override)를 추천 합니다만, 필수가 아닙니다.

class PingEvent extends Event {
var URL:String;
  
public override function toString() :String {
return formatToString("PingEvent", "type", "bubbles", "cancelable", "eventPhase", "URL");
     }
  }
  

Parameters
className:String — custom Event 클래스의 이름입니다. 위의 예에서는,className Parameters는 PingEvent 입니다.
 
... arguments — Event 클래스의 property와 custom Event 클래스에 추가하는 property입니다. 위의 예에서는,...arguments Parameters에,type,bubbles,cancelable,eventPhase, 및 URL 가 포함됩니다.

반환값
String — custom Event 클래스의 이름과 ...arguments Parameters의 string치입니다.
isDefaultPrevented()Methods 
public function isDefaultPrevented():Boolean

이벤트로 preventDefault() 가 불려 갔는지 어떠했는지를 체크합니다. preventDefault() 가 불려 갔을 경우는 true, 그 이외의 경우는 false 를 돌려줍니다.

반환값
Boolean preventDefault() 가 불려 갔을 경우는 true, 그 이외의 경우는 false 를 돌려줍니다.

See also

preventDefault()Methods 
public function preventDefault():void

이벤트의 디폴트 행동을 캔슬할 수 있는 경우에, 그 행동을 캔슬합니다.

많은 이벤트에는, Flash Player 가 디폴트로 실행하는 동작을 관련지을 수 있고 있습니다. 예를 들어, 유저가 텍스트 필드에 캐릭터를 입력했을 경우, 디폴트 동작에서는 캐릭터가 텍스트 필드에 표시됩니다. TextEvent.TEXT_INPUT 이벤트의 디폴트 동작은 캔슬할 수 있기 (위해)때문에,preventDefault() Methods를 사용해 캐릭터를 표시하지 않게 할 수가 있습니다.

캔슬할 수 없는 동작의 예로서는,Event.REMOVED 이벤트에 관련지을 수 있고 있는 디폴트 동작이 있습니다. 이 이벤트는, Flash Player 가 표시 리스트로부터 표시 object를 삭제하려고 하면 생성됩니다. 이 디폴트 동작 (요소의 삭제)은 캔슬할 수 없습니다. 즉,preventDefault() Methods는 이 디폴트 동작에는 효과가 없습니다.

Event.cancelable property를 사용해, 특정의 이벤트에 관련지을 수 있고 있는 디폴트 동작을 캔슬할 수 있을지 어떨지를 확인할 수 있습니다. Event.cancelable 의 값이 true 의 경우,preventDefault() 를 사용해 이벤트를 캔슬할 수 있습니다. 그 이외의 경우,preventDefault() 의 효과는 없습니다.

See also

stopImmediatePropagation()Methods 
public function stopImmediatePropagation():void

event 플로우(flow)의 현재의 노드 및 후속 하는 노드로, event listener가 처리되지 않게 합니다. 이 Methods는 곧바로 유효하게 되어, 현재의 노드의 event listener에게 영향을 줍니다. 이것에 대해,stopPropagation() Methods는, 현재의 노드의 event listener의 처리가 모두 종료할 때까지 유효하게 되지 않습니다.

메모 : 이 Methods는, 이 이벤트에 관련지을 수 있고 있는 행동을 캔슬하지 않습니다. 그 기능에 대해서는, 「preventDefault()」를 참조해 주세요.

See also

stopPropagation()Methods 
public function stopPropagation():void

event 플로우(flow)의 현재의 노드에 후속 하는 노드로, event listener가 처리되지 않게 합니다. 이 Methods는, 현재의 노드 (currentTarget)의 event listener에게는 영향을 주지 않습니다. 이것에 대해,stopImmediatePropagation() Methods는, 현재의 노드와 그 이후의 노드로, event listener가 처리되지 않게 합니다. 이 Methods를 반복해 호출해도 영향은 없습니다. 이 Methods는, event 플로우(flow)의 임의의 단계에서 호출할 수가 있습니다.

메모 : 이 Methods는, 이 이벤트에 관련지을 수 있고 있는 행동을 캔슬하지 않습니다. 그 기능에 대해서는, 「preventDefault()」를 참조해 주세요.

See also

toString()Methods 
public function toString():String

Event object의 모든 property를 포함한 string를 돌려줍니다. string는 다음의 형식입니다.

[Event type=value bubbles=value cancelable=value]

반환값
String — Event object의 모든 property를 포함한 string입니다.

See also

정수의 상세
ACTIVATE정수
public static const ACTIVATE:String = "activate"

activate event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetACTIVATE 이벤트에 대한 listener가 등록된 임의의 DisplayObject 인스턴스입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

ADDED정수 
public static const ADDED:String = "added"

added event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target표시 리스트에 추가되는 DisplayObejct 인스턴스입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

CANCEL정수 
public static const CANCEL:String = "cancel"

cancelevent object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target조작을 캔슬하는 object에의 참조입니다.

See also

CHANGE정수 
public static const CHANGE:String = "change"

change event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target치가 변경된 object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

CLOSE정수 
public static const CLOSE:String = "close"

close event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target접속이 닫혀진 object입니다.

See also

COMPLETE정수 
public static const COMPLETE:String = "complete"

complete event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target로드가 완료한 네트워크 object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

CONNECT정수 
public static const CONNECT:String = "connect"

connect event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target네트워크 접속을 확립한 Socket object 또는 XMLSocket object입니다.

See also

DEACTIVATE정수 
public static const DEACTIVATE:String = "deactivate"

deactivate event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetDEACTIVATE 이벤트에 대한 listener가 등록된 임의의 DisplayObject 인스턴스입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

ENTER_FRAME정수 
public static const ENTER_FRAME:String = "enterFrame"

enterFrame event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetENTER_FRAME 이벤트에 대한 listener가 등록된 임의의 DisplayObject 인스턴스입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

ID3정수 
public static const ID3:String = "id3"

id3 event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetID3 데이터가 현재 사용 가능한 MP3 를 로드하고 있는 Sound object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

INIT정수 
public static const INIT:String = "init"

init event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target로드하는 SWF 파일에 관계가 있는 LoaderInfo object입니다.

See also

MOUSE_LEAVE정수 
public static const MOUSE_LEAVE:String = "mouseLeave"

mouseLeave event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetStage object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

OPEN정수 
public static const OPEN:String = "open"

open event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target접속을 오픈한 네트워크 object입니다.

See also

REMOVED정수 
public static const REMOVED:String = "removed"

removed event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target표시 리스트로부터 삭제되는 DisplayObejct 인스턴스입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

RENDER정수 
public static const RENDER:String = "render"

render event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse. 디폴트의 동작을 캔슬할 수 없습니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetRENDER 이벤트에 대한 listener가 등록된 임의의 DisplayObject 인스턴스입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

RESIZE정수 
public static const RESIZE:String = "resize"

resize event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targetStage object입니다.

See also

SCROLL정수 
public static const SCROLL:String = "scroll"

scroll event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target스크롤 된 TextField object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

SELECT정수 
public static const SELECT:String = "select"

select event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target아이템이 선택된 FileReference object입니다.

See also

SOUND_COMPLETE정수 
public static const SOUND_COMPLETE:String = "soundComplete"

soundComplete event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target사운드의 재생이 종료한 Sound object입니다.

See also

TAB_CHILDREN_CHANGE정수 
public static const TAB_CHILDREN_CHANGE:String = "tabChildrenChange"

tabChildrenChange event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targettabChildren 플래그가 변경된 object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

TAB_ENABLED_CHANGE정수 
public static const TAB_ENABLED_CHANGE:String = "tabEnabledChange"

tabEnabledChange event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targettabEnabled 플래그가 변경된 InteractiveObject 입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

TAB_INDEX_CHANGE정수 
public static const TAB_INDEX_CHANGE:String = "tabIndexChange"

tabIndexChange event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblestrue
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
targettabIndex 가 변경된 object입니다. target 는, 반드시 event listener를 등록한 표시 리스트내의 object라고는 할 수 없습니다. 현재 이벤트를 처리하고 있는 표시 리스트내의 object에 액세스 하려면 ,currentTarget property를 사용합니다.

See also

UNLOAD정수 
public static const UNLOAD:String = "unload"

unload event object의 type property의 값을 정의합니다.

이 이벤트에는, 다음의 property가 있습니다.

PropertyValue
bubblesfalse
cancelablefalse 는, 캔슬하는 디폴트의 동작이 없는 것을 나타냅니다.
currentTargetevent listener로 Event object를 액티브하게 처리하고 있는 object입니다.
target언로드 또는 옮겨놓는 SWF 파일에 관계가 있는 LoaderInfo object입니다.

See also

Examples

다음의 예에서는,EventExample 클래스 및 Square custom 클래스를 사용해, event 바브 링을 관리하는 방법을 나타냅니다.
package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;

    public class EventExample extends Sprite {
        
        public function EventExample() {
            var square_0:Square = new Square(300, 0x336633);
            addChild(square_0);
            
            var square_1:Square = new Square(250, 0x669966);
            square_0.addChild(square_1);

            var square_2:Square = new Square(200, 0x66CC66);
            square_1.addChild(square_2);

            var square_3:Square = new Square(150, 0xAA0000);
            square_3.shouldBubble = false;
            square_2.addChild(square_3);

            var square_4:Square = new Square(100, 0x66FF66);
            square_3.addChild(square_4);

            var square_5:Square = new Square(50, 0xCC0000);
            square_5.shouldBubble = false;
            square_4.addChild(square_5);

            this.addEventListener(MouseEvent.CLICK, clickHandler);
        }
        
        private function clickHandler(e:Event) :void {
            trace(">> stage: " + e.type + " event from " + e.target.name + " called on " + this.name);
            trace(">> --------------------------------------------");
        }
    }
}

import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;

class Square extends Sprite {
    private var sideLen:int;
    private var color:Number;
    public var shouldBubble:Boolean = true;

    public function Square(sideLen:int, color:Number) {
        this.sideLen = sideLen;
        this.color = color;
        init();
        draw();
    }
        
    private function init() :void {
        buttonMode = true;
        this.addEventListener(MouseEvent.CLICK, firstClickHandler);
        this.addEventListener(MouseEvent.CLICK, secondClickHandler);
        this.addEventListener(MouseEvent.CLICK, thirdClickHandler);
    }
        
    private function draw() :void {
        this.graphics.beginFill(color);
        this.graphics.drawRect(0, 0, sideLen, sideLen);
    }
        
    private function firstClickHandler(e:Event) :void {
        trace(">> 1e: " + e.type + " event from " + e.target.name + " called on " + this.name);
        if(! shouldBubble) {
            e.stopPropagation();
        }
    }

    private function secondClickHandler(e:Event) :void {
        trace(">> 2e: " + e.type + " event from " + e.target.name + " called on " + this.name);
        if(! shouldBubble) {
            e.stopImmediatePropagation();
            trace(">> --------------------------------------------");
        }
    }

    private function thirdClickHandler(e:Event) :void {
        trace(">> 3e: " + e.type + " event from " + e.target.name + " called on " + this.name);
    }
}






 

코멘트가 추가되었을 경우, 메일로 받기. | 코멘트 리포트

현재의 페이지: http://flexdocs.kr/docs/flex2/langref/flash/events/Event.html