Foundation Actionscript for Flash 8

by
Format: Paperback
Pub. Date: 2006-04-10
Publisher(s): Apress
List Price: $48.62

Buy New

Usually Ships in 2-3 Business Days
$46.30

Rent Textbook

Select for Price
There was a problem. Please try again later.

Rent Digital

Rent Digital Options
Online:30 Days access
Downloadable:30 Days
$16.20
Online:60 Days access
Downloadable:60 Days
$21.60
Online:90 Days access
Downloadable:90 Days
$27.00
Online:120 Days access
Downloadable:120 Days
$32.40
Online:180 Days access
Downloadable:180 Days
$35.10
Online:1825 Days access
Downloadable:Lifetime Access
$53.99
*To support the delivery of the digital material to you, a non-refundable digital delivery fee of $3.99 will be charged on each digital item.
$35.10*

Used Textbook

We're Sorry
Sold Out

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

This book contains all you need to understand and make use of ActionScript, and to have some fun while learning. The Foundation series teaching style is ideal if you're a non-programmer who wants to learn Flash programming quickly and thoroughly. The authors teach the basics, and provide you an all-around proficiency in ActionScript, as well as Flash components within Flash 8. You'll gain the practical skills to build ActionScript based Flash projects, including making initial design decisions, structuring code, and testing. An ongoing case study means that by the end of the book, you'll have constructed a cutting-edge Flash site to showcase your newly learned skills.

Table of Contents

