Known Errors

If you find any more errors of any sort, please inform the author.

Known errors at 25th January 2001

p40–41. loadMovie. These examples do work, but there is an ambiguity in any call to the loadMovie function which uses a variable or an expression involving variables as its second argument: is it a level number or a target name? ActionScript now has an extra function loadMovieNum which you should use when the second argument is a number, so the example at the top of page 40 would be better as loadMovieNum("DMM.swf", 1). In fact, it appears that loadMovie no longer works correctly to load a movie into a level if any of its arguments is a variable or expression. This Macromedia TechNote contains more information.

p71, line 14. replace loadMovie by loadMovieNum (see above).

p121, top of page. amend the definitions as follows:

 this.move_down = function(dy) { this.ycoord += dy; }
this.move_right = function(dx) { this.xcoord += dx; }
this.move_to = function(p) {
                    this.xcoord = p.xcoord;
                    this.ycoord = p.ycoord;
}

thanks to Antonio De Donatis for pointing this out.

p124, line -5. replace the test by

if (playing && _level1._framesloaded > 0 && _level1._currentframe == _level1._totalframes)

this avoids the possibility of trying to test whether the movie has finished before it has actually loaded. To catch all possibilities, we also need to make sure that a movie is explicitly unloaded if nothing is waiting, so…

p125, top. replace the function definition by

function next() {
	waiting.dequeue();
	if (!waiting.is_empty())
		loadMovieNum(url[waiting.head()], 1);
	else {
		unloadMovieNum(1);
		playing = false;
	}
}

See above for loadMovieNum. unloadMovieNum is its cohort.

p103. key navigation example. This script uses functions, which are not described until the next chapter. My apologies for any confusion caused.

p124, line 14. replace loadMovie by loadMovieNum (see above).