I asked about this over in the forum a couple of days ago and refreshed
the post to re-add it to the first page, but no one has an answer.
What is happening is when the user clicks a button on the input form it
is replaced with a result form. This is done by switching states and
works. What I want to happen is the input form fade out and the result
form fade in.
I have tried several things with this being the latest (going against a
textarea) - transition:
<s:transitions>
<s:Transition fromState="Input" toState="*">
<s:Fade
target="fsPageTitle" duration="2000"
alphaFrom="1" alphaTo="0"/>
</s:Transition>
<s:Transition fromState="Results" toState="*">
<s:Fade
target="fsPageTitle" duration="2000"
alphaFrom="1" alphaTo="0"/>
</s:Transition>
</s:transitions>
Here are the parts I want to fade in/out:
<s:BorderContainer
id="inputFormBC"
width="100%"
includeIn="Input"
backgroundColor="#DEDACF"
chromeColor="#DEDACF"
borderVisible="false">
<s:Group
horizontalCenter="0"
width="100%">
<DHSComp:InputForm
id="inputForm"
width="100%" />
</s:Group>
</s:BorderContainer>
<s:BorderContainer
id="resultFormBC"
width="100%"
includeIn="Results"
backgroundColor="#DEDACF"
chromeColor="#DEDACF"
borderVisible="false" >
<s:Group
horizontalCenter="0"
width="100%">
<DHSComp:ResultForm
id="resultForm"
width="100%" />
</s:Group>
</s:BorderContainer>
I've tried using the BorderContainer or the component. I've tried going
against a control just to see if something simple works:
<s:TextArea
id="fsPageTitle"
alpha="1"
text="{pageTopText.pageTitleText}"
styleName="pageTitle"
width="60%" height="25"
textAlign="center"
tabIndex="10"
contentBackgroundColor="#dedacf"
horizontalCenter="0"
fontSize="16"
top="0"
borderVisible="false"
verticalAlign="middle"/>
In this last test, I got this error:
Error: Property alpha is not a property or a style on object
fsPageTitle: TypeError: Error #1006: value is not a function..
at
spark.effects.supportClasses::AnimateInstance/setupStyleMapEntry()[E:\de
v\4.x\frameworks\projects\spark\src\spark\effects\supportClasses\Animate
Instance.as:994]
at
spark.effects.supportClasses::AnimateInstance/setValue()[E:\dev\4.x\fram
eworks\projects\spark\src\spark\effects\supportClasses\AnimateInstance.a
s:1009]
at
spark.effects.supportClasses::AnimateInstance/applyValues()[E:\dev\4.x\f
rameworks\projects\spark\src\spark\effects\supportClasses\AnimateInstanc
e.as:510]
at
spark.effects.supportClasses::AnimateInstance/animationUpdate()[E:\dev\4
.x\frameworks\projects\spark\src\spark\effects\supportClasses\AnimateIns
tance.as:669]
at
spark.effects.animation::Animation/sendUpdateEvent()[E:\dev\4.x\framewor
ks\projects\spark\src\spark\effects\animation\Animation.as:811]
at
spark.effects.animation::Animation/start()[E:\dev\4.x\frameworks\project
s\spark\src\spark\effects\animation\Animation.as:1304]
at
spark.effects.animation::Animation/play()[E:\dev\4.x\frameworks\projects
\spark\src\spark\effects\animation\Animation.as:1011]
at
spark.effects.supportClasses::AnimateInstance/play()[E:\dev\4.x\framewor
ks\projects\spark\src\spark\effects\supportClasses\AnimateInstance.as:49
1]
at
spark.effects.supportClasses::FadeInstance/play()[E:\dev\4.x\frameworks\
projects\spark\src\spark\effects\supportClasses\FadeInstance.as:174]
at
spark.effects.supportClasses::AnimateInstance/startEffect()[E:\dev\4.x\f
rameworks\projects\spark\src\spark\effects\supportClasses\AnimateInstanc
e.as:422]
at
mx.effects::Effect/play()[E:\dev\4.x\frameworks\projects\framework\src\m
x\effects\Effect.as:1214]
at
mx.core::UIComponent/commitCurrentState()[E:\dev\4.x\frameworks\projects
\framework\src\mx\core\UIComponent.as:10088]
at
mx.core::UIComponent/setCurrentState()[E:\dev\4.x\frameworks\projects\fr
amework\src\mx\core\UIComponent.as:9961]
at
components::InputForm/swapToResultsState()[C:\FSCalc\Flex\FSCalc\src\scr
ipts\FSUtil.as:71]
at
components::InputForm/doItToIt()[C:\FSCalc\Flex\FSCalc\src\components\In
putForm.mxml:216]
at
components::InputForm/__calculateButton_click()[C:\FSCalc\Flex\FSCalc\sr
c\components\InputForm.mxml:633]
633 is a button on the inputForm.
216 is in the button function.
71 sets the state.