Skip to content

how to flash develop on terminal

여러분은 어떤 툴로 플래시를 개발 하시나요? 플래시를 개발 할 수 있는 툴은 참 다양하게 있습니다. SWF 포멧 자체가 공개 되어 있기 때문에 심지어 바이너리를 수정 해서도 만들 수 있습니다. 일반적인 경우 Flash IDE 나 Flash Builder 를 많이 이용 하지요. 저 같은 경우 재작년 까지는 Flash Develop 이 가벼워서 애용하다가 최근에는 Flash Builder 에서 주로 작업을 하고 있습니다. 모두 좋은 툴이므로 본인의 상황에 맞게 이용하면 되겠지요.

그런데 근래에 들어 사용횟수가 부쩍 늘어난게 있는데 바로 Vim 입니다. 정확하게는 터미널에서 작업을 한다고 해야 되겠네요. 터미널에서 작업을 하면 가장 좋은게 더 이상 마우스 질을 하기 위해서 손을 움직이지도 않아도 된다는 겁니다. 디자이너 출신인 제가 마우스 질 하기가 귀잖다는게 참 아이러니 하네요. ㅎㅎㅎ 여튼 그래서 터미널에서 플래시를 개발하는 방법과 유용한 Vim 플러그인을 소개 해 보겠습니다. 참고로 테스트 환경은 MaxOS X 10.7.2, Vim 7.3 입니다.

1. Download lastest Flex SDK or Flash Builder

2. Setting PATH & alias

export PATH=/usr/local/git/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:   /usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin:/Applications/Adobe Flash Builder 4.5/sdks/4.5.1_AIR3/bin

alias flash='/Applications/Adobe Flash Builder 4.5/player/mac/11.1/Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger'

빌드를 편하게 하기 위해서 PATH 와 단축키를 설정 합니다. PATH 에는 빌더의 bin 폴더를 alias 에는 사용할 플레이어 실행 파일을 설정합니다. 플레이어의 경우 절대경로 상에서 실행하지 않으면 안되므로 alias 로 만들어 줘야 합니다. 이렇게 하면 간단하게 mxmlc 로 컴파일 하고 flash 로 실행 할 수 있게 됩니다.

3. Download Vundle
Vim 플러그인 관리툴 입니다. 한번에 간단하게 플러그인 들을 설치/관리 할 수 있습니다. 파일트리를 볼 수 있는 NERD Tree 와 actionscript syntax 를 해주는 vim-actionscript 등을 유용한 플러그인을 설치 할 수 있습니다.

4. Download AutoComplPop
Vim 같은 터미널 에디터를 쓸 때 참 아쉬운게 자동완성 기능인데 IDE 처럼 완벽하지는 않지만 나름 코딩시간을 많이 줄여 줍니다.

5. Setting .vimrc

" my setting
set nu
set autoindent
set smartindent
syntax enable

set nocompatible               " be iMproved
 filetype off                   " required!

 set rtp+=~/.vim/bundle/vundle/
 call vundle#rc()

 " let Vundle manage Vundle
 " required!
 Bundle 'gmarik/vundle'

 " My Bundles here:
 "
 " original repos on github
 Bundle 'tpope/vim-fugitive'
 Bundle 'Lokaltog/vim-easymotion'
 Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
 Bundle 'tpope/vim-rails.git'
 Bundle 'jeroenbourgois/vim-actionscript'
 Bundle 'scrooloose/nerdtree'
 " vim-scripts repos
 Bundle 'L9'
 Bundle 'FuzzyFinder'
" non github repos
 Bundle 'git://git.wincent.com/command-t.git'
 " ...

 filetype plugin indent on     " required!
 "
 " Brief help
 " :BundleList          - list configured bundles
 " :BundleInstall(!)    - install(update) bundles
 " :BundleSearch(!) foo - search(or refresh cache first) for foo
 " :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
 "

Vundle 설치를 위한 설정과 자동들여쓰기 옵션 등을 본인의 기호에 맞게 설정합니다. 대충의 설정이 끝났습니다. 이제 열심히 코딩 합시다. ^^

영상은 어웨이에 구를 넣어 swf 를 만들기 까지 vim 과 builder 코딩시간비교 입니다. 원래 목표는 “vim 이 훨씬 빨라요.” 뭐 이런 결과를 보여드리고 싶었는데 별반 차이가 없네요. ㅎㅎㅎ

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.