Beruflich Dokumente
Kultur Dokumente
Flash CS4
Slide
navigation
Want to bring iPhone-
style slide navigation into
your own online portfolio?
Stewart Hamilton-
Arrandale shows you how
Re-creating the beautifully simple drag-and-throw functionality
of the iPhone to create a simple yet visually pleasing portfolio
centrepiece for your web page is easy. What’s more, by controlling
the content through an external XML file, you’ll be able to use this
technique to add and edit your portfolio without the need of
redesigning or recoding your site. The advantages of this approach
are two-fold: you can concentrate on the visual casing of the design,
while the content can be updated and edited independently.
In this tutorial, we’ll be looking at the interactive
elements and the way your audience will interact with a drag-and-
throw portfolio. We’ve based our design on the iPhone, but have set
up the tutorial so you can mimic this action with any design you
choose. We will be using ActionScript 3.0 and utilising external XML
files for updatable content to help make this project flexible for all
your future needs.
01 Copy the relevant files from this issue’s disc to your computer. Open the
PSDs folder – the document is set up at the correct size for the content used in this
tutorial. I’ve chosen to use an iPhone image, but you can choose any background image
you like. Simply drop your image in place of the white Holder layer. This will be the
canvas for our iPhone-style interface.
09 Open the FlashiPhone.as and look at lines 13-68. First we declare our
variables, then in our set-up method we create all the drag-and-throw functionality 10 Lines 73-123 cover creating the menu. Firstly keep a
(as we did in the last file). We disable mouse events for any movies sitting above the reference of the original position of the main menu, then set up
Content pane. We then start to load the content for this interface and set up some a mouse event for the home button. Next, loop through the
listeners for resizing content, then call that as default for when the movie first XML, and set up and load the images that will act as buttons in
launches. Once the XML has loaded, we call the xmlLoaded method, which sets a the menu. Once they have loaded, call the showImg method for
reference to the loaded XML. animating them in.