Part IIA Basic Workshops
Part IIB Intermediate Workshops
Part IIC Advanced Workshops
Now we really get to apply the knowledge gained in the first part of the book. I can't imagine that you haven't touched Flash since starting the book, but in any case, you will now.
The first thing that I feel compelled to mention is that the code you'll find in the workshop chapters ranges from flat-out bad to really good. The bad stuff is just there for educational purposes (so that we can fix it up). Even the good stuff should not always be considered the "best." There's always more than one way to achieve a result. I would never fault code if it worked. Certainly you shouldn't write code that's unmanageable, but there's a good argument for code that's clear to you. Often the examples shown are presented in a way that makes the most sense. I didn't make sacrifices just to make the code look pretty, but I didn't spend an inordinate amount of time streamlining it either. The workshop chapters are intended to teach you a process of development as well as offer a chance to apply the topics covered in the first part of the book. (Please don't call me when you find a better way to do the same thing consider that I'd be proud and leave it at that.)
Anyway, let me offer this quick overview of all the workshop chapters.
"Ensuring That Users Have the Flash Player 6." This no-nonsense workshop chapter discusses some of the ways to make sure that your audience is equipped to see your Flash 6 creation. We also walk through an exercise using Flash itself as a way to determine player version.
"Creating Custom Cursors." After two simple steps to make a custom cursor, this workshop chapter goes on to make a component and then a custom UI for that component. This workshop chapter is pretty involved. You learn that you can't use buttons (even invisible ones) because they would conflict with any buttons that you try to place this component over.
"Creating a Horizontal Slider." In this workshop chapter, we make a slider component that can work for anything from volume control to video playback. We make this component as generic and universal as possible.
"Building a Slide Show." In addition to the slide show application that you build, you get your first introduction to using the onEnterFrame event as well as disabling buttons.
"Mapping and Scripted Masks." The general technique of mapping is applied to a contrived exercise, but in a way that enables you to apply it to other situations. Bring your math "thinking cap" to this one.
"Working with Odd-Shaped Clickable Areas." Although buttons are great, this workshop chapter shows how Movie Clips (along with the hitTest() method) can serve as alternatives to buttons.
"Adapting Built-In Components." Not only does this exercise show you how to adapt the look and feel of the ComboBox component that ships with Flash, you also learn a bit about the process involved in looking through someone else's code.
"Creating a Currency-Exchange Calculator." We turn a simple currency-exchange calculation into a really usable application. This workshop chapter includes some fancy string maneuvers and a simple use of the new LoadVars object.
"Creating a ToolTip Component." The basic concepts from Workshop Chapter 2, "Creating Custom Cursors," come into play, but we use getTimer() for the first time to add an optional delay.
"Creating Timers." In this workshop chapter, we use the getTimer() function in a most typical way to make three separate timers: a digital stopwatch, a traditional analog display, and a countdown timer (like a sand hourglass). The code for the first two parts is nearly identical.
"Using Math to Create a Circular Slider." The result of this workshop chapter doesn't look much different than a regular slider it just follows a circular path. However, to calculate angles and draw arcs, we use several trigonometry functions from the Math object.
"Developing Time-Based Animations." In a simple example, we see how to use getTimer()to ensure perfect synchronization and how to effectively drop frames if the animation is not keeping up.
"Drawing Graphs." This workshop chapter uses the new drawing functions to create graphs based on dynamic data. Then we go on to label the graph using the TextField object and add a colored mask using the new setMask() method.
"Offline Production." We'll build an animation and then save the coordinates of each step so that it can be used in a time-based application.
"Creating a Dynamic Slide Presentation." Here we build an XML application that dynamically loads data (including images) to build a slide show with bullet points. This workshop chapter is an exercise in using XML-structured data as well as general template design.
"Using the Local SharedObject to Remember User Settings." In this workshop chapter, we build a language-selection interface so that users can specify their language preferences.
"Using the LocalConnection Object for Inter-Movie Communication." Perhaps the most under-appreciated new feature in Flash MX is the LocalConnection object, which lets two Flash movies communicate. In this workshop chapter, we use the LocalConnection object to build a help system.
"Fixing Broken Scripts." This workshop chapter challenges you to fix 10 faulty Flash files (that you download from www.phillipkerman.com/actionscripting). For each one, you'll be given a clue and the solution to make things right.
Naturally, each of these workshop chapters involves many details that require you to use additional parts of ActionScript. After completing all the workshop chapters, consider trying to rebuild them from scratch (without the book). I'll bet that many of you will find quicker or better ways to get them running.