Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating slices from objects

From: Illustrator CS5 for Web and Interactive Design

Video: Creating slices from objects

Perhaps the most efficient way to define slices in Illustrator is using a feature called object-based slicing. Well, after all, Illustrator is an object-based program. We are focusing on using objects, like rectangles and vector shapes, so on and so forth. It only makes sense to use those very objects which we're already using in the Transform panel to ensure that they are the right size, and use those objects to also define our slices. Here is one of the nicest things about using that method. If we ever update or change our object, because the slice is based on the object itself, the slice also changes to match that.

Creating slices from objects

Perhaps the most efficient way to define slices in Illustrator is using a feature called object-based slicing. Well, after all, Illustrator is an object-based program. We are focusing on using objects, like rectangles and vector shapes, so on and so forth. It only makes sense to use those very objects which we're already using in the Transform panel to ensure that they are the right size, and use those objects to also define our slices. Here is one of the nicest things about using that method. If we ever update or change our object, because the slice is based on the object itself, the slice also changes to match that.

In other words, it means it's kind of a live slice that always updates itself based on your content. It's a great concept, and let's see how we actually apply it, here inside of Illustrator. Now we're going to use this for two examples here. I'm going to focus right now on an entire web page, where we're going to be using slices to define these divs for our web page, and at the same time I'm also going to show you how to take slices that are defined by objects and use them to create individual graphics, things like maybe banner ads or other web graphics that you might create. So let's see how those work.

Now in this example here, I have my web page, but I also have the grid that I've defined that help me first create my design. I use just regular, plain rectangles to draw this grid. In fact, I'm going to the View menu here. I'm going to choose Guides, then I'm going to choose Hide Guides, just so that they don't get in the way here. We want to focus on the artwork itself that's right on the page. These here are regular rectangles, and we use this when we first started designing the actual grid for our layout. Now remember, when we first started actually drawing these rectangles, we actually drew and positioned them using the Transform panel.

So every single rectangle that I see here is at exact precise size and in the right location. The way that Illustrator works is that you could take any object, you can go to the Object menu and choose Slice, and then choose Make. This takes that object that you currently have selected and uses it as the basis to create a slice. So if I choose this option right now, Illustrator automatically creates a slice around that object, and the beautiful thing is that if I move this rectangle somewhere else, you can see that the other slices update automatically.

If I resize this object, this slice itself updates automatically as well. So I'm going to actually press Undo a few times to go back to the state I was in before I actually created that slice. I want to show you how I can take this grid now that I created and instead of just throwing it out or wasting it, I can use this grid to help me define a perfect slice table for this page here. Now again, don't worry about the fact that we're creating a table here, because at the end of the day, we could take the slices that we create and turn it to anything we want. We just want to define the right regions here.

So let's see how to do that. I'm going to select all this artwork right here, and I'm going to press Command+C, or Ctrl+C, to the copy it. Then I'm going to click on this artboard so that now this artboard is the active artboard, and I'm now going to choose Edit > Paste in Place. That's going to take this grid and position it precisely in location, right on top of the artwork that appears on this web page. We can't see the artwork right now, because it's being covered by this artwork, but that's fine. We have several ways to deal with this.

Sometimes I'll actually create a separate layer, specifically for my slices, and that might be a really nice way to manage that process. I can now create a new layer, and I could take the art that's on this layer right now, that's currently selected, the little colored dot that appears in the far right of a layer shows what artwork is currently selected. And if I take that little dot and I drag it into layer 2, that means I'm now moving all of that artwork onto the second layer. Just to show you if I now choose to hide layer 2, those objects go away.

So I'm going to turn that layer 2 on right now, and I'm also going to select everything in that layer. Now I don't have a little colored dot here, but if you just click in his blank area, it actually selects all the elements on that layer. So right now, all the rectangles that I created that I'm going to be using for my slices are currently selected on layer 2. I'm simply going to come up over here to the Control panel and change the fill color to None. So now those objects have a fill and a stroke of None, meaning I can't see them; they're invisible.

