| 패키지 | org.osmf.traits | 
| 클래스 | public class DisplayObjectTrait | 
| 상속 | DisplayObjectTrait    MediaTraitBase   EventDispatcher   Object | 
| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
For an image, for example, the intrinsic dimensions are the height and width of the image as it is stored.
Use the MediaElement.hasTrait(MediaTraitType.DISPLAY_OBJECT) method to query
	 whether a media element has a trait of this type.
	 If hasTrait(MediaTraitType.DISPLAY_OBJECT) returns true,
	 use the MediaElement.getTrait(MediaTraitType.DISPLAY_OBJECT) method
	 to get an object that is of this type.
관련 API 요소
| 속성 | 정의 주체 | ||
|---|---|---|---|
![]()  | constructor : Object 
	 지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다.  | Object | |
| displayObject : DisplayObject [읽기 전용] 
		 The media's display object.  | DisplayObjectTrait | ||
| mediaHeight : Number [읽기 전용] 
		 The intrinsic height of the media.  | DisplayObjectTrait | ||
| mediaWidth : Number [읽기 전용] 
		 The intrinsic width of the media.  | DisplayObjectTrait | ||
![]()  | traitType : String [읽기 전용] 
		 The MediaTraitType for this trait.  | MediaTraitBase | |
| 메서드 | 정의 주체 | ||
|---|---|---|---|
		 Constructor.  | DisplayObjectTrait | ||
![]()  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void 
	리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다.  | EventDispatcher | |
![]()  | 
	이벤트를 이벤트 흐름으로 전달합니다.  | EventDispatcher | |
![]()  | 
		 Disposes of any resources used by this trait.  | MediaTraitBase | |
![]()  | 
	EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다.  | EventDispatcher | |
![]()  | 
	 지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다.  | Object | |
![]()  | 
	 Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다.  | Object | |
![]()  | 
	 지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다.  | Object | |
![]()  | 
	EventDispatcher 객체에서 리스너를 제거합니다.  | EventDispatcher | |
![]()  | 
     루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다.  | Object | |
![]()  | 
	 로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다.  | Object | |
![]()  | 
	 지정된 객체의 문자열 표현을 반환합니다.  | Object | |
![]()  | 
	 지정된 객체의 프리미티브 값을 반환합니다.  | Object | |
![]()  | 
	이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다.  | EventDispatcher | |
| 메서드 | 정의 주체 | ||
|---|---|---|---|
		 Called just after the displayObject property has changed.  | DisplayObjectTrait | ||
		 Called immediately before the displayObject property is changed.  | DisplayObjectTrait | ||
		 Called just after setMediaSize() has applied new mediaWidth
		 and/or mediaHeight values.  | DisplayObjectTrait | ||
		 Called just before a call to setMediaSize().  | DisplayObjectTrait | ||
		 Defines the trait's displayObject.  | DisplayObjectTrait | ||
		 Sets the trait's width and height.  | DisplayObjectTrait | ||
| 이벤트 | 요약 | 정의 주체 | ||
|---|---|---|---|---|
![]()  | [브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 얻어 활성화될 때 전달됩니다. | EventDispatcher | ||
![]()  | [브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 잃고 비활성화될 때 전달됩니다. | EventDispatcher | ||
| Dispatched when the trait's displayObject property has changed. | DisplayObjectTrait | |||
| Dispatched when the trait's mediaWidth and/or mediaHeight property has changed. | DisplayObjectTrait | |||
displayObject | 속성 | 
displayObject:DisplayObject  [읽기 전용] | 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
The media's display object.
구현
    public function get displayObject():DisplayObjectmediaHeight | 속성 | 
mediaWidth | 속성 | 
DisplayObjectTrait | () | 생성자 | 
public function DisplayObjectTrait(displayObject:DisplayObject, mediaWidth:Number = 0, mediaHeight:Number = 0)| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
Constructor.
매개 변수displayObject:DisplayObject | |
mediaWidth:Number (default = 0) | |
mediaHeight:Number (default = 0) | 
displayObjectChangeEnd | () | 메서드 | 
 protected function displayObjectChangeEnd(oldDisplayObject:DisplayObject):void| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
		 Called just after the displayObject property has changed.
		 Dispatches the change event.
		 
Subclasses that override should call this method to dispatch the displayObjectChange event.
매개 변수
oldDisplayObject:DisplayObject — Previous displayObject value.
		  
		   | 
displayObjectChangeStart | () | 메서드 | 
 protected function displayObjectChangeStart(newView:DisplayObject):void| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
		 Called immediately before the displayObject property is changed. 
		 
Subclasses can override this method to communicate the change to the media.
매개 변수
newView:DisplayObject — New displayObject value.
		  
		   | 
mediaSizeChangeEnd | () | 메서드 | 
 protected function mediaSizeChangeEnd(oldMediaWidth:Number, oldMediaHeight:Number):void| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
		 Called just after setMediaSize() has applied new mediaWidth
		 and/or mediaHeight values. Dispatches the change event.
		 
		 
Subclasses that override should call this method to dispatch the mediaSizeChange event.
매개 변수
oldMediaWidth:Number — Previous mediaWidth value.
		  | |
oldMediaHeight:Number — Previous mediaHeight value.
		 
		  
		   | 
mediaSizeChangeStart | () | 메서드 | 
 protected function mediaSizeChangeStart(newMediaWidth:Number, newMediaHeight:Number):void| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
		 Called just before a call to setMediaSize(). 
		 Subclasses can override this method to communicate the change to the media.
		 
매개 변수
newMediaWidth:Number — New mediaWidth value.
		  | |
newMediaHeight:Number — New mediaHeight value.
		  
		   | 
setDisplayObject | () | 메서드 | 
 protected final function setDisplayObject(value:DisplayObject):void| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
Defines the trait's displayObject. If the displayObject is different from the one that is currently set, a displayObjectChange event will be dispatched.
매개 변수
value:DisplayObject | 
setMediaSize | () | 메서드 | 
 protected final function setMediaSize(mediaWidth:Number, mediaHeight:Number):void| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
Sets the trait's width and height.
Forces non numerical and negative values to zero.
If the either the width or the height differs from the previous width or height, dispatches a mediaSizeChange event.
매개 변수
mediaWidth:Number — The new width.
		  | |
mediaHeight:Number — The new height.
		 
		  
		   | 
displayObjectChange | 이벤트 | 
org.osmf.events.DisplayObjectEvent속성 DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.DISPLAY_OBJECT_CHANGE| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
	 Dispatched when the trait's displayObject property has changed.
	 This occurs when a different DisplayObject is assigned to represent the media.
	 
	 
mediaSizeChange | 이벤트 | 
org.osmf.events.DisplayObjectEvent속성 DisplayObjectEvent.type =
org.osmf.events.DisplayObjectEvent.MEDIA_SIZE_CHANGE| 언어 버전: | ActionScript 3.0 | 
| 제품 버전: | OSMF 1.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
Dispatched when the trait's mediaWidth and/or mediaHeight property has changed.
The DisplayObjectEvent.MEDIA_SIZE_CHANGE constant defines the value of the type property of the event object for a mediaSizeChange event.Tue Jun 12 2018, 03:17 PM Z
 
 상속되는 공용 속성 숨기기
 상속되는 공용 속성 표시