[FlexExample] 현 마우스 좌표위치구하기 (Get x-coordinate,y-coordinate)
Adobe Platform/Flex Examples 2012. 9. 6. 20:16This example shows how to get the current mouse x,y coordinate.
*source code :MouseLocation.fxp
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="500" height="600" backgroundColor="#BEEFFF" mouseMove="onMouseMove(event);">
<fx:Script>
<![CDATA[
/* http://storyjava.tistory.com
* code5381@hotmail.com
* KevinKim
*/
private function onMouseMove(mouseEvent:Object):void
{
mouseXPoint.text = this.mouseX.toString();
mouseYPoint.text = this.mouseY.toString();
}
]]>
</fx:Script>
<s:HGroup width="100%" height="100%">
<s:Label text="X : " />
<s:Label id="mouseXPoint"/>
<s:Label text="Y : " />
<s:Label id="mouseYPoint"/>
</s:HGroup>
</s:Application>
'Adobe Platform > Flex Examples' 카테고리의 다른 글
[FlexExample] Mic활동 감지 및 이퀄라이저 만들기(Detecting Mic activity and Visualization) (0) | 2012.12.21 |
---|---|
[FlexExample] Flex에서 MP3 재생시키기 (0) | 2012.12.19 |
[FlexExample] 모션인식(Motion Detection) 예제 (0) | 2012.12.13 |
[FlexExample] Print클래스를 이용한 여러가지 인쇄옵션 (0) | 2012.10.26 |
[FlexExample] 여러가지 패널예제 모음(Draggalbe, Resizable, Movable, Minimize, Maximize Panel) (0) | 2012.09.07 |