You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/08/09 04:17:18 UTC
[03/10] moved mx example files to mx directory
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/DefaultTileListEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/DefaultTileListEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/DefaultTileListEffectExample.mxml
new file mode 100755
index 0000000..9cbc514
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/DefaultTileListEffectExample.mxml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.DefaultTileListEffect;
+ import mx.effects.easing.Elastic;
+ import mx.collections.ArrayCollection;
+ import mx.effects.Move;
+
+ [Bindable]
+ private var myDP:ArrayCollection = new ArrayCollection(
+ ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P']);
+
+ private function deleteItems():void {
+ // As each item is removed, the index of the other items changes.
+ // So first get the items to delete, then determine their indices
+ // as you remove them.
+ var toRemove:Array = [];
+ for (var i:int = 0; i < tlist0.selectedItems.length; i++)
+ toRemove.push(tlist0.selectedItems[i]);
+ for (i = 0; i < toRemove.length; i++)
+ myDP.removeItemAt(myDP.getItemIndex(toRemove[i]));
+ }
+
+ private var zcount:int = 0;
+ private function addItems():void {
+ myDP.addItemAt("Z"+zcount++,Math.min(2,myDP.length));
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- Define an instance of the DefaultTileListEffect effect,
+ and set its moveDuration and color properties. -->
+ <mx:DefaultTileListEffect id="myDTLE"
+ moveDuration="100"
+ color="0x0000ff"/>
+ </fx:Declarations>
+
+ <mx:Panel title="DefaultTileListEffect Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:TileList id="tlist0"
+ height="100%" width="100%"
+ columnCount="4" rowCount="4"
+ fontSize="18" fontWeight="bold"
+ direction="horizontal"
+ dataProvider="{myDP}"
+ allowMultipleSelection="true"
+ offscreenExtraRowsOrColumns="2"
+ itemsChangeEffect="{myDTLE}" />
+
+ <mx:Button
+ label="Delete selected item(s)"
+ click="deleteItems();"/>
+ <mx:Button
+ label="Add item"
+ click="addItems();"/>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/DissolveEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/DissolveEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/DissolveEffectExample.mxml
new file mode 100755
index 0000000..958eab9
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/DissolveEffectExample.mxml
@@ -0,0 +1,57 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the Dissolve effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:Dissolve id="dissolveOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
+ <mx:Dissolve id="dissolveIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Dissolve Effect Example"
+ width="95%" height="95%" layout="horizontal"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:VBox height="100%">
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
+ </mx:VBox>
+
+ <mx:VBox height="100%" width="100%">
+ <mx:Text width="100%" color="blue"
+ text="Use the Dissolve effect to show or hide the text, image, and button."/>
+
+ <mx:Spacer height="100%"/>
+
+ <mx:Button label="Purchase"
+ visible="{cb1.selected}"
+ hideEffect="{dissolveOut}" showEffect="{dissolveIn}"/>
+ </mx:VBox>
+
+ <mx:ControlBar>
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+ </mx:ControlBar>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/FadeEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/FadeEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/FadeEffectExample.mxml
new file mode 100755
index 0000000..576e5c7
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/FadeEffectExample.mxml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Fade effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Style>
+ @font-face {
+ src:url("./assets/OpenSans-Regular.ttf");
+ fontFamily: OpenSans;
+ embedAsCFF: false;
+ }
+ </fx:Style>
+
+ <fx:Declarations>
+ <mx:Fade id="fadeOut" duration="1000" alphaFrom="1.0" alphaTo="0.0"/>
+ <mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Fade Effect Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the Fade effect to show or hide the text and image. Use an embedded font when applying the Fade effect to text."/>
+
+ <mx:Label text="Apache Flex"
+ fontFamily="OpenSans" fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ hideEffect="{fadeOut}" showEffect="{fadeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/GlowEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/GlowEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/GlowEffectExample.mxml
new file mode 100755
index 0000000..411eeda
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/GlowEffectExample.mxml
@@ -0,0 +1,46 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the Glow effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:Glow id="glowImage" duration="1000"
+ alphaFrom="1.0" alphaTo="0.3"
+ blurXFrom="0.0" blurXTo="50.0"
+ blurYFrom="0.0" blurYTo="50.0"
+ color="0x00FF00"/>
+ <mx:Glow id="unglowImage" duration="1000"
+ alphaFrom="0.3" alphaTo="1.0"
+ blurXFrom="50.0" blurXTo="0.0"
+ blurYFrom="50.0" blurYTo="0.0"
+ color="0x0000FF"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Glow Effect Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Click and hold the mouse on the image to see glowImage effect. Release the mouse to see unglowImage effect."/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ mouseDownEffect="{glowImage}"
+ mouseUpEffect="{unglowImage}"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/IrisEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/IrisEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/IrisEffectExample.mxml
new file mode 100755
index 0000000..02d317d
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/IrisEffectExample.mxml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Iris effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:Iris id="irisOut" duration="1000" showTarget="true"/>
+ <mx:Iris id="irisIn" duration="1000" showTarget="false"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Iris Effect Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the Iris effect to show or hide the logo."/>
+
+ <mx:Image id="flex" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ showEffect="{irisIn}" hideEffect="{irisOut}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/MoveEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/MoveEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/MoveEffectExample.mxml
new file mode 100755
index 0000000..2052a1d
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/MoveEffectExample.mxml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Move effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ private function moveImage():void {
+ myMove.end();
+ myMove.xTo=mouseX-60;
+ myMove.play();
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Move id="myMove" target="{img}"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Move Effect Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Click anywhere on the canvas to move the logo horizontally to that position"/>
+
+ <mx:Canvas id="canvas" width="100%" height="100%" mouseDown="moveImage();">
+
+ <mx:Image id="img" source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+
+ </mx:Canvas>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/ParallelEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/ParallelEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/ParallelEffectExample.mxml
new file mode 100755
index 0000000..61cfdea
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/ParallelEffectExample.mxml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Parallel effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:Parallel id="expand" target="{img}">
+ <mx:Move xTo="{canvas.width/2 - 50}" yTo="{canvas.height/2 - 100}"/>
+ <mx:Resize widthTo="100" heightTo="200"/>
+ </mx:Parallel>
+
+ <mx:Parallel id="contract" target="{img}">
+ <mx:Move xTo="20" yTo="20"/>
+ <mx:Resize widthTo="30" heightTo="60"/>
+ </mx:Parallel>
+ </fx:Declarations>
+
+ <mx:Panel title="Parallel Effect Example" width="100%" height="100%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the Button controls to move and resize the logo in parallel."/>
+
+ <mx:Canvas id="canvas" width="100%" height="100%">
+ <mx:Image id="img" x="20" y="20" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+ </mx:Canvas>
+
+ <mx:ControlBar>
+ <mx:Button label="Expand" click="expand.end(); expand.play();"/>
+ <mx:Button label="Contract" click="contract.end(); contract.play();"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/PauseEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/PauseEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/PauseEffectExample.mxml
new file mode 100755
index 0000000..ae508e1
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/PauseEffectExample.mxml
@@ -0,0 +1,47 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the Pause effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.easing.*;
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Sequence id="movePauseMove">
+ <mx:Move xBy="150" duration="2000" easingFunction="Bounce.easeOut"/>
+ <mx:Pause duration="2000"/>
+ <mx:Move xBy="-150" duration="2000" easingFunction="Bounce.easeIn"/>
+ </mx:Sequence>
+ </fx:Declarations>
+
+ <mx:Panel title="Pause Effect Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Click the logo to start the Sequence effect. The effect pauses for 2 seconds between moves."/>
+
+ <mx:Image
+ source="@Embed(source='assets/ApacheFlexLogo.png')"
+ mouseDownEffect="{movePauseMove}"/>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/ResizeEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/ResizeEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/ResizeEffectExample.mxml
new file mode 100755
index 0000000..f73d435
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/ResizeEffectExample.mxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Resize effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200"/>
+ <mx:Resize id="contract" target="{img}" widthTo="30" heightTo="60"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Resize Effect Example" width="100%" height="100%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the Button controls to resize the image."/>
+
+ <mx:Image id="img" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+
+ <mx:ControlBar>
+ <mx:Button label="Expand" click="expand.end(); expand.play();"/>
+ <mx:Button label="Contract" click="contract.end(); contract.play();"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/RotateEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/RotateEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/RotateEffectExample.mxml
new file mode 100755
index 0000000..544621f
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/RotateEffectExample.mxml
@@ -0,0 +1,66 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the Rotate effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var angle:int=0;
+
+ private function rotateImage():void {
+ rotate.end();
+ angle += 45;
+ rotate.play();
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Style>
+ @font-face {
+ src:url("./assets/OpenSans-Regular.ttf");
+ fontFamily: OpenSans;
+ embedAsCFF: false;
+ }
+ </fx:Style>
+
+ <fx:Declarations>
+ <mx:Rotate id="rotate" angleFrom="{angle-45}" angleTo="{angle}" target="{myVB}"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Rotate Effect Example" horizontalAlign="center"
+ width="75%" height="75%" layout="horizontal"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:VBox id="myVB" width="50%" horizontalAlign="center">
+ <mx:Label text="Apache Flex"
+ fontFamily="OpenSans" fontSize="14"/>
+
+ <mx:Image id="img"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+ </mx:VBox>
+
+ <mx:Text width="50%" color="blue"
+ text="Click the button to rotate the image 45 degrees. Use an embedded font when applying the Rotate effect to text."/>
+
+ <mx:ControlBar>
+ <mx:Button label="Rotate 45 Degrees" click="rotateImage();"/>
+ </mx:ControlBar>
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/SequenceEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/SequenceEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/SequenceEffectExample.mxml
new file mode 100755
index 0000000..6675b33
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/SequenceEffectExample.mxml
@@ -0,0 +1,47 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the Sequence effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.effects.easing.*;
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Sequence id="movePauseMove">
+ <mx:Move xBy="150" duration="2000" easingFunction="Bounce.easeOut"/>
+ <mx:Pause duration="2000"/>
+ <mx:Move xBy="-150" duration="2000" easingFunction="Bounce.easeIn"/>
+ </mx:Sequence>
+ </fx:Declarations>
+
+ <mx:Panel title="Sequence Effect Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Click the logo to start the Sequence effect. The effect pauses for 2 seconds between moves."/>
+
+ <mx:Image
+ source="@Embed(source='assets/ApacheFlexLogo.png')"
+ mouseDownEffect="{movePauseMove}"/>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleEffectExample.mxml
new file mode 100755
index 0000000..ce232d2
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleEffectExample.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Effect class. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.controls.Alert;
+
+ // Event handler for the effectEnd event.
+ private function endEffectHandler():void {
+ Alert.show("Effect Ended!");
+ }
+
+ // Event handler for the reset button.
+ private function resetHandler():void {
+ expand.end();
+ img.width=30;
+ img.height=60;
+ button1.enabled=true;
+ }
+ ]]>
+ </fx:Script>
+
+
+ <fx:Declarations>
+ <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200"
+ duration="10000" effectEnd="endEffectHandler();"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Resize Effect Example" width="100%" height="100%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the Button controls to control the Resize effect."/>
+
+ <mx:Image id="img" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+
+ <mx:ControlBar>
+ <mx:Button id="button1" label="Start" click="expand.play(); button1.enabled=false;"/>
+ <mx:Button label="Pause" click="expand.pause();"/>
+ <mx:Button label="Resume" click="expand.resume();"/>
+ <mx:Button label="Reverse" click="expand.reverse();"/>
+ <mx:Button label="End" click="expand.end();"/>
+ <mx:Button label="Reset" click="resetHandler();"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleTweenEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleTweenEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleTweenEffectExample.mxml
new file mode 100755
index 0000000..93e236c
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/SimpleTweenEffectExample.mxml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the TweenEffect class. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.TweenEvent;
+
+ // Event handler for the tweenUpdate and tweenEnd effects.
+ private function tweenUpdateHandler(event:TweenEvent):void {
+ // Access current width of the image.
+ currentWidth.text="Current width (in pixels): " + String(event.value[0]);
+ }
+
+ // Event handler for the reset button.
+ private function resetHandler():void {
+ expand.end();
+ img.width=30;
+ currentWidth.text="Current width (in pixels): 30";
+ img.height=60;
+ button1.enabled=true;
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200"
+ duration="10000"
+ tweenUpdate="tweenUpdateHandler(event);"
+ tweenEnd="tweenUpdateHandler(event);"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Resize Effect Example" width="100%" height="100%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the Button controls to resize the image."/>
+
+ <mx:HBox width="100%">
+ <mx:Image id="img" width="30" height="60"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+ <mx:Text id="currentWidth" height="20" width="100%"/>
+ </mx:HBox>
+
+ <mx:ControlBar>
+ <mx:Button id="button1" label="Start" click="expand.play(); button1.enabled=false;"/>
+ <mx:Button label="Pause" click="expand.pause();"/>
+ <mx:Button label="Resume" click="expand.resume();"/>
+ <mx:Button label="Reverse" click="expand.reverse();"/>
+ <mx:Button label="End" click="expand.end();"/>
+ <mx:Button label="Reset" click="resetHandler();"/>
+ </mx:ControlBar>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/SoundEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/SoundEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/SoundEffectExample.mxml
new file mode 100755
index 0000000..cdbf299
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/SoundEffectExample.mxml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the SoundEffect effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:SoundEffect id="mySounds" source="@Embed(source='./assets/ping.mp3')"/>
+ </fx:Declarations>
+
+ <mx:Panel title="Sound Effect Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Label width="100%" color="blue"
+ text="Click on the logo to hear the sound effect."/>
+
+ <mx:Image id="flex" source="@Embed(source='assets/ApacheFlexLogo.png')"
+ mouseDownEffect="{mySounds}"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/WipeDownExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/WipeDownExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeDownExample.mxml
new file mode 100755
index 0000000..7363a7c
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeDownExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the WipeDown effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:WipeDown id="wipeOut" duration="1000"/>
+ <mx:WipeDown id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeDown Effect Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the WipeDown effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/WipeLeftExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/WipeLeftExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeLeftExample.mxml
new file mode 100755
index 0000000..6c3b6de
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeLeftExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the WipeLeft effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:WipeLeft id="wipeOut" duration="1000"/>
+ <mx:WipeLeft id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeLeft Effect Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the WipeLeft effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/WipeRightExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/WipeRightExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeRightExample.mxml
new file mode 100755
index 0000000..bd3d0fa
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeRightExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the WipeRight effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:WipeRight id="wipeOut" duration="1000"/>
+ <mx:WipeRight id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeRight Effect Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the WipeRight effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/WipeUpExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/WipeUpExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeUpExample.mxml
new file mode 100755
index 0000000..dce394c
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/WipeUpExample.mxml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the WipeUp effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <mx:WipeUp id="wipeOut" duration="1000"/>
+ <mx:WipeUp id="wipeIn" duration="1000"/>
+ </fx:Declarations>
+
+ <mx:Panel title="WipeUp Effect Example" width="95%" height="95%"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Use the WipeUp effect to show or hide the text and image."/>
+
+ <mx:Label text="Apache Flex"
+ fontSize="14"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+ visible="{cb1.selected}"
+ hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
+
+ <mx:CheckBox id="cb1" label="visible" selected="true"/>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/ZoomEffectExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/ZoomEffectExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/effects/ZoomEffectExample.mxml
new file mode 100755
index 0000000..0695d58
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/effects/ZoomEffectExample.mxml
@@ -0,0 +1,56 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the Zoom effect. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import flash.events.MouseEvent;
+
+ public function doZoom(event:MouseEvent):void {
+ if (zoomAll.isPlaying) {
+ zoomAll.reverse();
+ }
+ else {
+ // If this is a ROLL_OUT event, play the effect backwards.
+ // If this is a ROLL_OVER event, play the effect forwards.
+ zoomAll.play([event.target], event.type == MouseEvent.ROLL_OUT ? true : false);
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Zoom id="zoomAll" zoomWidthTo="1" zoomHeightTo="1" zoomWidthFrom=".5" zoomHeightFrom=".5" />
+ </fx:Declarations>
+
+ <mx:Panel title="Zoom Effect Example" width="95%" height="95%" horizontalAlign="center"
+ paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
+
+ <mx:Text width="100%" color="blue"
+ text="Move the mouse over the image to enlarge it. Move the mouse off of the image to shrink it."/>
+
+ <mx:Image id="img"
+ source="@Embed(source='assets/ApacheFlexLogo.png')"
+ scaleX=".5" scaleY=".5"
+ rollOver="doZoom(event)"
+ rollOut="doZoom(event)"/>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ApacheFlexLogo.png
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ApacheFlexLogo.png b/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ApacheFlexLogo.png
new file mode 100644
index 0000000..4ff037f
Binary files /dev/null and b/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ApacheFlexLogo.png differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/assets/OpenSans-Regular.ttf
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/assets/OpenSans-Regular.ttf b/TourDeFlex/TourDeFlex3/src/mx/effects/assets/OpenSans-Regular.ttf
new file mode 100644
index 0000000..db43334
Binary files /dev/null and b/TourDeFlex/TourDeFlex3/src/mx/effects/assets/OpenSans-Regular.ttf differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ping.mp3
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ping.mp3 b/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ping.mp3
new file mode 100644
index 0000000..2eb90ea
Binary files /dev/null and b/TourDeFlex/TourDeFlex3/src/mx/effects/assets/ping.mp3 differ
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/CurrencyFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/CurrencyFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/CurrencyFormatterExample.mxml
new file mode 100755
index 0000000..82ad2c0
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/CurrencyFormatterExample.mxml
@@ -0,0 +1,73 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the CurrencyFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void {
+
+ vResult = numVal.validate();
+
+ if (vResult.type==ValidationResultEvent.VALID) {
+ var temp:Number=Number(priceUS.text);
+ formattedUSPrice.text= usdFormatter.format(temp);
+ }
+
+ else {
+ formattedUSPrice.text="";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:CurrencyFormatter id="usdFormatter" precision="2"
+ currencySymbol="$" decimalSeparatorFrom="."
+ decimalSeparatorTo="." useNegativeSign="true"
+ useThousandsSeparator="true" alignSymbol="left"/>
+
+ <mx:NumberValidator id="numVal" source="{priceUS}" property="text"
+ allowNegative="true" domain="real"/>
+ </fx:Declarations>
+
+ <mx:Panel title="CurrencyFormatter Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter U.S. dollar amount:">
+ <mx:TextInput id="priceUS" text="" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted amount: ">
+ <mx:TextInput id="formattedUSPrice" text="" width="50%" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/DateFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/DateFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/DateFormatterExample.mxml
new file mode 100755
index 0000000..9a2e875
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/DateFormatterExample.mxml
@@ -0,0 +1,67 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate the DateFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = dateVal.validate();
+ if (vResult.type==ValidationResultEvent.VALID) {
+ formattedDate.text=dateFormatter.format(dob.text);
+ }
+
+ else {
+ formattedDate.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:DateFormatter id="dateFormatter" formatString="month: MM, day: DD, year: YYYY"/>
+
+ <mx:DateValidator id="dateVal" source="{dob}" property="text" inputFormat="mm/dd/yyyy"/>
+ </fx:Declarations>
+
+ <mx:Panel title="DateFormatter Example" width="95%" height="95%"
+ paddingTop="10" paddingLeft="5" paddingRight="5" paddingBottom="10">
+
+ <mx:Form width="100%">
+ <mx:FormItem label="Enter date (mm/dd/yyyy):" width="100%">
+ <mx:TextInput id="dob" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted date: " width="100%">
+ <mx:TextInput id="formattedDate" text="" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/NumberFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/NumberFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/NumberFormatterExample.mxml
new file mode 100755
index 0000000..0a990ba
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/NumberFormatterExample.mxml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate NumberFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = numVal.validate();
+ if (vResult.type==ValidationResultEvent.VALID) {
+
+ formattedNumber.text= numberFormatter.format(inputVal.text);
+ }
+
+ else {
+ formattedNumber.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:NumberFormatter id="numberFormatter" precision="4"
+ useThousandsSeparator="true" useNegativeSign="true"/>
+
+ <mx:NumberValidator id="numVal" source="{inputVal}" property="text"
+ allowNegative="true" domain="real"/>
+ </fx:Declarations>
+
+ <mx:Panel title="NumberFormatter Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter number:">
+ <mx:TextInput id="inputVal" text="" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted number (precision=4): ">
+ <mx:TextInput id="formattedNumber" editable="false" width="50%"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/PhoneFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/PhoneFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/PhoneFormatterExample.mxml
new file mode 100755
index 0000000..699e0d9
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/PhoneFormatterExample.mxml
@@ -0,0 +1,69 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate PhoneFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = pnVal.validate();
+ if (vResult.type==ValidationResultEvent.VALID) {
+ formattedPhone.text= phoneFormatter.format(phone.text);
+ }
+
+ else {
+ formattedPhone.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:PhoneFormatter id="phoneFormatter"
+ formatString="(###) ###-####" validPatternChars="#-() "/>
+
+ <mx:PhoneNumberValidator id="pnVal" source="{phone}" property="text"
+ allowedFormatChars=""/>
+ </fx:Declarations>
+
+ <mx:Panel title="PhoneFormatter Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter a 10-digit phone number:">
+ <mx:TextInput id="phone" text="" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted phone number: ">
+ <mx:TextInput id="formattedPhone" text="" width="75%" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/SimpleFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/SimpleFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/SimpleFormatterExample.mxml
new file mode 100755
index 0000000..45787d5
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/SimpleFormatterExample.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Simple example to demonstrate the Formatter class. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ // Event handler to format the input.
+ private function Format():void
+ {
+ // The format() method returns the formatted String,
+ // or an empty String if there is an error.
+ var formattedVal:String = numberFormatter.format(inputVal.text);
+
+ if (formattedVal.length==0) {
+ // If there is an error, the Format.error property
+ // contains the reason.
+ formattedNumber.text=numberFormatter.error;
+ }
+
+ else {
+ formattedNumber.text=formattedVal;
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:NumberFormatter id="numberFormatter"/>
+ </fx:Declarations>
+
+ <mx:Panel title="NumberFormatter Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form>
+ <mx:FormItem label="Enter number - a letter is invalid:">
+ <mx:TextInput id="inputVal" text="" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted number: ">
+ <mx:TextInput id="formattedNumber" editable="false" width="75%"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/SwitchSymbolFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/SwitchSymbolFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/SwitchSymbolFormatterExample.mxml
new file mode 100755
index 0000000..4bc47a0
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/SwitchSymbolFormatterExample.mxml
@@ -0,0 +1,63 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate SwitchSymbolFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.formatters.SwitchSymbolFormatter;
+ import mx.events.ValidationResultEvent;
+
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = scVal.validate();
+
+ if (vResult.type==ValidationResultEvent.VALID) {
+ var switcher:SwitchSymbolFormatter=new SwitchSymbolFormatter('#');
+
+ formattedSCNumber.text =
+ switcher.formatValue("Formatted Social Securty number: ###-##-#### ", scNum.text);
+ }
+
+ else {
+ formattedSCNumber.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SocialSecurityValidator id="scVal" source="{scNum}" property="text"/>
+ </fx:Declarations>
+
+ <mx:Panel title="SwitchSymbolFormatter Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Label text="Enter a 9 digit Social Security number with no separator characters:"/>
+ <mx:TextInput id="scNum" text="" maxChars="9" width="50%"/>
+
+ <mx:Button label="Validate and Format" click="Format();"/>
+ <mx:TextInput id="formattedSCNumber" editable="false" width="75%"/>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/formatters/ZipCodeFormatterExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/formatters/ZipCodeFormatterExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/formatters/ZipCodeFormatterExample.mxml
new file mode 100755
index 0000000..92fa718
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/formatters/ZipCodeFormatterExample.mxml
@@ -0,0 +1,68 @@
+<?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.
+ -->
+
+<!-- Simple example to demonstrate ZipCodeFormatter. -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.ValidationResultEvent;
+ private var vResult:ValidationResultEvent;
+
+ // Event handler to validate and format input.
+ private function Format():void
+ {
+ vResult = zcVal.validate();
+
+ if (vResult.type==ValidationResultEvent.VALID) {
+ formattedZipcode.text= zipFormatter.format(zip.text);
+ }
+
+ else {
+ formattedZipcode.text= "";
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:ZipCodeFormatter id="zipFormatter" formatString="#####-####"/>
+
+ <mx:ZipCodeValidator id="zcVal" source="{zip}" property="text" allowedFormatChars=""/>
+ </fx:Declarations>
+
+ <mx:Panel title="ZipCodeFormatter Example" width="75%" height="75%"
+ paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
+
+ <mx:Form width="100%">
+ <mx:FormItem label="Enter a 5 or 9 digit U.S. ZIP code:" width="100%">
+ <mx:TextInput id="zip" text=""/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Formatted ZIP code: " width="100%">
+ <mx:TextInput id="formattedZipcode" text="" editable="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem>
+ <mx:Button label="Validate and Format" click="Format();"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/printing/AdvancedPrintDataGridExample.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/printing/AdvancedPrintDataGridExample.mxml b/TourDeFlex/TourDeFlex3/src/mx/printing/AdvancedPrintDataGridExample.mxml
new file mode 100755
index 0000000..38f0244
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/printing/AdvancedPrintDataGridExample.mxml
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- printing\ADGPrint.mxml -->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.printing.*;
+ import mx.collections.ArrayCollection;
+ import mx.printing.PrintAdvancedDataGrid;
+
+ // Create a PrintJob instance.
+ private function doPrint():void {
+ // Create an instance of the FlexPrintJob class.
+ var printJob:FlexPrintJob = new FlexPrintJob();
+
+ // Initialize the PrintAdvancedDataGrid control.
+ var printADG:PrintAdvancedDataGrid =
+ new PrintAdvancedDataGrid();
+ // Exclude the PrintAdvancedDataGrid control from layout.
+ printADG.includeInLayout = false;
+ printADG.source = adg;
+
+ // Add the print-specific control to the application.
+ addChild(printADG);
+
+ // Start the print job.
+ if (printJob.start() == false) {
+ // User cancelled print job.
+ // Remove the print-specific control to free memory.
+ removeChild(printADG);
+ return;
+ }
+
+ // Add the object to print. Do not scale it.
+ printJob.addObject(printADG, FlexPrintJobScaleType.NONE);
+
+ // Send the job to the printer.
+ printJob.send();
+
+ // Remove the print-specific control to free memory.
+ removeChild(printADG);
+ }
+
+ [Bindable]
+ private var dpHierarchy:ArrayCollection = new ArrayCollection([
+ {Region:"Southwest", children: [
+ {Region:"Arizona", children: [
+ {Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
+ {Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}]},
+ {Region:"Central California", children: [
+ {Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000}]},
+ {Region:"Nevada", children: [
+ {Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000}]},
+ {Region:"Northern California", children: [
+ {Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000},
+ {Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000}]},
+ {Region:"Southern California", children: [
+ {Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},
+ {Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}]}
+ ]}
+ ]);
+
+ ]]>
+ </fx:Script>
+
+ <mx:Panel title="PrintAdvancedDataGrid Control Example"
+ height="75%" width="75%" layout="horizontal"
+ paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
+
+ <mx:AdvancedDataGrid id="adg"
+ width="100%" height="100%">
+ <mx:dataProvider>
+ <mx:HierarchicalData source="{dpHierarchy}"/>
+ </mx:dataProvider>
+ <mx:columns>
+ <mx:AdvancedDataGridColumn dataField="Region"/>
+ <mx:AdvancedDataGridColumn dataField="Territory_Rep"
+ headerText="Territory Rep"/>
+ <mx:AdvancedDataGridColumn dataField="Actual"/>
+ <mx:AdvancedDataGridColumn dataField="Estimate"/>
+ </mx:columns>
+ </mx:AdvancedDataGrid>
+
+ <mx:Button id="myButton"
+ label="Print"
+ click="doPrint();"/>
+ </mx:Panel>
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintFooter.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintFooter.mxml b/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintFooter.mxml
new file mode 100755
index 0000000..20e500b
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintFooter.mxml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Custom control for the footer area of the printed page. -->
+
+<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="60%" horizontalAlign="right" >
+ <!-- Declare and initialize the product total variable. -->
+
+ <fx:Script>
+ <![CDATA[
+ [Bindable]
+ public var pTotal:Number = 0;
+ ]]>
+ </fx:Script>
+ <mx:Label text="Product Total: {pTotal}"/>
+</mx:VBox>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintHeader.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintHeader.mxml b/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintHeader.mxml
new file mode 100755
index 0000000..b2283fd
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintHeader.mxml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Custom control for the header area of the printed page. -->
+
+<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ width="60%" horizontalAlign="right" >
+
+ <mx:Label text="This is a placeholder for first page contents"/>
+</mx:VBox>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/48f47e61/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintView.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintView.mxml b/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintView.mxml
new file mode 100755
index 0000000..dabe443
--- /dev/null
+++ b/TourDeFlex/TourDeFlex3/src/mx/printing/FormPrintView.mxml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+
+<!-- Custom control to print the DataGrid control on multiple pages. -->
+
+<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns="*" backgroundColor="#FFFFFF" paddingTop="50" paddingBottom="50" paddingLeft="50">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.core.*
+ // Declare and initialize the variables used in the component.
+ // The application sets the actual prodTotal value.
+ [Bindable]
+ public var pageNumber:Number = 1;
+ [Bindable]
+ public var prodTotal:Number = 0;
+
+ // Control the page contents by selectively hiding the header and
+ // footer based on the page type.
+ public function showPage(pageType:String):void {
+ if(pageType == "first" || pageType == "middle") {
+ // Hide the footer.
+ footer.includeInLayout=false;
+ footer.visible = false;
+ }
+ if(pageType == "middle" || pageType == "last") {
+ // The header won't be used again; hide it.
+ header.includeInLayout=false;
+ header.visible = false;
+ }
+ if(pageType == "last") {
+ // Show the footer.
+ footer.includeInLayout=true;
+ footer.visible = true;
+ }
+ //Update the DataGrid layout to reflect the results.
+ validateNow();
+ }
+ ]]>
+ </fx:Script>
+
+ <!-- The template for the printed page, with the contents for all pages. -->
+ <mx:VBox width="80%" horizontalAlign="left">
+ <mx:Label text="Page {pageNumber}"/>
+ </mx:VBox>
+
+ <FormPrintHeader id="header" />
+ <!-- The data grid. The sizeToPage property is true by default, so the last
+ page has only as many grid rows as are needed for the data. -->
+ <mx:PrintDataGrid id="myDataGrid" width="60%" height="100%">
+ <!-- Specify the columns to ensure that their order is correct. -->
+ <mx:columns>
+ <mx:DataGridColumn dataField="Index" />
+ <mx:DataGridColumn dataField="Qty" />
+ </mx:columns>
+ </mx:PrintDataGrid>
+
+ <!-- Create a FormPrintFooter control and set its prodTotal variable. -->
+ <FormPrintFooter id="footer" pTotal="{prodTotal}" />
+
+</mx:VBox>
\ No newline at end of file