I've created a small binary demo package for those of you who just want to see vektrix in action, without needing to compile the whole thing from source
(if you are unable to run the demo, you might be missing the VS2008 SP1 runtime, which you can download here)
Download the demo here
[edit]: you can press F1 to display debug information about the object bounding boxes
Screenshot...
Basically, in this little demo you've got 6 "arrow" buttons for controlling the X and Y coordinates as well as the rotation of a SWF object.
The whole logic behind this is done inside ActionScript 3.0, there's no extra C++ code involved at all.
The ActionScript 3.0 code inside the SWF looks like follows...
Code: Select all
plus_x.addEventListener(MouseEvent.CLICK, function() {grad_btn.x += 10;} );
min_x.addEventListener(MouseEvent.CLICK, function() {grad_btn.x -= 10;});
plus_y.addEventListener(MouseEvent.CLICK, function() {grad_btn.y += 10;} );
min_y.addEventListener(MouseEvent.CLICK, function() {grad_btn.y -= 10;});
plus_rot.addEventListener(MouseEvent.CLICK, function() {grad_btn.rotation += 10;} );
min_rot.addEventListener(MouseEvent.CLICK, function() {grad_btn.rotation -= 10;} );
If you are interested in the FLA source file, there you go
Cheers