instead of the showEffect, use creationCompleteEffect.  Show effect will only 
play when the control / container visible property is set to true, which 
doesn't happen on initial load.  I have had this problem before and it seems 
confusing.  Logically, one would think the show effect is the correct effect to 
use, but it really only works when the item is in a TabNavigator, Viewstack, 
Accordian... it's because those set the containers visible property when 
changing from one view to the other, in turn, causing the show effect to play.  
 
Play around with the show effect by putting some containers in a viewstack, 
you'll see the difference.  Also, the creation complete only plays once.  The 
showEffect can play as much as you move around in the viewstack :)

________________________________

From: [email protected] on behalf of dorkie dork from dorktown
Sent: Sat 11/4/2006 10:55 PM
To: [email protected]
Subject: [flexcoders] Cannot get any effects to work



How come this code does not work? It seems straigt forward. I just
want the header to fade in and slide in from the top when the
application first starts. Why does flex hate me? I hope you can help
or else I will be execute.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml 
<http://www.adobe.com/2006/mxml> "
layout="absolute"
backgroundColor="0xFFFFFF">

<!--Effects-->
<mx:Move id="move1" yFrom="-100" yTo="0" duration="2000"/>
<mx:Fade id="fade1" alphaFrom="0" alphaTo="1" duration="2000"/>

<!--Layout-->
<mx:VBox x="0" y="0" width="100%" height="100%"
showEffect="{fade1}">
<!--When the app loads I want the HBox to move in from off the
screen and fade in-->
<mx:HBox width="100%" backgroundColor="#000000" height="100"
verticalAlign="bottom" paddingBottom="10" paddingLeft="10"
showEffect="{move1}">
<mx:Image source="myimage.png" width="100" height="80"/>
<mx:Text text="Some Text" fontSize="54" color="#ffffff"
fontFamily="Georgia" textAlign="left"/>
</mx:HBox>
<mx:HBox width="100%" height="25" label="Menu bar"
backgroundColor="#9c1f4a" verticalAlign="middle" color="#ffffff">
</mx:HBox>
</mx:VBox>
</mx:Application>


 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<<winmail.dat>>

Reply via email to