nj,
In the future you might want to avoid list cross-posting and instead perform either
individual posts or simply post in one forum and if no help appears then post in
another forum. Hopefully you'll notice that I broke the cross-posting chain by
replying individually to each list. But let's deal with the question at hand...
> so somehow I'm not getting the new model into my original 3d
> castmember. How do you do this???
You're misunderstanding the purpose of addToWorld and you're missing out completely on
cloneModelFromCastMember which is the command you should be using. When you have a 3D
member you must look at that member as an isolated environment, in order to render
that environment you must have all needed models and their resources present in that
member. In order to get a model that exists in one member into another you must use
the cloneModelFromCastMember command:
if (member("source").state = 4) then
member("target").cloneModelFromCastMember("newName","oldName",member("source"))
end if
The above code will clone the model named "oldName" that's found in the cast member
"source" and put that clone (and all its resources, shaders, textures, etc.) into the
cast member "target". Please take note of the fact that your source cast member *must*
have achieved a state value of 4 before you can do this operation. This confuses folks
when the cast member is not used on stage as it won't be preloaded for you, you must
do this yourself before issuing the cloneModelFromCastMember command.
So what does addToWorld do (as well as removeFromWorld)? Within a cast member there is
a scenegraph, at the top of the scenegraph sits the "world" group object, everything
that's "in the world" gets rendered, anything that's "not in the world" doesn't get
rendered. It's important to remember that being added to the world or removed to the
world doesn't affect whether the model exists in the cast member or not! You can have
models in your member that aren't in the world (and therefore aren't rendered) and
others that are (and so they are rendered).
Does that clear things up? If not then give a shout...
Cheers,
Tom
[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!]