| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <s:List xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" dataProvider="{colorsArray}" width="200" height="300" |
| itemRenderer="comps.ColorRenderer" |
| y="40" selectedIndex="0" creationComplete="colorList_creationCompleteHandler()"> |
| |
| <fx:Script> |
| <![CDATA[ |
| import mx.collections.ArrayCollection; |
| import mx.events.FlexEvent; |
| |
| [Bindable] |
| private var colorsArray:ArrayCollection = new ArrayCollection([0x000000, 0x280000 , 0x300000, 0x380000 , 0x400000, 0x500000 , 0x580000, 0x600000 , 0x680000, 0x700000 , 0x780000, 0x880000 , 0x900000, 0xA00000 , 0xA80000, 0xB80000 , 0xC80000, 0xD80000 , 0xE80000, 0xF80000 , 0xFF0000]); |
| |
| public var maxScrollPosition:Number; |
| |
| public function colorList_creationCompleteHandler():void |
| { |
| maxScrollPosition = scroller.verticalScrollBar.maximum; |
| scroller.setStyle("interactionMode", "touch"); |
| } |
| |
| ]]> |
| </fx:Script> |
| |
| </s:List> |
| |
| |