2010년 4월 17일 토요일
2009년 12월 22일 화요일
SVN(subversion)버전관리시스템 서버 구축 및 이클립스 연동
참조 링크 :
http://blog.naver.com/chingdsa?Redirect=Log&logNo=10071532104
http://blog.naver.com/chingdsa?Redirect=Log&logNo=10071532104
2009년 12월 16일 수요일
HandMouseCursor
package nhn.util
{
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.utils.*;
public class HandMouseCursor extends Object
{
private var cursors:Dictionary;
private var currentCursor:Object;
private var stage:Object;
private static var thisObj:HandMouseCursor;
public function HandMouseCursor() : void
{
return;
}// end function
public function showCursor(param1:String) : void
{
var _loc_2:* = undefined;
_loc_2 = param1;
if (cursors[_loc_2] != null && cursors[_loc_2] != undefined)
{
currentCursor = cursors[_loc_2];
Mouse.hide();
currentCursor.x = stage.mouseX;
currentCursor.y = stage.mouseY;
stage.addChild(currentCursor);
trace("??", stage.hasEventListener(MouseEvent.MOUSE_MOVE), stage);
if (!stage.hasEventListener(MouseEvent.MOUSE_MOVE))
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
}
}
return;
}// end function
public function removeCursor(param1:String) : Boolean
{
var _loc_2:* = undefined;
_loc_2 = param1;
if (cursors == null)
{
return false;
}
if (cursors[_loc_2] != null && cursors[_loc_2] != undefined)
{
cursors[_loc_2] = null;
delete cursors[_loc_2];
return true;
}
return false;
}// end function
private function moveMouse(event:MouseEvent) : void
{
Mouse.hide();
currentCursor.x = stage.mouseX;
currentCursor.y = stage.mouseY;
event.updateAfterEvent();
return;
}// end function
public function addCursor(param1:Sprite, param2:String) : Boolean
{
var _loc_3:* = undefined;
var _loc_4:* = undefined;
_loc_3 = param2;
_loc_4 = param1;
if (cursors == null)
{
cursors = new Dictionary();
}
if (cursors[_loc_3] == null || cursors[_loc_3] == undefined)
{
_loc_4.mouseEnabled = false;
_loc_4.mouseChildren = false;
_loc_4.enabled = false;
cursors[_loc_3] = _loc_4;
return true;
}
return false;
}// end function
public function hideCursor(param1:String = "") : void
{
var _loc_2:* = undefined;
var _loc_3:* = undefined;
trace("hide");
_loc_2 = currentCursor;
_loc_3 = param1;
if (_loc_3 != "")
{
_loc_2 = cursors[_loc_3];
}
if (_loc_2 != null && _loc_2 != undefined)
{
Mouse.show();
if (currentCursor != null && currentCursor.parent == stage)
{
stage.removeChild(currentCursor);
}
}
if (stage.hasEventListener(MouseEvent.MOUSE_MOVE))
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
}
return;
}// end function
public function addStage(param1) : Boolean
{
if (stage == null || stage == undefined)
{
stage = param1;
return true;
}
return false;
}// end function
public static function getInstance() : HandMouseCursor
{
if (thisObj == null)
{
thisObj = new HandMouseCursor;
}
return thisObj;
}// end function
}
}
{
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.utils.*;
public class HandMouseCursor extends Object
{
private var cursors:Dictionary;
private var currentCursor:Object;
private var stage:Object;
private static var thisObj:HandMouseCursor;
public function HandMouseCursor() : void
{
return;
}// end function
public function showCursor(param1:String) : void
{
var _loc_2:* = undefined;
_loc_2 = param1;
if (cursors[_loc_2] != null && cursors[_loc_2] != undefined)
{
currentCursor = cursors[_loc_2];
Mouse.hide();
currentCursor.x = stage.mouseX;
currentCursor.y = stage.mouseY;
stage.addChild(currentCursor);
trace("??", stage.hasEventListener(MouseEvent.MOUSE_MOVE), stage);
if (!stage.hasEventListener(MouseEvent.MOUSE_MOVE))
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
}
}
return;
}// end function
public function removeCursor(param1:String) : Boolean
{
var _loc_2:* = undefined;
_loc_2 = param1;
if (cursors == null)
{
return false;
}
if (cursors[_loc_2] != null && cursors[_loc_2] != undefined)
{
cursors[_loc_2] = null;
delete cursors[_loc_2];
return true;
}
return false;
}// end function
private function moveMouse(event:MouseEvent) : void
{
Mouse.hide();
currentCursor.x = stage.mouseX;
currentCursor.y = stage.mouseY;
event.updateAfterEvent();
return;
}// end function
public function addCursor(param1:Sprite, param2:String) : Boolean
{
var _loc_3:* = undefined;
var _loc_4:* = undefined;
_loc_3 = param2;
_loc_4 = param1;
if (cursors == null)
{
cursors = new Dictionary();
}
if (cursors[_loc_3] == null || cursors[_loc_3] == undefined)
{
_loc_4.mouseEnabled = false;
_loc_4.mouseChildren = false;
_loc_4.enabled = false;
cursors[_loc_3] = _loc_4;
return true;
}
return false;
}// end function
public function hideCursor(param1:String = "") : void
{
var _loc_2:* = undefined;
var _loc_3:* = undefined;
trace("hide");
_loc_2 = currentCursor;
_loc_3 = param1;
if (_loc_3 != "")
{
_loc_2 = cursors[_loc_3];
}
if (_loc_2 != null && _loc_2 != undefined)
{
Mouse.show();
if (currentCursor != null && currentCursor.parent == stage)
{
stage.removeChild(currentCursor);
}
}
if (stage.hasEventListener(MouseEvent.MOUSE_MOVE))
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
}
return;
}// end function
public function addStage(param1) : Boolean
{
if (stage == null || stage == undefined)
{
stage = param1;
return true;
}
return false;
}// end function
public static function getInstance() : HandMouseCursor
{
if (thisObj == null)
{
thisObj = new HandMouseCursor;
}
return thisObj;
}// end function
}
}
ScrollManager
package nhn.util
{
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ScrollManager extends MovieClip
{
public var n_mc:MovieClip;
private var npDownFlag:Boolean;
public var bar:MovieClip;
private var viewWidth:Number;
private var minX:Number;
private var maxX:Number;
private var targetWidth:Number;
private var isDrag:Boolean;
public var moveTarget:Function;
public var p_mc:MovieClip;
public var thisWidth:Number;
private var clickState:Number;
public var back:MovieClip;
public function ScrollManager(param1:uint = 0, param2:uint = 0)
{
isDrag = false;
if (param1 != 0 && param2 != 0)
{
viewWidth = param1;
targetWidth = param2;
thisWidth = this.height - n_mc.height - p_mc.height - 2;
minX = p_mc.y + p_mc.height + 1;
maxX = n_mc.y--;
setInit();
}
return;
}// end function
public function setBarCenter()
{
this.bar.y = Math.round((this.height - this.bar.height) / 2);
checkBarX();
return;
}// end function
private function backDown(event:MouseEvent) : void
{
var _loc_2:* = undefined;
_loc_2 = event.currentTarget;
if (_loc_2.mouseY < bar.y)
{
bar.y = bar.y - bar.height;
checkBarX();
}
else if (_loc_2.mouseY > bar.y + bar.height)
{
bar.y = bar.y + bar.height;
checkBarX();
}
return;
}// end function
private function pUp(event:Event)
{
var _loc_2:* = undefined;
p_mc.removeEventListener(Event.ENTER_FRAME, moveBar, false);
_loc_2 = thisWidth - bar.height;
return;
}// end function
public function setBarX(param1)
{
var _loc_2:* = undefined;
_loc_2 = thisWidth * param1 / targetWidth;
bar.y = _loc_2 + 15;
return;
}// end function
private function pDown(event:Event)
{
p_mc.addEventListener(Event.ENTER_FRAME, moveBar, false, 0, true);
npDownFlag = true;
return;
}// end function
private function barUp(event:Event)
{
var _loc_2:* = undefined;
if (isDrag)
{
this.bar.stopDrag();
this.stage.removeEventListener(MouseEvent.MOUSE_UP, barUp, false);
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, staDrag, false);
_loc_2 = thisWidth - bar.height;
isDrag = false;
}
return;
}// end function
private function nDown(event:Event)
{
n_mc.addEventListener(Event.ENTER_FRAME, moveBar, false, 0, true);
npDownFlag = false;
return;
}// end function
private function onOver(event:Event)
{
var _loc_2:* = undefined;
_loc_2 = event.currentTarget;
if (_loc_2.name == "bar")
{
_loc_2 = _loc_2.bg;
}
_loc_2.gotoAndStop(2);
return;
}// end function
private function barDown(event:MouseEvent)
{
isDrag = true;
clickState = event.currentTarget.parent.mouseY;
this.stage.addEventListener(MouseEvent.MOUSE_UP, barUp, false, 0, true);
this.bar.startDrag(false, new Rectangle(0, 15, 0, thisWidth));
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, staDrag, false, 0, true);
return;
}// end function
private function addEvent()
{
back.addEventListener(MouseEvent.MOUSE_DOWN, backDown, false, 0, true);
bar.mouseChildren = false;
bar.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
bar.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
bar.addEventListener(MouseEvent.MOUSE_DOWN, barDown, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_DOWN, nDown, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_UP, nUp, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_DOWN, pDown, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_UP, pUp, false, 0, true);
return;
}// end function
private function setInit()
{
var _loc_1:* = undefined;
_loc_1 = thisWidth * viewWidth / targetWidth;
this.bar.bg.height = _loc_1;
this.bar.icon.y = Math.round((_loc_1 - this.bar.icon.height) / 2);
addEvent();
return;
}// end function
private function moveBar(param1)
{
if (!npDownFlag)
{
bar.y = bar.y + 10;
}
else
{
bar.y = bar.y - 10;
}
checkBarX();
return;
}// end function
private function staDrag(event:MouseEvent)
{
checkBarX();
return;
}// end function
private function nUp(event:Event)
{
var _loc_2:* = undefined;
n_mc.removeEventListener(Event.ENTER_FRAME, moveBar, false);
_loc_2 = thisWidth - bar.height;
return;
}// end function
public function setSize(param1:uint = 0, param2:uint = 0) : void
{
viewWidth = param1;
targetWidth = param2;
this.back.height = param1;
this.n_mc.y = this.back.height - this.n_mc.height;
thisWidth = this.height - n_mc.height - p_mc.height - 2;
trace("thisW == " + thisWidth);
minX = p_mc.y + p_mc.height + 1;
maxX = n_mc.y--;
setInit();
return;
}// end function
private function checkBarX()
{
var sX:*;
var vW:*;
bar.y = Math.round(bar.y);
if (bar.y < minX)
{
bar.y = minX;
}
else if (bar.y + bar.height > maxX)
{
bar.y = maxX - bar.height;
}
sX = bar.y - (p_mc.height + 1);
vW = thisWidth - bar.height;
try
{
moveTarget(sX, vW);
}
catch (e)
{
}
return;
}// end function
private function onOut(event:Event)
{
var _loc_2:* = undefined;
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, staDrag, false);
_loc_2 = event.currentTarget;
if (_loc_2.name == "bar")
{
barUp(null);
_loc_2 = _loc_2.bg;
}
_loc_2.gotoAndStop(1);
return;
}// end function
public function wheelEvent(param1)
{
bar.y = bar.y - param1 * 2;
checkBarX();
return;
}// end function
}
}
{
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ScrollManager extends MovieClip
{
public var n_mc:MovieClip;
private var npDownFlag:Boolean;
public var bar:MovieClip;
private var viewWidth:Number;
private var minX:Number;
private var maxX:Number;
private var targetWidth:Number;
private var isDrag:Boolean;
public var moveTarget:Function;
public var p_mc:MovieClip;
public var thisWidth:Number;
private var clickState:Number;
public var back:MovieClip;
public function ScrollManager(param1:uint = 0, param2:uint = 0)
{
isDrag = false;
if (param1 != 0 && param2 != 0)
{
viewWidth = param1;
targetWidth = param2;
thisWidth = this.height - n_mc.height - p_mc.height - 2;
minX = p_mc.y + p_mc.height + 1;
maxX = n_mc.y--;
setInit();
}
return;
}// end function
public function setBarCenter()
{
this.bar.y = Math.round((this.height - this.bar.height) / 2);
checkBarX();
return;
}// end function
private function backDown(event:MouseEvent) : void
{
var _loc_2:* = undefined;
_loc_2 = event.currentTarget;
if (_loc_2.mouseY < bar.y)
{
bar.y = bar.y - bar.height;
checkBarX();
}
else if (_loc_2.mouseY > bar.y + bar.height)
{
bar.y = bar.y + bar.height;
checkBarX();
}
return;
}// end function
private function pUp(event:Event)
{
var _loc_2:* = undefined;
p_mc.removeEventListener(Event.ENTER_FRAME, moveBar, false);
_loc_2 = thisWidth - bar.height;
return;
}// end function
public function setBarX(param1)
{
var _loc_2:* = undefined;
_loc_2 = thisWidth * param1 / targetWidth;
bar.y = _loc_2 + 15;
return;
}// end function
private function pDown(event:Event)
{
p_mc.addEventListener(Event.ENTER_FRAME, moveBar, false, 0, true);
npDownFlag = true;
return;
}// end function
private function barUp(event:Event)
{
var _loc_2:* = undefined;
if (isDrag)
{
this.bar.stopDrag();
this.stage.removeEventListener(MouseEvent.MOUSE_UP, barUp, false);
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, staDrag, false);
_loc_2 = thisWidth - bar.height;
isDrag = false;
}
return;
}// end function
private function nDown(event:Event)
{
n_mc.addEventListener(Event.ENTER_FRAME, moveBar, false, 0, true);
npDownFlag = false;
return;
}// end function
private function onOver(event:Event)
{
var _loc_2:* = undefined;
_loc_2 = event.currentTarget;
if (_loc_2.name == "bar")
{
_loc_2 = _loc_2.bg;
}
_loc_2.gotoAndStop(2);
return;
}// end function
private function barDown(event:MouseEvent)
{
isDrag = true;
clickState = event.currentTarget.parent.mouseY;
this.stage.addEventListener(MouseEvent.MOUSE_UP, barUp, false, 0, true);
this.bar.startDrag(false, new Rectangle(0, 15, 0, thisWidth));
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, staDrag, false, 0, true);
return;
}// end function
private function addEvent()
{
back.addEventListener(MouseEvent.MOUSE_DOWN, backDown, false, 0, true);
bar.mouseChildren = false;
bar.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
bar.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
bar.addEventListener(MouseEvent.MOUSE_DOWN, barDown, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_DOWN, nDown, false, 0, true);
n_mc.addEventListener(MouseEvent.MOUSE_UP, nUp, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_DOWN, pDown, false, 0, true);
p_mc.addEventListener(MouseEvent.MOUSE_UP, pUp, false, 0, true);
return;
}// end function
private function setInit()
{
var _loc_1:* = undefined;
_loc_1 = thisWidth * viewWidth / targetWidth;
this.bar.bg.height = _loc_1;
this.bar.icon.y = Math.round((_loc_1 - this.bar.icon.height) / 2);
addEvent();
return;
}// end function
private function moveBar(param1)
{
if (!npDownFlag)
{
bar.y = bar.y + 10;
}
else
{
bar.y = bar.y - 10;
}
checkBarX();
return;
}// end function
private function staDrag(event:MouseEvent)
{
checkBarX();
return;
}// end function
private function nUp(event:Event)
{
var _loc_2:* = undefined;
n_mc.removeEventListener(Event.ENTER_FRAME, moveBar, false);
_loc_2 = thisWidth - bar.height;
return;
}// end function
public function setSize(param1:uint = 0, param2:uint = 0) : void
{
viewWidth = param1;
targetWidth = param2;
this.back.height = param1;
this.n_mc.y = this.back.height - this.n_mc.height;
thisWidth = this.height - n_mc.height - p_mc.height - 2;
trace("thisW == " + thisWidth);
minX = p_mc.y + p_mc.height + 1;
maxX = n_mc.y--;
setInit();
return;
}// end function
private function checkBarX()
{
var sX:*;
var vW:*;
bar.y = Math.round(bar.y);
if (bar.y < minX)
{
bar.y = minX;
}
else if (bar.y + bar.height > maxX)
{
bar.y = maxX - bar.height;
}
sX = bar.y - (p_mc.height + 1);
vW = thisWidth - bar.height;
try
{
moveTarget(sX, vW);
}
catch (e)
{
}
return;
}// end function
private function onOut(event:Event)
{
var _loc_2:* = undefined;
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, staDrag, false);
_loc_2 = event.currentTarget;
if (_loc_2.name == "bar")
{
barUp(null);
_loc_2 = _loc_2.bg;
}
_loc_2.gotoAndStop(1);
return;
}// end function
public function wheelEvent(param1)
{
bar.y = bar.y - param1 * 2;
checkBarX();
return;
}// end function
}
}
2009년 12월 10일 목요일
CVS 계정 생성
아래 명령으로 cvs 계정을 생성할 수 있다.
cvs passwd -r [Alias] -a[생성할 계정명]
생성된 유저 목록은
CVSROOT 밑에 passwd 파일을 보면 알 수 있다.
http://www.pyrasis.com/main/Subversion-HOWTO
cvs passwd -r [Alias] -a[생성할 계정명]
생성된 유저 목록은
CVSROOT 밑에 passwd 파일을 보면 알 수 있다.
http://www.pyrasis.com/main/Subversion-HOWTO
피드 구독하기:
글 (Atom)