Actionscript 3 如何在flex 4.6中显示从列表中选择的项目数

Actionscript 3 如何在flex 4.6中显示从列表中选择的项目数,actionscript-3,apache-flex,flex4.6,Actionscript 3,Apache Flex,Flex4.6,我有一个包含20项的列表,我有4个按钮,分别是button1、button2、button3和button4。现在我想在单击按钮1时显示列表的前5项,在单击按钮2时显示列表的第二5项,依此类推,如何操作?有人能帮我吗 <s:List id="list" visible="true" height="105" x="100" y="100"> <s:dataProvider> <s:ArrayCollection>

我有一个包含20项的列表,我有4个按钮,分别是button1、button2、button3和button4。现在我想在单击按钮1时显示列表的前5项,在单击按钮2时显示列表的第二5项,依此类推,如何操作?有人能帮我吗

<s:List id="list" visible="true" height="105" x="100" y="100">
    <s:dataProvider>
        <s:ArrayCollection>
            <fx:String>1</fx:String>
            <fx:String>2</fx:String>
            <fx:String>3</fx:String>
            <fx:String>4</fx:String>
            <fx:String>5</fx:String>
            <fx:String>6</fx:String>
            <fx:String>7</fx:String>
            <fx:String>8</fx:String>
            <fx:String>9</fx:String>
            <fx:String>10</fx:String>
            <fx:String>11</fx:String>
            <fx:String>12</fx:String>               
            <fx:String>13</fx:String>
            <fx:String>14</fx:String>
            <fx:String>15</fx:String>
            <fx:String>16</fx:String>
            <fx:String>17</fx:String>
            <fx:String>18</fx:String>
            <fx:String>19</fx:String>
            <fx:String>20</fx:String>
        </s:ArrayCollection>
    </s:dataProvider>
</s:List>

1.
2.
3.
4.
5.
6.
7.
8.
9
10
11
12
13
14
15
16
17
18
19
20
为您的ArrayCollection创建一个