Viz Scripts


1. Resize textfield:

dim cPICTO = this.scene.findcontainer("$ONOFF_PICTO")
dim piMaxsize = (plugininstance) this.GetFunctionPluginInstance("Maxsize")

sub OnInitParameters()
   RegisterPushButton("action", "Maxsize txt_title01", 1)
end sub

sub OnExecAction(buttonId as Integer)
 if cPicto.active = false then
 piMaxsize.SetParameterDouble("WIDTH_X", 880.0)
 else
 piMaxsize.SetParameterDouble("WIDTH_X", 815.0)
 end if
end sub

2. Resize textfield:

Frame 0: THIS_SCENE*STAGE*DIRECTOR*PAGE_1 CONTINUE
Frame 12: THIS_SCENE*STAGE*DIRECTOR*PAGE_2 START
Frame 14: THIS_SCENE*STAGE*DIRECTOR*PAGE_2 CONTINUE
Frame 26: THIS_SCENE*STAGE*DIRECTOR*PAGE_1 START

Page 2 inactive at 0, active at 1, active at 26

3.GAP

dim sMaxValueContainerName = (string) "txt_config_result_gap_base"
dim sResultBaseContainerName = (string) "txt_result_left"
dim sResultGapContainerName = (string) "txt_result_right"
dim sResultGapMaskContainerName = (string) "result_progress_bar"
dim sBaseContainerName = (string) "ONOFF_RESULT_GAP"
dim sBaseLineContainer = (string) "RESULT_GAP"

sub OnInitParameters()
 RegisterPushButton("rt_action", "Calculate RT Progress Bar", 1)
end sub

sub OnExecAction(buttonId As Integer)
 dim dMaxValue = CDbl(scene.findcontainer(sMaxValueContainerName).geometry.text)
 dim dResultBaseValue = (double) CDbl(scene.findcontainer(sBaseContainerName).findsubcontainer(sBaseLineContainer).findsubcontainer(sResultBaseContainerName).geometry.text)
 dim dResultGapValue = (double) CDbl(scene.findcontainer(sBaseContainerName).findsubcontainer(sBaseLineContainer).findsubcontainer(sResultGapContainerName).geometry.text)
 dim cResultGapMaskContainer = (container) scene.findcontainer(sBaseContainerName).findsubcontainer(sBaseLineContainer).findsubcontainer(sResultGapMaskContainerName)
 dim dPercentage = (double) dResultGapValue/dResultBaseValue

 if dPercentage > 2 then
  dPercentage = 2
 end if 
 
 if dPercentage < 0 then
  dPercentage = 0
 end if 
 cResultGapMaskContainer.scaling.y = dPercentage 
end sub

4. Color

dim sMaxValueContainerName = (string) "txt_config_result_gap_base"
dim sResultBaseContainerName = (string) "txt_result_left"
dim sResultGapContainerName = (string) "txt_result_right"
dim sResultGapMaskContainerName = (string) "result_progress_bar"
dim sBaseContainerName = (string) "ONOFF_RESULT_GAP"
dim sBaseLineContainerPrefix = (string) "RESULT_GAP" 

sub OnInitParameters()
 RegisterPushButton("result_color", "determine color", 1)
end sub sub OnExecAction(buttonId As Integer)

dim dMaxValue = CDbl(scene.findcontainer(sMaxValueContainerName).geometry.text)
dim dResultBaseValue = (double) CDbl(scene.findcontainer(sBaseContainerName).findsubcontainer(sBaseLineContainerPrefix).findsubcontainer(sResultBaseContainerName).geometry.text)
dim dResultGapValue = (double) CDbl(scene.findcontainer(sBaseContainerName).findsubcontainer(sBaseLineContainerPrefix).findsubcontainer(sResultGapContainerName).geometry.text)
dim cResultGapMaskContainer = (container) scene.findcontainer(sBaseContainerName).findsubcontainer(sBaseLineContainerPrefix).findsubcontainer(sResultGapMaskContainerName)
dim dPercentage = (double) dResultGapValue/dResultBaseValue
dim dKeyFrame = FindKeyFrame("result_color_frame")
dim vRed as Double
dim vGreen as Double
dim vBlue as Double
dim vAlpha as Double

if dPercentage = 1 then
 dKeyFrame.MaterialValue.Color.SetRGB(cdbl(255)/255, cdbl(255)/255, cdbl(255)/255)
else if dPercentage > 1 then 
 dKeyFrame.MaterialValue.Color.SetRGB(cdbl(31)/255, cdbl(190)/255, cdbl(27)/255)
else
 dKeyFrame.MaterialValue.Color.SetRGB(cdbl(153)/255, cdbl(1)/255, cdbl(17)/255)
end if
end if
end sub

'*******Position between 16:9 and 4:3*****
Dim Pos_43 as integer = -222
Dim Pos_169 as integer = -292 
'****************************************** 
Dim actContainer as Container 
Dim events as array[string] 
Dim action as array[string] 
Dim switch as array[string] 
Dim time as array[string] 
Dim str_action as string 
Dim str_event as string 
Dim str_time as string 
Dim str_switch as string 
Dim SCALE as double 
Dim POS_X as double 
events.clear 
events.push(" 100% ") 
events.push(" 90% ") 
events.push(" 80% ") 
events.push(" 70% ") 
action.clear 
action.push(" 4:3safe ") 
action.push(" 16:9safe ") 
switch.clear 
switch.push(" FINA DIVE ") 
switch.push(" HIGH DIVE ") 
time.clear 
time.push(" 2sec ") 
time.push(" 3sec ") 
time.push(" 4sec ") 
time.push(" 5sec ") 
time.push(" 6sec ") 

sub OnInit() 
 actContainer = GetParameterContainer("actCont") 
 str_event=events[GetParameterInt("do_event")] 
 str_action=action[GetParameterInt("do_action")]
 str_switch=switch[GetParameterInt("do_switch")] 
 str_time=time[GetParameterInt("do_time")] 
end sub 

sub OnInitParameters() 
 RegisterRadioButton("do_event", "Scale: ",1,events) 
 RegisterParameterContainer("actCont", "TARGET: ") 
 RegisterRadioButton("do_action", "Action: ",1,action) 
 RegisterRadioButton("do_switch", "Switch: ",0,switch) 
 RegisterRadioButton("do_time", "Time: ",2,time) 
 RegisterInfoText("*****CONTAINER Control ***** \nSCALE\nPOSITION - 4:3safe=-222|16:9safe=-292\nand the AnimationSpeed and Time of PAUL\n\n\nHEIKO :>") 
end sub 

sub OnParameterChanged(parameterName As String) 
 If parameterName = "do_action" Then 
  str_action=action[GetParameterInt("do_action")] 
  select case str_action 
   case " 4:3safe " 
    actContainer.Position.x = Pos_43 
   case " 16:9safe " 
    actContainer.Position.x = Pos_169 
  end select 
 Elseif parameterName="do_time" then 
  str_time=time[GetParameterInt("do_time")] 
  select Case str_time 
   case " 2sec " sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F100") 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F100") 
   case " 3sec " 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F150") 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F150") 
   case " 4sec " 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F200") 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F200") 
   case " 5sec " 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F250") 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F250") 
   case " 6sec " 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F300") 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F300") 
  end select 
 Elseif parameterName="do_event" then 
  str_event=events[GetParameterInt("do_event")] 
  select case str_event 
   case " 100% " 
    actContainer.Scaling.xyz = 1 
   case " 90% " 
    actContainer.Scaling.xyz = 0.9 
   case " 80% " 
    actContainer.Scaling.xyz = 0.8 
   case " 70% " 
    actContainer.Scaling.xyz = 0.7 
  end select 
 Elseif parameterName = "actCont" then 
  actContainer = GetParameterContainer("actCont") 
 Elseif parameterName="do_switch" then 
  str_switch=switch[GetParameterInt("do_switch")] 
  select case str_switch 
   case " FINA DIVE " 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*VALUE SET 150") 
   case " HIGH DIVE " 
    sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*VALUE SET 200") 
  end select 
 End If 
end sub

5. Replace Director

dim cLine = this.scene.findcontainer("$ONOFF_LINE_2_1")
dim dDir = Stage.FindDirector("ALL_IN")
dim dKeyFrame = dDir.FindKeyframe("ActionLineY_1")

sub OnExecPerField()
if cLine.active = false then
 dKeyFrame.XyzValue.y = 24
else
 dKeyFrame.XyzValue.y = 48
end if
end sub

6. Showbanner

dim cSponsor = this.scene.findcontainer("$ONOFF_SHOW_BANNER")
dim cBg = this.scene.findcontainer("$ONOFF_BG")

sub onexecperfield()
 if cSponsor.active = false then
 this.scaling.x = 1.0
 this.scaling.y = 1.0 
 this.scaling.z = 1.0
 cBg.active = true
 else
 this.scaling.x = 0.9
 this.scaling.y = 0.9
 this.scaling.z = 0.9
 cBg.active = false
 end if
end sub

6. Dive

