Adobe® Flash® Platform용 ActionScript® 3.0 참조 설명서
 |  패키지 및 클래스 목록 숨기기 |  패키지  |  클래스  |  새로운 내용  |  색인  |  부록  |  영어로 표시되는 이유
필터: AIR 30.0 이하, Flash Player 30.0 이하, Flash Lite 4
Flex 4.6 이하, Flash Pro CS6 이하
필터 숨기기
 

패키지 flash.utils 

패키지x

최상위 레벨
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

언어 요소

전역 상수
전역 함수
연산자
명령문, 키워드 및 지시문
특수 유형 연산자

부록

새로운 내용
컴파일러 오류
컴파일러 경고
런타임 오류
ActionScript 3으로 마이그레이션
지원되는 문자 세트
MXML 전용 태그
모션 XML 요소
Timed Text 태그
사용되지 않는 요소의 목록
액세스 가능성 구현 상수
ActionScript 예제 사용 방법
법적 고지 사항

flash.utils 패키지에는 코드 실행 시간 제어, 클래스 및 객체 정보 검색, 이스케이프 문자 변환 등에 사용되는 다양한 패키지 레벨 함수가 들어 있습니다.
공용 메서드
 함수정의 주체
  
지정된 setInterval() 호출을 취소합니다.
flash.utils
  
지정된 setTimeout() 호출을 취소합니다.
flash.utils
  
메서드의 매개 변수와 이름이 같은 ActionScript 객체를 설명하는 XML 객체를 만듭니다.
flash.utils
  
System.useCodePage의 값에 따라 UTF-8 또는 시스템 코드 페이지로 인코딩된 입력 문자열의 이스케이프된 복사본을 반환합니다.
flash.utils
  
name 매개 변수로 지정된 클래스의 클래스 객체에 대한 참조를 반환합니다.
flash.utils
  
객체의 정규화된 클래스 이름을 반환합니다.
flash.utils
  
value 매개 변수로 지정된 객체의 기본 클래스의 정규화된 클래스 이름을 반환합니다.
flash.utils
  
상대 시간을 계산하는 데 사용됩니다.
flash.utils
  
setInterval(closure:Function, delay:Number, ... arguments):uint
지정된 밀리초 단위 간격으로 함수를 실행합니다.
flash.utils
  
setTimeout(closure:Function, delay:Number, ... arguments):uint
밀리초 단위로 지정된 지연 시간 후 지정된 함수를 실행합니다.
flash.utils
  
System.useCodePage의 값에 따라 시스템 코드 페이지 또는 UTF-8에서 디코딩되는 입력 문자열의 언이스케이프된 복사본을 반환합니다.
flash.utils
함수 세부 정보

clearInterval

()함수
public function clearInterval(id:uint):void

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9

지정된 setInterval() 호출을 취소합니다.

매개 변수

id:uintsetInterval() 호출의 ID이며 다음과 같이 변수로 설정합니다.

관련 API 요소


예제  ( 예제 사용 방법 )

다음 예제에서는 setInterval() 메서드를 사용하여 1초 간격으로 일정하게 myRepeatingFunction() 메서드를 호출하는 예약 간격을 만듭니다.

myRepeatingFunction 메서드를 호출할 때마다 counter 속성이 증가하고, 이 속성이 stopCount 속성과 같으면 clearInterval() 메서드가 호출되며 이 메서드는 이전에 만들어진 간격에 대한 참조 ID인 intervalId 속성을 가집니다.

package {
    import flash.display.Sprite;
    import flash.utils.*;

    public class ClearIntervalExample extends Sprite {
        private var intervalDuration:Number = 1000; // duration between intervals, in milliseconds
        private var intervalId:uint;
        private var counter:uint     = 0;
        private var stopCount:uint     = 3;
        
        public function ClearIntervalExample() {
            intervalId = setInterval(myRepeatingFunction, intervalDuration, "Hello", "World");
        }

        public function myRepeatingFunction():void {
            trace(arguments[0] + " " + arguments[1]);

            counter++;
            if(counter == stopCount) {
                trace("Clearing Interval");
                clearInterval(intervalId);    
            }
        }
    }
}

