| <?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:Application |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:s="library://ns.adobe.com/flex/spark"> |
| |
| <s:states> |
| <s:State name="default"/> |
| <s:State name="flipped"/> |
| </s:states> |
| |
| <s:transitions> |
| <s:Transition id="t1"> |
| <s:Wipe id="wipe" |
| direction="right" |
| target="{holder}" |
| duration="1000" /> |
| </s:Transition> |
| </s:transitions> |
| |
| <s:Panel title="Wipe Example" |
| width="75%" height="75%"> |
| |
| <s:HGroup width="100%" height="100%" left="5" top="5" |
| horizontalCenter="0" verticalCenter="0"> |
| <s:Group id="holder"> |
| <s:BitmapImage |
| source="@Embed('assets/back2.png')" |
| visible="true" visible.flipped="false"/> |
| <s:BitmapImage |
| source="@Embed('assets/c2.png')" |
| visible="false" visible.flipped="true"/> |
| </s:Group> |
| |
| <!-- Directions --> |
| <s:VGroup id="detailsBox" |
| width="50%" |
| left="0"> |
| <s:Label |
| width="99%" |
| color="blue" |
| text="Wipe wipes from bitmapFrom to the bitmapTo image in the given direction. Click the 'Wipe Right' button to see the effect."/> |
| </s:VGroup> |
| </s:HGroup> |
| |
| <s:Rect left="0" right="0" bottom="0" height="30"> |
| <s:fill> |
| <s:LinearGradient rotation="90"> |
| <s:GradientEntry color="0xE2E2E2" /> |
| <s:GradientEntry color="0xD9D9D9" /> |
| </s:LinearGradient> |
| </s:fill> |
| </s:Rect> |
| <s:Button |
| left="5" bottom="5" |
| label="Wipe Right" |
| click="currentState = (currentState == 'flipped') ? 'default' : 'flipped';"/> |
| </s:Panel> |
| |
| </s:Application> |