I'm using a single, looping scene director with two scripts. At the front of the SD is a script that refreshes the datalinqs based on the current race number. At the end is a script that set the race number. That is based on whether or not the producer only wants to show winners and, if not, keeps track of the number of candidates in a race before going to the next race. The scene itself has hidden text boxes linked to the Datalinq which then sets party colors, party icons, and winner flags based on the data. Script is below and
here's a sample scene (some elements may not have exported, but scripts are there).
'declare variables
dim sequence, numberofraces, pages, newrace, candidate1, candidate2 as xptextobject
dim keys as xpDatalinqKeys
dim key as xpDatalinqKey
dim nextrace, nextpage, boolnewrace as string
'get objects
Scene.getobjectbyname("Seq Number", sequence)
Scene.getobjectbyname("Number Of Races", numberofraces)
Scene.GetObjectByName("Number of Pages", pages)
Scene.GetObjectByName("New Race", newrace)
Scene.GetObjectByName("CandidateNumber_1", candidate1)
Scene.GetObjectByName("CandidateNumber_2", candidate2)
If pages.Text = "1"
'check if at end of ticker list
If sequence.text <> numberofraces.text Then
'advance sequence number by one if not end of list
nextrace = CInt(sequence.text) + 1
Else If sequence.text = numberofraces.text Then
'reset sequence number to 1 if end of list
nextrace = 1
End If
boolnewrace = "True"
Else
'advance to next page of race if multiple winners entered
candidate1.Text = CInt(candidate1.Text) + 2
candidate2.Text = CInt(candidate2.Text) + 2
pages.Text = CInt(pages.Text) - 1
nextrace = CInt(sequence.Text)
boolnewrace = "False"
End If
'send new race designation to template
newrace.Text = boolnewrace
'send sequence number to scene
sequence.text = CStr(nextrace)
'set datalinq and refresh
Scene.GetDatalinqKeys(keys)
keys.GetKeyByName("Sequence", key)
key.AsString = CStr(nextrace)
Scene.RefreshDatalinqs
engine.DebugMessage("New Race = " & newrace.Text, 0)
engine.DebugMessage("Sequence number: " & nextrace, 0)
engine.DebugMessage("Page number: " & pages.Text, 0)
'If a new race reset candidate count
If boolnewrace = "True" Then
candidate1.Text = "1"
candidate2.Text = "2"
End If
------------------------------
John Robbins
Graham Media Group INC
------------------------------