Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: [flasher] duplicateMovieClip and depth setting |
| From: | Paul Willoughby |
| Date: | Thu, 01 Mar 2001 14:18:22 -0000 |
Hi Andy,
The third parameter of the duplicateMovieClip sets the *depth* which the
movie is duplicated to, not the _level. Depths are not the same as levels.
Levels are for loading movies into and depths are for creating
duplicates/attaching movie clips *within a level*. Basically you use depths
to control the stacking order (usually referred to as z-order) of clips
within a level. You can use depth to switch objects in front of each other
with swapDepth. If you duplicate a movie clip into a depth that is already
occupied, the duplicated clip will replace any clips previously duplicated
to that depth. I hope that makes sense.
So to me your code looks fine, you'll make a duplicate on whatever level the
code is executed from and its depth will be the value of MenuItemIndex. Do
the duplicates appear as you would expect? Does listing objects in test
movie mode show that all the duplicates movie clips are there?
paul
> -----Original Message-----
> From: AndyA [me
> Sent: 01 March 2001 13:44
> To: flasher from chinwag
> Subject: [flasher] duplicateMovieClip and depth setting
>
>
> Hi All,
>
> I've been looking at this line of code for the last 30
> minutes and cannot
> work out what is wrong with it. Help would be gratefully received.
>
> Code is:
>
> duplicateMovieClip (_root.MenuTemplate, "MenuItem"+MenuNameIndex,
> MenuNameIndex);
>
> the MenuNameIndex is an integer variable and is working fine, since
> "MenuItem"+MenuNameIndex is behaving as it should (MenuName1,
> MenuName2 etc
> as MenuNameIndex increments).
>
> The problem is that the MCs are all being created on _level0. My
> understanding is that the third parameter sets the level onto
> which the MC
> is loaded so the result should be an object MenuName1 on
> _level1, MenuName2
> on _level2 etc
>
> Am I just plain wrong? Or is something weird going on here?
>
> Regards
>
> Andy
> flasher
>
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

