Table of Contents for
Graphics and Multimedia for the Web with Adobe Creative Cloud: Navigating the Adobe Software Landscape

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Graphics and Multimedia for the Web with Adobe Creative Cloud: Navigating the Adobe Software Landscape by Jennifer Harder Published by Apress, 2018
  1. Navigation
  2. Cover
  3. Front Matter
  4. Part I. Welcome to the Adobe Creative Cloud. Where Should You Begin?
  5. 1. Entering the Software Maze or Labyrinth
  6. Part II. Working with Photoshop to Create Web Graphics and Animations
  7. 2. Getting Started
  8. 3. Color Choices: CMYK, RGB, Grayscale, and Index
  9. 4. Saving or Exporting Your Files for the Web
  10. 5. Actions to Speed up File Conversion and Slicing Tools
  11. 6. Tools for Animation
  12. 7. Tools for Video
  13. 8. Other Miscellaneous Items in Photoshop That You Can Use for Web Design
  14. 9. Putting It into Practice with Photoshop CC
  15. Part III. Working with Illustrator to Create Web Graphics
  16. 10. Getting Started with Illustrator CC
  17. 11. Color Choices: CMYK, RGB, and Grayscale
  18. 12. Saving or Exporting Your Files for the Web
  19. 13. Actions to Speed up File Conversion and Slicing Tools
  20. 14. Tools for Animation and Video
  21. 15. Other Miscellaneous Items in Illustrator That You Can Use for Web Design
  22. 16. Putting It into Practice with Illustrator CC
  23. Part IV. Working with Animate to Create Animations, Movies, and HTML5 Canvas
  24. 17. Getting Started with Animate CC
  25. 18. Color Choices: RGB
  26. 19. Importing Your Artwork
  27. 20. Import Your Audio and Video
  28. 21. Working with the Timeline Panel
  29. 22. Exporting Your Files to the Web
  30. 23. Other Miscellaneous Items in Animate that You Can Use for Web Design
  31. 24. Putting It into Practice with Animate CC
  32. Part V. Working with Media Encoder to Create Audio and Video Files
  33. 25. Getting Started with Media Encoder
  34. 26. Working with Your RAW Video Files (AVI and MOV)
  35. 27. Working with Your RAW Video Files and Converting Them to Audio
  36. 28. Working with Your RAW Video Files and Converting Them to an Image Sequence
  37. 29. Putting It into Practice with Media Encoder CC
  38. Part VI. Working with Dreamweaver: Adding Images, Animations, and Multimedia to HTML5 Pages
  39. 30. Getting Started with Dreamweaver CC
  40. 31. Working with Images and Tags
  41. 32. Working with CSS
  42. 33. Working with Images for Mobile Web Design
  43. 34. What Is JavaScript?
  44. 35. Working with Bootstrap, Templates, Library Items, and the Assets Panel
  45. 36. Working with Video, Audio, and Animations
  46. 37. Additional Options to Apply Images in Dreamweaver
  47. 38. Final Testing, Getting Ready to Upload Your Site
  48. 39. Putting It into Practice with Dreamweaver CC
  49. Part VII. Further Dreamweaver Integration with Other Adobe Products for Websites
  50. 40. What Other Programs That Are Part of Adobe Creative Cloud Can I Use to Display My Graphics or Multimedia Online?
  51. Back Matter
© Jennifer Harder 2018
Jennifer HarderGraphics and Multimedia for the Web with Adobe Creative Cloudhttps://doi.org/10.1007/978-1-4842-3823-3_16

16. Putting It into Practice with Illustrator CC

Jennifer Harder1 
(1)
Delta, BC, Canada
 

In this chapter, you review exporting images for a webpage site, and you look at a few more scripts to add to an SVG file to create an informational map.

Note

This chapter has actual projects that are in two folders. You can use the files in the Chapter 16 folder to practice opening and viewing for this lesson. They are at https://github.com/Apress/graphics-multimedia-web-adobe-creative-cloud .

In this chapter you will be export some images for a website known as Hot Glass Tango, which tells the story (through images, animation, video, and audio) of how handmade glass items are created. The multimedia items that you create in this chapter will be used to finish the final website in Part 6.

