繁体   English   中英

有Flex 4暂停效果吗?

[英]Is there a Flex 4 Pause effect?

暂停效果是否有Flex 4 Spark版本?

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/effects/Pause.html

在序列中,此效果会暂停特定的时间,然后再转到下一个效果。 它也可以暂停直到在目标上调度特定事件。

@Shaun,
我懂了。 让我震惊的是它的一部分mx.effects包,以及Pause扩展的TweenEffect类中的此注释。

/ **
* TweenEffect是Flex 3中动画效果的超类。从Flex 4开始,
*火花效果扩展了spark.effects.Animate类而不是TweenEffect。
* /
[Alternative(replacement =“ spark.effects.Animate”,since =“ 4.0”)]

谢谢!

它在这里说,尽管不建议这样做(可能是由于体系结构的变化,以分隔布局和滚动条等)

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf5fdc3-7fff.html

我猜想暂停效果会很好...实际上尝试了一下它在4.5 SDK中的Spark中显示

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        title="HomeView">

    <fx:Script>
        <![CDATA[
            protected function button1_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                bc.visible=true;
            }

            protected function button2_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                bc.visible=false;
            }

        ]]>
    </fx:Script>

    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <s:Sequence id="sq">
            <s:Rotate angleBy="45"  autoCenterTransform="true"/>
            <s:Pause duration="1000"/>
            <s:Rotate angleBy="45" autoCenterTransform="true"/>
        </s:Sequence>
    </fx:Declarations>
    <s:layout>
        <s:VerticalLayout/>
    </s:layout>
    <s:BorderContainer id="bc" width="100" height="100" backgroundColor="blue" visible="false" showEffect="sq"/>
    <s:Button click="button1_clickHandler(event)" label="show"/>
    <s:Button click="button2_clickHandler(event)" label="hide"/>
</s:View>

请注意,这是一个移动应用程序,因此是s:View。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM