logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
famt  
#1 Posted : Tuesday, February 13, 2024 10:35:01 AM(UTC)
famt

Rank: Newbie

Groups: Registered
Joined: 2/13/2024(UTC)
Posts: 1
Brazil
Location: Fortaleza

I am creating a Scoreboard for tennis that will be integrated with an external software which produces stats data about the game such as winners, aces, server errors, and so on.
In order to integrate this software with vMIX, I am using a XML file as a datasource.
One field in this XML file is named "server_player", that maps which player is the current server (1 - FirstPlayer / 2 - SecongPlayer).
In my ScoreBoard, I am using two images to represent an icon beside the player to show who is serving.
I created an script that according the "server_player" value, should present only one of both images.

So I create the following script:

Quote:

dim PLACAR as String = "PLACAR"

Dim xmlFilePath As String = "C:\\score.xml"
While True
sleep(500)
Try
Dim xmlDoc As New XmlDocument()
xmlDoc.Load(xmlFilePath)
Dim xpath As String = "/scoreboard_config/server"
Dim xmlNode As XmlNode = xmlDoc.SelectSingleNode(xpath)
If xmlNode IsNot Nothing Then
Dim serverValue As String = xmlNode.InnerText
if serverValue = "1" Then
API.Function("SetImageVisibleOn",Input:=PLACAR , SelectedName:="Player1_Serving.Source")
API.Function("SetImageVisibleOff",Input:=PLACAR , SelectedName:="Player2_Serving.Source")
Else
API.Function("SetImageVisibleOff",Input:=PLACAR, SelectedName:="Player1_Serving.Source")
API.Function("SetImageVisibleOn",Input:=PLACAR, SelectedName:="Player1_Serving.Source")

End if
Else
'Console.WriteLine("XPath not found in the XML file.")
End If

Catch ex As Exception
' Handle the case where an error occurs
'Console.WriteLine("Error loading or processing XML data: " & ex.Message)
End Try
End While


This script works fine, but images come and go without transitions!!!
So I think that it would be better if these images appear and disappear with their related transitions.
I searched in the vMIX reference and found the Function "TitleBeginAnimation", and I tried to use it, but with no sucess.
In my GT Tile, I already set both transitions for DataChangeIn and DataChangeOut
So mye question:
is it possible to use this function to trigger these transtions instead of using SetImageVisibleOn and SetImageVisibleOff?
Something line
API.Function("TitleBeginAnimation", Input:=PLACAR, SelectName=:"Image1", Value := "DataChangeIn")


doggy  
#2 Posted : Tuesday, February 13, 2024 11:18:39 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,209
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: famt Go to Quoted Post
I am creating a Scoreboard for tennis that will be integrated with an external software which produces stats data about the game such as winners, aces, server errors, and so on.
In order to integrate this software with vMIX, I am using a XML file as a datasource.
One field in this XML file is named "server_player", that maps which player is the current server (1 - FirstPlayer / 2 - SecongPlayer).
In my ScoreBoard, I am using two images to represent an icon beside the player to show who is serving.
I created an script that according the "server_player" value, should present only one of both images.

So I create the following script:


This script works fine, but images come and go without transitions!!!
So I think that it would be better if these images appear and disappear with their related transitions.
I searched in the vMIX reference and found the Function "TitleBeginAnimation", and I tried to use it, but with no sucess.
In my GT Tile, I already set both transitions for DataChangeIn and DataChangeOut
So mye question:
is it possible to use this function to trigger these transtions instead of using SetImageVisibleOn and SetImageVisibleOff?
Something line
API.Function("TitleBeginAnimation", Input:=PLACAR, SelectName=:"Image1", Value := "DataChangeIn")






Setvisibility does what it says , makes visible/invisible nothing more , no animation possible
Datachanges respond to changes in data ( text/values) but does not responds to the specific content/value itself of the data

you can use titlebeginaniation instead to change/select a page , with pages either showing/hiding an image including animations ( like a fade) when changing between pages
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.