>function changeColorJS(){
>c = CortonaX.Engine.Nodes
>("hotScrew3").Fields
>("diffuseColor");
>c.Red = 1;
>c.Value = Array(1, 0, 0);
>b = CortonaX.Engine.CreateField
>("SFColor")
>b.Red = 1;
>b.Green = 0.5;
>b.Blue = 0.1;
>c.Assign(b);
>}
>
>I couldn't get this to work.
>I'm sure I'm doing something
>wrong.
>
>c.Value = Array(1, 0, 0);
>b = CortonaX.Engine.CreateField
>("SFColor")
>b.Red = 1;
>b.Green = 0.5;
>b.Blue = 0.1;
>c.Assign(b);
This is the right way for JavaScript.
This code must works.
But I reccomend use VBScript for change
Array values. You can also see to
JavaScript SafeArray functions.
JavaScript does not support Array
function.
>Which is prefered? javaScript
>or VBScript.
For some tasks - VBScript. VBScript has,
for example, errors handling and Array
function.
For some tasks - JavaScript. JavaScript
has more useful syntax (for me) and has
regular expressions (ah... regexp!)
support.
You can mix functions on both languages.
There are many
>VB examples in the SDK. Can I
>use this code when writing
>VBScript?
In many cases - yes. But VB, of course,
has some differences with VBScript.
I've done some
>javascript, some VBA and some
>VB. I'd have to learn another
>language if I shift to
>VBScript, but it doesn't look
>tough at all.
VBScript and VBA mostly is the same
language. At this time the same
ScriptEngine used for Office and for IE.
---------------
parker
|
|