However, I want to use those objects. I want to use the boundaries of those objects to define slices. So now with those objects still selected, I'm going to up to the Object menu, I'm going to choose Slice, and then I'll choose Make. Now Illustrator will automatically now find the regions, or the boundaries, of each of those objects, turn them into slices for me. Now, I can come to layer 2 and simply lock it. So as I'm working on my design, I don't have to worry about accidentally moving or adjusting those slices, because now that serves as the basis for how my artwork is going to be exported when I start thinking about taking this design elsewhere.

This is one way to think about object-based slicing. Let's go to another example. I'm going to switch to a different document. It's called explore_ads.ai, and I have several pieces of art here that I'm working on. They can be for a variety of different purposes, either for different pieces of art that appears across an entire web site, maybe I'm working on some kind of an ad campaign. Notice over here I have here some ad banners that I'm working with, but I also have some individual graphics. I've already created some slices here in this document. This will allow me to export just the art that I need at just the sizes that I need them.

So, for example, I have some art down over here. It's a nice piece of art. I may need to use it on some different web pages. It's currently set to the right size. This piece of artwork is set to 200 pixels by 225 pixels. But what I can do now is just, with that art selected, go over to the Object menu, choose Slice, and then choose Make, And now that piece of art has a slice around it. Again, the beautiful thing about the object-based slice here is that I never know how I'm going to be working with my art. As I'm kind of working, I am moving things around. If I take this artwork now and I drag it over here, notice that the slice moves along with it.

If I had drawn that manually or used guides, the slice is really disconnected from the art whatsoever. It's kind of sitting on top of it as a different layer. So, that means that if I move the artwork, the artwork is now completely outside of that slice. But now no matter where I move this artwork around, the slice kind of goes with the object itself. Because each of these are separate slices, I can basically go into Save for Web dialog box that we've done in a previous chapter and maybe set these to export as GIF files or this one to export as JPEG. Maybe have this one export as a PNG.

Once those settings are done, those settings belong to the slice. That slice will always export with those settings. So once I lock it in, I can forget about it. That means as I'm working on artwork right now I need to make a quick change, let's say the Nature Watch, I need to change that star to something else. I can make a quick, little change to it. Then just simply select that object and then choose File > Save Selected Slices, and I'm done. I'm able to quickly export just that one piece of art, even though there're lots of other art inside of this document. So it's a great way to work inside Illustrator.

I'm not thinking about HTML tables here. I'm thinking simply about regions or different pieces of art that are being defined as separated pieces of art simply by the fact that they have had slices assigned to them. Of course, what really makes all this work is the fact that I'm using object-based slices. Illustrator knows that those objects have slices applied to them. And as I modify or change the artwork, the slice modifies with it, which allows me to focus more on the creative task at hand than worrying about how to export it each time.

Show transcript

This video is part of

Image for Illustrator CS5 for Web and Interactive Design
Illustrator CS5 for Web and Interactive Design

74 video lessons · 24246 viewers

