도스상에서 플렉스 사용하기
안녕하세요.
플렉스에 관심이 많아서, 현재 프로젝트 진행하면서 삽질중입니다.
이곳에 플렉스란이 있다는 것은 얼마전에 알았는데, 관심을 가지시는 분은 얼마 없는듯..
그냥 알고 있는거 간단히 적어봅니다.
시간되면 자주 적도록 하겠습니다.. ^^;
오늘은 도스상에서 플렉스 사용하기입니다.
플렉스 빌더가 있으면 빌더를 사용하면 되지만, 프로젝트 형태가 아니거나, 간단한 코딩한 것을 결과물을 내려고 할때는
도스상에서 처리하는 것이 편합니다.
빌더가 이클립스 기반이라서 시스템의 리소스를 많이 잡아먹어서, 고사양의 컴터가 아니면..
컴파일 하는데, 시간만 많이 소요되기도 하고요.
(아래부터 존재 생략..)
우선 플렉스 sdk가 있어야 한다.
SDK는 현재 두종류가 있다.
SDK 2.0.1 과 SDK 3 beta3 버전이다.
여기서는 2.0.1을 사용하기로 한다.
http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html
이곳에서 다운을 받으면 된다.
SDK 3은 아래 링크에서 받으면 된다.
http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email
하단의 Flex 3.0 SDK에 License부분 체크해 보면 바로 다운로드 할수 있다.
(플렉스를 실행하기 위해서는 jre가 설치되어야 있어야 한다.)
jre가 설치되어 있기 않다면, http://java.sun.com/ 에서 최신 java를 설치하자.
(여기서는 설치과정 생략. 검색하면 많이 나올겁니다.)
자바 버전은 1.5 이상이면 제대로 작동될겁니다.
다운 받았다면, 압축을 풀고 해당 디렉토리의 bin 경로로 가 보자.
bin 디렉토리 밑에 mxmlc.exe 파일이 보일것이다.
이것이 플렉스의 mxml 파일을 컴파일하는 컴파일러이다.
D:\04.Language\__SDK\flex_sdk_2\bin>mxmlc
Adobe Flex Compiler (mxmlc)
Version 2.0.1 build 155542
Copyright (c) 2004-2006 Adobe Systems, Inc. All rights reserved.
mxmlc [options] [defaultVar]
Use 'mxmlc -help' for more information.
옵션을 출력해 보자.
D:\04.Language\__SDK\flex_sdk_2\bin>mxmlc -help list
Adobe Flex Compiler (mxmlc)
Version 2.0.1 build 155542
Copyright (c) 2004-2006 Adobe Systems, Inc. All rights reserved.
-benchmark
-compiler.accessible
-compiler.actionscript-file-encoding <string>
-compiler.context-root <context-path>
-compiler.debug
-compiler.external-library-path [path-element] [...]
-compiler.fonts.flash-type
-compiler.fonts.max-glyphs-per-face <string>
-compiler.include-libraries [library] [...]
-compiler.incremental
-compiler.library-path [path-element] [...]
-compiler.locale <string>
-compiler.namespaces.namespace <uri> <manifest>
-compiler.optimize
-compiler.services <filename>
-compiler.show-actionscript-warnings
-compiler.show-binding-warnings
-compiler.show-deprecation-warnings
-compiler.show-unused-type-selector-warnings
-compiler.source-path [path-element] [...]
-compiler.strict
-compiler.theme [filename] [...]
-compiler.use-resource-bundle-metadata
-help [keyword] [...]
-licenses.license <product> <serial-number>
-load-config <filename>
-metadata.contributor <name>
-metadata.creator <name>
-metadata.date <text>
-metadata.description <text>
-metadata.language <code>
-metadata.localized-description <text> <lang>
-metadata.localized-title <title> <lang>
-metadata.publisher <name>
-metadata.title <text>
-output <filename>
-runtime-shared-libraries [url] [...]
-use-network
-version
-warnings
해당 옵션들중 중요한거 몇가지만 살펴보자.
-debug=true : 디버그 모드로 컴파일여부 지정
-warnings=false : 경고메세지 출력 여부
-source-path : 소스 경로
-load-config : 컴파일에 사용한 flex-config.xml 파일 경로
-compiler.옵션명 : flex-config.xml 파일의 컴파일 관련값 설정
그럼 간단히 코드를 작성해 보도록 하겠습니다..
hello.mxml
<?xml version='1.0' encoding='utf-8'?>
<mx:Application xmlns:mx='http://www.adobe.com/2006/mxml' layout='absolute'>
<mx:Panel x='57' y='24' width='466' height='331' layout='absolute'>
<mx:TextInput x='111' y='118' id='txtName'/>
<mx:Button x='279' y='118' label='button' click="mx.controls.Alert.show('Hello Flex!! '+ txtName.text)"/>
</mx:Panel>
</mx:Application>
이제 컴파일을 시켜 보자.
D:\04.Language\Flex\TestCode>mxmlc hello.mxml
Loading configuration file C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\flex-config.xml
D:\04.Language\Flex\TestCode\hello.swf (141521 bytes)
정상적으로 컴파일이 되었고, hello.swf파일이 생성이 되었다.
만일 오류코드를 보고 싶다면 위 코드에서 약간 수정하고 컴파일하면 에러 코드 출력이 어떻게 되는지 볼수 있을 것이다.
이제 결과물을 실행해 보자.
D:\04.Language\Flex\TestCode>hello.swf
이처럼 했는데, swf가 실행이 되지 않다는다면 아래 링크에서 플래시 플레이어를 설치하자.
http://www.adobe.com/support/flashplayer/downloads.html
플렉스를 하고자 한다면 개발자용 debug player가 유용하니, debug용으로 받아서 설치하고..
다시 도스상에서 실행하면 결과물을 볼수 있을 것이다.
오늘은 요까지입니다.
잘못된 것이 있다면 알려주세요.
그럼 다들 수고하세요.
플렉스에 관심이 많아서, 현재 프로젝트 진행하면서 삽질중입니다.
이곳에 플렉스란이 있다는 것은 얼마전에 알았는데, 관심을 가지시는 분은 얼마 없는듯..
그냥 알고 있는거 간단히 적어봅니다.
시간되면 자주 적도록 하겠습니다.. ^^;
오늘은 도스상에서 플렉스 사용하기입니다.
플렉스 빌더가 있으면 빌더를 사용하면 되지만, 프로젝트 형태가 아니거나, 간단한 코딩한 것을 결과물을 내려고 할때는
도스상에서 처리하는 것이 편합니다.
빌더가 이클립스 기반이라서 시스템의 리소스를 많이 잡아먹어서, 고사양의 컴터가 아니면..
컴파일 하는데, 시간만 많이 소요되기도 하고요.
(아래부터 존재 생략..)
우선 플렉스 sdk가 있어야 한다.
SDK는 현재 두종류가 있다.
SDK 2.0.1 과 SDK 3 beta3 버전이다.
여기서는 2.0.1을 사용하기로 한다.
http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html
이곳에서 다운을 받으면 된다.
SDK 3은 아래 링크에서 받으면 된다.
http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email
하단의 Flex 3.0 SDK에 License부분 체크해 보면 바로 다운로드 할수 있다.
(플렉스를 실행하기 위해서는 jre가 설치되어야 있어야 한다.)
jre가 설치되어 있기 않다면, http://java.sun.com/ 에서 최신 java를 설치하자.
(여기서는 설치과정 생략. 검색하면 많이 나올겁니다.)
자바 버전은 1.5 이상이면 제대로 작동될겁니다.
다운 받았다면, 압축을 풀고 해당 디렉토리의 bin 경로로 가 보자.
bin 디렉토리 밑에 mxmlc.exe 파일이 보일것이다.
이것이 플렉스의 mxml 파일을 컴파일하는 컴파일러이다.
D:\04.Language\__SDK\flex_sdk_2\bin>mxmlc
Adobe Flex Compiler (mxmlc)
Version 2.0.1 build 155542
Copyright (c) 2004-2006 Adobe Systems, Inc. All rights reserved.
mxmlc [options] [defaultVar]
Use 'mxmlc -help' for more information.
옵션을 출력해 보자.
D:\04.Language\__SDK\flex_sdk_2\bin>mxmlc -help list
Adobe Flex Compiler (mxmlc)
Version 2.0.1 build 155542
Copyright (c) 2004-2006 Adobe Systems, Inc. All rights reserved.
-benchmark
-compiler.accessible
-compiler.actionscript-file-encoding <string>
-compiler.context-root <context-path>
-compiler.debug
-compiler.external-library-path [path-element] [...]
-compiler.fonts.flash-type
-compiler.fonts.max-glyphs-per-face <string>
-compiler.include-libraries [library] [...]
-compiler.incremental
-compiler.library-path [path-element] [...]
-compiler.locale <string>
-compiler.namespaces.namespace <uri> <manifest>
-compiler.optimize
-compiler.services <filename>
-compiler.show-actionscript-warnings
-compiler.show-binding-warnings
-compiler.show-deprecation-warnings
-compiler.show-unused-type-selector-warnings
-compiler.source-path [path-element] [...]
-compiler.strict
-compiler.theme [filename] [...]
-compiler.use-resource-bundle-metadata
-help [keyword] [...]
-licenses.license <product> <serial-number>
-load-config <filename>
-metadata.contributor <name>
-metadata.creator <name>
-metadata.date <text>
-metadata.description <text>
-metadata.language <code>
-metadata.localized-description <text> <lang>
-metadata.localized-title <title> <lang>
-metadata.publisher <name>
-metadata.title <text>
-output <filename>
-runtime-shared-libraries [url] [...]
-use-network
-version
-warnings
해당 옵션들중 중요한거 몇가지만 살펴보자.
-debug=true : 디버그 모드로 컴파일여부 지정
-warnings=false : 경고메세지 출력 여부
-source-path : 소스 경로
-load-config : 컴파일에 사용한 flex-config.xml 파일 경로
-compiler.옵션명 : flex-config.xml 파일의 컴파일 관련값 설정
그럼 간단히 코드를 작성해 보도록 하겠습니다..
hello.mxml
<?xml version='1.0' encoding='utf-8'?>
<mx:Application xmlns:mx='http://www.adobe.com/2006/mxml' layout='absolute'>
<mx:Panel x='57' y='24' width='466' height='331' layout='absolute'>
<mx:TextInput x='111' y='118' id='txtName'/>
<mx:Button x='279' y='118' label='button' click="mx.controls.Alert.show('Hello Flex!! '+ txtName.text)"/>
</mx:Panel>
</mx:Application>
이제 컴파일을 시켜 보자.
D:\04.Language\Flex\TestCode>mxmlc hello.mxml
Loading configuration file C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\flex-config.xml
D:\04.Language\Flex\TestCode\hello.swf (141521 bytes)
정상적으로 컴파일이 되었고, hello.swf파일이 생성이 되었다.
만일 오류코드를 보고 싶다면 위 코드에서 약간 수정하고 컴파일하면 에러 코드 출력이 어떻게 되는지 볼수 있을 것이다.
이제 결과물을 실행해 보자.
D:\04.Language\Flex\TestCode>hello.swf
이처럼 했는데, swf가 실행이 되지 않다는다면 아래 링크에서 플래시 플레이어를 설치하자.
http://www.adobe.com/support/flashplayer/downloads.html
플렉스를 하고자 한다면 개발자용 debug player가 유용하니, debug용으로 받아서 설치하고..
다시 도스상에서 실행하면 결과물을 볼수 있을 것이다.
오늘은 요까지입니다.
잘못된 것이 있다면 알려주세요.
그럼 다들 수고하세요.
[이 게시물은 관리자님에 의해 2011-10-31 16:50:06 Flash에서 이동 됨]
게시글 목록
| 번호 | 제목 |
|---|---|
| 12201 | |
| 12200 |
기타
www 자동으로 붙이기
|
| 29244 | |
| 12196 | |
| 29243 | |
| 12188 | |
| 12184 |
Flash
Open Flash Chart
3
|
| 29231 |
HTML
타이틀 이미지 만드는 방법
11
|
| 29230 |
HTML
리코
|
| 12181 |
기타
툴팁
2
|
| 29229 | |
| 12179 | |
| 12177 | |
| 12173 |
Flash
서서히 늘어나는 리사이즈 팝업창
3
|
| 29226 | |
| 12172 |
정규표현식
자바스크립트 sort()를 이용한 숫자 정렬
|
| 25007 | |
| 12171 |
JavaScript
DOM 이용 select box 옵션추가삭제
|
| 12170 | |
| 29225 |
HTML
실수로 지운 데이터 살리기..
|
| 12167 | |
| 12166 |
JavaScript
아이디 중복체크
|
| 12157 |
기타
빈티지 효과만들기
8
|
| 12154 |
MySQL
그누보드 통합검색 방법...
2
|
| 12153 | |
| 25002 | |
| 12151 | |
| 29224 | |
| 12148 |
JavaScript
심플한 드롭다운 레이어 메뉴 (2단계 메뉴 구성)
2
|
| 29223 | |
| 12142 | |
| 29217 | |
| 12141 |
JavaScript
날짜 관련 쿼리 입니다. 한달을 요일별로 구함..
|
| 12136 | |
| 12132 | |
| 12130 |
MySQL
테이블 깨졌거나 복구 할때 간단한 팁.
1
|
| 29216 |
HTML
Table생성 스크립트 파일 뽑아내기
|
| 29215 | |
| 12126 | |
| 12124 |
JavaScript
마우스 오버시 그림 변하게 하는 스크립트 소스
1
|
| 12122 | |
| 12120 |
PHP
웹 서버를 이용한 인증
1
|
| 12111 |
JavaScript
div 사이즈 5픽셀로 하기. -_-
8
|
| 25001 | |
| 25000 | |
| 24999 | |
| 24998 | |
| 24997 | |
| 24994 | |
| 24985 | |
| 12109 | |
| 12105 | |
| 12104 | |
| 12096 | |
| 12094 | |
| 12091 | |
| 12090 |
MySQL
리눅스 mysql 에서 백그라운드 실행
|
| 12079 |
JavaScript
거리에서 찍은 인물사진 더 멋있게-
10
|
| 29211 |
HTML
낡은 포스터효과를 내어보자
3
|
| 12072 |
기타
돌아가는 글자
6
|
| 29210 |
HTML
구멍난 자바스크립트 보안
|
| 12070 | |
| 29207 |
HTML
올가미툴에 대해 배워보자
2
|
| 12067 |
JavaScript
div layer 위치 Javascript
2
|
| 12061 | |
| 29204 |
HTML
한글패치 삭제하는 방법
2
|
| 12058 | |
| 12057 | |
| 12056 |
PHP
php로 엑셀파일 만들기
|
| 24984 | |
| 12055 |
JavaScript
lampp 스타트 간단명령
|
| 12053 |
JavaScript
중앙정렬 사이트에 영향없이 오른쪽 배너 붙이기
1
|
| 12051 |
MySQL
apm
1
|
| 12050 |
MySQL
LOG
|
| 12049 | |
| 12048 |
기타
dhcp
|
| 12047 |
Linux
X 윈도우
|
| 12046 |
Linux
BOOT PROCESS
|
| 12045 |
Linux
Linux 명령어 사용방법
|
| 12044 | |
| 12043 |
JavaScript
vi
|
| 12042 |
기타
Nis/NFS
|
| 12041 |
PHP
User Management
|
| 12040 |
JavaScript
쉘
|
| 12039 |
기타
Process
|
| 12038 |
Linux
파일 시스템
|
| 12037 |
Linux
programming
|
| 12036 |
Flash
시스템 튜닝
|
| 12035 |
JavaScript
Quota
|
| 12034 |
MySQL
LOG
|
| 12033 | |
| 12032 |
Linux
메모리
|
| 12031 |
JavaScript
IPCHAINS
|
| 12028 | |
| 12026 |
Linux
linux + samba
1
|
| 12025 |
Linux
압축 그리고 백업( Backup)
|
| 12020 | |
| 12017 | |
| 12015 |
기타
이미지파일정보
1
|
| 12013 |
기타
아쿠아버튼
1
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기