clearTimeout

()함수 
public function clearTimeout(id:uint):void

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9

지정된 setTimeout() 호출을 취소합니다.

매개 변수

id:uintsetTimeout() 호출의 ID이며 다음과 같이 변수로 설정합니다.

관련 API 요소


예제  ( 예제 사용 방법 )

다음 예제에서는 setTimeout() 메서드를 사용하여 지정된 지연 기간 후에 다른 메서드를 호출합니다.

1백만까지 계수하는 루프가 만들어집니다. 시스템에서 이 요청을 1초 이내에 처리할 수 있는 경우 clearTimeout()에서 setTimeout() 요청을 제거하고 myDelayedFunction()이 호출되지 않습니다.

package {
    import flash.display.Sprite;
    import flash.utils.*;

    public class ClearTimeoutExample extends Sprite {
        private var delay:Number = 1000; // delay before calling myDelayedFunction
        private var intervalId:uint;
        private var count:uint = 1000000;
        
        public function ClearTimeoutExample() {
            intervalId = setTimeout(myDelayedFunction, delay);
            startCounting();
        }

        public function startCounting():void {
            var i:uint = 0;
            do {
                if(i == count-1) {
                    clearTimeout(intervalId);
                    trace("Your computer can count to " + count + " in less than " + delay/1000 + " seconds.");    
                }
                i++;
            } while(i < count)            
        }
        
        public function myDelayedFunction():void {
            trace("Time expired.");
        }
    }
}

describeType

()함수 
public function describeType(value:*):XML

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

메서드의 매개 변수와 이름이 같은 ActionScript 객체를 설명하는 XML 객체를 만듭니다. 이 메서드는 ActionScript 언어의 리플렉션이라는 프로그래밍 개념을 구현합니다.

value 매개 변수가 특정 유형의 인스턴스인 경우 반환되는 XML 객체에는 해당 유형의 모든 인스턴스 속성이 포함되지만 정적 속성은 모두 제외됩니다. XML 객체를 파싱할 때 <type> 태그의 isStatic 특성 값을 조사하면 이 조건을 확인할 수 있습니다. 이 특성 값이 false이면 value 매개 변수가 해당 유형의 인스턴스임을 의미합니다.

특정 유형의 정적 속성을 가져오려면 value 매개 변수에 유형 자체를 전달합니다. 이때 반환되는 XML 객체에는 유형의 정적 속성과 인스턴스 속성이 모두 포함됩니다. 인스턴스 속성은 정적 속성과 구별되도록 <factory>라는 태그 내에 중첩됩니다. 이 경우 <type> 태그의 isStatic 특성은 true입니다.

참고: describeType()에서 제공하는 다른 정보는 필요하지 않고 객체의 상속 계층 구조만 순회하면 되는 경우에는 getQualifiedClassName()getQualifiedSuperclassName() 함수를 대신 사용하십시오.

다음 표에서는 describeType()으로 생성되는 XML 객체의 태그 및 특성 중 일부를 보여 줍니다. 모든 클래스 및 인터페이스 이름은 정규화된 형식으로 반환됩니다.

태그특성설명
<type> XML 객체의 루트 태그입니다.
 nameActionScript 객체 데이터 유형의 이름입니다.
 baseActionScript 객체의 정의 클래스에 대한 바로 위 수퍼 클래스입니다. ActionScript 객체가 클래스 객체인 경우 값은 Class입니다.
 isDynamicActionScript 객체의 정의 클래스가 동적이면 true이고 그렇지 않으면 false입니다. ActionScript 객체가 클래스 객체인 경우 클래스 객체는 동적이므로 이 값은 true입니다.
 isFinalActionScript 객체의 정의 클래스가 최종 클래스이면 true이고 그렇지 않으면 false입니다.
 isStaticActionScript 객체가 클래스 객체 또는 생성자 함수이면 true이고 그렇지 않으면 false입니다. 이 특성이 true이면 factory 태그 내에 중첩되지 않은 모든 태그는 정적이므로 이 특성의 이름은 isStatic입니다.