'*******Position between 16:9 and 4:3*****
Dim Pos_43 as integer = -222
Dim Pos_169 as integer = -292
'******************************************
Dim actContainer as Container
Dim events as array[string]
Dim action as array[string]
Dim switch as array[string]
Dim time as array[string]
Dim str_action as string
Dim str_event as string
Dim str_time as string
Dim str_switch as string
Dim SCALE as double
Dim POS_X as double

events.clear
events.push(" 100% ")
events.push(" 90% ")
events.push(" 80% ")
events.push(" 70% ")
action.clear
action.push(" 4:3safe ")
action.push(" 16:9safe ")
switch.clear
switch.push(" FINA DIVE ")
switch.push(" HIGH DIVE ")
time.clear
time.push(" 2sec ")
time.push(" 3sec ")
time.push(" 4sec ")
time.push(" 5sec ")
time.push(" 6sec ")

sub OnInit()
 actContainer = GetParameterContainer("actCont")
 str_event=events[GetParameterInt("do_event")]
 str_action=action[GetParameterInt("do_action")]
 str_switch=switch[GetParameterInt("do_switch")]
 str_time=time[GetParameterInt("do_time")]

end sub


sub OnInitParameters()
 RegisterRadioButton("do_event", "Scale: ",1,events)
 RegisterParameterContainer("actCont", "TARGET: ")
 RegisterRadioButton("do_action", "Action: ",1,action)
 RegisterRadioButton("do_switch", "Switch: ",0,switch) 
 RegisterRadioButton("do_time", "Time: ",2,time)
 RegisterInfoText("*****CONTAINER Control ***** \nSCALE\nPOSITION - 4:3safe=-222|16:9safe=-292\nand the AnimationSpeed and Time of PAUL\n\n\nHEIKO :>")

end sub

sub OnParameterChanged(parameterName As String)
 If parameterName = "do_action" Then
 str_action=action[GetParameterInt("do_action")] 
 select case str_action
 case " 4:3safe "
 actContainer.Position.x = Pos_43
 case " 16:9safe "
 actContainer.Position.x = Pos_169
 end select
 Elseif parameterName="do_time" then
 str_time=time[GetParameterInt("do_time")]
 select Case str_time
 case " 2sec "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F100")
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F100")
 case " 3sec "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F150")
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F150") 
 case " 4sec "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F200")
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F200") 
 case " 5sec "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F250")
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F250") 
 case " 6sec "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*TIME SET F300")
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$OUTRO_PAUL*TIME SET F300")
 end select
 Elseif parameterName="do_event" then
 str_event=events[GetParameterInt("do_event")]
 select case str_event
 case " 100% "
 actContainer.Scaling.xyz = 1
 case " 90% "
 actContainer.Scaling.xyz = 0.9
 case " 80% "
 actContainer.Scaling.xyz = 0.8
 case " 70% "
 actContainer.Scaling.xyz = 0.7
 end select 
 Elseif parameterName = "actCont" then
 actContainer = GetParameterContainer("actCont")
 Elseif parameterName="do_switch" then
 str_switch=switch[GetParameterInt("do_switch")] 
 select case str_switch
 case " FINA DIVE "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*VALUE SET 150")
 case " HIGH DIVE "
 sendCommand("MAIN_SCENE*STAGE*DIRECTOR*GO_PAUL*KEY*$END_PAUL*VALUE SET 200")
 end select 
 End If
end sub

7. Next Page

ANI_IN/LINES/0 (stop 4)

THIS_SCENE*STAGE*DIRECTOR*StartList03_Next SHOW 0.0;
THIS_SCENE*STAGE*DIRECTOR*StartList03_P1 START;

ANI_IN/LINES/5

THIS_SCENE*STAGE*DIRECTOR*StartList03_P1 CONTINUE;
THIS_SCENE*STAGE*DIRECTOR*StartList03_P2 CONTINUE;

ANI_IN/LINES/6

THIS_SCENE*STAGE*DIRECTOR*StartList03_P1 SHOW 0.0; 
THIS_SCENE*STAGE*DIRECTOR*StartList03_P2 SHOW 0.0;

PAGE1 & PAGE2/0 & 6 (stop 5)

Active = Off

PAGE1 & PAGE2/1 & 5

Active = On

NEXT_PAGE/PAGE_CHANGE/1 (stop 3)

THIS_SCENE*STAGE*DIRECTOR*StartList03_P1 CONTINUE;
THIS_SCENE*STAGE*DIRECTOR*StartList03_P2 START;

NEXT_PAGE/PAGE_CHANGE/4

THIS_SCENE*STAGE*DIRECTOR*StartList03_P2 CONTINUE;
THIS_SCENE*STAGE*DIRECTOR*StartList03_P1 START

ONOFF_PAGE2

0 Active = Off
4 Active = On