Talk:Chumby Flash Tutorials

From Chumby Wiki
Jump to: navigation, search

Capturing a Screen "Swipe" for AS3/FP10
As far as i understood the Chumby One understands AS3 and since
i(yet) don't have one i'm already preparing to develop...
There isn't much to change though to convert the provided example to AS3.
I know that FP10 is downward compatible to FP8, but why saddle an old horse...
I mean, one of the best uses for this could be a Carousel-style picture gallery using AS3s
3D capabilities.


var swipe_start_x:Number = 0;
var swipe_start_y:Number = 0;

stage.addEventListener(MouseEvent.MOUSE_DOWN, startSwipe);
stage.addEventListener(MouseEvent.MOUSE_UP, endSwipe);

function startSwipe (e:MouseEvent) {
 swipe_start_x = stage.mouseX;
 swipe_start_y = stage.mouseY;

function endSwipe (e:MouseEvent) {
 var swipe_end_x:Number = stage.mouseX;
 var swipe_end_y:Number = stage.mouseY;