Flex 4 有暂停效果吗?

发布于 2024-10-31 04:33:12 字数 576 浏览 1 评论 0原文

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

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

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

@肖恩,
我懂了。让我失望的是它所属的 mx.effects 包以及 Pause 扩展的 TweenEffect 类中的这条注释。

/**
* TweenEffect 是 Fl​​ex 3 中动画效果的超类。从 Flex 4 开始,
* Spark 效果扩展了spark.effects.Animate 类,而不是TweenEffect。
*/
[替代(替换=“spark.effects.Animate”,因为=“4.0”)]

谢谢!

Is there a Flex 4 Spark version of the Pause effect?

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

In a Sequence this effect pauses for a specific duration of time before going to the next effect. It also can pause until a specific event is dispatched on a target.

@Shaun,
I see. What threw me off was the mx.effects package it's part of and this comment in the TweenEffect class which Pause extends.

/**
* TweenEffect is the superclass for the animated effects in Flex 3. As of Flex 4, the
* Spark effects extend the spark.effects.Animate class instead of TweenEffect.
*/
[Alternative(replacement="spark.effects.Animate", since="4.0")]

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一个人的旅程 2024-11-07 04:33:12

尽管不建议这样做,但它在这里说(可能是由于架构中分离布局和滚动条等的变化)

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

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

<?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。

It says here although it's not advised (likely due to the changes in the architecture to separate the layout and scroll bar etc.)

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

I would guess a Pause effect would work fine... actually tried it out it shows up in Spark in the 4.5 SDK

<?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>

Note this is a mobile application hence the s:View.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文