flash player 설치 관련
1. 현재 설치된 flash player 버전 확인하기
(http://www.adobe.com/software/flash/about/)
2. 플래시 플레이어 삭제 프로그램 다운
http://download.macromedia.com/pub/flashplayer/current/uninstall_flash_player.exe
3. flash 설치
9버전
http://download.macromedia.com/pub/flashplayer/updaters/9/flashplayer_9_ax_debug.exe
※ 설치 에러시 레지스트리 삭제
HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer\SafeVersions
(안에 버전별 내용 모두 삭제)
'DEVELOPMENT > FLEX & AIR' 카테고리의 다른 글
actionscript 유용한 라이브러리 (0) | 2012.05.31 |
---|---|
탄성을 갖고 움직이게 하는 플래시 함수 (0) | 2012.05.30 |
두 지점사이의 거리를 구하는 메서드 공식 (0) | 2012.05.30 |
특정 지점을 바라보게 하기위한 각도를 구하는 메서드 공식 (0) | 2012.05.30 |
BorderContainer image background 활용 (0) | 2011.08.24 |
탄성을 갖고 움직이게 하는 플래시 함수
// 무비클립을 탄력적으로 움직이게 하는 메서드
// a는 -2부터 2사이의 실수 (-2<a<2)
// b는 -1부터 0사이의 실수(-1<b<0)
// a*a+4b는 -4부터 0사이의 실수(-4<a*a+4b<0)
// b가 -1에 가까울수록 진동폭이 큼
// a가 -2에 가까울수록(작을수록) 속도가 빠름
// tx와 ty는 이동할 최종 위치
MovieClip.prototype.elasticMove = function(a, b, tx, ty){
var tempx = this._x;
var tempy = this._y;
this._x = a*(this._x - tx) + b*(this.prevx - tx) + tx;
this._y = a*(this._y - ty) + b*(this.prevy - ty) + ty;
this.prevx = tempx;
this.prevy = tempy;
};
'DEVELOPMENT > FLEX & AIR' 카테고리의 다른 글
flash player 설치 관련 (0) | 2013.01.22 |
---|---|
actionscript 유용한 라이브러리 (0) | 2012.05.31 |
두 지점사이의 거리를 구하는 메서드 공식 (0) | 2012.05.30 |
특정 지점을 바라보게 하기위한 각도를 구하는 메서드 공식 (0) | 2012.05.30 |
BorderContainer image background 활용 (0) | 2011.08.24 |
특정지점으로 부드럽게 움직이는 메서드 공식
// 부드러운 움직임
MovieClip.prototype.smoothMove = function(speed, targetx, targety){
this._x += speed*(targetx - this._x);
this._y += speed*(targety - this._y);
};
_root.무비클립인스턴스.smoothMove(0.2, _xmouse, _ymouse);
'DEVELOPMENT > IOS' 카테고리의 다른 글
아이폰 OS 개발 자료 총정리 (0) | 2012.05.17 |
---|---|
iPhone용 Open Source 모음 (0) | 2012.05.17 |
두 지점사이의 거리를 구하는 메서드 공식
// (x1, y1)에서 (x2, y2)까지의 거리를 구해서 정수값을 반환하는 함수
function distance(x1, y1, x2, y2) {
var diffX = x2-x1;
var diffY = y2-y1;
var r = Math.sqrt(diffX*diffX+diffY*diffY);
return r;
}
'DEVELOPMENT > FLEX & AIR' 카테고리의 다른 글
actionscript 유용한 라이브러리 (0) | 2012.05.31 |
---|---|
탄성을 갖고 움직이게 하는 플래시 함수 (0) | 2012.05.30 |
특정 지점을 바라보게 하기위한 각도를 구하는 메서드 공식 (0) | 2012.05.30 |
BorderContainer image background 활용 (0) | 2011.08.24 |
FlashVars 사용법 (0) | 2011.08.24 |
특정 지점을 바라보게 하기위한 각도를 구하는 메서드 공식
// 무비클립을 (targetx, targety)로 회전시키는 함수
MovieClip.prototype.rotateTo = function(targetx, targety){
var diffX = targetx - this._x;
var diffY = targety - this._y;
this._rotation = Math.atan2(diffY, diffX)*180/Math.PI;
};
_root.무비클립인스턴스.rotateTo(this._xmouse, this._ymouse);
'DEVELOPMENT > FLEX & AIR' 카테고리의 다른 글
탄성을 갖고 움직이게 하는 플래시 함수 (0) | 2012.05.30 |
---|---|
두 지점사이의 거리를 구하는 메서드 공식 (0) | 2012.05.30 |
BorderContainer image background 활용 (0) | 2011.08.24 |
FlashVars 사용법 (0) | 2011.08.24 |
flashBuilder 4.5 plug-in의 메뉴가 한글로 나올때 해결법 (0) | 2011.06.23 |
[AS3] BitmapData 사용시 퍼포먼스 향상하는법
비트맵의 모든 픽셀의 색상을 바꾸게 될 경우 setPixcel32()나 setPixcel()이 한프레임에서 자주 호출될때는 퍼포먼스가 떨어지게 되는데 이런경우 퍼포먼스 향상을 위해 lock()을 사용한다.
lock()을 호출하게 되면 AS는 Bitmap 객체가 setPixel32()나 setPixcel()의 실행을 알 수 없게 강제로 막는다.
그래서 연속된 setPixcel()이 호출되는 경우는 lock()을 호출하는 편이 좋다. 호출된 후 변경하려던 모든 픽셀이 변경이 완료된 경우는 unlock()을 호출해주면 Bitmap 객체가 모든 알림을 받을 수 있게 된다.
var bmp:Bitmap = new Bitmap(bitmapData);
//퍼포먼스 향샹을 위해 lock을 걸어준다.
bitmapData.lock();
for(var i:uint = 0; i < bitmapData.height; i++){
for(var j:uint = 0; j < imgData.width; j++){
bitmapData.setPixel(j, i, Math.floor(Math.random()*0xffffffff));
}
}
bitmapData.unlock(); //lock 해제
container.addChild(bmp);
'DEVELOPMENT > FLEX & AIR' 카테고리의 다른 글
[FLEX] Flex 상에서 stage가 null 일경우 (0) | 2010.08.20 |
---|---|
[Flex] Flex Default Background Color (0) | 2010.08.17 |
[flex] shp 확장자를 가진 해안선 자료 보여주기 예제 (0) | 2010.07.15 |
[actionscript 3.0] 외부 xml 및 txt 파일 읽기 (0) | 2010.07.07 |
Bindable 메타 데이터 태그 (0) | 2010.06.18 |
[AIR] 플렛폼 독립적인 공통 디렉터리
공통디렉터리 | 설명 | 속성 |
사용자 홈 | 사용자 계정의 루트 디렉터리 | File.userDirectory |
사용자 문서 디렉터리 | 사용자 홈 디렉터리에 위치하는 문서 디렉터리 | File.documentsDirectory |
애플리케이션 스토리지 디렉터리 | 설치되는 어플리케이션별로 생성되는 고유 스토리지 디렉터리 | File.applicationStorageDirectory |
애플리케이션 디렉터리 | 애플리케이션이 설치된 디렉터리 | File.applicationDirectory |
바탕화면 | 사용자의 바탕화면 디렉터리 | File.desktopDirectory |
사용자 바탕화면 디렉터리 읽어오기
var listing:Array = File.desktopDirectory.getDirectoryListing();
애플리케이션 디렉터리 참조하기
var applicationDirectory:File = new File("app:/");
var applicationDirectory:File = File.applicationDirectory();
예제)
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="creationCompleteHandler()">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function creationCompleteHandler():void{
print(File.userDirectory.nativePath);
print(File.documentsDirectory.nativePath);
print(File.desktopDirectory.nativePath);
print(File.applicationDirectory.nativePath);
print(File.applicationStorageDirectory.nativePath);
print(File.documentsDirectory.resolvePath("Downloads").nativePath);
print(File.documentsDirectory.resolvePath("Downloads/test").nativePath);
print(File.documentsDirectory.resolvePath("..").nativePath);
print(File.userDirectory.getRelativePath(File.documentsDirectory));
}
private function print(string:String):void{
output.text += ">" + string + "\n";
}
]]>
</mx:Script>
<mx:TextArea id="output" width="100%" height="100%" />
</mx:WindowedApplication>
참고
http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS53995f63097985ed-7aaf5f2511d5bbfba82-8000f.html
http://livedocs.adobe.com/apollo/1.0/aslr/
'DEVELOPMENT > FLEX & AIR' 카테고리의 다른 글
[Flex] 사용자 컴포넌트 (0) | 2010.06.15 |
---|---|
BlazeDS 4 출시 (0) | 2010.06.11 |
[Flex] TextInput 컨트롤에 제한된 문자면 입력하기 (0) | 2010.04.22 |
[FLEX] DateChooser, DateField 달력 한글로 표기하기 (0) | 2010.04.19 |
[AIR] 윈도우 우선 순위 속성 (0) | 2010.03.27 |