Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

SPONSORED BY

The Very Best Algebra Notes


The Very Best Algebra Notes for the Very Best Flash Games

 

FLASH ACTIONSCRIPT LESSON: CREATING AN ONLINE WHITE BOARD, PAINT WITH MATHEMATICAL WAVEFORM BRUSHES

In this lesson, students learn how to create an online white board with Flash AS3 code. Online white boards are used for online classroom sessions and in online screen sharing sessions. The white board created in this lesson lets you paint with math equations. You can paint with the line brush, the sinusoidal brush, the damped sinusoidal brush and the tangent brush (first click on the stage, hold down any key from 0 to 9 and then depress and drag the mouse). Press the space bar on your key board to erase a composition.

Although it helps to know algebra and trigonometry to code math waveform brushes, it is not a requirement. This coding session is designed to get the student acquainted with math equations and their corresponding graphs. Once students understand the graphs of mathematical equations, it becomes much easier for them to understand, work with and apply mathematics.

The AS3 API object, components, methods and properties used in the lesson include the KeyboardEvent and keyboard event handler function. The keyboard event handler function assigns different mathematical waveforms to the numeric keys on the top row of the keyboard. The lesson also provides the key codes needed for the different numeric keys. The keyboard interface given in the code can also be used in other game programs to assign different behaviors to different types of game pieces. Other API commands used in this session include the Math.sin, Math.cos and Math.tan functions as well as addEventListener, addChild, graphics.lineStyle, graphics.moveTo and graphics lineTo.

To schedule an online Flash lesson, contact

Email: mark.c.stansberry@gmail.com,

Text: (707)235-4095


http://www.3d-perspective-software-development.com/lesson-math-paint-flash-as3-code.html