Applying textures to objects is one of the many powerful and creative features of Macromedia Fireworks. To learn about textures and how you can apply them to objects in your Macromedia Fireworks projects, see "Working with and Creating Textures in Fireworks" by Richard Blenkinsopp. Once you have mastered the use of Fireworks textures, you will find that creating your own textures can be a lot of fun. In fact, creating Fireworks textures is one of my favorite things to do. Once you have mastered–or at least got the hang of creating–textures, you may find that you want to share your textures with others as well as deconstruct and study textures that other Fireworks users have created. Playing around with textures that other people have created is a great way to enhance your own texture creation. In this article, I review how you can install new Fireworks textures, and I will show you how you can package your textures into a Macromedia eXtension Package (MXP) file, so you can easily share your textures with others by either e-mailing them or by posting them on the Fireworks Exchange.
To complete this tutorial you will need to install the following software and files:
The sample ZIP file contains 24 PNG textures.
Basic familiarity with Fireworks MX 2004 and an understanding of Fireworks textures. To learn about Fireworks textures, see "Working with and Creating Textures in Fireworks" by Richard Blenkinsopp.
Installing new textures in Fireworks can be done in a couple of different ways. The first, manual way to install textures is by dropping new textures into the Fireworks textures folder. On Macintosh, the directory is:
<hard drive> | Macromedia | Fireworks MX 2004 | Configuration | Textures
On Windows, the directory is:
C:\Program Files\Macromedia\Fireworks MX 2004\Configuration\Textures
I encourage you to download the sample textures that Richard Blenkinsopp created and install them using the manual method described above. You can get those sample styles from the sample files download in Richard’s article.
The second way to install Fireworks textures is by acquiring textures that are packaged in an MXP file and double-clicking the MXP file. Double-clicking the MXP file will open the Macromedia Extension Manager, which is Macromedia’s tool to install, uninstall, organize, and package extensions such as textures, patterns, autoshapes, and commands. One of the main benefits of creating texture extensions is that they are easily turned on and off in the Extension Manager without having to manually delete the textures or move them to another location. Simple to share, MXP extensions are automatically installed in your default texture folder with ease.
Creating an MXP file is essentially a two-step process. To make an MXP file, first you need to create an MXI file, which will be the source file you will work with. The second step is to properly package the MXI file into an MXP file. In the following sections of this article, I will show you how to both create and package an MXI file into an MXP file.
When you install the Extension Manager, a blank MXI file is installed that you can use as a template for MXI files you create. On Macintosh you can find the Blank.mxi file at: <hard drive> | Macromedia | Extension Manager | Samples | Fireworks. On Windows you can find the Blank.mxi file at: C:\Program Files\Macromedia\Extension Manager\Samples. You may freely use the blank MXI file and edit it with notepad or any HTML editor (Dreamweaver, GoLive, TopStyle, and so forth). Basically, the MXI file is an XML document with an MXI extension that provides information for the Extension Manager to package the contents into an extension. Open the Blank.mxi file in Dreamweaver or the text editor of your choice and take a look at it. I recommend saving the file with a different file name so you have the original Blank.mxi file to use as a template for future extensions. I will explain each of the file’s tags below.
<?xml version="1.0" encoding="iso-8859-1"?>
The first line in the document is the XML declaration, which defines the XML version and the character encoding used in the document. In this case the document conforms to the 1.0 specification of XML and uses the ISO-8859-1 (Latin-1/West European) character set. The Blank.mxi file does not include this line of code by default, but it is a good idea to have it in all XML documents so they comply with standards. I recommend copying the above line of code and pasting it into the top line in your file.
<macromedia-extension name="Textures System 1" version="1.0.0" type="Texture" requires-restart = "false" >
The macromedia-extension tag is the root element of the document and includes four attributes: name, version, type, and requires-start.
Name: The texture’s name
Version: The texture’s version
Type: Texture for textures; Pattern for patterns; autoshape for autoshapes; Command for commands.
Requires-start: Indicates whether the Macromedia application (Fireworks in this case) must be restarted after the
extension is installed.
Note: To see whether you have to restart Fireworks (“true”) or not ("false"), please see the table below showing which extension types needs restarting.
<products> <product name="Fireworks" version="6" primary="true" /> </products>
The products and product tags specify the product and the product version number the extension can work best with. In this case, the extension only works with one product, Fireworks, so there is only one product tag. The product tag has three attributes: name, and version, and primary. I’ve given the name attribute an attribute of Fireworks, a version number of 6, and I have set the primary attribute to true. Setting the version number to 6 tells the Extension Manager that the extension will work with Fireworks versions 6 and later. Setting the primary attribute to true tells the extension manager that Fireworks is the primary program that this extension applies to. The primary attribute is really only pertinent if the extension applies to multiple programs. However, you should include this attribute even if the extension applies to only one program.
<author name="Fireworks Zone" />
The author tag has one attribute that specifies the author’s name or website.
<description> <![CDATA[ Textures system 1 24 original Fireworks Textures<br> www.fireworkszone.com ]]> </description>
The description tag allows you to give a brief description of your extension. The text inside a CDATA section will be ignored by the parser but will appear in the Extension Manager.
<ui-access> <![CDATA[ Select textures from Textures drop-down menu. ]]> </ui-access>
The ui-access tag provides information on how to access the extension once installed in Fireworks.
<license-agreement> <![CDATA[ ]]> </license-agreement>
The license-agreement tag allows a developer to include a license agreement that is displayed at installation.
<files> <file name="system01.png" destination="$fireworks/configuration/Textures/" /> <file name="system02.png" destination="$fireworks/configuration/Textures/" /> […] </files>
The files tag provides information about specific files to be installed as part of the extension, and the $fireworks variable specifies the Fireworks installation folder.
<configuration-changes> </configuration-changes>
The configuration-changes tag is a container tag for tags that modify the application’s configuration. These include menus, shortcuts, server behaviors, and data sources. Since you are creating a texture extension there is no need to change the application’s configuration, and this tag can be left empty. However, you should still include it in the MXI file.
</macromedia-extension>
The macromedia-extension tag is the closing XML tag for the MXI file.
For in-depth information about all the MXI tags, review the following PDF document, The Extension Installation File Format documentation.
There are also a couple third-party tools available to create MXI files: MXI Creator for Flash extensions only, and MXI Wizard for all the products.
Once an extension is installed, the extension manager will provide information to users. The information about the type of the extension is conveyed in the form of icons. Except for AutoShape, Texture, Pattern, and Command Panel extension types, which share the same icon, a different icon will be displayed in the Extension Manager. To change the icon, modify the type attribute in the macromedia-extension tag at the beginning of the MXI file. For example, for Textures, you will write type="Texture". For others, see the table below. The extension type is not case sensitive so you can write Autoshape or autoshape. The "Requires-start" column shows you which extension types require that Fireworks be restarted ("true") after the extension is installed and which don't ("false").
| Icons | Extension Type | Requires-start |
|---|---|---|
| AutoShape | false | |
| Texture | true | |
| Pattern | true | |
| CommandPanel | true | |
| Command | false | |
| Utility | true | |
| Dictionary | n/a | |
| KeyboardShortcut | n/a | |
| Library | n/a | |
| Suite | n/a | |
| Other | n/a |
Note: The Extension Type icons are embedded in Extension Manager, which means you cannot customize them.
When you finish editing the MXI file, save the MXI file into the same folder with the textures you want to package. Then open the Extension Manager and use the following steps to package the extension into an MXP file.
To install the new texture extension, double-click the MXP file. Once installed through the Extension Manager, the textures are available in the Textures pop-up menu in the Property inspector in Fireworks. Now you know how to package textures. Et voilà ! You may wonder what has happened to the textures. As I have mentioned above, you can find them in the Fireworks Textures folder. And if you open <hard drive> | Macromedia | Fireworks MX 2004 | Configuration | Extensions (On Windows the path is C:\Program Files\Macromedia\Fireworks MX 2004\ Configuration\ Extensions) you will find the MXI and the MXP files.
Go to the Fireworks Exchange and download and install some of the textures listed there. Then try creating some textures of your own using Richard Blenkinsopp’s "Working with and Creating Textures in Fireworks" article. Once you have created your textures, use the steps above to package your textures into an MXP file. I look forward to seeing your textures on the Fireworks Exchange.
Thierry Lorey is full-time webmaster for Fireworks Zone, one of the best resources around for Fireworks enthusiasts. He's a member of the Adobe Fireworks Advisory Forum and also writes tutorials for Community MX. He lives in St Jean de Braye, France.
Fireworks Zone and its partners offer professional services in design (logos, business, cards, banners, icons, and digital art) and Flash and Flex development, including custom Fireworks extensions.