패키지 | spark.transitions |
클래스 | public class ViewTransitionBase |
상속 | ViewTransitionBase EventDispatcher Object |
하위 클래스 | CrossFadeViewTransition, FlipViewTransition, SlideViewTransition, ZoomViewTransition |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
When a view transition is initialized, the owning view navigator
sets the startView
and endView
properties
to the views the transition animates.
The navigator
property is
set to the view navigator.
The lifecycle of a transition is as follows:
- The transition starts with
the
captureStartValues()
method. When this method is called, the navigator is currently in the start state. At this time, the transition should capture any start values or bitmaps that it requires. - A validation pass is performed on the pending
view, and the
captureEndValues()
method is called. At this time, the transition captures any properties or bitmaps representations from the pending view. - The
prepareForPlay()
method is then called, which allows the transition to perform any further preparations, such as preparing a Spark effects sequence, or positioning transient elements on the display list. - After a final validation pass, if necessary,
the
play()
method is called by the navigator to perform the actual transition. - Prior to any animation starting, the
start
event is dispatched. - When a transition completes, it dispatches an
end
event.
Note:Create and configure view transitions in ActionScript; you cannot create them in MXML.
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
duration : Number
Duration of the transition, in milliseconds. | ViewTransitionBase | ||
easer : IEaser
The easing behavior for this transition. | ViewTransitionBase | ||
endView : View
The view that the navigator is transitioning
to, as set by the owning ViewNavigator object. | ViewTransitionBase | ||
navigator : ViewNavigator
Reference to the owning ViewNavigator instance set by the owning
ViewNavigator. | ViewTransitionBase | ||
startView : View
The currently active view of the view navigator,
as set by the owning view navigator. | ViewTransitionBase | ||
suspendBackgroundProcessing : Boolean
When set to true, the UIComponent.suspendBackgroundProcessing()
method is invoked prior to the transition playing. | ViewTransitionBase | ||
transitionControlsWithContent : Boolean
When set to true, the primary view transition
is used to transition the view navigator in its entirety,
including the action bar. | ViewTransitionBase |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | ViewTransitionBase | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
Called by the ViewNavigator during the preparation phase of a transition. | ViewTransitionBase | ||
Called by the ViewNavigator during the preparation phase of a transition. | ViewTransitionBase | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
Called by the ViewNavigator when the transition
should begin animating. | ViewTransitionBase | ||
Called by the ViewNavigator during the preparation phase
of a transition. | ViewTransitionBase | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
메서드 | 정의 주체 | ||
---|---|---|---|
Determine if Flex can perform a transition on
action bar or tab bar content independently of the views. | ViewTransitionBase | ||
Called after the transition completes. | ViewTransitionBase | ||
Called by the default prepareForPlay() implementation,
this method is responsible for creating the Spark effect
played on the action bar when the transition starts. | ViewTransitionBase | ||
Called by the default prepareForPlay() implementation,
this method is responsible for creating the Spark effect played to
transition the entire navigator, inclusive of the control bar content,
when necessary. | ViewTransitionBase | ||
Called by the default prepareForPlay() implementation,
this method is responsible for creating the Spark effect played
on the tab bar when the transition starts. | ViewTransitionBase | ||
Called by the default prepareForPlay() implementation,
this method is responsible for creating the Spark effect played
on the current and next view when the transition starts. | ViewTransitionBase | ||
Used to render snap shots of screen elements in
preparation for transitioning. | ViewTransitionBase | ||
Called by the transition to indicate that the transition
has completed. | ViewTransitionBase |
이벤트 | 요약 | 정의 주체 | ||
---|---|---|---|---|
[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 얻어 활성화될 때 전달됩니다. | EventDispatcher | |||
[브로드캐스트 이벤트] Flash Player 또는 AIR 응용 프로그램이 운영 체제 포커스를 잃고 비활성화될 때 전달됩니다. | EventDispatcher | |||
Dispatched when the transition completes. | ViewTransitionBase | |||
Dispatched when the transition starts. | ViewTransitionBase |
duration | 속성 |
easer | 속성 |
easer:IEaser
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
The easing behavior for this transition. The IEaser object is generally propagated to the IEffect instance managing the actual transition animation.
기본값: Sine(.5);.
구현
public function get easer():IEaser
public function set easer(value:IEaser):void
관련 API 요소
endView | 속성 |
navigator | 속성 |
navigator:ViewNavigator
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Reference to the owning ViewNavigator instance set by the owning ViewNavigator.
기본값: null.
구현
public function get navigator():ViewNavigator
public function set navigator(value:ViewNavigator):void
startView | 속성 |
suspendBackgroundProcessing | 속성 |
suspendBackgroundProcessing:Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
When set to true
, the UIComponent.suspendBackgroundProcessing()
method is invoked prior to the transition playing.
This disables Flex's layout manager and improving performance.
Upon completion of the transition,
the layout manager function is restored by a call to the
UIComponent.resumeBackgroundProcessing()
method.
기본값: false.
구현
public function get suspendBackgroundProcessing():Boolean
public function set suspendBackgroundProcessing(value:Boolean):void
관련 API 요소
transitionControlsWithContent | 속성 |
transitionControlsWithContent:Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
When set to true
, the primary view transition
is used to transition the view navigator in its entirety,
including the action bar.
Specific transitions for the action bar are not performed.
Because the tab bar is associated with the entire application,
and not a view, view transitions do not affect it.
Note that even when set to false
, there are cases
where its not feasible to transition the action bar.
For example, when the action bar does not exist in one of
the two views, or if the action bar changes size.
기본값: false.
구현
public function get transitionControlsWithContent():Boolean
public function set transitionControlsWithContent(value:Boolean):void
ViewTransitionBase | () | 생성자 |
public function ViewTransitionBase()
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Constructor.
canTransitionControlBarContent | () | 메서드 |
protected function canTransitionControlBarContent():Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Determine if Flex can perform a transition on action bar or tab bar content independently of the views.
Flex cannot perform a transition on the control bars independently:
- If the containing view navigator is a TabbedViewNavigator and its tab bar's visibility changes between views.
- If the value of the view navigator's
overlayControls
property changes between views. - If the size or visibility of the action bar changes between views.
Boolean — false if Flex determines controls bars between views are
incompatible in some way.
|
captureEndValues | () | 메서드 |
public function captureEndValues():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the ViewNavigator during the preparation phase of a transition. It is invoked when the new view has been fully realized and validated and the action bar and tab bar content reflect the state of the new view. It is at this point that the transition can capture any values it requires from the pending view. In addition any bitmaps reflecting the state of the new view, tab bar, or action bar should be captured, if required for animation.
captureStartValues | () | 메서드 |
public function captureStartValues():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the ViewNavigator during the preparation phase of a transition. It is invoked when the new view has been fully realized and validated and the action bar and tab bar content reflect the state of the new view. The transition can use this method capture any values it requires from the pending view. Any bitmaps reflecting the state of the new view, tab bar, or action bar should be captured if required for animation.
cleanUp | () | 메서드 |
protected function cleanUp():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called after the transition completes. This method is responsible for releasing any references and temporary constructs used by the transition.
createActionBarEffect | () | 메서드 |
protected function createActionBarEffect():IEffect
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the default prepareForPlay()
implementation,
this method is responsible for creating the Spark effect
played on the action bar when the transition starts.
This method should be overridden by subclasses if a custom action bar
effect is required.
By default, this method returns a basic action bar effect.
IEffect — An IEffect instance serving as the action bar effect.
This effect is played by the default play() method implementation.
|
createConsolidatedEffect | () | 메서드 |
protected function createConsolidatedEffect():IEffect
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the default prepareForPlay()
implementation,
this method is responsible for creating the Spark effect played to
transition the entire navigator, inclusive of the control bar content,
when necessary.
This method should be overridden by subclasses.
By default, this method returns null.
IEffect — An IEffect instance serving as the view transition.
This effect is played by the default play() method implementation.
|
createTabBarEffect | () | 메서드 |
protected function createTabBarEffect():IEffect
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the default prepareForPlay()
implementation,
this method is responsible for creating the Spark effect played
on the tab bar when the transition starts.
This method should be overridden by subclasses.
By default, this returns null.
IEffect — An IEffect instance serving as the tab bar transition.
This effect is played by the default play() method implementation.
|
createViewEffect | () | 메서드 |
protected function createViewEffect():IEffect
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the default prepareForPlay()
implementation,
this method is responsible for creating the Spark effect played
on the current and next view when the transition starts.
This method should be overridden by subclasses.
By default, this method returns null.
IEffect — An IEffect instance serving as the view transition.
This effect is played by the default play() method implementation.
|
getSnapshot | () | 메서드 |
protected function getSnapshot(target:UIComponent, padding:int = 4, globalPosition:Point = null):BitmapImage
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Used to render snap shots of screen elements in preparation for transitioning. The bitmap is returned in the form of a BitmapImage object.
The BitmapImage is in target's parent coordiantes space -
it overlaps the target precisely if paranted to the same parent.
When moving to a different parent, make sure to adjust the
transformation of the BitmapImage to correctly account for the
change in coordinate spaces.
The updated value of the globalPosition
parameter
can be used for that.
매개 변수
target:UIComponent — Display object to capture.
| |
padding:int (default = 4 ) — Padding around the object to be included in
the BitmapImage object.
| |
globalPosition:Point (default = null ) — When non-null, globalPosition
will be updated with the origin of the BitmapImage in global
coordiantes. When moving to a different coordinate space, this
value can be used to adjust the snapshot's position so its
global position on screen doesn't change.
|
BitmapImage — BitmapImage object representing the target.
|
play | () | 메서드 |
public function play():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the ViewNavigator when the transition
should begin animating.
At this time, the transition should dispatch a
start
event.
prepareForPlay | () | 메서드 |
public function prepareForPlay():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the ViewNavigator during the preparation phase
of a transition.
This method gives the transition the chance to create and
configure the underlying IEffect instance, or to add any transient
elements to the display list.
Example transient elements include bitmap placeholders, temporary
containers required during the transition, and other elements.
If required, a final validation pass occurs prior to the invocation
of the play()
method.
If it is determined that a standard transition can be initiated,
meaning one that transitions the control bars separately from the views,
the default implementation of this method constructs
a single Parallel effect which wraps the individual effect sequences
for the view transition, the action bar transition, and the tab bar transition.
This method uses the methods, createActionBarEffect()
,
createTabBarEffect()
, and createViewEffect()
.
If transitionControlsWithContent
is set to true
,
or if it is determined that the control bars cannot be transitioned independently,
a single effect is created to transition the navigator in its entirety.
In this case, only createConsolidatedEffect()
is invoked.
transitionComplete | () | 메서드 |
protected function transitionComplete():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Called by the transition to indicate that the transition
has completed.
This method dispatches the end
event.
transitionEnd | 이벤트 |
mx.events.FlexEvent
속성 FlexEvent.type =
mx.events.FlexEvent.TRANSITION_START
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Dispatched when the transition completes.
TheFlexEvent.TRANSITION_START
constant defines the value of the
type
property of the event object for a transitionStart
event.
This event will only be dispatched when there are one or more relevant listeners attached to the dispatching object.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
transitionStart | 이벤트 |
mx.events.FlexEvent
속성 FlexEvent.type =
mx.events.FlexEvent.TRANSITION_START
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | AIR 2.5 |
Dispatched when the transition starts.
TheFlexEvent.TRANSITION_START
constant defines the value of the
type
property of the event object for a transitionStart
event.
This event will only be dispatched when there are one or more relevant listeners attached to the dispatching object.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
Tue Jun 12 2018, 03:17 PM Z