OnPreviewRender

Can anybody tell me why this script in the “OnPreviewRender” tab:

dim PreviewPage as xpTextObject
dim Dir as xpSceneDirector
self.GetObjectByName(“PreviewChoiceVLTxt”,PreviewPage)
self.GetSceneDirectorByName(“SceneDirector1”,Dir)
If PreviewPage.Text = “Row1” then
Dir.Position = 25
ElseIf PreviewPage.Text = “Row2” then
Dir.Position = 30
ElseIf PreviewPage.Text = “Row3” then
Dir.Position = 35
ElseIf PreviewPage.Text = “Row4” then
Dir.Position = 40
ElseIf PreviewPage.Text = “Row5” then
Dir.Position = 45
End If

Is working in XP10.1_5434 but NOT in XP11.1_5760?

And with “working” I mean: by choosing one of the options (Row1-5) I want to see the preview of that director position.

I just tested your script in 11.1.5761 and found that your script works for me.

That’s strange… You use only one build later and it works? Is there any notification of this in the change-log? I do have to mention I am using the 64bit version. Perhaps that’s the answer?

Try to recompile your script(s) when you go into a different version.

Add in some Engine.WriteToLog() debug statements to see if it is even firing. If not, check the preferences on the different version to see if there are some preferences for scripting not correctly set.

I checked with 64bit version, seems to work for me.

You should check the debugger

You can add your own messages as well.

Engine.debugmessage(“Hello World”, 0)

If you are uninstalling/installing a lot on the same system make sure the last thing you do is install. If you uninstall one edition of XPression it will uninstall the script engine for all.

You could also try clearing the script cache: Edit > Preferences > On DIsk Cache > Script Engine > Delete the contents of this folder