Knowledge/Utility·Program

[Flash] ActionScript Reference

서 태평 2009. 2. 17. 00:26

ActionScript Reference

 

플래시 MX 730여개가 넘는 액션의 사용법을 보시려면 액션 스크립트 레퍼런스 [Window]-[Reference] Shift-F1 를 참고하세요.

  • [표] 액션 카테고리에 포함되어 있지 않은 연산자
    // (주석문 연산자) // 주석문이 한 줄
    /* 주석문이 여러 줄 */
    . (도트 연산자) _root.myMovieClip.childMovieClip // 객체 경로
    / (슬래시 구문) /myMovieClip/childMovieClip // Flash 3 및 4에서 무비 클립이나 변수의 대상 패스를 나타내는데 사용
    : (콜론 연산자) switch(표현식) = { case 상수식 : 명령문; ... } // switch 조건문에서 형태로 사용
    객체명 = { 속성 : 값 , 속성 : 값 , ... } // 객체 초기화에서 사용
    변수 = (조건식) ? 참일 때 결과 : 거짓일 때 결과; // ?:(조건부 연산자)에서 사용
    myMovieClip/childMovieClip:myVariable // 슬래시 구문에서 변수를 나타낼 때 사용
    ; (세미콜론) 명령문; // 명령문 마무리
    [ ] (배열 액세스 연산자) myArray =[]; // 배열 생성
    myArray = [[1,2,3],[4,5,6],[7,8,9]]; // 배열 초기화
    myArray[1][2]; // 배열 액세스
    myMovieClip["mc"+i]; // 객체 액세스
    { } (객체 이니셜라이저) { 명령문; 명령문; ... } // 그룹화
    object = {}; // 객체 생성
    person = { name: "Gina Vechio", children: [ "Ruby", "Chickie", "Puppa"] }; // 객체 배열 초기화
    new 연산자 instanceName = new constructor; // 오브젝트(구조체) 인스턴스를 생성한다
    ' '  (작은따옴표) myString = '문자열' // " " (큰따옴표)처럼 문자열을 만든다

  • 플래시 액션 카테고리는 알파벳순이지만 여기서는 분류별 중요도순으로 정리하였다
  • [보기] 객체. , 메서드() , 이벤트핸들러메서드()= , 리스너()= , 상수는 대문자로 표기되어 있다

    1 2
    액션
    Actions
    무비제어
    gotoAndPlay gotoAndStop nextFrame prevFrame nextScene prevScene play stop
    stopAllSounds()
    브라우저/네트워크
    fscommand( command, parameters )
    getURL loadMovie loadMovieNum unloadMovie unloadMovieNum
    loadVariables( url, target, method )
    loadVariablesNum( url, level, method )
    무비클립제어
    duplicateMovieClip removeMOvie startDrag stopDrag
    updateAfterEvent()
    변수
    delete set var with
    조건/루프
    if..else if..else   switch..case..default   for..in   while   do..while  
    break continue
    인쇄
    print printNum printAsBitmap printAsBitmapNum
    사용자 정의 함수
    call function return
    기타 액션 #include #initclip #endinitclip setInterval clearInterval comment trace
    연산자
    Operators
    일반 연산자
    ""   () 
    기타 연산자
    --  ?:  ++  instanceof  typeof()  void() 
    논리 연산자
    !  &&  || 
    대입 연산자
    -=  %=  &=  *=  |=  /=  ^=  +=  <<=  =  >>=  >>>= 
    비교 연산자
    !=  !==  <  <=  ==  ===  >  >= 
    비트 연산자
    &  ~  |  ^  <<  >>  >>> 
    산술 연산자
    -  %  *  /  + 
    (내장)함수
    Functions
    변환 함수
    Array() Boolean() Number() Object() String()
    수학 함수
    isFinite() isNaN() parseFloat() parseInt()
    기타 함수
    escape() eval() getProperty() getTimer() getVersion() targetPath() unescape()
    상수
    Constants
    false newline null true undefined
    속성
    Propertys
    읽기 쓰기 _x _y _width _height _alpha _visible _rotation _xscale _yscale _name _focusrect
    읽기 전용 _url _target _xmouse _ymouse
    _droptarget _currentframe _totalframes _framesloaded  → 4개는 무비클립 인스턴스만 한정적 사용
    전역 속성 _soundbuftime _quality  → 읽기 쓰기 가능
    객체
    Objects
    기본
    core _global super this
    arguments callee caller length
    Array new Array()
    concat() join() pop() push() reverse() shift() slice() sort() sortOn() splice() toString() unshift()
    length
    Boolean new Boolean()
    toString() valueOf()
    Date new Date()
    getDate() getDay() getFullYear() getHours() getMilliseconds() getMinutes() getMonth() getSeconds() getTime() getTimezoneOffset() getUTCDate() getUTCDay() getUTCFullYear() getUTCHours() getUTCMilliseconds() getUTCMinutes() getUTCMonth() getUTCSeconds() getYear() setDate() setFullYear() setHours() setMilliseconds() setMinutes() setMonth() setSeconds() setTime() setUTCDate() setUTCFullYear() setUTCHours() setUTCMilliseconds() setUTCMinutes() setUTCMonth() setUTCSeconds() setYear() toString() UTC()
    Function apply() call()
    prototype
    Math abs() acos() asin() atan() atan2() ceil() cos() exp() floor() log() max() min() pow() random() round() sin() sqrt() tan()
    E LN2 LOG2E LN10 LOG10E PI SQRT1_2 SQRT2
    Number new Number()
    toString() valueOf()
    MAX_VALUE MIN_VALUE NaN NEGATIVE_INFINITY POSITIVE_INFINITY
    Object new Object()
    addProperty() registerClass() toString() unwatch() valueOf() watch()
    __proto__
    String new String()
    charAt() charCodeAt() concat() fromCharCode() indexOf() lastIndexOf() slice() split() substr() substring() toLowerCase() toUpperCase()
    length
    무비 _level _parent _root
    Accessibility isActive()
    Button getDepth()
    enabled tabEnabled tabIndex trackAsMenu useHandCursor
    onPress()= onRelease()= onReleaseOutside()= onRollOver()= onRollOut()=
    onDragOver()= onDragOut()= onSetFocus()= onKillFocus()=
    Capabilities hasAudioEncoder hasAccessibility hasAudio hasMP3 language manufacturer os pixelAspectRatio screenColor screenDPI screenResolution.x screenResolution.y version hasVideoEncoder
    Color new Color()
    getRGB() getTransform() setRGB() setTransform()
    Key addListener() getAscii() getCode() isDown() isToggled() removeListener()
    BACKSPACE CAPSLOCK CONTROL DELETEKEY DOWN END ENTER ESCAPE HOME INSERT LEFT PGDN PGUP RIGHT SHIFT SHIFT TAB UP
    onKeyDown()= onKeyUp()=
    Mouse addListener() hide() removeListener() show()
    onMouseDown()= onMouseMove()= onMouseUp()=
    MovieClip
    메서드 gotoAndPlay() gotoAndStop() play() stop() nextFrame() prevFrame()
    startDrag() stopDrag() hitTest() setMask()
    getBytesLoaded() getBytesTotal()
    getBounds() globalToLocal() localToGlobal()
    createEmptyMovieClip() createTextField() attachMovie() duplicateMovieClip() removeMovieClip()
    swapDepths() getDepth()
    getURL() loadVariables() loadMovie() unloadMovie()
    드로잉
    메서드
    lineStyle() moveTo() lineTo() curveTo()
    beginFill() beginGradientFill() endFill()
    clear()
    속성 enabled focusEnabled hitArea tabChildren tabEnabled tabIndex trackAsMenu useHandCursor
    이벤트 onPress()= onRelease()= onReleaseOutside()= onRollOver()= onRollOut()=
    onDragOver()= onDragOut()= onSetFocus()= onKillFocus()=
    onLoad()= onUnload()= onEnterFrame()=
    onMouseDown()= onMouseUp()= onMouseMove()=
    onKeyDown()= onKeyUp()= onData()=
    Selection addListener() getBeginIndex() getCaretIndex() getEndIndex() getFocus() removeListener() setFocus() setSelection()
    onSetFocus()=
    Sound new Sound()
    attachSound() getBytesLoaded() getBytesTotal() getPan() getTransform() getVolume() loadSound() setPan() setTransform() setVolume() start() stop()
    duration position
    onLoad()= onSoundComplete()=
    Stage addListener() removeListener()
    align height width scaleMode
    onResize()=
    System System.capabilities.
    TextField
    메서드 addListener() getDepth() getNewTextFormat() removeListener() removeTextField() setNewTextFormat() replaceSel() setTextFormat()
    속성 autoSize background backgroundColor border borderColor bottomScroll embedFonts hscroll html htmlText length maxChars maxhscroll maxscroll multiline password restrict scroll selectable tabEnabled tabIndex text textColor textHeight textWidth type variable wordWrap
    이벤트 onChanged()= onKillFocus()= onScroller()= onSetFocus()=
    수신기 onChanged()= onScroller()=
    TextFormat new TextFormat()
    getTextExtent()
    align blockIndent bold bullet color font indent italic leading leftMargin rightMargin tabStops target size underline url
    클라이언트/서버
    LoadVars new LoadVars()
    load() getBytesTotal() getBytesTotal() send() sendAndLoad() toString()
    contentType load
    onLoad()=
    XML new XML()
    appendChild() cloneNode() createElement() createTextNode() getBytesLoaded() getBytesTotal() hasChildNodes() insertBefore() load() parseXML() removeNode() send() sendAndLoad() toString()
    contentType docTypeDecl firstChild ignoreWhite lastChild load nextSibling nodeName nodeType nodeValue parentNode previousSibling status xmlDecl
    attributes childNodes  → 2개 컬렉션
    onData()= onLoad()=
    XMLSocket new XMLSocket()
    close() connect() send()
    onClose()= onConnect()= onData()= onXML()=
    제작
    실시간 미리보기 function onUpdate(){}
    CustomActions CustomActions.get() CustomActions.install() CustomActions.list() CustomActions.uninstall()
    사용되지 않음
    Depreccated
    속성 _highquality maxscroll scroll
    액션 ifFrameLoaded(){} tellTarget(){} toggleHighQuality()
    연산자 add and eq ge gt le lt ne not or
    함수 chr() int() length() mbchr() mblength() mbord() mbsubstring() ord() random() substring()
    Flash UI
    구성요소
    Components
    FCheckBox getEnabled() getLabel() getValue() registerSkinElement() setChangeHandler() setEnabled() setLabel() setLabelPlacement() setSize() setStyleProperty() setValue()
    FComboBox addItem() addItemAt() getEnabled() getItemAt() getLength() getRowCount() getScrollPosition() getSelectedIndex() getSelectedItem() getValue() registerSkinElement() removeAll() removeItemAt() replaceItemAt() setChangeHandler() setDataProvider() setEditable() setEnabled() setItemSymbol() setRowCount() setSelectedIndex() setSize() setStyleProperty() setValue() sortItemsBy()
    FListBox addItem() addItemAt() getEnabled() getItemAt() getLength() getRowCount() getScrollPosition() getSelectedIndex() getSelectedIndices() getSelectedItem() getSelectedItems() getSelectMultiple() getValue() registerSkinElement() removeAll() removeItemAt() replaceItemAt() setAutoHideScrollBar() setChangeHandler() setDataProvider() setEnabled() setItemSymbol() setRowCount() setScrollPosition() setSelectedIndex() setSelectedIndices() setSelectMultiple() setSize() setStyleProperty() setWidth() sortItemsBy()
    FPushButton getEnabled() getLabel() registerSkinElement() setClickHandler() setEnabled() setLabel() setSize() setStyleProperty()
    FRadioButton
    메서드 getData() getEnabled() getGroupName() getLabel() getState() registerSkinElement() setChangeHandler() setData() setEnabled() setGroupName() setLabel() setLabelPlacement() setSize() setState() setStyleProperty()
    그룹 메서드 getEnabled() getGroupName() getValue() registerSkinElement() setChangeHandler() setEnabled() setGroupName() setLabelPlacement() setSize() setStyleProperty() setValue()
    FScrollBar getEnabled() getScrollPosition() registerSkinElement() setChangeHandler() setEnabled() setHorizontal() setLargeScroll() setScrollContent() setScrollPosition() setScrollProperties() setScrollTarget() setSize() setSmallScroll() setStyleProperty()
    FScrollPane getPaneHeight() getPaneWidth() getScrollContent() getScrollPosition() loadScrollContent() refreshPane() registerSkinElement() setDragContent() setHScroll() setScrollContent() setScrollPosition() setSize() setStyleProperty() setVScroll()
    FStyleFormat globalStyleFormat.
    new FStyleFormat()
    addListener() applyChanges() removeListener()
    arrow background backgroundDisabled check darkshadow face foregroundDisabled highlight highlight3D radioDot scrollTrack selection selectionDisabled selectionUnfocused shadow textAlign textBold textColor textDisabled textFont textIndent textItalic textLeftMargin textRightMargin textSelected textSize textUnderline
    Index 8개 액션 카테고리 내용을 알파벳순으로 나열한 것입니다
  • 'Knowledge > Utility·Program' 카테고리의 다른 글

    swish menul  (0) 2009.12.21
    photoshop menu 설명  (0) 2009.11.24
    camtasia Studio 동영상 강좌 링크모음  (0) 2009.02.20
    [photo]포토샆 용어 알기  (0) 2009.02.17
    [Swish] Load Movie size 설정 스크립트  (0) 2009.02.17