| <?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:Group xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="library://ns.adobe.com/flex/mx"> |
| <fx:Script> |
| <![CDATA[ |
| import mx.events.FlexEvent; |
| |
| [Bindable] |
| public var embed:MultiDPIBitmapSource; |
| |
| [Bindable] |
| public var refer:MultiDPIBitmapSource; |
| |
| public function changeSource(i:int): void { |
| embed = embed_list.getItemAt(i) as MultiDPIBitmapSource; |
| refer = refer_list.getItemAt(i) as MultiDPIBitmapSource; |
| } |
| ]]> |
| </fx:Script> |
| <fx:Declarations> |
| <s:ArrayList id="embed_list"> |
| <s:MultiDPIBitmapSource id="embed_full" |
| source160dpi="@Embed('../assets/80x80.png')" |
| source240dpi="@Embed('../assets/120x120.png')" |
| source320dpi="@Embed('../assets/160x160.png')"/> |
| <s:MultiDPIBitmapSource id="embed_23" |
| source240dpi="@Embed('../assets/120x120.png')" |
| source320dpi="@Embed('../assets/160x160.png')"/> |
| <s:MultiDPIBitmapSource id="embed_13" |
| source160dpi="@Embed('../assets/80x80.png')" |
| source320dpi="@Embed('../assets/160x160.png')"/> |
| <s:MultiDPIBitmapSource id="embed_12" |
| source160dpi="@Embed('../assets/80x80.png')" |
| source240dpi="@Embed('../assets/120x120.png')"/> |
| <s:MultiDPIBitmapSource id="embed_1" |
| source160dpi="@Embed('../assets/80x80.png')"/> |
| <s:MultiDPIBitmapSource id="embed_2" |
| source240dpi="@Embed('../assets/120x120.png')"/> |
| <s:MultiDPIBitmapSource id="embed_3" |
| source320dpi="@Embed('../assets/160x160.png')"/> |
| </s:ArrayList> |
| |
| |
| <s:ArrayList id="refer_list"> |
| <s:MultiDPIBitmapSource id="refer_full" |
| source160dpi="assets/80x80.png" |
| source240dpi="assets/120x120.png" |
| source320dpi="assets/160x160.png"/> |
| <s:MultiDPIBitmapSource id="refer_23" |
| source240dpi="assets/120x120.png" |
| source320dpi="assets/160x160.png"/> |
| <s:MultiDPIBitmapSource id="refer_13" |
| source160dpi="assets/80x80.png" |
| source320dpi="assets/160x160.png"/> |
| <s:MultiDPIBitmapSource id="refer_12" |
| source160dpi="assets/80x80.png" |
| source240dpi="assets/120x120.png"/> |
| <s:MultiDPIBitmapSource id="refer_1" |
| source160dpi="assets/80x80.png"/> |
| <s:MultiDPIBitmapSource id="refer_2" |
| source240dpi="assets/120x120.png"/> |
| <s:MultiDPIBitmapSource id="refer_3" |
| source320dpi="assets/160x160.png"/> |
| </s:ArrayList> |
| </fx:Declarations> |
| <s:states> |
| <s:State name="Embedded"/> |
| <s:State name="Referrenced"/> |
| </s:states> |
| <s:Image source.Embedded="{embed}" source.Referrenced="{refer}" id="image"/> |
| </s:Group> |