パッケージmx.effects
public class AddChildAction
継承AddChildAction Inheritance Effect Inheritance EventDispatcher Inheritance Object

AddChildAction クラスでは、ビューステートを定義する AddChild プロパティに対応したアクションエフェクトを定義します。AddChildAction エフェクトをトランジションの定義範囲で使用することにより、AddChild プロパティで定義されたビューステートの変化がトランジションで発生する時期を制御できます。

MXML シンタックスexpandedMXML シンタックスの非表示

<mx:AddChildAction> タグはスーパークラスのすべてのタグ属性を継承し、次のタグ属性を追加します。

 <mx:AddChildAction プロパティ id="ID" index="-1" relativeTo="" position="index" /> 

例の表示

関連項目

mx.effects.effectClasses.AddChildActionInstance
mx.states.AddChild


パブリックプロパティ
 プロパティ定義
 InheritedclassName : String
"Fade" など、エフェクトクラスの名前です。
Effect
 Inheritedconstructor : Object
特定のオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
Object
 InheritedcustomFilter : EffectTargetFilter
エフェクトを再生するターゲットを特定するために、エフェクトによって使用されるタイプ EffectTargetFilter のカスタムフィルタオブジェクトを指定します。
Effect
 Inheritedfilter : String
エフェクトのターゲットをフィルタリングするアルゴリズムを指定します。
Effect
  index : int = -1
親の中で子が持つインデックスを表します。
AddChildAction
 InheritedinstanceClass : Class
このエフェクトクラスのエフェクトインスタンスクラスを指定する Class 型のオブジェクトを表します。
Effect
 InheritedisPlaying : Boolean
エフェクトのインスタンスのいずれかが現在再生中の場合に true、そうでない場合に false となる読み取り専用フラグです。
Effect
  position : String = "index"
relativeTo プロパティで指定されたオブジェクトを基準にした、表示リスト内での子の位置です。
AddChildAction
 Inheritedprototype : Object
[static] クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
Object
  relativeTo : DisplayObjectContainer
子コンポーネントが追加される位置です。
AddChildAction
 InheritedrelevantProperties : Array
フィルタリング実行時に使用するプロパティ名の配列を表します。
Effect
 InheritedrelevantStyles : Array
フィルタリング実行時に使用するスタイル名の配列を表します。
Effect
 InheritedrepeatCount : int = 1
エフェクトを繰り返す回数を表します。
Effect
 InheritedrepeatDelay : int = 0
エフェクトを繰り返す前の待機時間を表します (ミリ秒単位)。
Effect
 InheritedstartDelay : int = 0
エフェクトを開始する前の待機時間を表します (ミリ秒単位)。
Effect
 InheritedsuspendBackgroundProcessing : Boolean = false
true の場合、エフェクトの再生中にすべてのバックグラウンド処理をブロックします。
Effect
 Inheritedtarget : Object
このエフェクトが適用される UIComponent オブジェクトを表します。
Effect
 Inheritedtargets : Array
エフェクトのターゲットである UIComponent オブジェクトの配列を表します。
Effect
パブリックメソッド
 メソッド定義
  AddChildAction(target:Object = null)
コンストラクタ。
AddChildAction
 InheritedaddEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
イベントリスナーオブジェクトを EventDispatcher オブジェクトに登録し、リスナーがイベントの通知を受け取るようにします。
EventDispatcher
 InheritedcaptureStartValues():void
エフェクトのターゲットにおいて関連するプロパティの現在値をキャプチャします。
Effect
 InheritedcreateInstance(target:Object = null):EffectInstance
1 つのエフェクトインスタンスを作成し、それを初期化します。
Effect
 InheritedcreateInstances(targets:Array = null):Array
ターゲットオブジェクトの配列を取得し、各ターゲットで createInstance() メソッドを呼び出します。
Effect
 InheriteddispatchEvent(event:Event):Boolean
イベントをイベントフローに送出します。
EventDispatcher
 Inheritedend(effectInstance:EffectInstance = null):void
現在再生中のエフェクトをすべて中断し、直ちにエフェクトの終わりにジャンプします。
Effect
 InheritedgetAffectedProperties():Array
ストリングの配列を返します。各ストリングは、このエフェクトによって変更されるプロパティの名前です。
Effect
 InheritedhasEventListener(type:String):Boolean
EventDispatcher オブジェクトに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。
EventDispatcher
 InheritedhasOwnProperty(name:String):Boolean
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
Object
 InheritedisPrototypeOf(theClass:Object):Boolean
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 Inheritedpause():void
resume() メソッドを呼び出すまで、エフェクトを一時停止します。
Effect
 Inheritedplay(targets:Array = null, playReversedFromEnd:Boolean = false):Array
エフェクトの再生を開始します。
Effect
 InheritedpropertyIsEnumerable(name:String):Boolean
指定されたプロパティが存在し、列挙可能かどうかを示します。
Object
 InheritedremoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventDispatcher オブジェクトからリスナーを削除します。
EventDispatcher
 Inheritedresume():void
pause() メソッドを呼び出し、エフェクトを一時停止した後、再開させます。
Effect
 Inheritedreverse():void
エフェクトが現在再生中の場合に、エフェクトの現在位置から開始して、逆順でエフェクトを再生します。
Effect
 InheritedsetPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
 InheritedtoString():String
指定されたオブジェクトのストリング表現を返します。
Object
 InheritedvalueOf():Object
指定されたオブジェクトのプリミティブ値を返します。
Object
 InheritedwillTrigger(type:String):Boolean
