Fireworks prototyping for the iPhone

home

Update 3: A new version of this tool is available and you can find it here: http://unitid.nl/2011/03/touch-application-prototypes-tap-for-iphone-and-ipad-using-adobe-fireworks/

Update 2: This article is also available on the Adobe Developer Connection. The article is edited and therefore a better version of what you read here. Of course you are welcome to continue reading this page, result is the same!

Update 1: We are working with the patched version of Fireworks CS4 for a few weeks now and most of the problems are fixed. I removed the negative comments in this article on the bugs in CS4.

So, you are a designer. A concept-, interaction- or visual designer and you use Adobe Fireworks for sketching, wireframing, visual design and of course prototyping. Great choice. I have been working with this program for many years.  I think it is the most efficient tool for creating anything based on pixels and consisting of more than one screen. In this post I use Fireworks CS3, but you won’t have any problems creating something simular using CS4.

Lately we are working on quite some iPhone applications. We always aim to see the design we make on the device it is made for as soon as possible. For web design this is easy. Use the “preview in browser” function in FW. But for iPhone it is a bit harder. We created 320*480 png’s and synced these “photos” with the iPhone so we could get a bit of a feel of how it looks on the handheld. But we wanted more.

In this video I show how to get a simple clickable mockup
on your iphone within 4 minutes (press the HQ button)

The idea

This is what you want:

  • Click through the screens the way you normally do with a FW mock up.
  • Make use of the full screen (no Safari buttons).
  • Export directly from Fireworks without the need of changing CSS or HTML afterward.
  • Opening the app from the home screen.
  • Disable zoom.
  • Be able to send links to every iphone without even be an official iPhone developer.

This is what you don’t want:

  • Learn Objective C or depend on someone who can.
  • Take many actions before you can actually see the screens on the device.
  • Wait for a new screen to load every time you click a button.

This is what you might wish, but is a bit harder:

(we are working on it)

  • Animations, within a screen or from screen to screen.
  • Using real form elements (that trigger the default iPhone UI elements).

Demo

Time to try it out to get the idea. We made a little demo, this is what you do:

  1. Be sure you are a fast network, Wifi or 3G with your iPhone
  2. Open this link in Safari on your iPhone: http://ipro.to/tap_iphone/ (I usually mail links to myself and open them on the phone)
  3. Follow the instructions.

This demo is made in Fireworks, with the help of PHP and jQuery. We tried using Axure, IUI and webapps.net as well, but did not succeed this far creating something that was really easy to make.

How does it work?

Just very quickly, I explain more in detail later on:

  1. Download this zip file containing some folders with PHP files and jQuery.
  2. Create the screens with FW like you normally do. Start with a 320*480 canvas and call the first page “index” (no capitals please!).
  3. Use hotspots (instead of slices) for creating links to the different pages.
  4. Export the mockup to HTML and images like you normally do to test the mockup in a browser.
  5. Everything OK? Now export the file to Dreamweaver Library (.lbi) to
    the folder named “Library”.
  6. Upload everything to a server that can execute PHP.
  7. Get your iphone and visit http://www.yourwebsite.com/..path..to..iprototype/iprototype.

But how does it really work?

Technically speaking.  (if you are not interested, skip to “creating the mockup with FW“)

  1. When you open the URL on the iphone, jQuery will check the height of the screen, so it knows if you already have added the link to your homescreen.
  2. If not (screenheight is under 480px) it alerts you to add the link to your homescreen
  3. If you enter the site from the homescreen, the height of your window is 480px. So jQuery gets the content of the mockup using PHP.
  4. All .lbi files are loaded and changed a bit by PHP to correct path to images, remove unnecessary tags and change the links so jQuery can work with it. Also some DIV tags are wrapped around the images and the ID attribute is set to the name of the file.
  5. jQuery hides all DIV’s found in the generated HTML, but makes the screen (page) named “index” visible.
  6. Clicking the image maps (hotspots) on this image shows the DIV the URL links to.

Take a look at the source code of the files for even more details (I figured most of you are designers not interested so much in code, like myself most of the time)

Do it yourself

Download the files

files
Files in the zip
Download this zip and extract it to your hard-disk. All of these files have to be uploaded to a server, so make sure you can find them in your FTP client or put them directly on the server.  About the files in the folder “iPrototype”:

  • index.html; the file the browser opens. The file contains some metatags, CSS, javascript and a call to the php file.
  • The folder “includes”: A folder with some files needed for the prototype to work.
    • js/jquery.js: the javascript libary
    • icon.png: The icon that is put on the iPhone homescreen (you can change this)
    • functions.php: A file to read and modify the exported files from Fireworks.
  • The folder “Library”: This is where you export your files to from Fireworks. (you can use these files to test, but you should delete these before exporting your own prototype)

Create the Fireworks PNG

If you are new to Fireworks, there are many tutorials to be found on the web. I won’t go into detail about how to use the program, but will point out a few important things for making prototyping for the iPhone work.

A great way to start is getting the iPhone UI elements from Metaspark (thanks for this guys!). Open Fireworks and create a new file setting the canvas to 320 by 480 pixels and name the first page “index”. This is important because otherwise you’ll get a black screen opening the first page on your iPhone.

Pages and hotspots

Fireworks makes use of pages. Every page can have its own graphics, buttons and settings. To be able to click through the screen, you need more than one page and link these pages together using hot-spots. This easiest way to create a hot-spot is to right click the element you want to be a button and select “insert hot-spot”. In the properties panel you enter the page name you want the button to link to. You can enter this manually or use the pull-down menu. If you create a link to a page that does not exist, you will see a black (or whatever background color you set) screen and you’ll have to reload the prototype. Make sure all links are correct. You can export the prototype as “HTML and images” to check everything in your favorite browser.

Creating the hotspots
Creating the hotspots

Exporting to .lbi

Click “file>export” in Fireworks. Find the “Library” folder. Export the file as Dreamweaver Library Items. Dreamweaver library items are small pieces of HTML code that you normally insert into webpages and will update automatically, but forget about that. Other settings:  Don’t bother entering a “file name” as the files will be named after your pages, “Slices: None”, Check “Put images in subfolder (images)”, uncheck “Current frame only”. Hit “Export”.

export

Upload and view it on your iPhone

photo
The message you get when opening in Safari

All files in the iPrototype folder should be on a server that can execute PHP. I normally use FTP in Dreamweaver to do this. Take your iPhone and navigate to the address, ending with /iprototype. Follow the instructions on the screen.

Having trouble?

Let us know! We can also create a prototype for you, or help out with the design, that is what we do!