WindowTransition.PrepareWindow
------------------------------

Prepare the a transition to apply to the front FileMaker window.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WindowTransition](component_WindowTransition.md) | [1.5](newinversion15.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md).

MBS( "WindowTransition.PrepareWindow"; TransitionType; TransitionOption; HasBackGround; HasBackColor; Red; Green; Blue ) 

**MBS**( **"WindowTransition.PrepareWindow";** /\* Prepare the a transition to apply to the front FileMaker window. \*/  
**$TransitionType**; /\* The transition type (see description) \*/   
**$TransitionOption**; /\* Options for each transition (see description) \*/   
**$HasBackGround**; /\* If HasBackGround is true, a background is drawn behind the transition which may have a background color. \*/   
**$HasBackColor**; /\* Whether the background on the transition has a color. \*/   
**$Red**; /\* The RED value of the back ground \*/   
**$Green**; /\* The GREEN value of the back ground \*/   
**$Blue**) /\* The BLUE value of the back ground \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| TransitionType | The transition type (see description) |  |
| TransitionOption | Options for each transition (see description) |  |
| HasBackGround | If HasBackGround is true, a background is drawn behind the transition which may have a background color. |  |
| HasBackColor | Whether the background on the transition has a color. |  |
| Red | The RED value of the back ground |  |
| Green | The GREEN value of the back ground |  |
| Blue | The BLUE value of the back ground |  |

### Description

Prepare the a transition to apply to the front FileMaker window.  
  
You select which transition you would like to use by setting the Parameter "TransitionType" to one of the numbers listed here.  
  
0 - No transition effect.  
1 - Cross-fade  
2 - Zoom/fade towards us.  
3 - Reveal new desktop under old.  
4 - Slide old out and new in.  
5 - Warp old and fade out revealing new.  
6 - Swap desktops over graphically.  
7 - The well-known cube effect.  
8 - Warp old, switch and un-warp.  
9 - The flip effect known from Dashboard  
Add 128 for transparent background.  
  
You can set the direction of the transition by Setting the TransitionOption parameter as follows:  
  
0 - Old window moves down.  
1 - Old window moves left.  
2 - Old window moves right.  
3 - Swap: Old window moves into screen, new comes from right.  
5 - Swap: Old window moves to bottom left, new comes from top right.  
6 - Old window to bottom right, New from top left.  
7 - Swap: Old window moves down, new from top right.  
8 - Old window moves up.  
9 - Old window moves top left.  
10 - Swap: old to top right. new from bottom left.  
11 - Swap: old desktop up, new from bottom right.  
12 - Swap: old in, new from bottom.  
13 - Swap: old one moves left, new from bottom right.  
14 - Swap: old one moves right, new from bottom left.  
15 - Swap: onl one in, new from bottom right.  
16 - Swap: old in, new out.  
  
The options Begininning with "Swap:" Apply only to the Swap transition.  
  
NOTE! In order to have the transition correctly swap the old view for the new view you will need to arrange you FileMaker Script to do perform the following commands in this order:   
Change window contents (ie go to layout, go to record) PrepareTransition Pause script (.01 seconds) PerformTransition   
The pause script step is important. It allows FileMaker to draw the new contents.  
### See also

- [WindowTransition.Perform](WindowTransitionPerform.md)
- [WindowTransition.Prepare](WindowTransitionPrepare.md)

This function is free to use.

Created 18th August 2014 , last changed 7th July 2023

  
[WindowTransition.Prepare](WindowTransitionPrepare.md) - [WindowsLocation.Initialize](WindowsLocationInitialize.md)

[HTML Version](WindowTransitionPrepareWindow.shtml)