Sample code translated to OpenFL and Haxe from Foundation ActionScript 3.0 Animation: Making Things Move by Keith Peters (Apress, 2007).
Ported and shared with permission. Thank you, Keith.
Definitely buy the book to dive into detailed explanations of the animation concepts demonstrated in these samples. It's really one of the best Flash books ever written, and the concepts are applicable to animation in any programming environment. Honestly, a version of this book should be available for every language. It's that good!
Each chapter's sample code is configured as a separate OpenFL project. Compiling and running these samples to see them in action is easy!
- Open a terminal and navigate to a chapter directory, such as ch03.
- Run
openfl test html5
to compile and run the currently selected sample from that chapter in a web browser.
Most chapters contain several different samples, but they're all in one project. You can uncomment a specific sample in the chapter's project.xml file, or you can use the --app-main
command line option to choose a specific sample from the chapter.
openfl test html5 --app-main=SampleName