|
-
getDepth();
trying to understand getDepth better
i have main mc and mc b so i do
main.attachMovie("b", "b1",1);
it works fine it but if i change depth from 1 to main.getDepth the main mc dissapears. why is that? does main mc get replaced by b1?
-
there are several thousands of depth layers. what you place on on the stage during authoring time is automatically put into the depth range below 0. what you create by actionscript should be put in the positive range.
there can be only one object per depth layer. thus, your main MC disappears, if you put something else on its depth level.
if you create mcs per AS and don't want to keep track of which depth has already been taken, you can use mc.getNextHighestDepth();
e.g.:
main.attachMovie("b", "b1",main.getNextHighestDepth());
will attach an mc to main and automatically put it into the next highest depth level inside main that is not yet occupied by another object.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|