Duplicate [MX]

This is my problem, sorry if I don’t explain it too well because I’m not entirely sure how to explain it.

I’m trying to create a whole big grid of circles, where the edge of each “quadrent” or whatever you want to call it (12, 3, 6, 9 oclock) touches the other at the cooresponding part. Here, I’ll try to explain using letters… lol
oooo
oooo
I need the o’s to be touching on ever side.

I have it positioned so that the top left of the imaginary square around the circle is at (0,0)… (0,0) is the top left right? I think that’s how flash does it anyway.

Well the circle is 10 by 10 and I want the “circle grid” to be like 60 by 25 circles or so.

I really have no idea how to do this. I took a look at the duplicate movie clip tutorial and it confused the bajeezus outta me, well it didnt so much confuse me, I just couldn’t figure out how to apply it.

Thanks a lot in advance

gridW = 5;
gridH = 5;
xStart = 20;
yStart = 20;
for (ii = 0; ii < 5; ii++)
{
	for (jj = 0; jj < 5; jj++)
	{
		x++
		circle.duplicateMovieClip ("copy" + ii + jj, x);
		ext = _root["copy" + ii + jj];
		ext._x = xStart + (ext._width * ii);
		ext._y = yStart + (ext._height * jj);
	}
}

like that?

just change gridW to the number of circles you want across and gridH to the number of circles you want up and down…

pretty dang close, thanks a lot, im just gonna screw with it til i get what i need

Thanks a ton for the fast response jubba

actually, how can I call it from the library?
sorry… heh

you don’t call from the library with duplicate. if you want to call fro mthe library change where it says:


circle.duplicateMovieClip ("copy" + ii + jj, x);

to


_root.attachMovie ("circle", "copy" + ii + jj, x);

hey jubba, sorry I’m not getting this
here’s the fla… I’m not entirely sure whats wrong
its mostly working except for this wierd little section that is blank
no clue how to fix that

I really appreciate the help, still

change


x++

to


x--

gridW = 40;
gridH = 15;
xStart = 0;
yStart = 0;
for (ii = 0; ii < gridW; ii++)
{
        for (jj = 0; jj < gridH; jj++)
        {
                x--
                circle.duplicateMovieClip ("copy" + ii + jj, x);
                ext = _root["copy" + ii + jj];
                ext._x = xStart + (ext._width * ii);
                ext._y = yStart + (ext._height * jj);
        }
}

that worked… i dont get why… but it did
thanks sooo much for the help

I always like to see peoples finished products, so heres mine
http://xxviii.net/swf/circle.swf

I was all inspired-like by ahmeds signature, so i decided to try to make something… i did part of it on my own, which im proud of
I can’t wait to start tweeking it and doin fun stuff to it.

Thanks a ton for the help jubba