<extendsClass> ActionScript 객체의 정의 클래스에 대한 각 수퍼 클래스에는 별도의 extendsClass 태그가 있습니다.
 typeActionScript 객체의 정의 클래스가 확장하는 수퍼 클래스의 이름입니다.
<implementsInterface> ActionScript 객체의 정의 클래스 또는 수퍼 클래스로 구현되는 각 인터페이스에는 별도의 implementsInterface 태그가 있습니다.
 typeActionScript 객체의 정의 클래스가 구현하는 인터페이스의 이름입니다.
<accessor> 접근자는 getter 및 setter 함수로 정의되는 속성입니다.
 name접근자의 이름입니다.
 access속성의 액세스 권한입니다. readonly, writeonlyreadwrite 값이 될 수 있습니다.
 type속성의 데이터 유형입니다.
 declaredBy관련된 getter 또는 setter 함수가 들어 있는 클래스입니다.
<constant> 상수는 const 문을 사용하여 정의되는 속성입니다.
 name상수의 이름입니다.
 type상수의 데이터 유형입니다.
<method> 메서드는 클래스 정의의 일부로 선언되는 함수입니다.
 name메서드의 이름입니다.
 declaredBy메서드 정의가 들어 있는 클래스입니다.
 returnType메서드에서 반환하는 값의 데이터 유형입니다.
<parameter> 메서드가 정의하는 매개 변수마다 별도의 parameter 태그가 있습니다. 이 태그는 항상 <method> 태그 내에 중첩됩니다.
 index메서드의 매개 변수 목록에서 매개 변수가 배치되는 순서에 해당하는 숫자입니다. 첫 번째 매개 변수의 값은 1입니다.
 type매개 변수의 데이터 유형입니다.
 optional매개 변수가 선택 요소이면 true이고 그렇지 않으면 false입니다.
<variable> 변수는 var 문을 사용하여 정의되는 속성입니다.
 name변수의 이름입니다.
 type변수의 데이터 유형입니다.
<factory> ActionScript 객체가 클래스 객체 또는 생성자 함수인 경우 모든 인스턴스 속성과 메서드는 이 태그 내에 중첩됩니다. <type> 태그의 isStatic 특성이 true인 경우 <factory> 태그 내에 중첩되지 않은 모든 속성과 메서드는 정적입니다. 이 태그는 ActionScript 객체가 클래스 객체이거나 생성자 함수인 경우에만 표시됩니다.

매개 변수

value:* — 유형 설명이 필요한 객체입니다. 이 메서드에는 사용 가능한 모든 ActionScript 유형, 객체 인스턴스, uint 등의 프리미티브 유형 및 클래스 객체를 비롯한 모든 ActionScript 값을 전달할 수 있습니다.

반환값
XML — 매개 변수로 전달한 객체에 대한 자세한 정보가 들어 있는 XML 객체입니다. 객체에 대한 다음과 같은 정보가 제공됩니다.
  • 객체의 클래스
  • 클래스의 특성
  • 클래스에서 해당 기본 클래스까지 이어지는 상속 트리
  • 클래스에서 구현된 인터페이스
  • 클래스에서 선언된 인스턴스 속성
  • 클래스에서 선언된 정적 속성
  • 클래스의 인스턴스 메서드
  • 클래스의 정적 메서드
  • 클래스의 각 메서드에 대한 이름, 매개 변수 개수, 반환 유형 및 매개 변수 유형

