• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Communicating with Fireworks > Example: Cross-Application Extension:...

Example: Cross-Application Extension: Thumbnail Builder

As noted earlier, Dreamweaver comes with Create Web Photo Album, which is a tool for creating thumbnails. However, this command is intended for batch-processing a series of images. What if you want to create thumbnails one at a time? I wrote the Thumbnail Builder extension to fill just that need (see Listing 7-1).

Listing 7-.1. Thumbnail Builder.htm (07_ThumbnailBuilder.mxp)

<!-- MENU-LOCATION=NONE --> 
<html> 
<head> 
<title>Thumbnail Builder</title> 
<!-- By Joseph Lowery, 
     Author of the Dreamweaver Bible series, 
     the Fireworks Bible series and Beyond Dreamweaver 
     jlowery@idest.com 
--> 
<script src="../Shared/Fireworks/FwExec.js"></script> 
<script language="javascript" 
src="../Shared/MM/Scripts/CMN/UI.js"></script> 
<script language="javascript" 
src="../Shared/MM/Scripts/CMN/FILE.js"></script> 
<script language="javascript" 
src="../Shared/MM/Scripts/CMN/enableControl.js"></script> 
<script language="javascript" 
src="../Shared/MM/Scripts/CMN/enableControl.js"></script> 
<script language="javascript" 
src="../Shared/MM/Scripts/CMN/docInfo.js"></script> 
<script src="ThumbnailBuilder.js"></script> 
<link rel="stylesheet" href="mmres://user_interface_dialog.css"> 
<style type="text/css"> 
<!--
.textbox {  width: 30px; height: 15px} 
--> 
</style> 
</head> 
<body onLoad="initUI()"> 
<form name="theForm"> 
  <table border="0"> 
    <tr> 
      <td colspan="4" nowrap><currentsize>Current Image: W: xx 
      &nbsp;&nbsp;H: 
        xx</currentsize></td> 
    </tr> 
    <tr> 
      <td colspan="4"><newsize>Thumbnail: W: 
      &nbsp;&nbsp;&nbsp;&nbsp;H:</newsize></td> 
    </tr> 
    <tr> 
      <td colspan="4"> 
        <hr> 
      </td> 
    </tr> 
    <tr> 
      <td>Size:</td> 
      <td> 
        <div align="right"> 
          <input name="sizeRB" type="radio" 
          onClick="javascript:document.theForm.widthText.focus()" 
          value="width" checked> 
        </div> 
      </td> 
      <td>Width</td> 
      <td nowrap> 
        <input type="text" name="widthText" class="textbox" 
        onBlur="checkField(this.name)"> 
        pixels </td> 
    </tr> 
    <tr> 
      <td>&nbsp;</td> 
      <td>  
        <div align="right"> 
          <input type="radio" name="sizeRB" value="height" 
          onClick="javascript:document.theForm. 
          heightText.focus()"> 
        </div> 
      </td> 
      <td>Height</td> 
      <td nowrap> 
        <input type="text" name="heightText" class="textbox" 
        onBlur="checkField(this.name)"> 
        pixels </td> 
    </tr> 
    <tr> 
      <td>&nbsp;</td> 
      <td> 
        <div align="right"> 
          <input type="radio" name="sizeRB" value="percentage" 
          onClick="javascript:document.theForm. 
          percentageText.focus()"> 
        </div> 
      </td> 
      <td>Percentage</td> 
      <td nowrap> 
        <input type="text" name="percentageText" class="textbox" 
        onBlur="checkField(this.name)"> 
        % </td> 
    </tr> 
    <tr> 
      <td colspan="4"> 
        <hr> 
      </td> 
    </tr> 
    <tr> 
      <td>Border:</td> 
      <td> 
        <div align="right"> 
          <input type="checkbox" name="htmlCB" value="html"> 
        </div> 
      </td> 
      <td>HTML</td> 
      <td>&nbsp; </td> 
    </tr> 
    <tr> 
      <td>&nbsp;</td> 
      <td> 
        <div align="right"> 
          <input type="checkbox" name="bevelCB" value="checkbox"> 
        </div> 
      </td> 
      <td>Bevel</td> 
      <td>&nbsp; </td> 
    </tr> 
    <tr> 
      <td>&nbsp;</td> 
      <td> 
        <div align="right"> 
          <input type="checkbox" name="dropshadowCB" 
          value="checkbox"> 
        </div> 
      </td> 
      <td nowrap>Drop Shadow</td> 
      <td>&nbsp;</td> 
    </tr> 
    <tr> 
      <td colspan="4"> 
        <hr> 
      </td> 
    </tr> 
    <tr> 
      <td nowrap>Target:</td> 
      <td> 
        <div align="right"> 
          <input type="radio" name="targetRB" value="jspw"> 
        </div>  
      </td> 
      <td colspan="2">Just So Picture Window</td> 
    </tr> 
    <tr> 
      <td>&nbsp;</td> 
      <td> 
        <div align="right"> 
          <input type="radio" name="targetRB" value="radiobutton"> 
        </div> 
      </td> 
      <td colspan="2">_blank page</td> 
    </tr> 
  </table> 
</form></body> 
</html> 

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint