I have a simple <mx:Text> that is being populated by a "push" from a
ColdFusion query object.  My end goal is to have the text fade in
(using the showEffect and hideEffect) when users click on a navigation
item.  Also, when users click on a different navigation item, I would
like to have the current text fade out, load the new query object, and
then fade back in.

Currently, I can get it to fade in with no problem.  However, when I
try to finish the next two steps, the following occurs:  Before the
text starts fading, the new query object is loaded, even though I call
the "fade" function before the function that loads the query result. 
Also, after it fades, the new text never fades back in.

Below is my code.  Please be gentle, as I am completely new to Flex
and actionscripting.  Also, I know that everyone like me is busy with
their own things.  But if you could provide a brief explanation to any
solutions, I would be extremely grateful.

// Rules for showEffect and hideEffect
<mx:Fade id="fadeIn" duration="1000" alphaFrom="0.0" alphaTo="1.0">
<mx:Fade id="fadeOut" duration="500" alphaFrom="1.0" alphaTo="0.0">

public function reveal() {
     bodyHeader.visible = true;
     bodyText.visible = true;
}

public function conceal() {
     bodyHeader.visible = false;
     bodyText.visible = false;
}

public function loadAbout() {
     aboutContent.getAbout();  // Call to ColdFusion
     bodyHeader.text = "ABOUT ME"; // Push header
     reveal();
}

public function loadMission() {
     conceal();  // Fade out previous message
     missionContent.getMission();  // Call to ColdFusion
     bodyHeader.text = "MY MISSION"; // Push header
     reveal();  // Fade in new message
}

Reply via email to