Difference between revisions of "Talk:Chumby Flash Tutorials"
From Chumby Wiki
(Capturing a Screen "Swipe" for AS3/FP10) |
|||
Line 1: | Line 1: | ||
− | '''Capturing a Screen "Swipe" for AS3/FP10''' | + | '''Capturing a Screen "Swipe" for AS3/FP10'''<br> |
As far as i understood the Chumby One understands AS3 and since<br> | As far as i understood the Chumby One understands AS3 and since<br> | ||
i(yet) don't have one i'm already preparing to develop...<br> | i(yet) don't have one i'm already preparing to develop...<br> |
Revision as of 14:01, 26 February 2011
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...
import flash.events.MouseEvent; 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; ...