| 패키지 | fl.data |
| 클래스 | public dynamic class SimpleCollectionItem |
| 상속 | SimpleCollectionItem Object |
| 언어 버전 : | ActionScript 3.0 |
| Player 버전 : | Flash Player 9.0.28.0 |
label 및 data 속성만 포함된 컬렉션 목록 항목입니다.
| 속성 | 다음에 의해 정의됨 | ||
|---|---|---|---|
![]() | constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다.
| Object | |
| data : String
객체의 data 속성입니다.
| SimpleCollectionItem | ||
| label : String
객체의 label 속성입니다.
| SimpleCollectionItem | ||
![]() | prototype : Object
[static]
클래스 또는 함수 객체의 프로토타입 객체에 대한 참조입니다.
| Object | |
| 메서드 | 다음에 의해 정의됨 | ||
|---|---|---|---|
|
새 SimpleCollectionItem 객체를 만듭니다.
| SimpleCollectionItem | ||
![]() |
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다.
| Object | |
![]() |
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다.
| Object | |
![]() |
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다.
| Object | |
![]() |
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다.
| Object | |
![]() |
지정된 객체의 문자열 표현을 반환합니다.
| Object | |
![]() |
지정된 객체의 프리미티브 값을 반환합니다.
| Object | |
| data | 속성 |
public var data:String
| 언어 버전 : | ActionScript 3.0 |
| Player 버전 : | Flash Player 9.0.28.0 |
객체의 data 속성입니다.
기본값은 null.
| label | 속성 |
public var label:String
| 언어 버전 : | ActionScript 3.0 |
| Player 버전 : | Flash Player 9.0.28.0 |
객체의 label 속성입니다. 기본값은 label(n) 입니다. 여기서 n은 서수 인덱스입니다.
| SimpleCollectionItem | () | 생성자 |
public function SimpleCollectionItem()
| 언어 버전 : | ActionScript 3.0 |
| Player 버전 : | Flash Player 9.0.28.0 |
새 SimpleCollectionItem 객체를 만듭니다.
예제를 실행하려면 다음 단계를 수행합니다.
package
{
import fl.controls.ComboBox;
import fl.controls.Label;
import fl.data.*;
import fl.data.SimpleCollectionItem;
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextFieldAutoSize;
public class SimpleCollectionItemExample extends Sprite
{
private var dp:DataProvider;
private var cb:ComboBox;
private var myLabel:Label;
public function SimpleCollectionItemExample() {
dp = new DataProvider();
var i:uint;
for(i=0; i<42; i++) {
var sci:SimpleCollectionItem = new SimpleCollectionItem();
sci.label = "Item "+i;
sci.data = null;
dp.addItem( sci );
}
cb = new ComboBox();
cb.dataProvider = dp;
cb.addEventListener(Event.CHANGE, announceSelectedItem);
cb.move(10,40);
addChild(cb);
myLabel= new Label();
myLabel.autoSize = TextFieldAutoSize.LEFT;
myLabel.text = "";
myLabel.move(10,10);
addChild(myLabel);
}
function announceSelectedItem(e:Event):void {
var sci:SimpleCollectionItem = e.target.selectedItem as SimpleCollectionItem;
myLabel.text = "You have selected " + sci.label;
}
}
}
이 페이지에 의견 추가되면 전자 메일 알림 받기 | 의견 보고서
현재 페이지: http://livedocs.adobe.com/flash/9.0_kr/ActionScriptLangRefV3/fl/data/SimpleCollectionItem.html