Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
Affected OS(s): Windows
Affected OS(s):
Browser: Firefox 3.x
Language Found: English
Description
Steps to reproduce:
1. Compile and run the following code:
<?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/halo"
currentState="state1" >
<fx:Script>
<![CDATA[
protected function clickHandler():void
]]
>
</fx:Script>
<s:states>
<s:State name="state1" />
<s:State name="state2" />
</s:states>
<s:transitions>
<s:Transition fromState="" toState="">
<s:AnimateColor duration="1000" target="
</s:Transition>
</s:transitions>
<!-- ***************** workaround ******************* -->
<!--<s:transitions>
<s:Transition fromState="state1" toState="state2">
<s:AnimateColor duration="1000" target="{myButton}
" colorPropertyName="baseColor" colorFrom="haloblue" colorTo="red"/>
</s:Transition>
<s:Transition fromState="state2" toState="state1">
<s:AnimateColor duration="1000" target="
" colorPropertyName="baseColor" colorFrom="red" colorTo="haloblue"/>
</s:Transition>
</s:transitions>-->
<s:Button id="myButton" width="200" height="200" verticalCenter="0" horizontalCenter="0"
label="click me"
baseColor.state1="haloblue" baseColor.state2="red"
click="clickHandler()"/>
</s:Application>
2. click the button to observe the color changes on the Button::baseColor property as it cycles between two states (state1 and state2)
Actual Results: The baseColor between the haloblue and red is not animated
Expected Results: the colors should animate
Workaround (if any): the colorFrom and colorTo properties must be manually set – the animateColor object is unable to pick up the declared color states on the target object (though it picks up the target color properties just fine when colorPropertyName is not need). To see the workaround uncomment/comment code as needed in the code given.