Flex 4 Group showEffect/hideEffect

2019-03-05 09:55发布

问题:

I have a Group that I want to do a wipe effect when it shows and hides.

<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    <s:Wipe id="wipeUp" direction="up" duration="2000"/>
    <s:Wipe id="wipeDown" direction="down" duration="2000" startDelay="2000"/>
</fx:Declarations>

<s:Group 
    id="zoomPopup"
    top="-290"
    right="15"
    width="30"
    height="300"
    visible="false" 
    showEffect="{wipeUp}" hideEffect="{wipeDown}">

The group is being hidden and shown on change of the group's visibility, but the effect doesn't do anything. When I set the visibility to false, it takes 4 secs for it to hide (delay+duration), but again, no effect.

回答1:

Effect triggers are not officially supported in spark in the current release. See this thread for more details: Spark effects: why is procedural code preferred over triggers?



标签: flex effects