home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd2.bin / ruzne / painter / PAINTE~2.cab / _3A41437F48014525833CAD01AD135DB4 < prev    next >
Text File  |  2003-03-24  |  18KB  |  294 lines

  1. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  2.   <head>
  3.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  4.     <meta name="GENERATOR" content="Quadralay WebWorks Publisher Professional Edition 6.0.7" />
  5.     <meta name="TEMPLATEBASE" content="Painter 8 Template" />
  6.     <meta name="LASTUPDATED" content="03/24/03 17:17:05" />
  7. <meta name="keywords" content="Rollovers, creating, Rollovers, defining, Rollovers, exporting, slices, Exporting, rollover, slices" />
  8.     <title>Creating Rollovers   </title>
  9.     <link rel="StyleSheet" href="document.css" type="text/css" media="screen" />
  10.   </head>
  11.  
  12.   <body>
  13.     <script type="text/javascript" language="JavaScript">
  14.      <!--
  15.       function  WWHUpdateFavorite(ParamHREF)
  16.       {
  17.         if ((parent != null) &&
  18.             (parent.WWHelpFrameSet != null))
  19.         {
  20.           parent.WWHelpFrameSet.fUpdateFavorite(ParamHREF);
  21.         }
  22.       }
  23.  
  24.       function  WWHSyncTOC(ParamHREF)
  25.       {
  26.         if ((parent != null) &&
  27.             (parent.WWHelpFrameSet != null))
  28.         {
  29.           parent.WWHelpFrameSet.fSyncTOC(ParamHREF);
  30.         }
  31.       }
  32.  
  33.       function  WWHShowPopup(ParamContext,
  34.                              ParamLink,
  35.                              ParamEvent)
  36.       {
  37.         if ((parent != null) &&
  38.             (parent.WWHelpFrameSet != null))
  39.         {
  40.           parent.WWHelpFrameSet.fShowPopup(ParamContext, ParamLink, ParamEvent);
  41.         }
  42.       }
  43.  
  44.       function  WWHHidePopup()
  45.       {
  46.         if ((parent != null) &&
  47.             (parent.WWHelpFrameSet != null))
  48.         {
  49.           parent.WWHelpFrameSet.fHidePopup();
  50.         }
  51.       }
  52.  
  53.       function  WWHClickedPopup(ParamContext,
  54.                                 ParamLink)
  55.       {
  56.         if ((parent != null) &&
  57.             (parent.WWHelpFrameSet != null))
  58.         {
  59.           location.href = parent.WWHelpFrameSet.fClickedPopup(ParamContext, ParamLink);
  60.         }
  61.       }
  62.      // -->
  63.     </script>
  64.  
  65.     <script type="text/javascript" language="JavaScript">
  66.      <!--
  67.       var  WWHelpHREF = location.href;
  68.  
  69.  
  70.       WWHUpdateFavorite(WWHelpHREF);
  71.      // -->
  72.     </script>
  73. <a name="pagetop">    
  74.     <table border="0">
  75.       <tr>
  76.         <td width="23">
  77. <a href="21-Web6.html">
  78.       <img alt="Previous Document" border="0" src="images/prev.gif" width="23" height="21" />
  79.     </a>
  80.         </td>
  81.         <td width="23">
  82. <a href="21-Web8.html">
  83.       <img alt="Next Document" border="0" src="images/next.gif" width="23" height="21" />
  84.     </a>
  85.         </td>
  86.       </tr>
  87.     </table>
  88.    </a>
  89.  
  90. <table border="0">
  91.       <tr width="400"></tr>
  92.       <tr width="400"></tr>
  93.       <tr width="400"></tr>
  94.       <tr width="400"></tr>
  95.       <tr width="400"></tr>
  96.       <tr width="400"></tr>
  97.       <tr>
  98.         <td width="40"></td>
  99.         <td width="400">
  100. <li class="Bulleted"><a href="21-Web7.html#1008405">Creating Rollovers </a></li><br/>
  101.  
  102. <li class="Bulleted"><a href="21-Web7.html#1005699">Understanding Rollovers</a></li><br/>
  103.  
  104. <li class="Bulleted"><a href="21-Web7.html#1008100">Creating Rollovers from Image Slices</a></li><br/>
  105.  
  106. <li class="Bulleted"><a href="21-Web7.html#1005555">Exporting Rollover Slices </a></li><br/>
  107. </td>
  108.       </tr>
  109.     </table>
  110.  
  111.   <blockquote>
  112.         <h2 id="1008405" class="Heading1">
  113.   <a name="1008405"> </a>Creating Rollovers 
  114. </h2>
  115.  
  116.  
  117.  
  118. <h3 id="1005699" class="Heading2">
  119.   <a name="1005699"> </a>Understanding Rollovers
  120. </h3>
  121.  
  122. <p id="1005700" class="Body">
  123.   <a name="1005700"> </a>Rollovers are interactive objects that can change in appearance when you click or point to them. They are often used as navigation tools on the Web. For example, you can make a button change color when it is clicked or display text when you point to it. 
  124. </p>
  125. <p id="1005703" class="Body">
  126.   <a name="1005703"> </a>The rollover effect is accomplished in the Web browser using JavaScript image swapping. The idea is simple: each rollover area uses two or more separate images of the same dimensions. In response to a user action (like moving the pointer over the image), one image is quickly replaced by another. 
  127. </p>
  128. <p id="1005516" class="AnchorGraphic">
  129.   <a name="1005516"> </a><div align="left"><img src="images/21-Weba4.jpg" height="163" width="216" border="0" hspace="0" vspace="0" />
  130. </div>
  131. </p>
  132. <p id="1005517" class="Caption">
  133.   <a name="1005517"> </a><i>A rollover in the Mouse out state (top) and the Mouse over state (bottom).
  134. </i></p>
  135. <p id="1005518" class="Body">
  136.   <a name="1005518"> </a>In effect, this creates a simple animation, and each of the separate images can be thought of as frames in that animation. For our purposes, we refer to each frame as a "state." Corel     Painter supports three possible states for each rollover:
  137. </p>
  138. <ul>
  139.   <li class="SmartList1"><a name="1005522"> </a><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Mouse out</span><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline"> - </span>This is the default image. Corel     Painter displays it when the page first loads, and also when the pointer moves off the rollover. If the Web browser doesn't support JavaScript image swapping, this image is the only one that will be displayed.</li>
  140.   <li class="SmartList1"><a name="1005526"> </a><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Mouse over </span><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">- </span>This image displays when the pointer moves over the rollover.</li>
  141.   <li class="SmartList1"><a name="1005527"> </a><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Mouse click</span><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline"> -</span> This image displays when the user clicks the rollover. When the user releases the mouse button, the Mouse out image is displayed again.</li>
  142. </ul>
  143. <p id="1005528" class="Body">
  144.   <a name="1005528"> </a>Not all browser versions support these states. The Mouse over and Mouse out states display in browsers that support JavaScript 1.1 (Netscape Navigator 3.0 and higher and Microsoft Internet Explorer 4.0 and higher). 
  145. </p>
  146. <p id="1005529" class="Body">
  147.   <a name="1005529"> </a>The Mouse click state displays in browsers that support JavaScript 1.2 (Netscape Navigator 4.0 and higher and Microsoft Internet Explorer 4.0 and higher). Browsers that do not support these versions of JavaScript (like Netscape Navigator 2.0 and Microsoft Internet Explorer 3.0), or that don't implement JavaScript at all, do not display rollover effects.
  148. </p>
  149. <h3 id="1008100" class="Heading2">
  150.   <a name="1008100"> </a>Creating Rollovers from Image Slices
  151. </h3>
  152.  
  153. <p id="1005530" class="Body">
  154.   <a name="1005530"> </a>Using the Image Slicer, you can divide your image into rectangular areas called slices. Each slice can have one of the following rollover state combinations:
  155. </p>
  156. <ul>
  157.   <li class="SmartList1"><a name="1005531"> </a><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">No rollover </span><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">- </span>The slice has no rollover states.</li>
  158.   <li class="SmartList1"><a name="1005532"> </a><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Mouse over-out </span><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">-</span> The slice has two states: Mouse over and Mouse out.</li>
  159.   <li class="SmartList1"><a name="1005533"> </a><span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Mouse over-out-click </span>- The slice has three states: Mouse over, Mouse out, and Mouse click. </li>
  160. </ul>
  161. <p id="1005534" class="Body">
  162.   <a name="1005534"> </a>A single image can contain different slices with different rollover combinations. This means that one slice can be set to Mouse over - out, another slice can be set to Mouse over - out - click, another slice can be set to No rollover, and so on. 
  163. </p>
  164. <p id="1008152" class="Body">
  165.   <a name="1008152"> </a>For more information about the Image Slicer, refer to <a href="21-Web6.html#1008411">"Using the Image Slicer"</a>. For more information about setting the number of rollover states, refer to the procedure <a href="21-Web6.html#1008549">"To set slice options:"</a>.
  166. </p>
  167. <p id="1005538" class="Body">
  168.   <a name="1005538"> </a>Before using the Image Slicer, you must carefully analyze your image. 
  169. </p>
  170. <ul>
  171.   <li class="SmartList1"><a name="1005539"> </a>Which image areas should have rollover effects?</li>
  172.   <li class="SmartList1"><a name="1005540"> </a>Which rollover state combinations (see above) will be used for each area?</li>
  173.   <li class="SmartList1"><a name="1005541"> </a>How will you create the rollover states for each of these areas?</li>
  174. </ul>
  175. <p id="1005542" class="Body">
  176.   <a name="1005542"> </a>The third item in this list deserves special note. Since each rollover area must have two or three separate states, you must decide how you will represent each of these states. 
  177. </p>
  178. <p id="1005543" class="Body">
  179.   <a name="1005543"> </a>The most common method of representing states is to use multiple layers (one for each state), then hide and show them, as necessary. Another option is to use Shapes or Dynamic Text, then redefine their attributes (color, opacity, size, and so on) for each state. 
  180. </p>
  181. <p id="1005544" class="Body">
  182.   <a name="1005544"> </a>Whatever method you choose, make sure you can easily move between states for each slice. This is necessary when exporting states using the Image Slicer. 
  183. </p>
  184. <p id="1005545" class="Body">
  185.   <a name="1005545"> </a>Press <span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Option</span>+click (Mac OS) or <span style="color: #000000;  font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Alt</span>+click (Windows) to control alignment when duplicating layers for use in rollovers. If in doubt, check layer alignment by double-clicking each layer and verifying the Position > Top and Position > Left fields. Make any necessary adjustments in alignment by typing numbers into these fields. 
  186. </p>
  187. <p id="1005549" class="Body">
  188.   <a name="1005549"> </a>To define rollovers with the Image Slicer, follow the general steps below. For detailed information, refer to the procedures in <a href="21-Web6.html#1008479">"Working with Image Slices"</a>.
  189. </p>
  190. <h5 id="1005550" class="ToDoHead">
  191.   <a name="1005550"> </a>To define rollovers
  192. </h5>
  193. <ol type="1">
  194.   <li class="SmartList1" value="1"><a name="1005551"> </a>Set up your image so you can easily move between states for each rollover area or slice. </li>
  195.   <li class="SmartList1" value="2"><a name="1005552"> </a>Use the Image Slicer's slice tools to divide the image. Each rollover area in the image should occupy its own slice. </li>
  196.   <li class="SmartList1" value="3"><a name="1005553"> </a>For each rollover slice, specify the supported rollover states (Mouse over - out or Mouse over - out - click). You do this by choosing an option from the Rollover State pop-up menu in the Image Slicer dialog box. For more information, refer to the procedure, <a href="21-Web6.html#1008549">"To set slice options:"</a>.</li>
  197. </ol>
  198. <h3 id="1005555" class="Heading2">
  199.   <a name="1005555"> </a>Exporting Rollover Slices 
  200. </h3>
  201.  
  202. <p id="1005556" class="Body">
  203.   <a name="1005556"> </a>Once you have defined slices, you are ready to export the slices and the associated HTML file. You must do a separate export operation for each rollover state. 
  204. </p>
  205. <p id="1005557" class="Body">
  206.   <a name="1005557"> </a>Because there are two or three possible states, you must do two or three separate export operations. All the Mouse out (default) images are exported together, all the Mouse over images are exported together, and all the Mouse click images (if any) are exported together. 
  207. </p>
  208. <h5 id="1005558" class="ToDoHead">
  209.   <a name="1005558"> </a>To export rollover slices 
  210. </h5>
  211. <ol type="1">
  212.   <li class="SmartList1" value="1"><a name="1005559"> </a>Set up your image so that all slices display their Mouse out (default) state. </li>
  213. <p id="1005560" class="ToDoBody">
  214.   <a name="1005560"> </a>This is how you want slices to appear when the Web page first loads. As mentioned in <a href="21-Web7.html#1008100">"Creating Rollovers from Image Slices"</a>, this is often done by hiding or showing layers, or by changing the attributes of Shapes or Dynamic Text.
  215. </p>
  216.   <li class="SmartList1" value="2"><a name="1005570"> </a>On the Layers palette, double-click the Image Slicing layer in the Layer list.</li>
  217.   <li class="SmartList1" value="3"><a name="1008661"> </a>In the Image Slicer dialog box, click Export Settings for Current Image State.</li>
  218.   <li class="SmartList1" value="4"><a name="1005571"> </a>In the Export Settings dialog box, enter the HTML and image export locations. </li>
  219.   <li class="SmartList1" value="5"><a name="1005572"> </a>Enable the Include JavaScript check box, and enable the Mouse out (default) option.</li>
  220.   <li class="SmartList1" value="6"><a name="1005573"> </a>Click Export. </li>
  221. <p id="1005577" class="ToDoBody">
  222.   <a name="1005577"> </a>Corel     Painter exports the slices and the HTML file. 
  223. </p>
  224.   <li class="SmartList1" value="7"><a name="1005578"> </a>Click OK in the Image Slicer dialog to return to the image.</li>
  225.   <li class="SmartList1" value="8"><a name="1005579"> </a>Set up the image so that all slices with rollovers display their Mouse over state. </li>
  226. <p id="1005580" class="ToDoBody">
  227.   <a name="1005580"> </a>This is how you want slices to look when the user's cursor passes over them. You can choose to do this by manipulating layers in your image. 
  228. </p>
  229.   <li class="SmartList1" value="9"><a name="1005581"> </a>On the Layers palette, double-click the Image Slicing layer in the Layer list.</li>
  230.   <li class="SmartList1" value="10"><a name="1008676"> </a>In the Image Slicer dialog box, click Export Settings for Current Image State.</li>
  231.   <li class="SmartList1" value="11"><a name="1005582"> </a>In the Export Settings dialog box, enable the Include JavaScript check box, and enable the Mouse over option.</li>
  232.   <li class="SmartList1" value="12"><a name="1005583"> </a>Click Export. </li>
  233. <p id="1005587" class="ToDoBody">
  234.   <a name="1005587"> </a>Corel     Painter exports the Mouse over slices and displays a confirmation message.
  235. </p>
  236.   <li class="SmartList1" value="13"><a name="1008705"> </a>Click OK in the Image Slicer dialog to return to the image.</li>
  237. <p id="1005588" class="ToDoBody">
  238.   <a name="1005588"> </a>If slices in your image have a Mouse click state, repeat steps 8 through 13 for this state. 
  239. </p>
  240.   <li class="SmartList1" value="14"><a name="1018114"> </a>Load the exported HTML file into your Web browser and test the rollover effects to make sure they work as you intended.</li>
  241. </ol>
  242. <p id="1018119" class="Body">
  243.   <a name="1018119"> </a>
  244. </p>
  245. <table border="0" width="90%" cellpadding="5" cellspacing="0">
  246.   <tr valign="top">
  247.     <td>
  248.       <img src="images/nicon.gif" alt="Notes" width="16" height="16" />
  249.     </td>
  250.   </tr>
  251. </table><ul>
  252.   <li class="SmartList1"><a name="1018116"> </a>You must exit the Image Slicer dialog to manipulate the image. </li>
  253.   <li class="SmartList1"><a name="1005590"> </a>It's important not to modify the image slice settings in any way between each of these export operations (for example, do not change any slice name or resize/add slices). Any changes you make may result in a nonfunctional HTML file. If you decide to modify one or more slice settings, you must repeat the export process from the beginning.</li>
  254. </ul>
  255.   </blockquote>
  256.  
  257.  
  258. <table border="0">
  259.       <tr>
  260.         <td width="23">
  261. <a href="21-Web6.html">
  262.       <img alt="Previous Document" border="0" src="images/prev.gif" width="23" height="21" />
  263.     </a>
  264.         </td>
  265.         <td width="23">
  266. <a href="21-Web8.html">
  267.       <img alt="Next Document" border="0" src="images/next.gif" width="23" height="21" />
  268.     </a>
  269.         </td>
  270.       <td width="23" >
  271.           <a href="#pagetop">
  272.             <img SRC="images/BtnBacktoTop.gif" ALT="Back to Top" border="0" height="21" width="23" />
  273.           </a>
  274.       </td>
  275.       </tr>
  276.     </table>
  277.  
  278.    <div id="WWHelpPopupDIV" style="position: absolute ; z-index: 1 ; visibility: hidden ; top: 0px ; left: 0px">
  279.     <script type="text/javascript" language="JavaScript">
  280.      <!--
  281.       if ((parent != null) &&
  282.           (parent.WWHelpFrameSet != null))
  283.       {
  284.         if (document.all != null)  // Non-Netscape browser
  285.         {
  286.           document.writeln(parent.WWHelpFrameSet.mPopup.fFormat("Popup"));
  287.         }
  288.       }
  289.      // -->
  290.     </script>
  291.    </div>
  292.   </body>
  293. </html>
  294.