IFBIN Free Friday and Flash® 8 - flash.geom.Point.interpolate by Keith Peters
Every Friday IFBIN will be releasing a high quality example for free download. This week's free download covers the flash.geom.Point.interpolate method and was authored by Keith Peters.
Download IFBIN Service 1.0.1 for 1-Click Installation and Example Configuration
Point.interpolate Example ZIP
In this example Keith uses 2 Point classes to interpolate the position of a 3rd Point. The real jewel within interpolate is the simplicity of calculating relative positions on a connecting line. The following code returns a new Point "pointC" on the line between "pointA" and "pointB" based on a 0-1 value from the V2 NumericStepper component:
var pointC:Point = Point.interpolate( pointA , pointB , stepper.value );
This example fully complies with the IFBIN Development Standards. The example includes ample source comments and is very easy to understand each stage of code execution. Readability, comments, and code formatting are essential when examples are used for learning and reuse. Although all authors code differently all software within IFBIN is formatted identically.
This example is available with full source and documentation within Flash® by Example.
More to come.
Ted :)

0 Comments:
Post a Comment
<< Home