The example code I provided was in C#. You can convert C# to Javascript by swapping the order of the [type][variable] declarations to [variable]:[type], like so:
public Cube myCube; // This is the C# style
public myCube : Cube; // This is the Javascript style
To convert functions, replace the return type (such as "void") with the word "function" and append its return type to the end:
void MyCubeWasClicked(GameObject go) { // C# style
function MyCubeWasClicked(go : GameObject) : void { // JS style, declares functions with a "function" keyword, and the return type goes on the end
You can use the same NGUI-based tweens in the same way for imported models, but remember that by design, they only modify the
current/specified GameObject: it does not traverse the hierarchy and modify the child GameObjects. This way, if your model is of a 3D face, applying a color tween will affect, say, the skin only but leave the rest of the children (like eyes, hair, eyebrows, etc.) alone. To modify those, you will need to recurse through its hierarchy yourself and apply the same tween to them all.