Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 为什么状态转换在flex移动应用程序中不起作用?_Actionscript 3_Apache Flex_Transition_Flex4.6 - Fatal编程技术网

Actionscript 3 为什么状态转换在flex移动应用程序中不起作用?

Actionscript 3 为什么状态转换在flex移动应用程序中不起作用?,actionscript-3,apache-flex,transition,flex4.6,Actionscript 3,Apache Flex,Transition,Flex4.6,我想在flex mobile应用程序中更改状态时添加转换,如下所示: <s:states> <s:State name="State1"/> <s:State name="resultsState"/> </s:states> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --&g

我想在flex mobile应用程序中更改状态时添加转换,如下所示:

<s:states>
    <s:State name="State1"/>

    <s:State name="resultsState"/>
</s:states>
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    <s:Transition fromState="''" toState="resultsState">
        <s:Sequence duration="2000">
            <s:Fade target="{myTitle}"/>
            <s:Move targets="{[cityNameInput,searchBtn]}"/>
            <s:AddAction target="{''}"/>
            />

        </s:Sequence>
    </s:Transition>
</fx:Declarations>
<s:Button id="about_state" includeIn="resultsState" label="About"
              click="result_state()" icon="@Embed('assets/About.png')"
              />

请提供帮助。

您必须在组件的
数组属性中声明转换,而不是在
块中声明转换:

<s:states>
    <s:State name="State1"/>
    <s:State name="resultsState"/>
</s:states>

<s:transitions>
    <s:Transition fromState="*" toState="resultsState">
        <s:Sequence duration="2000">
            <s:Fade target="{myTitle}"/>
            <s:Move targets="{[cityNameInput,searchBtn]}"/>
        </s:Sequence>
    </s:Transition>
</s:transitions>
<s:Button id="about_state" includeIn="resultsState" label="About"
              click="result_state()" icon="@Embed('assets/About.png')"/>


你在上有很多例子。

@Lasneyx谢谢你的编辑不客气@Arshad\u Ali\u Soomro:)
<s:states>
    <s:State name="State1"/>
    <s:State name="resultsState"/>
</s:states>

<s:transitions>
    <s:Transition fromState="*" toState="resultsState">
        <s:Sequence duration="2000">
            <s:Fade target="{myTitle}"/>
            <s:Move targets="{[cityNameInput,searchBtn]}"/>
        </s:Sequence>
    </s:Transition>
</s:transitions>
<s:Button id="about_state" includeIn="resultsState" label="About"
              click="result_state()" icon="@Embed('assets/About.png')"/>