blob: 9878c4584f6718817c58e15882708841c0551f48 [file] [log] [blame]
<?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:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:states>
<s:State name="normal" />
<s:State name="emailOpen" />
<s:State name="aboutOpen" />
<s:State name="infoOpen" />
</s:states>
<s:transitions>
<mx:Transition fromState="*" toState="*">
<mx:Sequence>
<s:Fade target="{emailPopUp.popUp}" duration="1000"/>
</mx:Sequence>
</mx:Transition>
</s:transitions>
<s:Panel title="PopUpAnchor with Form" width="100%" height="100%">
<s:layout>
<s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
</s:layout>
<s:HGroup>
<mx:LinkButton label="Home" color="0x336699" click="currentState = 'normal'"/>
<mx:LinkButton label="About" color="0x336699" click="currentState = 'aboutOpen'"/>
<mx:LinkButton label="Information" color="0x336699" click="currentState = 'infoOpen'"/>
<mx:LinkButton label="Contact Us" color="0x336699" click="currentState = 'emailOpen'"/>
</s:HGroup>
<s:BorderContainer id="border1" excludeFrom="emailOpen" width="290" height="200"
backgroundColor="0x000000" color="0xFFFFFF" cornerRadius="7">
<s:Label width="200" height="200" top="20" left="5"
text.normal="Welcome to Tour de Flex!"
text.aboutOpen="Tour de Flex is constantly being updated with more cool samples!"
text.infoOpen="Check back for more Flex 4 samples weekly!"/>
</s:BorderContainer>
<s:PopUpAnchor id="emailPopUp" left="0" bottom="0" popUpPosition="below"
includeIn="emailOpen" displayPopUp.normal="false" displayPopUp.emailOpen="true">
<mx:Form id="form1" backgroundColor="0x000000" color="0xFFFFFF">
<mx:FormItem label="From :">
<s:TextInput/>
</mx:FormItem>
<mx:FormItem label="To :">
<s:TextInput/>
</mx:FormItem>
<mx:FormItem label="Subject :">
<s:TextInput/>
</mx:FormItem>
<mx:FormItem label="Message :">
<s:TextArea width="100%" height="60" maxChars="60"/>
</mx:FormItem>
<mx:FormItem direction="horizontal">
<s:Button label="Send" click="currentState = 'normal'" color="0x000000"/>
<s:Button label="Cancel" click="currentState = 'normal'" color="0x000000"/>
</mx:FormItem>
</mx:Form>
</s:PopUpAnchor>
</s:Panel>
</s:Module>