참고: describeType()은 공용 속성과 메서드만 표시하며 전용, 패키지 내부 또는 사용자 정의 네임스페이스에 있는 속성과 메서드는 표시하지 않습니다.

관련 API 요소


예제  ( 예제 사용 방법 )

package {
    import flash.display.Sprite;
    import flash.utils.describeType;
    
    public class DescribeTypeExample extends Sprite {
        public function DescribeTypeExample() {
            var child:Sprite = new Sprite();
            var description:XML = describeType(child);
            trace(description..accessor.@name.toXMLString());
        }
    }
}

escapeMultiByte

()함수 
public function escapeMultiByte(value:String):String

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

System.useCodePage의 값에 따라 UTF-8 또는 시스템 코드 페이지로 인코딩된 입력 문자열의 이스케이프된 복사본을 반환합니다. System.useCodePage를 사용하면 런타임에서 로컬 코드 페이지로 인코딩된 레거시 내용에 액세스할 수 있지만, 이는 시스템에서 해당 레거시 코드 페이지를 사용하는 경우에만 해당됩니다. 예를 들어 Shift-JIS로 인코딩된 일본어 데이터는 일본어 기본 코드 페이지를 사용하는 OS에서만 제대로 이스케이프 및 언이스케이프됩니다.

매개 변수

value:String — 이스케이프할 문자열입니다.

반환값
String — 입력 문자열의 이스케이프된 복사본입니다. System.useCodePage가 true인 경우 이스케이프된 문자열은 시스템 코드 페이지로 인코딩됩니다. System.useCodePage가 false인 경우 이스케이프된 문자열은 UTF-8로 인코딩됩니다. 예를 들어 System.useCodePage가 false인 경우 "Crüe"라는 입력 문자열은 모든 시스템에서 "Cr%C3%BCe"로 이스케이프됩니다. system.useCodePage가 true이고 시스템에서 라틴어 코드 페이지를 사용하는 경우 "Crüe"는 "Cr%FCe"로 이스케이프됩니다. 시스템에서 'ü' 문자가 포함되지 않은 라틴어 이외의 코드 페이지를 사용하는 경우 결과는 "Cr?e"가 될 수 있습니다. System.useCodePage를 true로 설정하고 "Cr%C3%BCe"를 언이스케이프하면 라틴어 시스템에서 "CrÃ펎"가 출력되는 것처럼 다른 시스템에서 잘못된 결과가 나타날 수 있습니다. 마찬가지로 System.useCodePage를 false로 설정하고 "Cr%FCe"를 언이스케이프하면 시스템의 코드 페이지에 따라 "Cre", "Cr?e" 등의 결과가 나타날 수 있습니다.

getDefinitionByName

()함수 
public function getDefinitionByName(name:String):Object

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

name 매개 변수로 지정된 클래스의 클래스 객체에 대한 참조를 반환합니다.

매개 변수

name:String — 클래스의 이름입니다.

반환값
Objectname 매개 변수로 지정된 클래스의 클래스 객체에 대한 참조를 반환합니다.

오류
ReferenceError — 지정된 이름의 공용 정의가 없습니다.

예제  ( 예제 사용 방법 )

다음 예제에서는 GetDefinitionByNameExample 클래스를 사용하여 스테이지에 주황색 사각형을 만듭니다. 이는 다음 단계로 이루어집니다.
  1. 배경색을 주황색으로, 크기를 80픽셀로 지정하는 변수를 선언합니다. 이 변수는 나중에 사각형을 그리는 데 사용됩니다.
  2. 생성자 내에서 Class 유형의 변수 ClassReference를 Sprite에 할당합니다.
  3. instance라는 ClassReference의 인스턴스를 인스턴스화합니다.
  4. 참조에 의해 instance는 Sprite 객체이므로 Sprite에 사용할 수 있는 메서드를 사용하여 사각형을 그리고 표시 목록에 추가할 수 있습니다.
