http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.html new file mode 100644 index 0000000..78b450c --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.mxml.html new file mode 100644 index 0000000..c9c5f35 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample2.mxml.html @@ -0,0 +1,40 @@ + + + + + + +sample2.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
+    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0">
+        
+    <!-- Handling Events - Inline Block -->
+    
+    <mx:Button id="b" label="click me once">
+        <mx:click>
+        b.enabled = false;
+        mx.controls.Alert.show('clicked!');
+        </mx:click>
+    </mx:Button>
+    
+</mx:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.html new file mode 100644 index 0000000..686fd7a --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.mxml.html new file mode 100644 index 0000000..18f210c --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample3.mxml.html @@ -0,0 +1,43 @@ + + + + + + +sample3.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
+    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0">
+        
+    <!-- Handling Events - Function -->
+    
+    <mx:Script>
+    private function handleClick(event:MouseEvent):void
+    {
+        b.enabled = false;
+        mx.controls.Alert.show('clicked!');
+    }
+    </mx:Script>
+    
+    <mx:Button id="b" label="click me once" click="handleClick(event)"/>
+    
+</mx:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.html new file mode 100644 index 0000000..38f0775 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.mxml.html new file mode 100644 index 0000000..6bedd12 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample4.mxml.html @@ -0,0 +1,47 @@ + + + + + + +sample4.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
+    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0">
+        
+    <!-- Handling Events - Function with addEventListener -->
+    
+    <mx:Script>
+    private function handleClick(event:MouseEvent):void
+    {
+        b.enabled = false;
+        mx.controls.Alert.show('clicked!');
+    }
+    </mx:Script>
+    
+    <mx:Button id="b" label="click me once">
+        <mx:creationComplete>
+        b.addEventListener(MouseEvent.CLICK, handleClick);
+        </mx:creationComplete>
+    </mx:Button>
+    
+</mx:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.html new file mode 100644 index 0000000..d43f681 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.mxml.html new file mode 100644 index 0000000..b10eb16 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample5.mxml.html @@ -0,0 +1,42 @@ + + + + + + +sample5.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle" xmlns="*"
+    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0">
+
+    
+    <!-- Dispatching an Event -->
+    
+    <mx:Script>
+    import mx.controls.Alert;
+    </mx:Script>
+    
+    <FiveSecondTrigger triggered="Alert.show('five second event triggered')"/>
+    
+    <mx:Label text="wait 5 seconds" color="white"/>
+    
+</mx:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.html new file mode 100644 index 0000000..28dd4b5 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.mxml.html new file mode 100644 index 0000000..07a3068 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/final-sample/sample6.mxml.html @@ -0,0 +1,41 @@ + + + + + + +sample6.mxml + + + +
<?xml version="1.0" encoding="utf-8"?>
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
+    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">
+        
+    <!-- Dispatching a Custom Event -->
+    
+    <mx:initialize>
+    addEventListener(MyEvent.TRIGGERED, function(event:MyEvent):void {
+       mx.controls.Alert.show('event handled!'); 
+    });
+    </mx:initialize>
+    
+    <mx:Button label="fire the event!" click="dispatchEvent(new MyEvent(MyEvent.TRIGGERED))"/>
+    
+</mx:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample1.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample1.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample1.mxml.html new file mode 100644 index 0000000..13d8463 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample1.mxml.html @@ -0,0 +1,61 @@ + + + + + + +sample1.mxml + + + +
<?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" 
+               skinClass="TDFGradientBackgroundSkin" 
+               viewSourceURL="srcview/index.html">
+    
+    <fx:Script>
+        <![CDATA[
+            import mx.controls.Alert;
+        ]]>
+    </fx:Script>
+    
+    <s:layout>
+        <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+    </s:layout>
+    
+    <s:Panel title="Handling Events - Inline property Sample"
+             width="600" height="100%"
+             color="0x000000" 
+             borderAlpha="0.15">
+        
+        <s:layout>
+            <s:VerticalLayout horizontalAlign="center" 
+                              paddingLeft="10" paddingRight="10" 
+                              paddingTop="10" paddingBottom="10"/>
+        </s:layout>
+        
+        <!-- Handling Events - Inline Property -->
+        
+        <s:Button label="click me" click="Alert.show('clicked!')"/>    
+        
+    </s:Panel>
+    
+</s:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample2.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample2.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample2.mxml.html new file mode 100644 index 0000000..6d21a4b --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample2.mxml.html @@ -0,0 +1,65 @@ + + + + + + +sample2.mxml + + + +
<?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" 
+               skinClass="TDFGradientBackgroundSkin" 
+               viewSourceURL="srcview/index.html">
+    
+    <fx:Script>
+        <![CDATA[
+            import mx.controls.Alert;
+        ]]>
+    </fx:Script>
+    
+    <s:layout>
+        <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+    </s:layout>
+    
+    <s:Panel title="Handling Events - Inline Block Sample"
+             width="600" height="100%"
+             color="0x000000" 
+             borderAlpha="0.15">
+        
+        <s:layout>
+            <s:VerticalLayout horizontalAlign="center" 
+                              paddingLeft="10" paddingRight="10" 
+                              paddingTop="10" paddingBottom="10"/>
+        </s:layout>
+        
+        <!-- Handling Events - Inline Block -->
+        
+        <s:Button id="b" label="click me once">
+            <s:click>
+                b.enabled = false;
+                mx.controls.Alert.show('clicked!');
+            </s:click>
+        </s:Button>
+    </s:Panel>
+    
+</s:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample3.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample3.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample3.mxml.html new file mode 100644 index 0000000..d27e174 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample3.mxml.html @@ -0,0 +1,66 @@ + + + + + + +sample3.mxml + + + +
<?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" 
+               skinClass="TDFGradientBackgroundSkin" 
+               viewSourceURL="srcview/index.html">
+    
+    <fx:Script>
+        <![CDATA[
+            import mx.controls.Alert;
+            
+            private function handleClick(event:MouseEvent):void
+            {
+                b.enabled = false;
+                mx.controls.Alert.show('clicked!');
+            }
+        ]]>
+    </fx:Script>
+    
+    <s:layout>
+        <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+    </s:layout>
+    
+    <s:Panel title="Handling Events - Function Sample"
+             width="600" height="100%"
+             color="0x000000" 
+             borderAlpha="0.15">
+        
+        <s:layout>
+            <s:VerticalLayout horizontalAlign="center" 
+                              paddingLeft="10" paddingRight="10" 
+                              paddingTop="10" paddingBottom="10"/>
+        </s:layout>
+        
+        <!-- Handling Events - Function -->
+        
+        <s:Button id="b" label="click me once" click="handleClick(event)"/>
+    </s:Panel>
+    
+</s:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample4.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample4.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample4.mxml.html new file mode 100644 index 0000000..43902c6 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample4.mxml.html @@ -0,0 +1,72 @@ + + + + + + +sample4.mxml + + + +
<?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" 
+               skinClass="TDFGradientBackgroundSkin" 
+               viewSourceURL="srcview/index.html">
+    
+    <fx:Script>
+        <![CDATA[
+            import mx.controls.Alert;
+            
+            private function handleClick(event:MouseEvent):void
+            {
+                b.enabled = false;
+                mx.controls.Alert.show('clicked!');
+            }
+        ]]>
+    </fx:Script>
+    
+    <s:layout>
+        <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+    </s:layout>
+    
+    <s:Panel title="Handling Events - Function with addEventListener Sample"
+             width="600" height="100%"
+             color="0x000000" 
+             borderAlpha="0.15">
+        
+        <s:layout>
+            <s:VerticalLayout horizontalAlign="center" 
+                              paddingLeft="10" paddingRight="10" 
+                              paddingTop="10" paddingBottom="10"/>
+        </s:layout>
+        
+        
+        <!-- Handling Events - Function with addEventListener -->
+        
+        <s:Button id="b" label="click me once">
+            <s:creationComplete>
+                b.addEventListener(MouseEvent.CLICK, handleClick);
+            </s:creationComplete>
+        </s:Button>
+        
+    </s:Panel>
+    
+</s:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample5.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample5.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample5.mxml.html new file mode 100644 index 0000000..01a967e --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample5.mxml.html @@ -0,0 +1,66 @@ + + + + + + +sample5.mxml + + + +
<?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" 
+               xmlns:local="*"
+               skinClass="TDFGradientBackgroundSkin" 
+               viewSourceURL="srcview/index.html">
+    
+    <fx:Script>
+        <![CDATA[
+            import mx.controls.Alert;
+        ]]>
+    </fx:Script>
+    
+    <s:layout>
+        <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+    </s:layout>
+    
+    <fx:Declarations>
+        
+        <!-- Dispatching an Event -->
+        <local:FiveSecondTrigger triggered="Alert.show('five second event triggered')"/>
+    </fx:Declarations>
+    
+    <s:Panel title="Dispatching Events Sample"
+             width="600" height="100%"
+             color="0x000000" 
+             borderAlpha="0.15">
+        
+        <s:layout>
+            <s:VerticalLayout horizontalAlign="center" 
+                              paddingLeft="10" paddingRight="10" 
+                              paddingTop="10" paddingBottom="10"/>
+        </s:layout>
+        
+        <s:Label text="wait 5 seconds" color="0x000000"/>
+        
+    </s:Panel>
+    
+</s:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample6.mxml.html ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample6.mxml.html b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample6.mxml.html new file mode 100644 index 0000000..eae5f66 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/source/sample6.mxml.html @@ -0,0 +1,67 @@ + + + + + + +sample6.mxml + + + +
<?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" 
+               skinClass="TDFGradientBackgroundSkin" 
+               viewSourceURL="srcview/index.html">
+    
+    <fx:Script>
+        <![CDATA[
+            import mx.controls.Alert;
+        ]]>
+    </fx:Script>
+    
+    <s:layout>
+        <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
+    </s:layout>
+    
+    <s:Panel title="Dispatching Custom Events Sample"
+             width="600" height="100%"
+             color="0x000000" 
+             borderAlpha="0.15">
+        
+        <s:layout>
+            <s:VerticalLayout horizontalAlign="center" 
+                              paddingLeft="10" paddingRight="10" 
+                              paddingTop="10" paddingBottom="10"/>
+        </s:layout>
+        
+        <!-- Dispatching a Custom Event -->
+        
+        <s:initialize>
+            addEventListener(MyEvent.TRIGGERED, function(event:MyEvent):void {
+                mx.controls.Alert.show('event handled!'); 
+            });
+        </s:initialize>
+        
+        <s:Button label="fire the event!" click="dispatchEvent(new MyEvent(MyEvent.TRIGGERED))"/>
+        
+    </s:Panel>
+    
+</s:Application>
+ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/FiveSecondTrigger.as ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/FiveSecondTrigger.as b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/FiveSecondTrigger.as new file mode 100644 index 0000000..7c562d4 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/FiveSecondTrigger.as @@ -0,0 +1,44 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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. +// +//////////////////////////////////////////////////////////////////////////////// +package +{ + import flash.events.Event; + import flash.events.EventDispatcher; + import flash.events.TimerEvent; + import flash.utils.Timer; + + [Event(name="triggered")] + + public class FiveSecondTrigger extends EventDispatcher + { + public function FiveSecondTrigger() + { + var t:Timer = new Timer(5000, 1); + t.addEventListener(TimerEvent.TIMER, handleTimer); + t.start(); + } + + private function handleTimer(event:TimerEvent):void + { + var e:Event = new Event("triggered"); + dispatchEvent(e); + } + + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/MyEvent.as ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/MyEvent.as b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/MyEvent.as new file mode 100644 index 0000000..28b176c --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/MyEvent.as @@ -0,0 +1,33 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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. +// +//////////////////////////////////////////////////////////////////////////////// +package +{ + import mx.events.FlexEvent; + + public class MyEvent extends FlexEvent + { + public static const TRIGGERED:String = "triggered"; + + public function MyEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) + { + super(type, bubbles, cancelable); + } + + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/TDFGradientBackgroundSkin.mxml ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/TDFGradientBackgroundSkin.mxml b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/TDFGradientBackgroundSkin.mxml new file mode 100644 index 0000000..553aee3 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/TDFGradientBackgroundSkin.mxml @@ -0,0 +1,49 @@ + + + + + + [HostComponent("spark.components.Application")] + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample1.mxml ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample1.mxml b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample1.mxml new file mode 100644 index 0000000..b1b5403 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample1.mxml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d43c133c/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample2.mxml ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample2.mxml b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample2.mxml new file mode 100644 index 0000000..5448411 --- /dev/null +++ b/TourDeFlex/TourDeFlex_content/flex4.0/Sample-Adobe-Events/srcview/src/sample2.mxml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + b.enabled = false; + mx.controls.Alert.show('clicked!'); + + + + + \ No newline at end of file