>Well when I opened the library script to
>make my minor alterations,  a tear came to my eye
>( you see I'm still learning).
>
>If anyone has a neat solution I would be immensely grateful,
>thank you for your time,


I understand that, those behaviors take care of everything, and make 
coffee too. All you're trying to do is parent one thing to another, 
but do you want to directly manipulate the model with the mouse, or 
can you get by with keystrokes? Here's a simple script to show just 
the parenting part of things:

Make a new movie that has one cast member, a 3D member named "world". 
Drag it onto the stage. Make a movie script (command-shift-u will do) 
and paste this in there:

global littleboxmodel,bigboxmodel

on startmovie
   w = member("world")
   w.resetworld()
   littleboxRes = w.newmodelresource("little box", #box)
   littleboxRes.width = 10
   littleboxRes.height = 10
   littleboxRes.length = 10
   bigboxRes = w.newmodelresource("big box", #box)
   bigboxRes.width = 50
   bigboxRes.height = 50
   bigboxRes.length = 50
   littleboxmodel = w.newmodel("little box",littleboxRes)
   bigboxmodel = w.newmodel("big box",bigboxRes)
   bigboxmodel.parent = littleboxmodel
   bigboxmodel.translate(100,0,0)
end

on exitframe
   bigleft = keypressed("j")
   bigright = keypressed("l")
   bigup = keypressed("i")
   bigdown = keypressed("k") 
   littleleft = keypressed("a")
   littleright = keypressed("d")
   littleup = keypressed("w")
   littledown = keypressed("s")
   bigboxmodel.rotate(-bigleft+bigright,-bigup+bigdown,0)
   littleboxmodel.rotate(-littleleft+littleright,-littleup+littledown,0)
   go the frame
end


Run the movie, and you should see that pressing the keys ijkl will 
rotate just the big box, and the keys wasd will rotate the little box 
and the big box. Then let me know if you have questions!







-- 
[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