package {
    import flash.display.DisplayObject;
    import flash.display.Sprite;
    import flash.utils.getDefinitionByName;

    public class GetDefinitionByNameExample extends Sprite {
        private var bgColor:uint = 0xFFCC00;
        private var size:uint = 80;

        public function GetDefinitionByNameExample() {
            var ClassReference:Class = getDefinitionByName("flash.display.Sprite") as Class;
            var instance:Object = new ClassReference();
            instance.graphics.beginFill(bgColor);
            instance.graphics.drawRect(0, 0, size, size);
            instance.graphics.endFill();
            addChild(DisplayObject(instance));
        }
    }
}

getQualifiedClassName

()함수 
public function getQualifiedClassName(value:*):String

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

객체의 정규화된 클래스 이름을 반환합니다.

매개 변수

value:* — 정규화된 클래스 이름이 필요한 객체입니다. 이 메서드에는 사용 가능한 모든 ActionScript 유형, 객체 인스턴스, uint 등의 프리미티브 유형 및 클래스 객체를 비롯한 모든 ActionScript 값을 전달할 수 있습니다.

반환값
String — 정규화된 클래스 이름이 들어 있는 문자열입니다.

관련 API 요소

getQualifiedSuperclassName

()함수 
public function getQualifiedSuperclassName(value:*):String

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

value 매개 변수로 지정된 객체의 기본 클래스의 정규화된 클래스 이름을 반환합니다. 이 함수를 사용하면 describeType()보다 빠르게 기본 클래스 이름을 검색할 수 있지만 describeType()에서 제공하는 정보 중 일부는 얻을 수 없습니다.

이 함수를 사용하여 클래스의 이름을 검색한 후 getDefinitionByName() 함수를 사용하여 클래스 이름을 클래스 참조로 변환할 수 있습니다.

참고: 이 함수는 인스턴스 계층 구조에만 사용할 수 있는 반면 describeType() 함수는 value 매개 변수가 데이터 유형인 경우 클래스 객체 계층 구조를 사용합니다. 데이터 유형에 describeType()을 호출하면 모든 클래스 객체가 Class로부터 상속하는 클래스 객체 계층 구조에 따라 수퍼 클래스가 반환됩니다. 그러나 getQualifiedSuperclassName() 함수는 클래스 객체 계층 구조를 무시하고 보다 익숙한 인스턴스 계층 구조에 따라 수퍼 클래스를 반환합니다. 예를 들어 String 클래스 객체는 기술적으로 Class를 상속하지만 getQualifiedSuperclassName(String)을 호출하면 Object가 반환됩니다. 즉, 유형의 인스턴스를 사용하거나 유형을 사용하거나 결과는 같습니다.

매개 변수

value:* — 임의의 값입니다.

반환값
String — 정규화된 기본 클래스 이름입니다. 해당 이름이 없는 경우에는 null입니다.

관련 API 요소

getTimer

()함수 
public function getTimer():int

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

상대 시간을 계산하는 데 사용됩니다. ActionScript 3.0을 처리하는 Flash 런타임의 경우 이 메서드는 ActionScript 3.0(AVM2)을 처리하기 위해 Flash 런타임 가상 시스템이 시작된 이후 경과된 시간(밀리초)을 반환합니다. ActionScript 2.0을 처리하는 Flash 런타임의 경우 이 메서드는 Flash 런타임이 초기화를 시작한 이후의 시간(밀리초)을 반환합니다. Flash 런타임은 두 가지 가상 시스템을 사용하여 ActionScript를 처리합니다. AVM1은 ActionScript 1.0과 2.0을 실행하는 데 사용되는 가상 시스템입니다. AVM2는 ActionScript 3.0을 실행하는 데 사용되는 ActionScript 가상 시스템입니다. AVM1의 getTimer() 메서드 동작은 AVM2의 비헤이비어와 다릅니다.

