| 包 | mx.effects |
| 类 | public class RemoveChildAction |
| 继承 | RemoveChildAction Effect EventDispatcher Object |
| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
![]() | 从 Flex 4.0 开始,Adobe 建议您使用 spark.effects.RemoveAction 类来替代此类。 |
RemoveChildAction 类可定义与视图状态定义的 RemoveChild 属性对应的动作效果。您可以在转移定义中使用 RemoveChildAction 效果来控制在转移期间何时发生由 RemoveChild 属性定义的视图状态更改。 MXML 语法
隐藏 MXML 语法The <mx:RemoveChildAction> tag
inherits all of the tag attributes of its superclass,
and adds the following tag attributes:
<mx:RemoveChildAction
Properties
id="ID"
/>
相关 API 元素
受保护的属性
公共方法
| 方法 | 由以下参数定义 | ||
|---|---|---|---|
RemoveChildAction(target:Object = null)
构造函数。 | RemoveChildAction | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | EventDispatcher | |
![]() |
捕获效果目标上相关属性的当前值,并将这些值另存为结束值。 | Effect | |
![]() |
捕获另一组目标相关属性的当前值。在运行数据更改效果时,Flex 将使用此函数。
| Effect | |
![]() |
捕获效果目标上相关属性的当前值。 | Effect | |
![]() |
创建一个效果实例并对其进行初始化。 | Effect | |
![]() |
获取一个目标对象 Array,并对每个目标调用 createInstance() 方法。 | Effect | |
![]() |
删除实例中的事件侦听器,然后从实例列表中删除该实例。 | Effect | |
![]() |
将事件调度到事件流中。 | EventDispatcher | |
![]() |
中断当前正在播放的效果,立即跳转到该效果的末尾。 | Effect | |
![]() |
返回一个字符串 Array,其中每个 String 都是被此效果更改的属性的名称。 | Effect | |
![]() |
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。 | EventDispatcher | |
![]() |
表示对象是否已经定义了指定的属性。 | Object | |
![]() |
表示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | |
![]() |
暂停效果,直到调用 resume() 方法。 | Effect | |
![]() |
开始播放效果。 | Effect | |
![]() |
表示指定的属性是否存在、是否可枚举。 | Object | |
![]() |
从 EventDispatcher 对象中删除侦听器。 | EventDispatcher | |
![]() |
在效果由 pause() 方法暂停后继续播放效果。 | Effect | |
![]() |
逆序播放效果;如果当前正在播放效果,则从该效果的当前位置开始逆序播放。 | Effect | |
![]() |
设置循环操作动态属性的可用性。 | Object | |
![]() |
停止播放效果,使效果目标保持当前状态。 | Effect | |
![]() |
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。 | Object | |
![]() |
返回指定对象的字符串表示形式。 | Object | |
![]() |
返回指定对象的原始值。 | Object | |
![]() |
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。 | EventDispatcher | |
受保护的方法
构造函数详细信息
RemoveChildAction | () | 构造函数 |
示例 如何使用本示例
TransitionExample.mxml
<?xml version="1.0" ?>
<!-- Simple example to demonstrate the Transition class. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" currentState="Login">
<!-- Define the view states -->
<s:states>
<s:State name="Login" />
<s:State name="Register" />
</s:states>
<s:transitions>
<!-- Define the transition from the base state to the Register state.-->
<s:Transition id="toRegister" fromState="*" toState="Register">
<s:Sequence targets="{[loginPanel, registerLink, confirm, loginLink]}">
<s:RemoveAction />
<s:Fade />
<s:SetAction target="{loginPanel}" property="title" />
<s:SetAction target="{loginButton}" property="label" />
<s:SetAction target="{loginButton}" property="color" />
<s:Resize target="{loginPanel}"/>
<s:AddAction />
<s:Fade />
</s:Sequence>
</s:Transition>
<!-- Define the transition from the Register state to the base state.-->
<s:Transition id="toDefault" fromState="Register" toState="*">
<s:Sequence targets="{[loginPanel, registerLink,
confirm, loginLink]}">
<s:RemoveAction/>
<s:SetAction target="{loginPanel}" property="title"/>
<s:SetAction target="{loginButton}" property="label"/>
<s:SetAction target="{loginButton}" property="color"/>
<s:Resize target="{loginPanel}"/>
<s:AddAction/>
</s:Sequence>
</s:Transition>
</s:transitions>
<!-- Define a Panel container that defines the login form. The title of the Panel
changes depending on the state. -->
<s:Panel title="Login" title.Register="Register" id="loginPanel"
width="75%" horizontalCenter="0" verticalCenter="0">
<s:controlBarLayout >
<s:BasicLayout />
</s:controlBarLayout>
<s:layout>
<s:VerticalLayout paddingTop="10" paddingBottom="10" paddingRight="10" paddingLeft="10" />
</s:layout>
<s:Label color="blue" width="100%"
text="Click the 'Need to Register?' link to change state. Click the 'Return to Login' link to return to the base state."/>
<!-- The following form has two TextInputs in the Login state and three TextInputs
in the Register state. -->
<s:Form id="loginForm" >
<s:FormItem label="Username:">
<s:TextInput/>
</s:FormItem>
<s:FormItem label="Password:">
<s:TextInput/>
</s:FormItem>
<s:FormItem id="confirm" label="Confirm:" includeIn="Register" includeInLayout="false" includeInLayout.Register="true">
<s:TextInput/>
</s:FormItem>
</s:Form>
<!-- The controlBar includes two visible items in each state. Which LinkButton is visible is determined
by the state -->
<s:controlBarContent>
<mx:LinkButton id="registerLink" label="Need to Register?" top="10" bottom="10"
click="currentState='Register'" left="10" includeIn="Login" />
<mx:LinkButton id="loginLink" label="Return to Login" click="currentState=''" includeIn="Register" left="10" top="10" bottom="10"/>
<s:Button label="Login" label.Register="Register" id="loginButton" right="10" color.Register="0x0000FF" top="10" bottom="10"/>
</s:controlBarContent>
</s:Panel>
</s:Application>
Tue Jun 12 2018, 11:04 AM Z

显示 MXML 语法