| <?xml version="1.0" encoding="utf-8"?> |
| <mx:Application |
| xmlns:fx="http://ns.adobe.com/mxml/2009" |
| xmlns:mx="library://ns.adobe.com/flex/mx" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:assets="assets.*" |
| width="1200" height="600" |
| backgroundColor="0xFFFFFF" backgroundGradientColors="[0xFFFFFF, 0xFFFFFF]" |
| creationComplete="Reset()"> |
| |
| <fx:Style> |
| @namespace s "library://ns.adobe.com/flex/spark"; |
| @namespace mx "library://ns.adobe.com/flex/mx"; |
| @font-face |
| { |
| src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf"); |
| fontFamily: EmbeddedVerdana; |
| embedAsCFF: false; |
| } |
| |
| @font-face |
| { |
| src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf"); |
| fontWeight: bold; |
| fontFamily: EmbeddedVerdana; |
| embedAsCFF: false; |
| } |
| |
| @font-face |
| { |
| src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf"); |
| fontStyle: italic; |
| fontFamily: EmbeddedVerdana; |
| embedAsCFF: false; |
| } |
| |
| global |
| { |
| fontFamily: EmbeddedVerdana; |
| fontAntiAliasType: normal; |
| } |
| </fx:Style> |
| |
| <fx:Script> |
| <![CDATA[ |
| import assets.ObjectTabs; |
| import mx.effects.Effect; |
| import mx.events.EffectEvent; |
| import mx.events.TweenEvent; |
| import mx.containers.Canvas; |
| import mx.containers.TabNavigator; |
| import flash.events.TimerEvent; |
| import mx.controls.Alert; |
| import mx.events.StateChangeEvent; |
| |
| //Privies |
| public var currentTabNavigator:TabNavigator; |
| public var currentAccordion:Accordion; |
| public var currentCanvas:Canvas; |
| public var currentEffect:Effect; |
| public var timer:Timer = new Timer(500, 1); |
| |
| |
| |
| |
| private function ResetEffectAndGauges(effect:Effect):void |
| { |
| if(effect.hasEventListener(EffectEvent.EFFECT_START)) |
| effect.removeEventListener(EffectEvent.EFFECT_START, this.HandleEffectStart); |
| |
| if(effect.hasEventListener(TweenEvent.TWEEN_START)) |
| effect.removeEventListener(TweenEvent.TWEEN_START, this.HandleTweenStart); |
| |
| if(effect.hasEventListener(TweenEvent.TWEEN_UPDATE)) |
| effect.removeEventListener(TweenEvent.TWEEN_UPDATE, this.HandleTweenUpdate); |
| |
| if(effect.hasEventListener(TweenEvent.TWEEN_END)) |
| effect.removeEventListener(TweenEvent.TWEEN_END, this.HandleTweenEnd); |
| |
| if(effect.hasEventListener(EffectEvent.EFFECT_END)) |
| effect.removeEventListener(EffectEvent.EFFECT_END, this.HandleEffectEnd); |
| |
| |
| //Reattach listeners |
| effect.addEventListener(EffectEvent.EFFECT_START, HandleEffectStart); |
| |
| effect.addEventListener(TweenEvent.TWEEN_START, HandleTweenStart); |
| effect.addEventListener(TweenEvent.TWEEN_UPDATE, HandleTweenUpdate); |
| effect.addEventListener(TweenEvent.TWEEN_END, HandleTweenEnd); |
| |
| effect.addEventListener(EffectEvent.EFFECT_END, HandleEffectEnd); |
| |
| //Reset labels |
| this.ResetEventLabels(); |
| } |
| |
| private function HandleEffectStart(event:EffectEvent):void |
| { |
| this.lbl_EffectStart.setStyle("color", "0x00FF00"); |
| } |
| |
| private function HandleTweenStart(event:TweenEvent):void |
| { |
| this.lbl_TweenStart.setStyle("color", "0x00FF00"); |
| } |
| |
| private function HandleTweenUpdate(event:TweenEvent):void |
| { |
| this.lbl_TweenUpdate.setStyle("color", "0x00FF00"); |
| } |
| |
| private function HandleTweenEnd(event:TweenEvent):void |
| { |
| this.lbl_TweenEnd.setStyle("color", "0x00FF00"); |
| } |
| |
| private function HandleEffectEnd(event:EffectEvent):void |
| { |
| this.lbl_EffectEnd.setStyle("color", "0x00FF00"); |
| } |
| |
| //Init and reset |
| public function Reset():void |
| { |
| //Remove the object tab |
| if(this.mainBox.getChildren().length == 3) |
| { |
| this.mainBox.removeChildAt(2); |
| } |
| |
| this.currentTabNavigator = new ObjectTabs(); |
| this.currentTabNavigator.addEventListener("updateComplete", this.HandleTabUpdate); |
| |
| //Reset labels |
| this.ResetEventLabels(); |
| |
| //Readd a new one |
| this.mainBox.addChildAt(this.currentTabNavigator, 2); |
| } |
| |
| private function HandleTabUpdate(event:Event):void |
| { |
| this.dispatchEvent(new Event("tabUpdate", true)); |
| } |
| |
| private function ResetEventLabels():void |
| { |
| //Reset styles |
| this.lbl_EffectStart.setStyle("color", "0x00000"); |
| this.lbl_TweenStart.setStyle("color", "0x00000"); |
| this.lbl_TweenUpdate.setStyle("color", "0x00000"); |
| this.lbl_TweenEnd.setStyle("color", "0x00000"); |
| this.lbl_AnimationStart.setStyle("color", "0x00000"); |
| this.lbl_AnimationUpdate.setStyle("color", "0x00000"); |
| this.lbl_AnimationRepeat.setStyle("color", "0x00000"); |
| this.lbl_AnimationEnd.setStyle("color", "0x00000"); |
| this.lbl_EffectEnd.setStyle("color", "0x00000"); |
| } |
| |
| public function SelectCanvas(controlName:String):void |
| { |
| if(this.currentTabNavigator) |
| { |
| var accordions:Array = this.currentTabNavigator.getChildren(); |
| |
| for(var i:int = 0; i < accordions.length; i++) |
| { |
| var canvases:Array = (accordions[i] as Accordion).getChildren(); |
| |
| for(var j:int = 0; j < canvases.length; j++) |
| { |
| if(canvases[j].label == controlName) |
| { |
| this.currentTabNavigator.selectedIndex = i; |
| accordions[i].selectedIndex = j; |
| this.currentAccordion = accordions[i]; |
| this.currentCanvas = accordions[i].getChildAt(j) as Canvas; |
| } |
| } |
| } |
| } |
| |
| this.currentTabNavigator.dispatchEvent(new Event("selectEvent", true, false)); |
| } |
| |
| private function GetTarget():Object |
| { |
| if(this.currentTabNavigator) |
| { |
| var accord:Accordion = this.currentTabNavigator.getChildAt(this.currentTabNavigator.selectedIndex) as Accordion; |
| var canvas:mx.containers.Canvas = accord.selectedChild as mx.containers.Canvas; |
| var target:Object = canvas.getChildAt(0); |
| |
| return(target); |
| } |
| |
| return(null); |
| } |
| |
| private function GetTargets():Array |
| { |
| if(this.currentTabNavigator) |
| { |
| var accord:Accordion = this.currentTabNavigator.getChildAt(this.currentTabNavigator.selectedIndex) as Accordion; |
| var canvases:Array = accord.getChildren(); |
| var targets:Array = new Array(); |
| |
| for(var i:int = 0; i < canvases.length; i++) |
| { |
| var canvas:mx.containers.Canvas = canvases[i]; |
| |
| if(canvas) |
| { |
| var target:Object = canvas.getChildAt(0); |
| |
| if(target) |
| { |
| targets.push(target); |
| } |
| } |
| } |
| |
| return(targets); |
| } |
| |
| return(null); |
| } |
| |
| public function PlayEffectTarget(effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, playReversed:Boolean = false):void |
| { |
| effect.resume(); |
| effect.stop(); |
| |
| this.currentEffect = effect; |
| |
| ResetEffectAndGauges(effect); |
| |
| effect.target = this.GetTarget(); |
| effect.duration = duration; |
| effect.startDelay = startDelay; |
| effect.repeatCount = repeatCount; |
| effect.repeatDelay = repeatDelay; |
| effect.play(null, playReversed); |
| } |
| |
| public function PlayEffectTargets(effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int):void |
| { |
| effect.resume(); |
| effect.stop(); |
| |
| this.currentEffect = effect; |
| |
| ResetEffectAndGauges(effect); |
| |
| effect.targets = this.GetTargets(); |
| effect.duration = duration; |
| effect.startDelay = startDelay; |
| effect.repeatCount = repeatCount; |
| effect.repeatDelay = repeatDelay; |
| effect.play(); |
| } |
| |
| public function SeekEffectTarget(effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, seekTo:Number):void |
| { |
| effect.resume(); |
| effect.stop(); |
| |
| this.currentEffect = effect; |
| |
| effect.target = this.GetTarget(); |
| effect.duration = duration; |
| effect.startDelay = startDelay; |
| effect.repeatCount = repeatCount; |
| effect.repeatDelay = repeatDelay; |
| effect.play(); |
| |
| effect.playheadTime = seekTo; |
| effect.pause(); |
| timer.start(); |
| } |
| |
| public function SeekEffectTargets(effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, seekTo:Number):void |
| { |
| effect.resume(); |
| effect.stop(); |
| |
| this.currentEffect = effect; |
| |
| effect.targets = this.GetTargets(); |
| effect.duration = duration; |
| effect.startDelay = startDelay; |
| effect.repeatCount = repeatCount; |
| effect.repeatDelay = repeatDelay; |
| effect.play(); |
| |
| effect.playheadTime = seekTo; |
| effect.pause(); |
| timer.start(); |
| } |
| |
| public function SeekControl(control:String, effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, seekTo:Number):void |
| { |
| this.SelectCanvas(control); |
| this.SeekEffectTarget(effect, duration, startDelay, repeatCount, repeatDelay, seekTo); |
| } |
| |
| public function SeekControls(control:String, effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, seekTo:Number):void |
| { |
| this.SelectCanvas(control); |
| this.SeekEffectTargets(effect, duration, startDelay, repeatCount, repeatDelay, seekTo); |
| } |
| |
| public function PlayEffectControl(control:String, effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, playReversed:Boolean = false):void |
| { |
| this.SelectCanvas(control); |
| this.PlayEffectTarget(effect, duration, startDelay, repeatCount, repeatDelay, playReversed); |
| } |
| |
| public function PlayEffectControls(control:String, effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int):void |
| { |
| this.SelectCanvas(control); |
| this.PlayEffectTargets(effect, duration, startDelay, repeatCount, repeatDelay); |
| } |
| ]]> |
| </fx:Script> |
| |
| <fx:Declarations> |
| <!-- simple Glow effect --> |
| <mx:Glow id="eff_Glow_AXY" alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| |
| <!-- Glow alpha effects --> |
| <mx:Glow id="eff_Glow_AUp" alphaFrom="0" alphaTo="1" color="0x00FF00"/> |
| <mx:Glow id="eff_Glow_ADown" alphaFrom="1" alphaTo="0" color="0x00FF00"/> |
| |
| <!-- Glow x effects --> |
| <mx:Glow id="eff_Glow_XUp" blurXFrom="0" blurXTo="5" color="0x00FF00"/> |
| <mx:Glow id="eff_Glow_XDown" blurXFrom="5" blurXTo="0" color="0x00FF00"/> |
| |
| <!-- Glow y effects --> |
| <mx:Glow id="eff_Glow_YUp" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Glow id="eff_Glow_YDown" blurYFrom="5" blurYTo="0" color="0x00FF00"/> |
| |
| |
| <!-- Simple parallels --> |
| <mx:Parallel id="p_Glow_AXY"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_AUp"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_ADown"> |
| <mx:Glow alphaFrom="1" alphaTo="0" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_XUp"> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_XDown"> |
| <mx:Glow blurXFrom="5" blurXTo="0" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_YUp"> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_YDown"> |
| <mx:Glow blurYFrom="5" blurYTo="0" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <!-- Complex parallel --> |
| <mx:Parallel id="p_Glow_AXYUp"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00"/> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00"/> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_AXYDown"> |
| <mx:Glow alphaFrom="1" alphaTo="0" color="0x00FF00"/> |
| <mx:Glow blurXFrom="5" blurXTo="0" color="0x00FF00"/> |
| <mx:Glow blurYFrom="5" blurYTo="0" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <!-- Complex parallel with Thermo-Style Delays --> |
| <mx:Parallel id="p_Glow_AXY_Thermo"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00" startDelay="0" duration="500"/> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00" startDelay="500" duration="500"/> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00" startDelay="1000" duration="500"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_AXY_Thermo_Overlap"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00" startDelay="0" duration="1000"/> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00" startDelay="500" duration="1000"/> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00" startDelay="1000" duration="1000"/> |
| </mx:Parallel> |
| |
| <!-- Combo effect parallels to test order of importance--> |
| <mx:Parallel id="p_Blur_Glow"> |
| <mx:Blur blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5"/> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Parallel> |
| |
| <mx:Parallel id="p_Glow_Blur"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Blur blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5"/> |
| </mx:Parallel> |
| |
| |
| <!-- Combo effect parallels with Glow --> |
| <mx:Parallel id="p_Glow_Dissolve"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Dissolve alphaFrom="1" alphaTo=".2"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_Fade"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Fade alphaFrom="1" alphaTo=".3"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_Iris"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Iris showTarget="true"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_MaskEffect"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:MaskEffect scaleXFrom="0" scaleXTo="1" scaleYFrom="0" scaleYTo="1"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_Move"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Move xBy="100"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_Resize"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Resize widthBy="30" heightBy="30"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_WipeDown"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeDown/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_WipeLeft"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeLeft/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_WipeRight"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeRight/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_WipeUp"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeUp/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_Zoom"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Zoom zoomWidthFrom="0" zoomWidthTo="1" zoomHeightFrom="0" zoomHeightTo="1"/> |
| </mx:Parallel> |
| <mx:Parallel id="p_Glow_SetAction"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <s:SetAction property="x" value="200"/> |
| </mx:Parallel> |
| |
| <!-- Simple sequences --> |
| <mx:Sequence id="s_Glow_AXY"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_AUp"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_ADown"> |
| <mx:Glow alphaFrom="1" alphaTo="0" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_XUp"> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_XDown"> |
| <mx:Glow blurXFrom="5" blurXTo="0" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_YUp"> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_YDown"> |
| <mx:Glow blurYFrom="5" blurYTo="0" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <!-- Complex sequence --> |
| <mx:Sequence id="s_Glow_AXYUp"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00"/> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00"/> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_AXYDown"> |
| <mx:Glow alphaFrom="1" alphaTo="0" color="0x00FF00"/> |
| <mx:Glow blurXFrom="5" blurXTo="0" color="0x00FF00"/> |
| <mx:Glow blurYFrom="5" blurYTo="0" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <!-- Complex sequence with Thermo-Style Delays --> |
| <mx:Sequence id="s_Glow_AXY_Thermo"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00" startDelay="0" duration="500"/> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00" startDelay="500" duration="500"/> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00" startDelay="1000" duration="500"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_AXY_Thermo_Overlap"> |
| <mx:Glow alphaFrom="0" alphaTo="1" color="0x00FF00" startDelay="0" duration="1000"/> |
| <mx:Glow blurXFrom="0" blurXTo="5" color="0x00FF00" startDelay="500" duration="1000"/> |
| <mx:Glow blurYFrom="0" blurYTo="5" color="0x00FF00" startDelay="1000" duration="1000"/> |
| </mx:Sequence> |
| |
| <!-- Combo effect sequences to test order of importance--> |
| <mx:Sequence id="s_Blur_Glow"> |
| <mx:Blur blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5"/> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| </mx:Sequence> |
| |
| <mx:Sequence id="s_Glow_Blur"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Blur blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5"/> |
| </mx:Sequence> |
| |
| |
| <!-- Combo effect sequences with Glow --> |
| <mx:Sequence id="s_Glow_Dissolve"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Dissolve alphaFrom="1" alphaTo=".2"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_Fade"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Fade alphaFrom="1" alphaTo=".3"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_Iris"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Iris showTarget="true"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_MaskEffect"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:MaskEffect scaleXFrom="0" scaleXTo="1" scaleYFrom="0" scaleYTo="1"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_Move"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Move xBy="100"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_Resize"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Resize widthBy="30" heightBy="30"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_WipeDown"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeDown/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_WipeLeft"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeLeft/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_WipeRight"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeRight/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_WipeUp"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:WipeUp/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_Zoom"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <mx:Zoom zoomWidthFrom="0" zoomWidthTo="1" zoomHeightFrom="0" zoomHeightTo="1"/> |
| </mx:Sequence> |
| <mx:Sequence id="s_Glow_SetAction"> |
| <mx:Glow alphaFrom="0" alphaTo="1" blurXFrom="0" blurXTo="5" blurYFrom="0" blurYTo="5" color="0x00FF00"/> |
| <s:SetAction property="x" value="200"/> |
| </mx:Sequence> |
| |
| </fx:Declarations> |
| |
| |
| <mx:HBox id="mainBox"> |
| <mx:VBox width="170" height="540" verticalScrollPolicy="off" creationPolicy="all"> |
| <mx:Label width="100%" text="Properties"/> |
| <mx:HRule width="100%"/> |
| <s:Button id="btn_Reset" label="Reset" width="100%" click="Reset()"/> |
| <s:Button id="btn_Pause" label="Pause" width="100%" click="currentEffect.pause()"/> |
| <s:Button id="btn_Resume" label="Resume" width="100%" click="currentEffect.resume()"/> |
| <s:Button id="btn_Stop" label="Stop" width="100%" click="currentEffect.stop()"/> |
| <mx:Spacer/> |
| <mx:Label width="100%" text="Events"/> |
| <mx:HRule width="100%"/> |
| <mx:VBox id="eventBox"> |
| <mx:Label id="lbl_EffectStart" width="100%" text="EffectStart" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_TweenStart" width="100%" text="TweenStart" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_TweenUpdate" width="100%" text="TweenUpdate" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_TweenEnd" width="100%" text="TweenEnd" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_AnimationStart" width="100%" text="AnimationStart" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_AnimationUpdate" width="100%" text="AnimationUpdate" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_AnimationRepeat" width="100%" text="AnimationRepeat" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_AnimationEnd" width="100%" text="AnimationEnd" color="0x000000" fontWeight="bold"/> |
| <mx:Label id="lbl_EffectEnd" width="100%" text="EffectEnd" color="0x000000" fontWeight="bold"/> |
| </mx:VBox> |
| </mx:VBox> |
| <mx:VBox width="250" height="540" verticalScrollPolicy="off" creationPolicy="all"> |
| <mx:Label width="100%" text="Effects"/> |
| <mx:HRule width="100%"/> |
| <mx:Accordion width="100%" height="467" creationPolicy="all" verticalScrollPolicy="off"> |
| |
| <mx:VBox width="100%" height="100%" label="Glow Objects"> |
| <mx:LinkButton label="Button" width="100%" click="SeekControl('Button', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="ButtonBar" width="100%" click="SeekControl('ButtonBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="CheckBox" width="100%" click="SeekControl('CheckBox', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="ColorPicker" width="100%" click="SeekControl('ColorPicker', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="ComboBox" width="100%" click="SeekControl('ComboBox', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="DataGrid" width="100%" click="SeekControl('DataGrid', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="DateChooser" width="100%" click="SeekControl('DateChooser', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="DateField" width="100%" click="SeekControl('DateField', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="HorizontalList" width="100%" click="SeekControl('HorizontalList', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="HRule" width="100%" click="SeekControl('HRule', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="HScrollBar" width="100%" click="SeekControl('HScrollBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="HSlider" width="100%" click="SeekControl('HSlider', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="Image" width="100%" click="SeekControl('Image', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="Label" width="100%" click="SeekControl('Label', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="LinkBar" width="100%" click="SeekControl('LinkBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="LinkButton" width="100%" click="SeekControl('LinkButton', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="List" width="100%" click="SeekControl('List', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="MenuBar" width="100%" click="SeekControl('MenuBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="NumericStepper" width="100%" click="SeekControl('NumericStepper', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="PopUpButton" width="100%" click="SeekControl('PopUpButton', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="PopUpMenuButton" width="100%" click="SeekControl('PopUpMenuButton', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="ProgressBar" width="100%" click="SeekControl('ProgressBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="RadioButton" width="100%" click="SeekControl('RadioButton', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="RichTextEditor" width="100%" click="SeekControl('RichTextEditor', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="TabBar" width="100%" click="SeekControl('TabBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="Text" width="100%" click="SeekControl('Text', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="TextArea" width="100%" click="SeekControl('TextArea', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="TextInput" width="100%" click="SeekControl('TextInput', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="TileList" width="100%" click="SeekControl('TileList', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="ToggleButtonBar" width="100%" click="SeekControl('ToggleButtonBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="Tree" width="100%" click="SeekControl('Tree', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="VRule" width="100%" click="SeekControl('VRule', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="VScrollBar" width="100%" click="SeekControl('VScrollBar', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="VSlider" width="100%" click="SeekControl('VSlider', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| <mx:LinkButton label="Triangle" width="100%" click="SeekControl('Triangle', eff_Glow_AXY, 1000, 0, 1, 0, 500)"/> |
| </mx:VBox> |
| |
| <mx:VBox width="100%" height="100%" label="Glow Functionality"> |
| <mx:LinkButton label="A Up" width="100%" click="PlayEffectControl('Button', eff_Glow_AUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="A Down" width="100%" click="PlayEffectControl('Button', eff_Glow_ADown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="X Up" width="100%" click="PlayEffectControl('Button', eff_Glow_XUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="X Down" width="100%" click="PlayEffectControl('Button', eff_Glow_XDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Y Up" width="100%" click="PlayEffectControl('Button', eff_Glow_YUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Y Down" width="100%" click="PlayEffectControl('Button', eff_Glow_YDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="AXY" width="100%" click="PlayEffectControl('Button', eff_Glow_AXY, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="AXY+SD" width="100%" click="PlayEffectControl('Button', eff_Glow_AXY, 1000, 500, 1, 0)"/> |
| <mx:LinkButton label="AXY+RC+RD" width="100%" click="PlayEffectControl('Button', eff_Glow_AXY, 1000, 0, 2, 500)"/> |
| <mx:LinkButton label="AXY+SD+RC+RD" width="100%" click="PlayEffectControl('Button', eff_Glow_AXY, 1000, 500, 2, 500)"/> |
| <mx:LinkButton label="Play Reversed" width="100%" click="eff_Glow_AXY.play([this.GetTarget()], true)"/> |
| </mx:VBox> |
| |
| <mx:VBox width="100%" height="100%" label="Glow Parallel"> |
| <mx:LinkButton label="Parallel A Up" width="100%" click="PlayEffectControl('Button', p_Glow_AUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel A Down" width="100%" click="PlayEffectControl('Button', p_Glow_ADown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel X Up" width="100%" click="PlayEffectControl('Button', p_Glow_XUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel X Down" width="100%" click="PlayEffectControl('Button', p_Glow_XDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Y Up" width="100%" click="PlayEffectControl('Button', p_Glow_YUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Y Down" width="100%" click="PlayEffectControl('Button', p_Glow_YDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel AXY" width="100%" click="PlayEffectControl('Button', p_Glow_AXY, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel AXY+Thermo" width="100%" click="PlayEffectControl('Button', p_Glow_AXY_Thermo, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel AXY+Thermo Overlap" width="100%" click="PlayEffectControl('Button', p_Glow_AXY_Thermo_Overlap, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Blur+Glow (Order)" width="100%" click="PlayEffectControl('Button', p_Blur_Glow, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Blur" width="100%" click="PlayEffectControl('Button', p_Glow_Blur, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Dissolve" width="100%" click="PlayEffectControl('Button', p_Glow_Dissolve, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Fade" width="100%" click="PlayEffectControl('Button', p_Glow_Fade, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Iris" width="100%" click="PlayEffectControl('Button', p_Glow_Iris, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+MaskEffect" width="100%" click="PlayEffectControl('Button', p_Glow_MaskEffect, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Move" width="100%" click="PlayEffectControl('Button', p_Glow_Move, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Resize" width="100%" click="PlayEffectControl('Button', p_Glow_Resize, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+WipeDown" width="100%" click="PlayEffectControl('Button', p_Glow_WipeDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+WipeLeft" width="100%" click="PlayEffectControl('Button', p_Glow_WipeLeft, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+WipeRight" width="100%" click="PlayEffectControl('Button', p_Glow_WipeRight, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+WipeUp" width="100%" click="PlayEffectControl('Button', p_Glow_WipeUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+Zoom" width="100%" click="PlayEffectControl('Button', p_Glow_Zoom, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel Glow+SetAction" width="100%" click="PlayEffectControl('Button', p_Glow_SetAction, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Parallel AXY Multi Targets" width="100%" click="PlayEffectControls('Button', p_Glow_AXY, 1000, 0, 1, 0)"/> |
| </mx:VBox> |
| |
| <mx:VBox width="100%" height="100%" label="Glow Sequence"> |
| <mx:LinkButton label="Sequence A Up" width="100%" click="PlayEffectControl('Button', s_Glow_AUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence A Down" width="100%" click="PlayEffectControl('Button', s_Glow_ADown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence X Up" width="100%" click="PlayEffectControl('Button', s_Glow_XUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence X Down" width="100%" click="PlayEffectControl('Button', s_Glow_XDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Y Up" width="100%" click="PlayEffectControl('Button', s_Glow_YUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Y Down" width="100%" click="PlayEffectControl('Button', s_Glow_YDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence AXY" width="100%" click="PlayEffectControl('Button', s_Glow_AXY, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence AXY+Thermo" width="100%" click="PlayEffectControl('Button', s_Glow_AXY_Thermo, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence AXY+Thermo Overlap" width="100%" click="PlayEffectControl('Button', s_Glow_AXY_Thermo_Overlap, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Blur+Glow (Order)" width="100%" click="PlayEffectControl('Button', s_Blur_Glow, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Blur" width="100%" click="PlayEffectControl('Button', s_Glow_Blur, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Dissolve" width="100%" click="PlayEffectControl('Button', s_Glow_Dissolve, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Fade" width="100%" click="PlayEffectControl('Button', s_Glow_Fade, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Iris" width="100%" click="PlayEffectControl('Button', s_Glow_Iris, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+MaskEffect" width="100%" click="PlayEffectControl('Button', s_Glow_MaskEffect, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Move" width="100%" click="PlayEffectControl('Button', s_Glow_Move, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Resize" width="100%" click="PlayEffectControl('Button', s_Glow_Resize, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+WipeDown" width="100%" click="PlayEffectControl('Button', s_Glow_WipeDown, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+WipeLeft" width="100%" click="PlayEffectControl('Button', s_Glow_WipeLeft, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+WipeRight" width="100%" click="PlayEffectControl('Button', s_Glow_WipeRight, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+WipeUp" width="100%" click="PlayEffectControl('Button', s_Glow_WipeUp, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+Zoom" width="100%" click="PlayEffectControl('Button', s_Glow_Zoom, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence Glow+SetAction" width="100%" click="PlayEffectControl('Button', s_Glow_SetAction, 1000, 0, 1, 0)"/> |
| <mx:LinkButton label="Sequence AXY Multi Targets" width="100%" click="PlayEffectControls('Button', s_Glow_AXY, 1000, 0, 1, 0)"/> |
| </mx:VBox> |
| |
| </mx:Accordion> |
| </mx:VBox> |
| <assets:ObjectTabs/> |
| </mx:HBox> |
| </mx:Application> |