달력 날짜(타임스탬프)에 대한 자세한 내용은 Date 객체를 참조하십시오.

반환값
int — 런타임이 초기화된 이후(ActionScript 2.0을 처리하는 동안) 또는 가상 시스템이 시작된 이후(ActionScript 3.0을 처리하는 동안) 밀리초를 나타냅니다. 런타임에서 SWF 파일 하나의 재생이 시작된 후 다른 SWF 파일이 로드된 경우 반환 값은 첫 번째 SWF 파일이 로드된 시점을 기준으로 합니다.

관련 API 요소


예제  ( 예제 사용 방법 )

다음 예제는 GetTimerExample 클래스를 사용하여 런타임이 초기화된 후 경과된 시간(밀리초)을 가져와 출력합니다.
package {
    import flash.utils.getTimer;
    import flash.display.Sprite;

    public class GetTimerExample extends Sprite {
        public function GetTimerExample() {
            var duration:uint = getTimer();
            trace("duration: " + duration);
        }
    }
}

setInterval

()함수 
public function setInterval(closure:Function, delay:Number, ... arguments):uint

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9

지정된 밀리초 단위 간격으로 함수를 실행합니다.

setInterval() 메서드를 사용하는 대신 지정된 간격을 사용하고 repeatCount 매개 변수로 0을 사용하여 무한히 반복되는 Timer 객체를 만드는 것이 좋습니다.

clearInterval() 메서드를 사용하여 setInterval() 호출을 취소하려면 clearInterval() 함수에서 나중에 참조하는 변수에 setInterval() 호출을 할당해야 합니다. clearInterval() 함수를 사용하여 setInterval() 호출을 취소할 수 없는 경우 set timeout closure 함수를 포함하는 객체가 가비지 수집되지 않습니다.

매개 변수

closure:Function — 실행할 함수의 이름입니다. 따옴표나 괄호를 포함하면 안 되며 호출할 함수의 매개 변수를 지정해서는 안 됩니다. 예를 들어 functionName() 또는 functionName(param)이 아닌 functionName을 사용합니다.
 
delay:Number — 밀리초 단위 간격입니다.
 
... arguments — 선택 요소로서 클로저 함수로 전달할 인수 목록입니다.

반환값
uint — 예약된 프로세스의 고유 숫자 식별자입니다. 이 식별자를 사용하면 clearInterval() 메서드를 호출하여 프로세스를 취소할 수 있습니다.

관련 API 요소


예제  ( 예제 사용 방법 )

다음 예제에서는 setInterval() 메서드를 사용하여 1초 간격으로 일정하게 myRepeatingFunction() 메서드를 호출하는 예약 간격을 만듭니다.
package {
    import flash.display.Sprite;
    import flash.utils.*;

    public class SetIntervalExample extends Sprite {
        private var intervalDuration:Number = 1000; // duration between intervals, in milliseconds
        
        public function SetIntervalExample() {
            var intervalId:uint = setInterval(myRepeatingFunction, intervalDuration, "Hello", "World");
        }

        public function myRepeatingFunction():void {
            trace(arguments[0] + " " + arguments[1]);
        }
    }
}

setTimeout

()함수 
public function setTimeout(closure:Function, delay:Number, ... arguments):uint

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9

밀리초 단위로 지정된 지연 시간 후 지정된 함수를 실행합니다.

이 메서드를 사용하는 대신 지정된 간격을 사용하고 repeatCount 매개 변수로 1을 사용하여 한 번만 실행되는 Timer 객체를 만드는 것이 좋습니다.

clearTimeout() 메서드를 사용하여 setTimeout() 호출을 취소하려면 clearTimeout() 함수에서 나중에 참조하는 변수에 setTimeout() 호출을 할당해야 합니다. clearTimeout() 함수를 사용하여 setTimeout() 호출을 취소할 수 없는 경우 set timeout closure 함수를 포함하는 객체가 가비지 수집되지 않습니다.