Mordy Golding
Author

 
Expand all | Collapse all
  1. 6m 56s
    1. Welcome
      1m 33s
    2. Choosing Illustrator for web and interactive design
      2m 54s
    3. Illustrator and the web design workflow
      2m 7s
    4. Using the exercise files
      22s
  2. 40m 9s
    1. Pixel dimension vs. resolution
      4m 14s
    2. Pixel Preview mode and anti-aliasing
      5m 39s
    3. Taking charge of anti-aliasing
      5m 27s
    4. Choosing the right color management settings
      7m 25s
    5. Setting up important preferences
      6m 22s
    6. Setting up a workspace optimized for web design
      11m 2s
  3. 54m 5s
    1. Using the Web document profile
      3m 39s
    2. Creating custom document profiles
      9m 38s
    3. Using Illustrator's free web templates
      2m 33s
    4. Creating a sitemap or wireframe
      2m 50s
    5. Setting up an entire web site
      9m 33s
    6. Setting up a grid
      10m 37s
    7. Setting up an online ad campaign
      8m 13s
    8. Setting up icons for iOS
      2m 24s
    9. Setting up mobile content with Adobe Device Central
      4m 38s
  4. 32m 22s
    1. Understanding web-safe colors
      11m 50s
    2. Limiting the Color Guide to web-safe colors
      4m 53s
    3. Using Recolor Art to convert art to web-safe colors
      4m 54s
    4. Getting color inspiration from Adobe Kuler
      6m 48s
    5. Using Recolor Artwork to modify colors across a site
      3m 57s
  5. 56m 54s
    1. Using the Save for Web & Devices feature
      6m 44s
    2. Understanding the GIF file format and its settings
      10m 20s
    3. Understanding the JPEG file format and its settings
      7m 39s
    4. Understanding the PNG file format and its settings
      3m 21s
    5. Understanding the WBMP file format and its settings
      1m 18s
    6. Understanding the SWF file format and its settings
      4m 13s
    7. Understanding the SVG file format and its settings
      3m 41s
    8. Adjusting the dimensions of a graphic
      4m 46s
    9. Optimizing files to a specific file size
      4m 5s
    10. Modifying Save for Web & Devices output settings
      6m 51s
    11. Previewing content in Adobe Device Central
      3m 56s
  6. 56m 6s
    1. Setting point type in Illustrator
      4m 11s
    2. Setting area type in Illustrator
      5m 20s
    3. Formatting text quickly with paragraph styles
      14m 39s
    4. Overriding formatting with character styles
      3m 2s
    5. Controlling text anti-aliasing
      4m 50s
    6. Simulating the CSS box model
      11m 14s
    7. Adding cool reflections to text and graphics
      8m 26s
    8. Applying settings quickly with Graphic Styles
      4m 24s
  7. 35m 56s
    1. Understanding the concept of slicing
      3m 22s
    2. Creating slices manually
      4m 26s
    3. Creating slices from guides
      2m 45s
    4. Creating slices from objects
      7m 33s
    5. Understanding the different slice types
      4m 20s
    6. Applying settings to slices
      9m 20s
    7. Creating hotspots with image maps
      4m 10s
  8. 23m 35s
    1. Exporting static SWF files from Illustrator
      3m 35s
    2. Animated SWF: Converting Illustrator layers to SWF frames
      4m 3s
    3. Animated SWF: Using blends to define motion
      8m 35s
    4. Animated SWF: Adding static artwork to an animation
      3m 24s
    5. Animated SWF: Controlling time within an animation
      3m 58s
  9. 17m 13s
    1. Preserving slices and structure with PSD export
      6m 10s
    2. Working with Photoshop Smart Objects
      4m 35s
    3. Sharing color swatches between Illustrator and Photoshop
      2m 52s
    4. Generating an animated GIF file with Photoshop
      3m 36s
  10. 7m 28s
    1. Exporting HTML from Illustrator for use in Dreamweaver
      3m 31s
    2. Exporting CSS and DIVs from an Illustrator layout
      3m 57s
  11. 12m 37s
    1. Moving art between Illustrator and Fireworks
      6m 25s
    2. Using dynamic shapes from Fireworks
      3m 48s
    3. Sharing color swatches between Illustrator and Fireworks
      2m 24s
  12. 16m 7s
    1. Building files for use in Flash Catalyst
      4m 28s
    2. Creating a new Flash Catalyst project from an Illustrator file
      3m 40s
    3. Copying and pasting artwork between Illustrator and Flash Catalyst
      2m 4s
    4. Roundtrip editing between Illustrator and Flash Catalyst
      3m 36s
    5. Creating Flex skins for use in Flash Builder
      2m 19s
  13. 19m 48s
    1. Understanding symbols: The lifeblood of Flash
      4m 58s
    2. Symbols: Understanding 9-slice scaling
      4m 18s
    3. Setting text that will be used in Flash Professional
      3m 5s
    4. Moving artwork between Illustrator and Flash Professional
      7m 27s
  14. 1m 6s
    1. Goodbye
      1m 6s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Illustrator CS5 for Web and Interactive Design.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.