- [Voiceover] In this movie, I'll show you how
to distribute selected objects so that there's
a specific amount of room between
each object and its neighbors.
And so you can see here in the final version of the artwork
that we have an even amount of space between
each one of our squares as opposed to having them all
absolutely adjacent to each other as they are now.
And that spacing is absolutely even
up here at the top of the first row,
between each one of the rows,
and down here at the bottom as well.
So in other words, we have a total of
one, two, three, four, five gaps
that we need to bear in mind.
Alright, so I'll go ahead and switch over
to my document in progress.
You may recall that I made my artboard 100 points bigger
than it was before and so, if you take 100 and divide it
by those five gaps, then you can anticipate
that each of the gaps is gonna be 20 points.
And so I'm gonna start things off by
selecting all these squares which I can do
by going up to the Select menu and choose,
"All on Active Artboard" where you have
that keyboard shortcut of Ctrl-Alt-A,
or Command-Option-A on a Mac.
And then, I'll just go ahead and drag
this top left anchor point until it snaps into alignment
with the top right corner of the artboard.
But, for whatever reason, if I zoom in here
you can see that that didn't quite work.
If that happens to you, then the most rock solid solution
is to bring up the Transform Panel by clicking on the word,
"Transform" on the right side of the Control Panel.
Then, select this top point in the
small reference point matrix and notice your x and y values.
In my case, the x value is zero points.
That's with respect to the artboard by the way,
which is perfect, however, my y value is 2.827,
for whatever reason, so I'll just change it to zero as well.
And then just press the Tab key, and that goes ahead
and moves the square into exactly the proper location.
Now you may wonder, "Well, why didn't I just go ahead
"and use my Alignment functions right here, in order to
"for example, switch this align icon to align to artboard,
"and then I could click on Vertical Align Top?"
The problem is that's gonna move
all those objects independently
with the exception of the group objects in the center.
So I figured just dragging the objects
was the better solution.
Alright, I'll go ahead and press Ctrl-Z,
or Command-Z on a Mac, to undo that move.
And now what we need to do is scoot the squares
20 points down and 20 points to the right.
And so, with my black arrow tool selected,
I'll just go ahead and press the Enter key,
or the Return key on a Mac, and I'll change
both the horizontal and vertical values to 20 points,
and I'll turn on the Preview checkbox.
At which point, we'll see these guys scoot
into the proper locations.
Alright, I'll go ahead and click OK
in order to accept that change.
Now if you're really on the ball,
you could tell me that I wasted a little time there.
That wasn't the most efficient approach
because after all, we were just looking
at the Transform Panel and I could've just changed
the x and y values to 20 points.
In which case, good for you for noticing that.
Alright, now what I wanna do is distribute these guys
by a specific increment and I can do that
by bringing up the Full Align Panel.
And to make that happen, go to the Window menu,
and choose the Align command, which appears in my case,
over here on the right hand side of the screen.
And notice that we're seeing the six Align icons,
along with the six Distribute icons.
If you're not seeing anything more,
then you need to click on this double arrowhead
right next to the word, "Align,"
and that'll bring up the Distribute Spacing option.
Notice, however, that it's currently dimmed.
And that's because to make it available,
you have to select a key object.
And so I'll just go ahead and click on this top left square
in order to make it the key object because after all,
it's the only one that's in the proper position.
And now, as you can see,
Distribute Spacing is available to me.
I'll go ahead and change this value here
to 20 points because that's the size of the gap.
And then, I'll click Horizontal Distribute Space.
And that's gonna make an absolute disaster of things,
as you can see.
I'll go ahead and zoom out here.
And the reason that this is happening
is because Illustrator's distributing
every single one of the squares
20 points away from its neighbor
except for those four in the center.
And that's because they're grouped together.
What we need to do if first, group our squares into columns.
And I'm gonna do that by zooming back in
and of course, undo this mess.
And, in order to make things work,
I'm gonna have to ungroup these four squares in the center.
That doesn't mean you have to select them
independently of the other ones, by the way.
You can go up to the Object menu
and choose the Ungroup command,
or press Ctrl-Shift-G, or Command-Shift-G on the Mac.
And that will ungroup any groups inside the selection.
And so, I'll go ahead and choose that command.
At which point, I can now see the word, "Rectangle,"
over here on the far side of the Control Panel,
and that tells me that I no longer have any groups.
Because previously, it would have appeared
as, "Mixed Objects."
Alright, now I'm gonna marquee these four objects
in the first row and I'll press Ctrl-G,
or Command-G on a Mac, to group them.
And then I'll marquee this next column,
press Ctrl-G, the third column, press Ctrl-G,
and the fourth one, and then press Ctrl-G,
and of course, that's Command-G on the Mac.
Alright now, if I press Ctrl-A, or Command-A on the Mac,
to select everything and by the way,
that is the wrong keyboard shortcut
because I selected all these letters
on the second artboard as well.
Don't want that, so what I need to do instead,
is go the Select menu and choose,
"All on Active Artboard," or press Ctrl-Alt-A,
or Command-Option-A on the Mac.
Alright, now notice once again,
"Distribute Spacing" is dimmed.
And so what I need to do is establish a key object
by clicking on that top left square
which is gonna select the entire first group.
And then, if I click Horizontal Distribute Space,
I end up getting the exact effect I'm looking for.
Alright now, we're gonna wanna
vertically distribute the space,
but that means first grouping the squares into rows.
So, I'll start off by going up to the Object menu
and choosing, "Ungroup."
And that's going to ungroup all
four of the groups, by the way.
Then, I'll marquee these top squares,
press Ctrl-G or Command-G to group them,
the next row, group them,
the third row, group them,
and finally the fourth row, followed by Ctrl-G,
or Command-G on the Mac, to group them.
Alright, now I'll just go ahead and marquee these guys
instead of selecting everything on the artboard.
And now, notice again this object is dimmed
because we don't have a key object.
And in case that doesn't make sense, just think about it.
You have to tell Illustrator which of these rows
is supposed to be fixed in place so it knows
that other rows are the ones that are getting moved.
Now, notice we have this "Align to" option right there
and you can switch it to "Align to Key Object."
In which case, Illustrator's going to randomly
select a key object for you.
That's not the row I want, however.
So I'll just click on the top row
which will both deactivate the bottom row
and set the top row as a key object, as your're seeing now.
After which point, go ahead and click on
"Vertical Distribute Space" in order to move those rows
so that they're exactly 20 points apart.
After which point, I'll just go ahead
and click off the objects to deselect them.
And that's how you distribute selected objects by a specific
amount of space using the Distribute Spacing options
down here at the bottom of the Align panel.