page 34 |
 |
the following line of code:
gotoAndStop("init")
should, as a matter of good form, have a semicolon after it, as in:
gotoAndStop("init"); |
page 45 |
 |
the last sentence in the second paragraph ("Here's the code:") was mistakenly added during typesetting; it should not be there. |
page 50 |
 |
Due to the order of execution of code across timelines, Scenario 5 requires three frames, not two. The text should read:
Suppose we create a new movie with three keyframes. On frame 1, we place a clip instance, ball . On the ball timeline, we create a variable, radius . Frame 3 of our main timeline is blank (the ball instance is not present there).
From frame 2 of the main movie timeline, we can find out the value of radius using this code:
trace(ball.radius);
Now the question: If we move that line of code from frame 2 to frame 3 of the main timeline, what appears in the Output window when our movie plays?
Answer: Nothing appears. When the ball clip is removed from the main timeline on frame 3, all its variables are destroyed in the process.
|
page 80 |
 |
The following comment:
// Sets finalGreeting to "Hello, Karsten?"
should not have a comma between Hello and Karsten. It should read:
// Sets finalGreeting to "Hello Karsten?" |
page 87 |
 |
In the line of code:
paradox = "Pain is pleasure, pleasure is pain";
The first word "Pain" should have a lowercase "p".
|
page 95 |
 |
In the third code block, the eval() statement is malformed. It should be changed from:
eval("func" + i + "()");
to
eval("func" + i)();
|
page 102 |
 |
In the code sample that calculates the volume of a cylinder, the variable "circleArea" is defined on line 3, but the variable "area" is subsequently used on line 4. Line 4's variable "area" should be changed to "circleArea", so line 4 reads:
var cylinderVolume = circleArea * height;
|
page 108 |
 |
In the last paragraph, the following is incorrect:
"If the divisor is zero, the result is NaN"
It should read:
If the divisor (denominator) is zero:
* The result is NaN if the numerator is zero or non-numeric
* The result is Infinity if the numerator is a positive number
* The result is -Infinity if the numerator is a negative number
Some examples:
trace (0/0); // NaN
trace ("a"/0); // NaN
trace (1/0); // Infinity
trace (-1/0); // -Infinity
|
page 109 |
 |
