Peter Bochan wrote:

I was playing around with addChild command and I can't get it working. I
made up a couple of spheres and want to use AddChild to add one to another.
I always get a script error. Please help.

Hi, Peter. Dunno which error you�re talking about. Maybe you were not creating the spheres before trying to make them child of the main one. Oh, by the way, you were trying to create many newShaders with the same name and that would give you a script error. Anyway, here�s a working version:

www.onwine.com.ar/temp/addChild.zip

-- create model and apply shader to it
  sm1 = member("model").newModel("childSphere1", sr)

  --make this sphere child of the main one
  parentSphere = member("model").model("sphere1")
  parentSphere.addChild(sm1)

Regards,
--
Agust�n Mar�a Rodr�guez | [EMAIL PROTECTED] | www.OnWine.com.ar


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to