About the Authors xiii
About the Cover Image Designer xv
Introduction xvii
Interactive Flash
1(28)
Giving your movies instructions
2(1)
Working with the Actions panel
3(4)
Direct typing
7(5)
Who are you talking to?
12(6)
Controlling movie clips on the stage
12(6)
Arguments
18(2)
Listening to what your movies are telling you
20(2)
Events in Flash
20(1)
External events
21(1)
Internal events
21(1)
Introducing event handlers
22(5)
Nesting spiders---argh!
22(3)
Animating movie clips with ActionScript
25(2)
Summary
27(2)
Making Plans
29(30)
Defining the problem
30(6)
Keep your ideas in a safer place than your head
32(1)
Storyboarding
33(3)
Building your ActionScript
36(8)
Thinking from the top down
36(2)
Thinking from the bottom up
38(3)
Flowcharting
41(3)
Book project: Introducing the Futuremedia site
44(12)
Solving problem 1
49(1)
Solving problem 2
50(4)
Solving problems 3 and 4
54(2)
Parting shots
56(1)
Summary
56(3)
Movies That Remember
59(46)
Introducing variables
61(23)
Values and types
62(1)
Creating variables and using them with literals and expressions
63(1)
Naming variables
63(2)
Creating variables
65(1)
Using literal values
66(1)
Using expressions
67(5)
Input and output
72(6)
Using string expressions
78(1)
Working with numbers
79(2)
Other uses for numeric expressions
81(1)
Working with Boolean values
82(1)
Logic operators
83(1)
Arrays
84(8)
Reasons for using arrays
86(1)
Arrays let you store related information together
86(1)
Arrays let you hold information in a specific order
86(1)
Arrays let you index information
87(1)
Arrays let you link information
87(1)
Creating a new array
87(2)
Typing an array
89(1)
Using variable values as offsets
89(3)
Book project: Starting the Futuremedia site design
92(11)
What you're going to do
92(1)
What you're going to learn
93(1)
Choosing and setting the stage size
93(1)
Setting up the timeline
94(1)
Creating layout guides
95(2)
Adding the position and status text
97(1)
Choosing a font
98(1)
Adding the text
98(3)
Embedding the font
101(1)
Parting shots
102(1)
Summary
103(2)
Movies That Decide for Themselves
105(34)
Decision making
106(11)
Making decisions in ActionScript: The if action
107(3)
Defining a decision
110(7)
Alternative actions
117(19)
Acting on alternatives: The else action
118(1)
More than one alternative: The else if action
119(4)
Handling lots of alternatives: The switch action
123(3)
Switching without breaks
126(10)
Organizing your code in the correct order
136(1)
Summary
136(3)
More Power, Less Script
139(46)
Timeline loops
140(1)
ActionScript loops
141(1)
while loops
141(14)
Useful things to do with while loops
142(10)
for loops
152(1)
init
153(1)
condition
153(1)
next
153(1)
Some useful examples of for loops
154(1)
Simple loop
154(1)
Reverse loop
154(1)
Two at a time
154(1)
Looping through elements in an array
155(3)
Applying an operation to all the elements in an array
155(1)
Searching an array for a specific value
156(1)
Cross-indexing a pair of arrays
157(1)
Hangman
158(14)
Book project: Creating the static graphics
172(9)
Setting up the timeline layers for your graphics
174(1)
Creating the back strip
174(2)
Adding structure to the Library
176(2)
Creating the frame cutout
178(2)
Revealing the frame cutout and finishing the FLA
180(1)
Parting shots
180(1)
Summary
181(4)
Movies That Remember How to Do Things
185(36)
Breaking down a task
186(1)
Bundling actions and running them afterward
187(5)
Using anonymous and named functions
187(1)
Using functions to hide evil math
188(3)
Using functions to take care of repetitive jobs
191(1)
Choosing which actions to bundle and where
192(15)
Arguments and redundancy
194(1)
Local variables and modular code
195(3)
Returning values from a function
198(2)
Typing functions
200(2)
Running in circles
202(5)
Nesting functions
207(6)
Using nested functions
208(2)
Using more function nesting to tidy up your script
210(3)
Book project: Creating the dynamic graphics
213(5)
Summary
218(3)
Objects and Classes
221(48)
Introducing objects and classes
222(7)
Type and object-oriented programming
224(1)
Classes, generalization, and abstraction
224(1)
Seeing arrays in a new light
225(1)
The Array constructor method
225(2)
Other Array methods
227(2)
Array properties
229(1)
Creating classes and objects (instances) in Flash
229(7)
Instances
230(1)
The Object object
230(1)
Viewing an object in Flash
231(1)
Constructors
232(4)
Objects, objects, everywhere
236(20)
Lurking objects
236(2)
Making a show reel
238(18)
Book project: Initializing the code
256(11)
Getting yourself comfortable
257(2)
Initializing the site variables
259(1)
Telling ActionScript about the stage
260(3)
Sanity check
263(1)
Setting up your tricolor colors
264(1)
Sanity check
265(2)
Final words
267(1)
Summary
267(2)
Objects on the Stage
269(30)
Movie clips and buttons as objects
270(4)
Symbol types and behaviors
273(1)
Two sides of the same object
273(1)
Working with Library items
274(5)
Let chaos reign
279(2)
Bitmap caching
281(2)
The other side of bitmap caching
283(4)
Bitmap caching and RAM
284(1)
Changing the appearance of a cached movie clip
285(2)
When to use bitmap caching
287(1)
Referencing different timelines with ActionScript
287(6)
Different place, different variable
287(1)
Locating variables from inside an event handler function
288(1)
Reusing handler functions
289(4)
The apply method
293(2)
Global variables
295(1)
Summary
296(3)
Reusable Code and Realistic Movement
299(52)
Breaking down big tasks into smaller ones
300(2)
Black-box programming
301(1)
Creating simple components
302(12)
Creating a modular set of playback controls
303(8)
Dark Valentine
311(3)
Modular control of movie clips
314(5)
How to simulate realistic movement
314(2)
Motion with acceleration
316(3)
Trailing the pointer (a mouse follower)
319(8)
Understanding the inertial code
324(1)
Fine-tuning the component
325(2)
Function-based modular code
327(5)
Swarming behavior
328(4)
Taking the swarming effect forward
332(1)
Creating tweens with ActionScript
332(6)
Using import to access the Tween class
333(1)
How to use the Tween constructor function
334(1)
Understanding the transition types
335(3)
Book project: Setting up the color transition
338(10)
Making it modular
338(2)
Sanity check #1
340(4)
Sanity check #2
344(2)
Running the FLA: The results
346(1)
Parting shots
347(1)
Summary
348(3)
Games and Sprites
351(58)
What is a sprite?
352(1)
Control
353(5)
External and internal data
353(5)
Movement
358(1)
Collision
358(9)
Planning zapper
365(2)
The game world (the main timeline)
367(4)
gSCREEN_TOP, gSCREEN_BOTTOM, gSCREEN_RIGHT, and gSCREEN_LEFT
368(1)
score
368(1)
level, skill, and accel
368(1)
speed
368(1)
shipDead, fired, and gSHIP_HEIGHT
368(1)
The timeline
369(2)
The code
371(19)
Global constants
371(2)
The ``start game'' trigger
373(3)
The player (the ship)
376(4)
The SwarmAlien
380(1)
alienSpawn()
381(1)
onEnterFrame
381(1)
alienBrain()
381(1)
alienReincarnate()
382(1)
The SwarmAlien code
383(4)
The bullet
387(2)
The debris of war
389(1)
Book project: Navigation event handling
390(17)
Sanity check #1
391(1)
Adding the basic Ul animation
391(5)
navigate() and posTransition()
396(4)
Adding typing
400(1)
Sanity check #2
400(1)
Creating a smooth transition
400(6)
Parting shots
406(1)
Summary
407(2)
Drawing API
409(44)
Turtle graphics
410(1)
Drawing lines
411(5)
Drawing curves
416(6)
How the sketching code works
421(1)
Filling shapes
422(3)
Creating a kaleidoscope
425(10)
Kaleidoscope math
426(1)
Building the kaleidoscope engine
427(8)
Book project: Color transition event handling and data
435(16)
Wiring the colTransition() function
435(1)
The game plan
436(1)
Fading color
437(1)
Coding the color transition
438(2)
Finishing the text transition
440(1)
Reviewing the code so far
441(1)
Data-driven sites (and why you need to understand them)
442(2)
Defining data for Futuremedia
444(6)
Parting shots
450(1)
Summary
451(2)
Adding Sound to Flash
453(34)
Choosing the right sound format
454(1)
Using sound on a timeline
455(3)
Using the ActionScript Sound class
458(18)
Playing sounds from ActionScript
458(1)
Attaching sounds to a sound instance
458(4)
Starting and stopping sounds
462(2)
Creating dynamic soundtracks
464(5)
Using ActionScript to control volume and balance
469(7)
Dealing with large sound files
476(7)
Using compression to reduce download times
476(2)
Loading sound from external files
478(5)
Silence can also be golden
483(2)
Summary
485(2)
Loading Dynamic Data with XML
487(38)
XML 101
488(9)
How an XML document is structured
490(2)
Using the right version and encoding
492(1)
Using non-English text with XML in Flash
492(2)
Saving XML files in UTF-8
494(2)
How tags are used in XML
496(1)
Checking that your document is well formed
496(1)
Loading XML into Flash
497(6)
Book project: Controlling structure and content with XML
503(19)
Building the basic XML structure
503(5)
Loading the XML data into Flash
508(3)
Creating the Futuremedia site's data structure
511(1)
How the page array is structured
511(2)
Populating the actual data values
513(4)
Moving to the next level
517(4)
Sanity check
521(1)
Summary
522(3)
Finishing the Futuremedia Case Study
525(34)
Getting the data into the user interface
526(7)
Amending the way events are handled
530(1)
Reading content pages
531(2)
Adding the backward path
533(7)
Making sure the Ul knows where it needs to return
533(3)
How the buildlcon() function works
536(4)
Tidying up the user interface
540(17)
A great big sanity check
544(4)
Adding the status text messages
548(3)
Adding a preloader
551(4)
Loading your own content into the site
555(1)
Parting shots
556(1)
Summary
557(2)
Advanced ActionScript: Components and Classes
559(48)
Flash version 2 components
560(27)
Getting more out of components with ActionScript
563(2)
Components and event handling
565(1)
How event listeners work
565(4)
Adding an event listener
569(1)
Understanding the advantages of event listeners
570(2)
Commonly used components
572(1)
Radio buttons
572(3)
Check boxes
575(1)
Combo boxes (drop-down menus)
576(7)
Using code hints with components
583(1)
Loading components at runtime
584(2)
Removing components
586(1)
Removing listeners
587(1)
ActionScript and OOP
587(17)
The future road map for ActionScript
588(1)
Is OOP for me?
589(2)
How class-based coding works
591(6)
Extending classes
597(3)
Extending a built-in class
600(2)
Storing classes in a central location
602(2)
Final thoughts
604(3)
Index 607

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.