Hello. I have a template where I'm trying to change the preview displayed in the XPression MOS plug-in based on whether or not a text box is empty. The script below I have in On Prepare (ignore the MOS string programming. That bit is working.). It's currently not showing the desired preview frame in the plug-in. I'm sure I'm missing something. Looking to the community for answers. Thanks for the help!
'declare variables
dim txtAnimated, txtType, txtStyle, txtBkgd, txtMonth, txtDay, txtBody as xpTextObject
dim director as xpSceneDirector
dim track as xpSceneDirectorTrack
'dim clip as xpSceneDirectorClip
dim Animated, Type, Style as string
'get scene object
Self.GetObjectByName("Animate Graphic", txtAnimated)
Self.GetObjectByName("Select Graphic Type", txtType)
Self.GetObjectByName("Select FS Style", txtStyle)
Self.GetObjectByName("Custom Background Text", txtBkgd)
Self.GetObjectByName("Calendar Title", txtMonth)
Self.GetObjectByName("Calendar Date", txtDay)
Self.GetObjectByName("Text", txtBody)
Self.GetSceneDirectorByName("Preview", director)
director.GetTrackByName("PreviewTrack", track)
'engine.DebugMessage("Selected Style = " & txtStyle.Text, 0)
'set preview frame
If txtBody.Text = "" Then
track.Position = cdbl(40)
Else
track.Position = cdbl(115)
End If
'set type MOS string
If txtType.Text = "Full Screen" Then
Type = ""
Else
Type = "*LIVE VIDEO REQUIRED* | "
End If
'set style MOS string
If txtStyle.Text = "0" Then
Style = "Normal"
Else
Style = "Breaking"
End If
If txtBkgd.Text <> "" Then
Style = right(txtBkgd.Text, len(txtBkgd.Text)-30)
End If
'set animated MOS string
If txtAnimated.Text = "Animated" Then
Animated = "Animated | "
Else
Animated = ""
End If
'engine.DebugMessage("Style = " & Style, 0)
'set MOS string output
If Type = "*LIVE VIDEO REQUIRED* | " Then
Self.MOSDescription = "FS Timeline: " & Animated & Type & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text
engine.DebugMessage("FS Timeline: " & Animated & Type & " | " & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text, 0)
Else
Self.MOSDescription = "FS Timeline: " & Animated & Type & Style & " | " & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text
engine.DebugMessage("FS Timeline: " & Animated & Type & Style & " | " & txtMonth.Text & " " & txtDay.Text & " | " & txtBody.Text, 0)
End If