Exporting Images for an Instructional Webpage

The images that you are going to export for this project are in the domes.ai file. In Part 6, you are going to create a how-to page for the Hot Glass Tango website on creating a half-dome glass paperweight. When you open the file, you see the step-by-step illustrations on their own layers. Refer to Figure 16-1.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig1_HTML.jpg
Figure 16-1

A layer for each step in the how-to project in the Layers panel

If you are designing a multistep illustration project, you may find this an effective way to keep all of your illustrations organized in one location rather than in multiple files. As I completed drawing each step, I locked the layer and turned off the visibility. The only layer that is visible is step 12, as seen in Figure 16-1 and Figure 16-2.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig2_HTML.jpg
Figure 16-2

Step 12 is the visible layer on the artboard

Now I want to export each layer as a transparent GIF image.

The only way that you can create a GIF image in Illustrator is to use File ➤ Export ➤ Save for Web (Legacy). If you are going to create PNG or JPG files, use the Asset Export panel, as discussed in Chapter 12.

At this point, you could choose File ➤ Export ➤ Save for Web (Legacy) or instead use the prebuilt action found in the Actions panel (see Chapter 13) called Save For Web GIF 64 Dither. This might be too low res, so let’s create a similar action, but with a slightly different setting. Refer to Figure 16-3.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig3_HTML.jpg
Figure 16-3

The prebuilt action maybe too low res, so you may need to create a custom action

Create a Custom Action

In your Actions panel, create a new action set called Save GIF Files, as seen in Figure 16-4.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig4_HTML.jpg
Figure 16-4

Create a new action set

Click OK to confirm, and it is added to the Actions panel.

In the folder set you just created, create a new action called GIF Selective Diffusion 256. Refer to Figure 16-5.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig5_HTML.jpg
Figure 16-5

Create a new action for your GIF files

This should allow you to keep all the gradients looking clean and crisp and allow for transparency. This is a good option should you want to change the background in your website to another color later and not have a white box around your illustrations.

Click Record to start the action.

While recording in the Actions panel, go to File ➤ Export ➤ Save for Web. Refer to Figure 16-6.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig6_HTML.jpg
Figure 16-6

The image in the Save for Web (Legacy) dialog box

Set your settings as shown in Figure 16-7.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig7_HTML.jpg
Figure 16-7

GIF settings in the Save for Web (Legacy) dialog box

  • GIF Lossy: 0

  • Selective Colors: 256

  • Diffusion Dither: 100%

  • Check: Transparency Matte: White

  • No Transparency Dither

  • Uncheck: Interlaced

  • Web Snap: 0%

  • Leave Width and Height at the default

  • Choose Art Optimized

  • Clip to Artboard: uncheck

When done, save your first image (step12.gif) to your website’s Images folder or whatever folder you choose. Refer to Figure 16-8.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig8_HTML.jpg
Figure 16-8

Save your GIF file in a folder

Once the Save for Web (Legacy) dialog box closes, click the Stop button on your Actions panel to stop the action. Refer to Figure 16-9.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig9_HTML.jpg
Figure 16-9

Stop recording your actions in the Actions panel

You have now completed the action. Make sure that the Toggle dialog icon is on in the action so that the window will open.

Now you can go back to the Layers panel; this time, make step 11 visible so that you can export it next. Make sure to turn off the step 12 layer visibility because you do not need to export it again. Refer to Figure 16-10.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig10_HTML.jpg
Figure 16-10

Turn on the next layer’s visibility in the Actions panel so that you can export only its artwork

With the new layer selected, return to your Actions panel and play the GIF Selective Diffusion 256 action again.

This time, when the Save for Web (Legacy) dialog box opens, it sizes the GIF width and height to the new illustration. Refer to Figure 16-11.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig11_HTML.jpg
Figure 16-11

How the preview of the gif image appears om the Save for Web dialog box

Click the Save button and save step11.gif in your folder.

Repeat these steps for the remaining 10 images. You should have 12 images in total that you can use for your website.

You can close the AI file without saving changes. You have completed the first project.

Note