In the code sample that checks for a zero divisor, line 3 is missing curly braces around the else statement. Line 3 should read:
} else {
|
page 112 |
 |
In the first code sample on the page, the constructor function for the Ball class is implied, but not present. To be complete, the following lines should be added before the first line:
function Ball () {
// initialize ball objects
}
|
page 127 |
 |
In the second code sample on the page, the diameter variable is incorrectly set to ball.radius instead of ball.radius * 2. Line 1 of the code should read:
diameter = ball.radius * 2;
|
page 137 |
 |
In the second code sample on the page, the value of Math.PI is missing a "1". Line 3 of the code should read:
trace("pi is: " + PI); // Displays: 3.14159... (PI is a property of Math)
|
page 171 |
 |
Last paragraph before "Exiting and Returning Values from Functions", second last sentence incorrectly reads:
"by invoking our generic movieClip() function"
it should read:
"by invoking our generic moveClip() function"
("moveClip" not "movieClip")
|
page 177 |
 |
In the first code example, the word "function" is missing a "c". Line 2 of the example should read:
function getName() {
|
page 178 |
 |
The last code sample before the "Local Variables" section neglects to mention where rotate() should be called from. For clarity, the last two lines of code should be replaced by:
// From the _root timeline, invoke rotate() with a reference to clipA.
rotate(clipA, 30);
// Or, from clipA's timeline, invoke rotate() with a reference to clipA.
_root.rotate(_root.clipA, 30);
|
page 188 |
 |
Line 10 of the makeClip() function example should read:
theClip.duplicateMovieClip(theClip._name + makeClip.count, makeClip.count);
not:
theClip.duplicateMovieClip(the clip._name + makeClip.count, makeClip.count); |
page 210 |
 |
The function "Number" in the fourth last line of code in Example 10-2 should be capitalized, as in:
nextStarNumber = Number(_name.substring(4, _name.length)) + 1;
|
page 210 |
 |
The description of Example 10-2 neglects to mention that the instance name of the original star clip should be star0. For clarification, a comment should be added to the start of Example 10-2 as follows:
// Attach this load handler to a clip named star0.
|
page 215 |
 |
First paragraph, last line, "keyDownclip" needs a space. This:
"Unlike the keyPress button event, keyDownclip events"
should be changed to:
"Unlike the keyPress button event, keyDown clip events"
|
page 238 |
 |
The first non-code sentence reads "When invoked with no arguments, push() appends an empty element:". This is, in fact, not true. The sentence and the three-line code sample that follows it should be removed.
|
page 297, figure 13-4 |
 |
The footnote should read "contains clips not based on attached seed clips" (not "...no based..."). |
page 320, Example 13-4 |
 |
To determine how many degrees of a circle are occupied by a single hour on a clock face, we should divide 360 degrees by 12 hours. the fourth last line in example 13-4, hence, should read:
hourHand._rotation = 360 * dayPercent + hourPercent * (360 / 12);
where the last number is 12, not 24. this error also appears on page 322, in fourth last line of the example code starting with function updateClock () {.
|
page 323, Example 13-5 |
 |
The #include cannot have a comment on the same line. Hence, the line:
#include "questionsArray.as" // See explanation later in this example
should be broken into two lines, as follows:
// See explanation later in this example
#include "questionsArray.as"
|
page 359 |
 |
The second last code block reads:
title._gotoAndPlay("fadeout");
No underscore is used before the gotoAndPlay() method. the text should read:
title.gotoAndPlay("fadeout");
|
page 373 |
 |
The MIME type in the tip text (marked by an owl graphic), is incorrectly listed as: "application/x-www-urlform-encoded". The correct MIME type is: "application/x-www-form-urlencoded" (as specified by the W3C). This error also appears under Example 17-1 (p.377), loadVariables() (p.489), XML.contentType() (p.610), and XML.send() (p.626).
|
page 377 |
 |
Example 17-1. The Source Code of echo.pl. The fourth last line uses Unix notation to add blank lines that signify the end of an http header: \n\n. On some operating system/web server combinations, the blank lines may need to be specified differently (e.g., on Windows: \r\n\r\n). This problem is addressed by the CGI.pm module. The fourth last line should be changed from:
print "Content-type: application/x-www-form-urlencoded\n\n";
to:
print $query->header({"Content-Type"=>"application/x-www-form-urlencoded"});
This change also fixes the MIME erratum reported above for page 373.
|
page 463 |
 |
Last code example.
"exec", "C:/WINDOWS/NOTEPAD.EXE")
should be changed to:
fscommand("exec", "C:/WINDOWS/NOTEPAD.EXE");
|
page 476 |
 |
In the example for #include showing syntax differences between Macintosh and Windows file paths, the example for Macintosh uses a slash character ("/") to delimit folders:
#include "Mac HD/Desktop folder/working/myScript.as"
A colon (":") should be used instead, as in:
#include "Mac HD:Desktop folder:working:myScript.as"
|
page 522 |
 |
When passed a below-range frame number, the MovieClip.gotoAndPlay() method actually behaves differently than the global gotoAndPlay() function. The second line of the frameNumber argument for MovieClip.gotoAndPlay() should, hence, be replaced with:
"If frameNumber is less than 1, the call to MovieClip.gotoAndPlay() is ignored. If frameNumber is greater than the number of frames in mc's timeline, the playhead is sent to the last frame. Note that this behavior differs from the global version of gotoAndPlay(), where a value less than 1 is treated as 1."
|
page 523 |
 |
When passed a below-range frame number, the MovieClip.gotoAndStop() method actually behaves differently than the global gotoAndStop() function. The second line of the frameNumber argument for MovieClip.gotoAndStop() should, hence, be replaced with:
"If frameNumber is less than 1, the call to MovieClip.gotoAndStop() is ignored. If frameNumber is greater than the number of frames in mc's timeline, the playhead is sent to the last frame. Note that this behavior differs from the global version of gotoAndStop(), where a value less than 1 is treated as 1."
|
page 524 |
 |
Usage paragraph, last sentence confusingly reads:
"when a clip is called."
It should read:
"when a clip is scaled."
|
page 530 |
 |
Description paragraph, second sentence erroneously reads:
"Main movies do support..."
It should read:
"Main movies don't support..."
|
page 548 |
 |
First entry under See Also for Number.MIN_VALUE should read "Number.MAX_VALUE" not "Number.MX_VALUE". |
page 598 |
 |
The Availability heading for "$version 'Global' Propery" should read:
"Flash 4 Build 11 and later; deprecated in Flash 5 in favor of getVersion()"
Note: getVersion() not get Version.
|
page 605 |
 |
The word "indexes" after the colon at the end of the first paragraph should not be there. |
page 646 |
 |
The link for the fourth resource on this page ("Brandon Williams's and Ethan Kennedy's Flash Experiments") has changed to:
http://www20.brinkster.com/ahab/flash5/ |