@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;
}
1)
{
this.dispatcher.dispatchEvent(new Event("selectionComplete"));
}
}
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 SeekEffectTarget(effect:Effect, duration:int, startDelay:int, repeatCount:int, repeatDelay:int, seekTo:Number):void
{
effect.resume();
effect.stop();
timer.stop();
this.lbl_TimerComplete.setStyle("color", "0x000000");
this.currentEffect = effect;
effect.target = this.GetTarget();
effect.duration = duration;
effect.startDelay = startDelay;
effect.repeatCount = repeatCount;
effect.repeatDelay = repeatDelay;
effect.playheadTime = seekTo;
timer.start();
}
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");
}
]]>