I get 6 circles including the original one. My first question is… why is there a difference in the number of circles? (using the debugger I’m noticing that the second circle that’s made is named “circle3”)
my second question is - I have a navbar that I would like the circles to go behind… however, only the first circle (the bubble movie) does that. How can I make it so that all the circles go behind it?
And a bonus question - do buttons have levels? or is that just for movies? I have some buttons too that I dont want the circles to block.
for (k = 0; k < 4; k ++) {
duplicateMovieClip (bubble, “circle” + k , 0)
}
you’re giving the same depth for every duplicated bubble
so it’s replaced until circle3 … which remains in the stage [size=1][ i think … lol ][/size]
second …
bubble original movie clip circle0 first duplicated circle circle1 second duplicated circle circle2 third duplicated circle circle3 fourth duplicated circle
grand total = 5
me don’t understand :cyclops:
third …
place your navigation bar in a higher depth using
[color=red]instanceName.swapDepths (someNumber)[/color]
just fyi lavaboy, when dealing with duplicate movie and attachMovie etc, the correct term for that kind of placement/arrangement is “depth” (like kax used) and not level. Normally it wouldnt be a big deal but Flash also deals with levels when using loadMovie/loadMovieNum which are similar but different alltogther - allowing for confusion when working with duplicate etc.
hey, thanks, swapdepth worked. I’m still confused about depth though… my script generates a couple of movie, but I want them to go behind preexisting buttons… Are the movies generated by the code in different depths? Can you have two movies in the same depth? Cause I didnt really understand why the movies were getting overwritten as a result of having the same depth.
can you have two movie clips in the same depth ?
nope …
when you’re talking about movies … you mean movies [size=1][ different swfs ][/size] or movie clips ?? lol
if it’s movies then you’re talking about levels
if it’s movie clips then you’re talking about depths
oh well … you’ve officially confused me now :cyclops:
senocular get back here with your explanations !!
you’re really good at that and i really suck :-\
yeah, its like an array if you are familiar with them if you have an array with three elements:
myArray = new Array(1,2,3);
and you try to put a new element in the second postion of that array
myArray[1] = “a”;
Then you evectively over-write and replace that original element with the new
trace(myArray); // traces 1,a,3
The same thing applies when attaching and duplicating movieclips. Trying to attach a bunch of movies in depth 0 means you are replacing each one of those clips youve previously put there.
swapDepths however, does let you swap movieclips into the same depth once theyve been successfully attached. With this though you sometimes get some flickering if they are overlaping because Flash is confused on how to arrange them on the screen randomly putting one above the other etc.