You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ti...@apache.org on 2012/05/31 12:45:10 UTC

svn commit: r1344644 - in /incubator/flex/whiteboard/tink/activity/examples/src: ./ ActivityIndicatorWithRotatorExample.mxml

Author: tink
Date: Thu May 31 10:45:10 2012
New Revision: 1344644

URL: http://svn.apache.org/viewvc?rev=1344644&view=rev
Log:
Example of ActivityIndicator using a Rotator in it's skin.

Added:
    incubator/flex/whiteboard/tink/activity/examples/src/
    incubator/flex/whiteboard/tink/activity/examples/src/ActivityIndicatorWithRotatorExample.mxml

Added: incubator/flex/whiteboard/tink/activity/examples/src/ActivityIndicatorWithRotatorExample.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/tink/activity/examples/src/ActivityIndicatorWithRotatorExample.mxml?rev=1344644&view=auto
==============================================================================
--- incubator/flex/whiteboard/tink/activity/examples/src/ActivityIndicatorWithRotatorExample.mxml (added)
+++ incubator/flex/whiteboard/tink/activity/examples/src/ActivityIndicatorWithRotatorExample.mxml Thu May 31 10:45:10 2012
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   minWidth="955" minHeight="600" xmlns:ns="library://ns.tink.ws/flex/spark">
+	
+	<fx:Script>
+		<![CDATA[
+			
+			protected function toggleButton_changeHandler(event:Event):void
+			{
+				if( toggleButton.selected )
+				{
+					activityIndicator.play();
+				}
+				else
+				{
+					activityIndicator.stop();
+				}
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	
+	<s:layout>
+		<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
+	</s:layout>
+	
+	<ns:ActivityIndicator id="activityIndicator" autoAnimate="false"/>
+	
+	<s:ToggleButton id="toggleButton"
+					label="{toggleButton.selected?'Stop':'Start'}"
+					change="toggleButton_changeHandler(event)"/>
+	
+</s:Application>