diff --git a/src/org/gestouch/examples/views/TapGestureView.mxml b/src/org/gestouch/examples/views/TapGestureView.mxml
index 1bef0e3..6955c7a 100644
--- a/src/org/gestouch/examples/views/TapGestureView.mxml
+++ b/src/org/gestouch/examples/views/TapGestureView.mxml
@@ -5,6 +5,7 @@
xmlns:views="org.gestouch.examples.views.*"
xmlns:controls="org.gestouch.examples.controls.*"
xmlns:containers="org.gestouch.examples.containers.*"
+ xmlns:gestures="org.gestouch.gestures.*"
>
@@ -13,100 +14,12 @@
import com.greensock.plugins.GlowFilterPlugin;
import com.greensock.plugins.TweenPlugin;
- import org.gestouch.events.TapGestureEvent;
- import org.gestouch.gestures.TapGesture;
-
-
- private var tapGesture:TapGesture;
-
override protected function init():void
{
super.init();
- TweenPlugin.activate([GlowFilterPlugin]);
- }
-
-
- override protected function onViewActivate():void
- {
- super.onViewActivate();
-
- tapGesture = new TapGesture(button);
- tapGesture.addEventListener(TapGestureEvent.GESTURE_TAP, onGesture);
-
- slopSlider.value = tapGesture.slop;
- touchesSlider.value = tapGesture.numTouchesRequired;
- tapsSlider.value = tapGesture.numTapsRequired;
- maxTapDelaySlider.value = tapGesture.maxTapDelay;
- maxTapDurationSlider.value = tapGesture.maxTapDuration;
- }
-
-
- override protected function onViewDeactivate():void
- {
- super.onViewDeactivate();
-
- if (tapGesture)
- {
- tapGesture.removeEventListener(TapGestureEvent.GESTURE_TAP, onGesture);
- tapGesture.dispose();
- tapGesture = null;
- }
- }
-
-
- private function onGesture(event:TapGestureEvent):void
- {
- TweenMax.fromTo(button, 1,
- {glowFilter: {color: 0xCCCCCC * Math.random(), blurX: 64, blurY: 64, strength: 3, alpha: 1, quality: 1}},
- {glowFilter: {alpha: 0, remove: true}}
- );
- }
-
-
- private function onSlopSliderChange(event:Event = null):void
- {
- if (tapGesture)
- {
- tapGesture.slop = slopSlider.value;
- }
- }
-
-
- private function onTouchesSliderChange(event:Event = null):void
- {
- if (tapGesture)
- {
- tapGesture.numTouchesRequired = touchesSlider.value;
- }
- }
-
-
- private function onTapsSliderChange(event:Event = null):void
- {
- if (tapGesture)
- {
- tapGesture.numTapsRequired = tapsSlider.value;
- }
- }
-
-
- private function onMaxTapDelaySliderChange(event:Event = null):void
- {
- if (tapGesture)
- {
- tapGesture.maxTapDelay = maxTapDelaySlider.value;
- }
- }
-
-
- private function onMaxTapDurationSliderChange(event:Event = null):void
- {
- if (tapGesture)
- {
- tapGesture.maxTapDuration = maxTapDurationSlider.value;
- }
+ TweenPlugin.activate([GlowFilterPlugin]);
}
]]>
@@ -117,29 +30,48 @@
+ minimum="0" maximum="100" stepSize="1" dataTipPrecision="0"
+ value="@{tap.slop}"
+ />
+ value="@{tap.numTouchesRequired}"
+ />
+ value="@{tap.numTapsRequired}"
+ />
+ value="@{tap.maxTapDelay}"
+ />
+ value="@{tap.maxTapDuration}"
+ />
+
+
+
+
\ No newline at end of file