Movie Maker Timeline Control

AddTransition Method

Description

Add a transition to the timeline.

Syntax

Public Function AddTransition ( _
   ByVal trackIndex as integer, _
   ByVal name as string, _
   ByVal StartTime as float, _
   ByVal StopTime as float, _
   ByVal params as string, _
   ByVal mediaTrackIndex as integer, _
   ByVal reverseDirection as bool
) As Integer

 

Parameter

trackIndex
   0 - Transition Track
   1 - Video 1 Track
   2 - Video 2 Track
   3 - Image Track
   4 - Effect Track
   5 - Audio 1 Track
   6 - Audio 2 Track
   7 - Text Track

filename
    the name of transition. You may use GetDESTransition method to get all installed transition on your system.

clipStartTime
    Time in seconds when the clip will start on the timeline

clipStopTime
    Time in seconds when the clip will end on the timeline.

mediaTrackIndex
    2 - video track
    3 - image track

reverseDirection
     It is provided to run the transition upwards. By default the transition runs downwards. For example, if you have a video clip and image clip. You want to make a transition from video to image
     then you will add normal transition. But if you want to make a transition from image to video then you will add reverse transition.

 

Return Value

Return value is the clip index of the newly added clip if successful.
Return -1 , the name of transition is empty.
Return -3 , the clipStartTime >= clipStopTime.
Return -4 , the track not found.
Return -5 , the unknown error.
Return -6 , the media Track not found.

Example

Visual Basic Syntax
iCurrentClipIndex= TimelineControl1.AddTransition(0, "CheckerBoard", 0, 30, "",2, false)