매개 변수

closure:Function — 실행할 함수의 이름입니다. 따옴표나 괄호를 포함하면 안 되며 호출할 함수의 매개 변수를 지정해서는 안 됩니다. 예를 들어 functionName() 또는 functionName(param)이 아닌 functionName을 사용합니다.
 
delay:Number — 함수를 실행할 때까지 대기할 지연 시간(밀리초 단위)입니다.
 
... arguments — 선택 요소로서 클로저 함수로 전달할 인수 목록입니다.

반환값
uint — 예약된 프로세스의 고유 숫자 식별자입니다. 이 식별자를 사용하면 clearTimeout() 메서드를 호출하여 프로세스를 취소할 수 있습니다.

관련 API 요소


예제  ( 예제 사용 방법 )

다음 예제에서는 setTimeout() 메서드를 사용하여 지정된 지연 기간 후에 다른 메서드를 호출합니다.
package {
    import flash.display.Sprite;
    import flash.utils.*;

    public class SetTimeoutExample extends Sprite {
        private var delay:Number = 1000; // delay before calling myDelayedFunction
        
        public function SetTimeoutExample() {
            var intervalId:uint = setTimeout(myDelayedFunction, delay, "Hello", "World");
        }

        public function myDelayedFunction():void {
            trace(arguments[0] + " " + arguments[1]);
        }
    }
}

unescapeMultiByte

()함수 
public function unescapeMultiByte(value:String):String

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

System.useCodePage의 값에 따라 시스템 코드 페이지 또는 UTF-8에서 디코딩되는 입력 문자열의 언이스케이프된 복사본을 반환합니다. System.useCodePage를 사용하면 런타임에서 로컬 코드 페이지로 인코딩된 레거시 내용에 액세스할 수 있지만, 이는 시스템에서 해당 레거시 코드 페이지를 사용하는 경우에만 해당됩니다. 예를 들어 Shift-JIS로 인코딩된 일본어 데이터는 일본어 기본 코드 페이지를 사용하는 OS에서만 제대로 이스케이프 및 언이스케이프됩니다.

매개 변수

value:String — 언이스케이프할 이스케이프된 문자열입니다.

반환값
String — 입력 문자열의 언이스케이프된 복사본입니다. System.useCodePage가 true인 경우 이스케이프된 문자열은 시스템 코드 페이지에서 디코딩됩니다. System.useCodePage가 false인 경우 이스케이프된 문자열은 UTF-8에서 디코딩됩니다. 예를 들어 입력 문자열이 "Crüe"이고 System.useCodePage가 false인 경우 결과는 모든 시스템에서 "Crüe"가 됩니다. System.useCodePage가 true이고 입력 문자열이 "Cr%FCe"이며 시스템에서 라틴어 코드 페이지를 사용하고 있는 경우에도 결과는 "Crüe"가 됩니다. System.useCodePage를 true로 설정하고 "Cr%C3%BCe"를 언이스케이프하면 라틴어 시스템에서 "Crüe"가 출력되는 것처럼 다른 시스템에서 잘못된 결과가 나타날 수 있습니다. 마찬가지로 System.useCodePage를 false로 설정하고 "Cr%FCe"를 언이스케이프하면 시스템의 코드 페이지에 따라 "Cre", "Cr?e" 등의 결과가 나타날 수 있습니다.

[ X ]영어로 표시되는 이유
ActionScript 3.0 참조 설명서의 내용이 영어로 나타납니다.

ActionScript 3.0 참조 설명서 중 일부는 전체 언어로 번역되지 않았습니다. 언어 요소가 번역되지 않은 경우 영어로 나타납니다. 예를 들어 ga.controls.HelpBox 클래스는 어떤 언어로도 번역되지 않았습니다. 그러므로 한국어 버전의 참조 설명서에서 ga.controls.HelpBox 클래스는 영어로 나타납니다.