2012-11-03 4 views
2

목록에서 alternatingItemColors와 관련된 문제가 있습니다. alternatingItemColors에 배열을 할당하고 싶지만 내 배열은 구성 요소 위의 스크립트에 있습니다.Flash Builder에서 alternatingItemColors에 배열 할당

<fx:Script> 
     <![CDATA[ 
    [Bindable] 
     public var colors:ArrayCollection=new ArrayCollection(); 
colors=[#FFFF00,#fd8301]; 
    ]]> 
    </fx:Script> 
<s:List id="workList" width="100%" height="40%" alternatingItemColors="colors"/> 

은 어떤 하나 alternatingItemColors

답변

0

사용 어레이 (하지의 ArrayCollection)

public var colors:Array = [#FFFF00,#fd8301]; 
에 배열을 할당하는 것을 잘못된 방법을 제안 할 수 있습니다 : 플렉스 컴파일러는 다음과 같이 코드가 캔트 액세스 속성 색상 말한다

또한 바인딩 태그

<s:List id="workList" width="100%" height="40%" alternatingItemColors="{colors}"/> 
+0

이 대답 않았다 색상 주위에 누락하여 문제? 당신은 어떻게 지내는지보고 답을 확인하고 있습니까? –

관련 문제