Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Later
-
Adobe Flex SDK 4.5 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. Run the app below
2. Click the Toggle State button: observe the smooth crossfade of the button at the bottom
3. Repeat step 2: observe the smooth crossfade back to the initial state
4. Select the "startDelay" checkbox
5. Click the ToggleState button again
Actual Results:
The button immediately jumps to state s2 (the label switches case) and holds it during the startDelay period. Then the animation starts: the button switches back to the previous state and animates from there back to its s2 value for the label.
Expected Results:
the button should hold the current state value until the animation starts
Workaround (if any):
Don't use startDelay on AnimateTransitionShader effects (including Wipe and CrossFade)
<?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">
<fx:Declarations>
<s:Power id="easeIn" exponent="4" easeInFraction="1"/>
<s:Sine id="defaultEase" easeInFraction=".5"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
private const STARTDELAY:Number = 1000;
]]
>
</fx:Script>
<s:states>
<s:State name="s1"/>
<s:State name="s2"/>
</s:states>
<s:transitions>
<s:Transition autoReverse="false">
<s:Parallel duration="1000">
<s:CrossFade target="
" startDelay="
{startDelayCB.selected ? STARTDELAY : 0}"
easer="
"/>
</s:Parallel>
</s:Transition>
</s:transitions>
<s:HGroup>
<s:Button id="button" label="Toggle State"
click="currentState = (currentState == 's1') ? 's2' : 's1'"/>
<s:CheckBox id="startDelayCB" label="startDelay"/>
<s:CheckBox id="accelerateCB" label="accelerate"/>
</s:HGroup>
<s:Button id="b10" label="CROSSFADE" y="225" label.s2="crossfade" width="100"/>
</s:Application>