In Part 6, examples these gif files may have slightly different names, but you can always rename the file that you create in this lesson to match mine later.

Next, you look at how to create an informational map using SVG.

Exporting an SVG File

In Chapter 14, you looked at SVG interactivity to create a vase that changed color when your mouse hovered over it, and an alert message appeared when the vase was clicked. In Chapter 13, you took a brief look at image maps and saw how a shape can open a link. With SVG interactivity, you can create an informational image map so that when you hover over part of an illustration or shape, a message appears. Look at the map_test.ai file in the SVG folder. Then open the map_test.svg file in your browser and see how it interacts. Refer to Figure 16-12.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig12_HTML.jpg
Figure 16-12

When you hover over the broken glass shapes, you can determine what each piece is made of

When you hover over each colored shape of glass, you discover what that color is composed of. This technique could be very useful for a project where you want information in distinct parts of a map to guide people, or parts of an organ, like an ear, or to dissect a flower. There are many possibilities.

In map_test.ai, I created 14 sublayers and named them. Seven of them are the broken glass shapes and the other seven are the grouped text messages that will be linked to the glass shapes; one for each. Refer to the Layers panel and Figures 16-13 and 16-14.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig13_HTML.jpg
Figure 16-13

The Layers panel with each sublayer named and organized

Figure 16-14 looks rather cluttered on the artboard, but we will change that shortly.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig14_HTML.jpg
Figure 16-14

How the sublayers currently appear on the artboard

I gave my layers and sublayers one-word names, and I made sure that I knew which text link went with which colored glass piece. When you choose longer names, you can write them with letters and numbers (e.g., object1, object2) or with what scripters call camel code (e.g., redLink, greenLink), in which one letter is capitalized so that you see a break in the word. Do not use dashes (-), underscores ( _ ), or spaces in your names because this causes the SVG interactivity links to fail.

Once you have reviewed the file, leave the layers as you see them in Figure 16-13. Next, choose File ➤ Save As or File ➤ Save A Copy (if you want the original file to remain open while working on the SVG file) and save as an SVG. Save your file as map_test2.svg so that you do not overwrite my example. Refer to Figure 16-15.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig15_HTML.jpg
Figure 16-15

Save your file as an SVG

Now choose the SVG Options settings shown in Figure 16-16.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig16_HTML.jpg
Figure 16-16

Settings in the SVG Options dialog box

  • SVG Profiles: SVG 1.1

  • Type: SVG

  • Subsetting: None (Use System fonts)

  • Image Location Choose either embed or preserve from the menu. In my original settings I chose embed.

  • Preserve Illustrator Editing Capabilities: unchecked

  • CSS Properties: Style Elements

  • Uncheck Include Unused Graphic Styles

  • Decimal Places: 2

  • Encoding: Unicode (UTF-8)

  • Output fewer <tspan> elements: check

  • Use <textPath> element for Text on a Path: check

  • Check: Responsive.

Leave the other two setting unchecked.

When done, click OK to save your file.

If the newly created SVG file map_test.svg is not in Illustrator, choose File ➤ Open and locate the file.

You can close my original AI file without saving changes.

In the SVG file, look again at the Layers panel. It should look the same as the AI file. Refer to Figure 16-17.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig17_HTML.jpg
Figure 16-17

The Layers panel as viewed in the SVG File

Now turn off all the visibility eyes for the seven sublayers with the word link so that the information boxes are no longer visible, as seen in Figure 16-18. Now the artboard is less cluttered. Keep the main layer’s (Layer 1) eye on.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig18_HTML.jpg
Figure 16-18

The text link layers visibility is turned off and the artboard appears less cluttered

Make sure to save the SVG file at this point.

Note

When converted to an SVG, an AI file does not always retain the JavaScript if you enter it into the SVG Interactivity panel. Save the file as an SVG and then open the SVG. For my workflow, I find it better to enter the JavaScript only into the SVG file; that way, if I need to use the original AI file for other projects, the objects shapes are clean of extra code, which might be accidently copied into other AI files. Also, filters do not always convert correctly in the SVG file, so you may need to alter your graphics slightly if certain colors don’t convert as expected.

