SPDL editing (JavaScript) 2004-02-11 - By Loic Le Page
Back Hi,
To have your script called each time the slider's value is changing, the best way is to edit the SPDL file (as you said) and to add your scripted behaviour in the "Logic" section. If your slider is called "Slider" in your SPDL description, the corresponding function will be: Logic { Sub Slider_OnChanged() ....your script..... End Sub }
Unfortunately, the "Logic" section only accept VBScript. But you can also write your script in JScript in XSI, then you save it as a custom command and you call this command from the "Logic" section of your slider's SPDL file.
To answer your second question, you can write all your JScript functions in the same document and then register them as custom commands in XSI. Each time you create a custom command, you can specify the same file as source and then associate the command with a specific function in this file. Then you just have to call your own custom commands from your operators.
Hope this helps.
Loic Le Page BiboFilms - Pumpkin 3D France
-- -- Original Message -- -- From: "Jose Luis Gomez" <development@(protected)> To: <XSI@(protected)> Sent: Wednesday, February 11, 2004 11:28 AM Subject: SPDL editing (JavaScript)
> Hi all, > I have a custom parameter set with a slider on it, and I want a script > to be executed everytime the value of the slider changes. I know I can > do this by saving it as a SPDL and editing it, but I don't know how to > do it in JavaScript. Can anybody help me with this?? > > Another question I have is if it is possible to have a "library" of my > own JavaScript functions/procedures and call them from my > scripts/scripted operators. If so, how do I have to do it?? > > Thaks in Advance (examples would be really welcome :-) ) > > /Jose L. Gomez > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi > >
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|