Errata

Actionscript Cookbook

Errata for Actionscript Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
pdf 1.3.3
where to put action script code, end of page

http://blog.madebyderek.com/archives/2007/01/12/as3-projects-and-the-swf-metadata-tag/

However, from my tests, the SWF tag must be placed AFTER the imports.

Same for me.

Anonymous  Sep 21, 2008 
Printed Page xix
2nd Paragraph

What is the correct website for the code downloads?

The book states that it is at:
http://www.person13.com/ascb.

Please check out this site. It is a little scary if you ask me. You should do a better job of keeping current the urls that are posted in your books. I would like to know what the correct url is so that I could get the code samples from this book that I paid $50 for.

Thank you.

Brett Murray  Dec 16, 2008 
Printed Page 104
3rd and 4th paragraph

Create a custom Math.formatNumber() method.
should be:
Create a custom Math.numberFormat() method.

Same mistake in 4th paragraph.

Anonymous   
Printed Page 343
bottom of page

In TableColumn.prototype.render, the loop of i from 0 through this.elements.length
will yield undefined results the first time through the loop due to a reference to (i
- 1). When i == 0, (0-1) results in -1, which is then used to index an array.

Then, starty is also set to undefined, and all ._y values are now undefined.

It should be this instead:

var height = 0;
if (0 < i) {
height = this.elements[i-1]._height;
}

this.elements[i]._y = height + this.spacing + starty - bnds.yMin;
starty += height + this.spacing;

Anonymous   
Printed Page 386
2nd and 3rd function assignment

must be:
obj.onmyProperty0Change = function...
obj.onmyProperty1Change = function...
but is:
obj.onMyProperty0Change = ...
same mistake in "Object.as"

Anonymous   
Printed Page 398
Source Code example, last half of the page

In the new version of Flash (MX Pro) it will not compile the Sound.as file without
returning an error. This error is related to the syntax "Sound.createNewSound =
function (parentClip) {" I haven't explored why, but the immediate fix is to delete
the "Sound." from the begining of the line in the AS file. Only then will it work as
expected.

Anonymous   
Printed Page 488
middle part

For the "LoadMonitor" usage sample to work, one has to add
#include "MovieClip.as"
to the beginning of the sample. Without this the properties "isLoaded" and
"percentLoaded" are not available.

Anonymous   
Printed Page 500
line 8 from bottom

should read:
message_l_so.data.val=val+1;

Anonymous   
Printed Page 501
line 6

should read:
message_l_so.data.val=val+1;

Anonymous   
Printed Page 558
first line

there are missing lines of action script between pages 557 and 558

page 557 ends with a variable property input

username_txt.type = "input";

page 558 begins halfway through a function

saveScore_pb.setClickHandler("saveScore");
saveScore_pg.setLabel("Save");
}

Anonymous   
Printed Page 657
Next to last line

Published code for circle object in Chapter 23:
// Set the color
colObj.setRGB(col);
Should be:
this.colObj.setRGB(col);

Anonymous   
Printed Page 694
Very Top

Small typo in 7/03 printing and the Ch 25 application file. The book and
imageViewer.fla file both ask for "Forms.as" It should be Form.as.

Anonymous