This page was saved using jaction on 2006-09-04 8:34:09.
Address: http://flexdocs.kr/docs/flex2/langref/mx/states/Transition.html
Title: mx.states.Transition (Flex™ 2 레퍼런스 가이드)  •  Size: 28799
Packagemx.states
Classpublic class Transition
InheritanceTransition Inheritance Object

Transition 클래스에 의해, 뷰스테이트의 변경에 응해 재생되는 일련의 effect가 정의됩니다. 뷰스테이트 정의가 상태의 변경 방법을 정의하는 한편, 트란지션은 상태의 변경중으로 표시를 변경하는 순서를 정의합니다.

트란지션을 정의하려면 , 어플리케이션의 트란지션프로파티를 Transition object의 배열로 설정합니다.

Transition 클래스의 toState property 및 fromState property를 사용해, 트란지션을 방아쇠 하는 상태 변경을 지정합니다. 디폴트에서는,fromState property와 toState property의 양쪽 모두가 "*" 로 설정됩니다. 즉, 뷰스테이트에 대한 모든 변경에 트란지션이 적용됩니다.

변경전의 뷰스테이트를 명시적으로 지정하려면 ,fromState property를 사용합니다. 변경 후의 뷰스테이트를 명시적으로 지정하려면 ,toState property를 사용합니다. 상태 변경이 2 개의 트란지션과 일치하는 경우는,toState property가 fromState property보다 우선됩니다. 복수의 트란지션이 일치하는 경우, Flex 는 트란지션 배열의 최초의 정의를 사용합니다.

effect property를 사용해, 트란지션을 적용할 경우에 재생하는 Effect object를 지정합니다. 통상, 이 object에는, Parallel effect나 Sequence effect등의 복수의 effect의 편성이 포함됩니다. 다음에 예를 나타냅니다.

<mx:Transition id="myTransition" fromState="*" toState="*">
<mx:Parallel>
        ...
</mx:Parallel>
</mx:Transition>
  

MXML 문장구조법expandedMXML 문장구조법의 비표시

<mx:Transition> 태그는, 이하의 속성을 정의합니다.

 <mx:Transition property id="ID" effect="" fromState="*" toState="*" /> 

디폴트의 MXML propertyeffect

View the examples

See also

mx.effects.AddChildAction
mx.effects.RemoveChildAction
mx.effects.SetPropertyAction
mx.effects.SetStyleAction
트란지션의 정의
트란지션에 관한 힌트와 문제 해결
예 : 트란지션에페크트의 작성


Public property
 property정의
 Inheritedconstructor : Object
특정의 object 인스턴스의 클래스 object 또는 constructor    함수에의 참조입니다.
Object
  effect : Effect
트란지션을 적용할 경우에 재생하는 Effect object입니다.
Transition
  fromState : String = "*"
트란지션을 적용하는 경우에, 변경전의 뷰스테이트를 지정하는 string입니다.
Transition
 Inheritedprototype : Object
[static] 클래스 또는 함수 object의 prototype object에의 참조입니다.
Object
  toState : String = "*"
트란지션을 적용하는 경우에, 변경 후의 뷰스테이트를 지정하는 string입니다.
Transition
Public Methods
 Methods정의
  Transition ()
constructor   .
Transition
 InheritedhasOwnProperty (name:String ):Boolean
object로 지정된 property가 정의되고 있는지 어떤지를 나타냅니다.
Object
 InheritedisPrototypeOf (theClass:Object ):Boolean
Object 클래스의 인스턴스가, Parameters로서 지정된 object의 prototype 체인내에 있을지 어떨지를 나타냅니다.
Object
 InheritedpropertyIsEnumerable (name:String ):Boolean
지정된 property가 존재해, 열거 가능한가 어떤가를 나타냅니다.
Object
 InheritedsetPropertyIsEnumerable (name:String , isEnum:Boolean = true):void
루프 처리에 대한 다이나믹 property의 가용성을 설정합니다.
Object
 InheritedtoString ():String
지정된 object의 string 표현을 돌려줍니다.
Object
 InheritedvalueOf ():Object
지정된 object의 원시적치를 돌려줍니다.
Object
property의 상세
effectproperty
public var effect:Effect

트란지션을 적용할 경우에 재생하는 Effect object입니다. 통상, 이 object에는, Parallel effect나 Sequence effect등의 복수의 effect의 편성이 포함됩니다.

effect property는, Transition 클래스의 디폴트 property입니다. MXML 태그의 문장구조법을 사용하고 있는 경우는,<mx:effect> 태그를 생략 할 수 있습니다.

fromStateproperty 
public var fromState:String = "*"

트란지션을 적용하는 경우에, 변경전의 뷰스테이트를 지정하는 string입니다. 디폴트치는 "*" 으로, 임의의 뷰스테이트를 의미합니다.

이 property는, 기본 뷰스테이트에 대응하는 empty의 string "" 로 설정할 수 있습니다.

디폴트치"&#42;".

toStateproperty 
public var toState:String = "*"

트란지션을 적용하는 경우에, 변경 후의 뷰스테이트를 지정하는 string입니다. 디폴트치는 "*" 으로, 임의의 뷰스테이트를 의미합니다.

이 property는, 기본 뷰스테이트에 대응하는 empty의 string "" 로 설정할 수 있습니다.

디폴트치"&#42;".

constructor    의 상세
Transition()constructor   
public 함수 Transition()

constructor   .

Examples
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://flexdocs.kr/docs/flex2/langref/mx/states/Transition.html