Source Code Downloads for the Book

The following files are for the use of those who have purchased the book. They may not be redistributed in any form without the permission of the authors.

All files (22MB): AllChapters.zip

Chapters 1-6 (1MB): Chapters1-6.zip

Chapters 7-11 (7MB):Chapters7-11.zip

Chapters 12-14 (10MB):Chapters12-14.zip

Chapters 15-17 (4MB):Chapters15-17.zip

Errata: Corrections and Clarifications

Important Note on Font Embedding

The files on this page were created using Flash CS3 and Flash CS4, so there are some glitches when they are opened in Flash CS5 and more recent versions. The most noticeable thing is the following message when you try to test/publish some of the included files:

"Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts."

Starting with Flash CS5 all fonts must be embedded when using textboxes built on the stage. To do this, select your textbox on the stage and look in the PROPERTIES panel. Click the embed button (shown on the right) and choose Character ranges including Upper Case, Lower Case, Numerical, and Punctuation. You have to do this for each font you use, not for each textbox object. embed button in properties panel

Chapter 2

At the top of page 33, line 22 of the code is missing a colon. It should read, var y:int = int(txtMult2.text); On that same page, there should be a line between lines 24 and 25 that reads, correctCount++;

At the bottom of page 35, the marginal note referring to "Line 6" actually refers to Line 7.

In the middle of page 38, the references to buttons btnMore and btnLess actually refer to the buttons on the stage, btnCheck and btnAnother.

Chapter 3

At the bottom of page 47, we use the % symbol for "mod," but we do not explain its mathematical meaning there. As clarification, the operation "N % 360" returns the remainder when N is divided by 360. In the case where N is a changing angle measure, the purpose of this is to keep the value in a normal range for angles.

At the bottom of page 50, the line of code that reads, shArrow.graphics.lineTo(circleR-15,-0) should read, shArrow.graphics.lineTo(circleR-15,-1). This error has been corrected in this version of CircleMotionSprite.fla file, posted March 2, 2009.

Chapter 6

In the middle of page 88, the line txtDataList.text = ""; should follow line 5 of the given code if you have used "placeholding" tex in the txtDataList input text box on the stage. Otherwise, that text will not be cleared.

In the middle of page 91, the line txtDataList.text = ""; should follow line 4 of the given code if you have used "placeholding" tex in the txtDataList input text box on the stage. Otherwise, that text will not be cleared.

Also in the middle of page 91, it has not been made clear that the construction of spBoard from the first (Histogram.fla) example's lines 8-14 should be retained for the present example (PieChart.fla), say between the given lines 7 and 8. Otherwise, line 13 on page 91 will throw an error.

Chapter 7

In the middle of page 105, the line spBoard.graphics.endFill(); should follow line 4 of the given script.

At the bottom of page 105, there are two occurrences of the instance name slX, that should be slAlpha instead.

In the middle of page 109, delete the sentence that refers to a btnDraw button. (That button should be removed from the stage.) In its place, there should be a sentence that tells you to change the instance name of txtDataList to be txtNew, and resize/reposition it as shown in Figure 5.

At the top of page 111, we should have said, "The drawPlot function is almost identical to the drawScatterPlot function in Chapter 6..." This version of the file DataGridScatter.fla uses some comments to try to make the connection to the Chapter 6 example more clear.

Chapter 12

Due to an oversight with "versioning," the quick list on page 181 uses deprecated names for some of the methods. While these methods will work, they will produce an output message that gives the preferred method in each case. We include a list of the deprecated methods below, and we also include here an updated version of page 181 in pdf form.

Current Deprecated
|
Current Deprecated
graphRectangular drawRectangular
|
rectangularValueAt rectangularEval
graphPolar drawPolar
|
polarValueAt polarEval
graphParametric drawParametric
|
parametricValueAt parametricEval

There is a similar issue on page 185, where the method name setVarRange is used instead of the preferred setVarsRanges. Once again, both will work, but the former will produce an output message imploring you to use the latter. This method is not used in the book, so there are no inconsistencies, but we include an updated (pdf) version of page 185 here anyway.

Applets Book Cover

Order Now!


Flash and Math Applets: Learn by Example

Programming in ActionScript 3 for Mathematics and Science Teaching and Learning

by Douglas Ensley and Barbara Kaskosz

Available now at Amazon.com

We welcome your comments, suggestions, and contributions. To contact us, email Barbara Kaskosz at barbara@flashandmath.com or Doug Ensley at doug@flashandmath.com.