In the Layers panel, select the layer called Clear and click the circle target on the right so that you know this object is fully selected. Refer to Figure 16-19.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig19_HTML.jpg
Figure 16-19

With the clear sublayer targeted, you can now add SVG interactivity to the object

Now go to the SVG Interactivity panel.

While the target is selected, choose Event: onmouseover from the drop-down menu and enter the following code into the JavaScript box, as seen in Figure 16-20.
document.getElementById("clearLink").style.display="block";
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig20_HTML.jpg
Figure 16-20

Add your JavaScript code for an object to the SVG Interactivity panel

Click in the lower box area to confirm the code and then choose Event: onmouseout and enter the following code into the JavaScript area, as seen in Figure 16-21.
document.getElementById("clearLink").style.display="none";
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig21_HTML.jpg
Figure 16-21

Add your JavaScript code for an object to the SVG Interactivity panel

Click in the lower gray area to confirm it into the SVG Interactivity panel, and save your SVG file.

When you changed the object’s color to show or hide, you set the "clearLink" text to show when the mouse hovers over the "block" object. To hide this, it is set "none" when the mouse moves away from the object.

Open this file in your browser, and you see that when you hover over or move away from the clear glass shape, the text shows and hides. Refer to Figure 16-22.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig22_HTML.jpg
Figure 16-22

In the browser, when you hover over the clear glass, a message appears; it hides when you move away from the object

You now want to create interactivity for all the other shapes. If you get confused, you can refer to my map_test.svg file. However, make sure that, for each object, you always select the layer and the target for that layer so that the entire object is selected. Refer to Figure 16-23.
../images/466782_1_En_16_Chapter/466782_1_En_16_Fig23_HTML.jpg
Figure 16-23

Always select the target for a layer so that it will be linked correctly in the SVG Interactivity panel

Only then should you start adding your JavaScript to the SVG Interactivity panel.

Table 16-1 shows the remaining code.
Table 16-1

The Remaining Code for Each Sublayer

Target Color

Event

JavaScript

Purple

onmouseover

onmouseout

document.getElementById("purpleLink").style.display="block";

document.getElementById("purpleLink").style.display="none";

RadioActive

onmouseover

onmouseout

document.getElementById("radioLink").style.display="block";

document.getElementById("radioLink").style.display="none";

Blue

onmouseover

onmouseout

document.getElementById("blueLink").style.display="block";

document.getElementById("blueLink").style.display="none";

Green

onmouseover

onmouseout

document.getElementById("greenLink").style.display="block";

document.getElementById("greenLink").style.display="none";

Amber

onmouseover

onmouseout

document.getElementById("amberLink").style.display="block";

document.getElementById("amberLink").style.display="none";

Red

onmouseover

onmouseout

document.getElementById("redLink").style.display="block";

document.getElementById("redLink").style.display="none";

Once you have entered the code, make sure to save your file and test it in the browser. You may have to go back to Illustrator to make changes and save, and then refresh the browser.

As you can see, you don’t have to know a lot of JavaScript to find creative ways to work with Illustrator’s SVG Interactivity panel.

File ➤ Close any open files and then File ➤ Exit Illustrator. This concludes our Illustrator projects for Part 3.

Note

If your own project has a lot of sublayers, and you find that some shapes are not hiding when the file opens in the browser and only disappear after being hovered over once, make sure to check your layer order in the SVG file. Sometimes a layer’s eye needs to remain on and all of its sublayers’ eyes need to be turned off, as seen in Figure 16-24.

../images/466782_1_En_16_Chapter/466782_1_En_16_Fig24_HTML.jpg
Figure 16-24

Check your layer order if you notice that your SVG file does not respond correctly in the browser

Summary

In this chapter, you reviewed how to create images for a webpage and work with an interactive informational map from an SVG file. This chapter concludes your study of Illustrator. Make sure to review any areas of Part 3 that you don’t understand so that you feel comfortable working with your own graphics in Illustrator.

In Part 4, you journey to the next junction point in the software maze: Adobe Animate CC. You’ll discover how it creates animations, movies, and HTML5 canvases.