指定されたイベントタイプについて、この EventDispatcher オブジェクトまたはその祖先にイベントリスナーが登録されているかどうかを確認します。
EventDispatcher
Protectedメソッド
 メソッド定義
 InheritedapplyValueToTarget(target:Object, property:String, value:*, props:Object):void
エフェクトインフラストラクチャによって内部的に使用されます。
Effect
 InheritedeffectEndHandler(event:EffectEvent):void
エフェクトインスタンスの再生終了時に呼び出されます。
Effect
 InheritedeffectStartHandler(event:EffectEvent):void
このメソッドは、エフェクトインスタンスの再生開始時に呼び出されます。
Effect
 InheritedfilterInstance(propChanges:Array, targ:Object):Boolean
エフェクトインスタンスのフィルタリングに必要なロジックを決定します。
Effect
 InheritedgetValueFromTarget(target:Object, property:String):*
ターゲットからプロパティの値を取得するために captureStartValues() によって呼び出されます。
Effect
 InheritedinitInstance(instance:EffectInstance):void
エフェクトインスタンスにエフェクトのプロパティをコピーします。
Effect
イベント
 イベント一覧定義
 InheritedeffectEnd エフェクトの再生停止時 (エフェクトの再生完了時、またはエフェクトが end() メソッドの呼び出しにより中断されたとき) に送出されます。Effect
 InheritedeffectStart エフェクトの再生開始時に送出されます。Effect
プロパティの詳細
indexプロパティ
public var index:int = -1

親の中で子が持つインデックスを表します。値が -1 の場合、親の最後の子として子が追加されます。

デフォルト値-1.

positionプロパティ 
public var position:String = "index"

relativeTo プロパティで指定されたオブジェクトを基準にした、表示リスト内での子の位置です。有効な値は "before""after""firstChild""lastChild"、および "index" です。"index" を指定した場合は、index プロパティを使用して子の位置が決定されます。

デフォルト値"index".

relativeToプロパティ 
public var relativeTo:DisplayObjectContainer

子コンポーネントが追加される位置です。デフォルトでは、ビューステートを定義したもののうち AddChild プロパティの定義からこの値が決定されます。

コンストラクタの詳細
AddChildAction()コンストラクタ
public 関数 AddChildAction(target:Object = null)

コンストラクタ。

パラメータ
target:Object (default = null) — このエフェクトでアニメーション化するオブジェクトを表します。
TransitionExample
<?xml version="1.0" ?>
<!-- Simple example to demonstrate the Transition class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <!-- Define one view state, in addition to the base state.-->
    <mx:states>
        <mx:State name="Register">
            <mx:AddChild relativeTo="{loginForm}" position="lastChild">
                <mx:target>
                    <mx:FormItem id="confirm" label="Confirm:">
                        <mx:TextInput/>
                    </mx:FormItem>
                </mx:target>
            </mx:AddChild>
            <mx:SetProperty target="{loginPanel}" name="title" value="Register"/>
            <mx:SetProperty target="{loginButton}" name="label" value="Register"/>
            <mx:SetStyle target="{loginButton}" 
                name="color" value="blue"/>
            <mx:RemoveChild target="{registerLink}"/>
            <mx:AddChild relativeTo="{spacer1}" position="before">
                <mx:target>
                    <mx:LinkButton id="loginLink" label="Return to Login" click="currentState=''"/>
                </mx:target>
            </mx:AddChild>
        </mx:State>
    </mx:states>

    <mx:transitions>
        <!-- Define the transition from the base state to the Register state.-->
        <mx:Transition id="toRegister" fromState="*" toState="Register">
            <mx:Sequence targets="{[loginPanel, registerLink, confirm, loginLink, spacer1]}">
                <mx:RemoveChildAction/>
                <mx:SetPropertyAction target="{loginPanel}" name="title"/>
                <mx:SetPropertyAction target="{loginButton}" name="label"/>
                <mx:SetStyleAction target="{loginButton}" name="color"/>
                <mx:Resize target="{loginPanel}"/>
                <mx:AddChildAction/>
            </mx:Sequence>
        </mx:Transition>

        <!-- Define the transition from the Register state to the base state.-->
        <mx:Transition id="toDefault" fromState="Register" toState="*">
            <mx:Sequence targets="{[loginPanel, registerLink, 
                    confirm, loginLink, spacer1]}">
                <mx:RemoveChildAction/>
                <mx:SetPropertyAction target="{loginPanel}" name="title"/>
                <mx:SetPropertyAction  target="{loginButton}" name="label"/>
                <mx:SetStyleAction target="{loginButton}" name="color"/>
                <mx:Resize target="{loginPanel}"/>
                <mx:AddChildAction/>
            </mx:Sequence>
        </mx:Transition>
    </mx:transitions>

    <!-- Define a Panel container that defines the login form.-->
    <mx:Panel title="Login" id="loginPanel" 
        horizontalScrollPolicy="off" verticalScrollPolicy="off"
        paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
    
        <mx:Text width="100%" color="blue"
            text="Click the 'Need to Register?' link to change state. Click the 'Return to Login' link to return to the base state."/>

        <mx:Form id="loginForm" >
            <mx:FormItem label="Username:">
                <mx:TextInput/>
            </mx:FormItem>
            <mx:FormItem label="Password:">
                <mx:TextInput/>
            </mx:FormItem>
        </mx:Form>
        <mx:ControlBar>
            <mx:LinkButton id="registerLink"  label="Need to Register?"
                click="currentState='Register'"/>
            <mx:Spacer width="100%" id="spacer1"/>
            <mx:Button label="Login" id="loginButton"/>
        </mx:ControlBar>
    </mx:Panel>
</mx:Application>




 

このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート

現在のページ: http://livedocs.adobe.com/flex/2_jp/langref/mx/effects/AddChildAction.html