did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781590593059

Foundation Actionscript for Macromedia Flash Mx 2004

by
  • ISBN13:

    9781590593059

  • ISBN10:

    1590593057

  • Format: Paperback
  • Copyright: 2004-04-01
  • Publisher: Springer-Verlag New York Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $34.99 Save up to $1.05
  • Buy New
    $33.94

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

With the release of Flash MX 2004, scripting in Flash has moved from being a desirable asset to an essential skill in the world of web design and development. ActionScript is, quite simply, the key to real power in Flash. This book is for anyone who has ever looked in awe at a cutting-edge Flash site, then taken a look at some code, and run in the other direction. This book will take you from knowing nothing about ActionScript to a firm knowledge that will allow you to exercise a previously unimaginable amount of power over your Flash movies. It does this with fully worked examples throughout, and a case study that will leave you with a cutting-edge Flash site by the end of the book.

Table of Contents

About the Author xiv
About the Technical Reviewer xv
Introduction xvii
Chapter 1: Interactive Flash 1(22)
Giving your movies instructions
2(1)
Working with the Actions panel
3(2)
Direct typing
5(4)
Who are you talking to?
9(5)
Controlling movie clips on the stage
10(4)
Arguments
14(1)
Listening to what your movies are telling you
14(2)
Events in Flash
15(1)
External events
15(1)
Internal events
16(1)
Introducing callbacks
16(4)
Nesting spiders-argh!
17(1)
Animating movie clips with ActionScript
18(2)
Summary
20(3)
Chapter 2: Making plans 23(30)
Defining the problem
24(6)
Keep your ideas in a safer place than your head
25(1)
Storyboarding
26(4)
Building your ActionScript
30(7)
Thinking from the top down
30(1)
Thinking from the bottom up
31(6)
Flowcharting
33(4)
Book project: Introducing the Futuremedia site
37(14)
Deconstructing the problem
40(3)
Solving problem 1
43(2)
Solving problem 2
45(2)
Solving problems 3 and 4
47(4)
Parting shots
51(1)
Summary
51(2)
Chapter 3: Movies that remember 53(36)
Introducing variables
54(18)
Values and types
55(1)
Creating variables and using them with literals and expressions
56(6)
Naming variables
56(2)
Creating variables
58(1)
Literal values
58(1)
Expressions
59(3)
Input and output
62(5)
Using string expressions
67(1)
Working with numbers
68(2)
Other uses for numeric expressions
69(1)
Working with Boolean values
70(2)
Logic operators
71(1)
Arrays
72(5)
Reasons for using arrays
73(1)
Arrays let you store related information together
73(1)
Arrays let you hold information in a specific order
73(1)
Arrays let you index information
73(1)
Arrays let you link information
74(1)
Creating a new array
74(1)
Typing an array
75(1)
Using variable values as offsets
75(2)
Book project: Starting the Futuremedia site design
77(10)
What you're going to do
77(1)
What you're going to learn
78(1)
Choosing and setting the stage size
78(1)
Setting up the timeline
79(1)
Creating layout guides
80(2)
Adding the position and status text
82(4)
Choosing a font
82(1)
Adding the text
83(2)
Embedding the font
85(1)
Parting shots
86(1)
Summary
87(2)
Chapter 4: Movies that decide for themselves 89(26)
Decision making
90(8)
Making decisions in ActionScript: The if action
91(1)
Defining a decision
92(6)
Alternative actions
98(14)
Acting on alternatives: The else action
98(2)
More than one alternative: The else if action
100(3)
Handling lots of alternatives: The switch action
103(2)
Switching without breaks
105(7)
Summary
112(3)
Chapter 5: More power, less script 115(38)
Timeline loops
116(1)
ActionScript loops
117(1)
while loops
117(10)
Useful things to do with while loops
118(7)
for loops
125(1)
init
126(1)
condition
126(1)
next
126(1)
Some useful examples of for loops
126(1)
Simple loop
126(1)
Reverse loop
126(1)
Two at a time
126(1)
Looping through elements in an array
127(2)
Applying an operation to all the elements in an array
127(1)
Searching an array for a specific value
128(1)
Cross-indexing a pair of arrays
129(1)
Hangman
129(12)
Book project: Creating the static graphics
141(8)
Setting up the timeline layers for your graphics
143(1)
Creating the back strip
143(2)
Adding structure to the Library
145(1)
Creating the frame cutout
146(2)
Revealing the frame cutout and finishing the FLA
148(1)
Parting shots
148(1)
Summary
149(4)
Chapter 6: Movies that remember how to do things 153(22)
Breaking down a task
154(1)
Bundling actions and running them afterward
154(4)
Choosing which actions to bundle and where
158(10)
Arguments and redundancy
159(1)
Local variables and modular code
160(2)
Returning values from a function
162(1)
Typing functions
163(5)
Nesting functions
168(4)
Summary
172(3)
Chapter 7: Objects and classes 175(28)
Introducing objects and classes
176(5)
Type and object-oriented programming
177(1)
Classes, generalization, and abstraction
178(1)
Seeing arrays in a new light
178(3)
The Array constructor method
179(1)
Other Array methods
180(1)
Array properties
180(1)
Creating classes and objects (instances) in Flash
181(5)
Instances
181(1)
The Object object
181(1)
Viewing an object in Flash
182(1)
Constructors
183(3)
Objects, objects, everywhere
186(15)
Lurking objects
186(1)
Making a show reel
187(14)
Summary
201(2)
Chapter 8: Objects on the stage 203(18)
Movie clips and buttons as objects
204(3)
Symbol behavior
206(1)
Two sides of the same object
206(1)
Working with Library items
207(4)
Navigating the timelines
211(4)
Different place, different variable
211(11)
Locating variables from inside a callback function
211(1)
Reusing callbacks
212(3)
Changing the scope
215(2)
Global variables
217(2)
Summary
219(2)
Chapter 9: Modular ActionScript 221(38)
Modular ActionScript
222(1)
Black-box programming
222(1)
Creating components
223(8)
Creating a modular set of playback controls
224(7)
Dark Valentine
231(2)
Using your component with Dark Valentine
232(1)
Modular control of movie clips
233(4)
How to simulate realistic movement
234(3)
Linear motion
234(1)
Motion with acceleration
235(2)
Trailing the pointer (a mouse follower)
237(8)
Understanding the inertial code
242(1)
Fine-tuning the component
242(3)
Modular code and functions
245(4)
Swarming behavior
245(3)
Taking the swarming effect forward
248(1)
Book project: Starting to code
249(7)
The Futuremedia code style
249(1)
Making it modular
249(1)
Writing the code to set up the events and function hierarchy
250(1)
Sanity check #1
251(2)
Setting up the event handler callbacks
253(1)
Invoking the color change
253(1)
Sanity check #2
254(1)
Running the FLA: The results
254(2)
Parting shots
256(1)
Summary
256(3)
Chapter 10: Sprites 259(50)
What is a sprite?
260(1)
Control
261(3)
External and local data
261(3)
Movement
264(1)
Collision
264(7)
Planning zapper
269(2)
The game world (the main timeline)
271(4)
gSCREEN_TOP, gSCREEN_BOTTOM, gSCREEN_RIGHT, and gSCREEN_LEFT
272(1)
score
272(1)
level, skill, and accel
273(1)
speed
273(1)
shipDead, fired, and gSHIP_HEIGHT
273(1)
The timeline
273(2)
The code
275(15)
Global constants
275(1)
The "start game" trigger
276(2)
The player (the ship)
278(4)
The SwarmAlien
282(2)
alienSpawn()
283(1)
onEnterFrame
283(1)
alienBrain()
283(1)
alienReincarnate()
283(1)
The SwarmAlien code
284(4)
The bullet
288(1)
The debris of war
289(1)
Book project: Navigation event handling
290(17)
Sanity check #1
292(1)
Adding the basic UI animation
292(7)
navigate and posTransition
295(4)
Adding typing
299(1)
Sanity check #2
299(1)
Creating a smooth transition
299(7)
Parting shots
306(1)
Summary
307(2)
Chapter 11: Drawing API 309(34)
Turtle graphics
310(1)
Drawing lines
311(2)
Drawing curves
313(4)
How the sketching code works
317(1)
Filling shapes
317(3)
Creating a kaleidoscope
320(8)
Kaleidoscope math
320(2)
Building the kaleidoscope engine
322(6)
Book project: Color transition event handling and data
328(13)
Wiring the colTransition function
328(3)
The game plan
328(2)
Fading color
330(1)
Coding the color transition
331(1)
Finishing the text transition
332(1)
Reviewing the code so far
333(1)
Data-driven sites (and why you need to understand them)
334(7)
Defining data for Futuremedia
335(6)
Parting shots
341(1)
Summary
341(2)
Chapter 12: Sound 343(50)
Adding sound to Flash movies
344(2)
Using the Sound class
346(12)
Playing sounds from ActionScript
347(11)
Controlling sound from ActionScript
358(8)
setVolume()
358(1)
setPan()
358(8)
Dealing with large sound files: Compression and streaming
366(4)
Compression
366(1)
External sound files
367(3)
Book project: Adding data to the Futuremedia site
370(21)
Creating the data structure
371(1)
Defining your data
372(6)
Page type pType
372(1)
Page links pLink
372(1)
Page titles title
372(2)
Setting the content linkage identifier and URL
374(1)
Populating the data with default values
374(1)
Populating the actual data values
375(3)
Creating the Futuremedia configuration
378(12)
Populating the configuration file
381(3)
Getting Flash to read the data
384(3)
Populating the events
387(1)
Reading content pages
388(2)
Parting shots
390(1)
Summary
391(2)
Chapter 13: Advanced ActionScript 393(53)
Components
394(14)
Components and ActionScript
397(1)
Using component properties and methods
398(2)
Components and event handling
400(3)
A Flash UI
403(4)
Forms
404(3)
Removing components
407(1)
Removing listeners
408(1)
Components and bandwidth
408(1)
Revisiting classes, objects, methods, and properties
408(2)
Prototypes
410(5)
ActionScript 2.0 classes
415(6)
How class-based coding works
416(5)
Book project: Finishing the Futuremedia site
421(24)
Going backward
421(1)
Adding the backward path
421(7)
Create each icon as new pages are added
422(1)
Delete icons as they're used to navigate backward
422(1)
Display a new animation transition that shows the effects of backward navigation
422(1)
Make sure that the UI knows where it needs to return
422(6)
Tidying up the UI
428(4)
Tidying up the graphics
429(3)
Adding sound and interface status messages
432(1)
A great big sanity check
432(2)
Adding sound
434(3)
Adding the status text messages
437(1)
Another sanity check
437(1)
Forward path
438(1)
Backward path
438(1)
Testing the site
439(2)
Adding a preloader
441(2)
Parting shots
443(2)
Summary
445(1)
Index 446

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program