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

LoaderContext  - AS3

패키지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.system
클래스public class LoaderContext
상속LoaderContext Inheritance Object
하위 클래스 JPEGLoaderContext

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

LoaderContext 클래스에서는 Loader 클래스를 사용하여 SWF 파일 및 기타 미디어를 로드하는 데 필요한 옵션을 제공합니다. LoaderContext 클래스는 Loader 클래스의 load()loadBytes() 메서드에서 context 매개 변수로 사용됩니다.

Loader.load() 메서드를 사용하여 SWF 파일을 로드하는 경우 로드된 SWF 파일을 배치할 보안 도메인 및 해당 보안 도메인 내에서 파일을 배치할 응용 프로그램 도메인의 두 가지를 결정해야 합니다. 이러한 선택에 대한 자세한 내용은 applicationDomainsecurityDomain 속성을 참조하십시오.

Loader.loadBytes() 메서드로 SWF 파일을 로드할 때는 Loader.load()의 경우와 동일한 응용 프로그램 도메인을 선택해야 하지만 Loader.loadBytes()에서는 로드된 SWF 파일을 항상 로드하는 SWF 파일의 보안 도메인에 배치하므로 보안 도메인은 지정할 필요가 없습니다.

SWF 파일 대신 JPEG, GIF 또는 PNG 등의 이미지를 로드할 때는 SecurityDomain 또는 응용 프로그램 도메인은 SWF 파일에만 의미가 있으므로 지정할 필요가 없습니다. 대신 로드된 이미지의 픽셀에 프로그래밍 방식으로 액세스해야 하는지 여부만 결정하면 됩니다. 이러한 경우에는 checkPolicyFile 속성을 참조하십시오. 이미지를 로드할 때 디블로킹을 적용할 경우 LoaderContext 클래스 대신 JPEGLoaderContext 클래스를 사용합니다.

기타 예제

관련 API 요소



공용 속성
 속성정의 주체
  allowCodeImport : Boolean
Loader 객체를 사용하여 SWF 파일과 같이 실행 가능 코드가 있는 내용을 호출자의 보안 샌드박스로 가져올 수 있는지 여부를 지정합니다.
LoaderContext
  allowLoadBytesCodeExecution : Boolean
allowCodeImport로 대체되었지만 호환성을 위해 여전히 지원되는 레거시 속성입니다.
LoaderContext
  applicationDomain : ApplicationDomain = null
Loader.load() 또는 Loader.loadBytes() 메서드에서 사용할 응용 프로그램 도메인을 지정합니다.
LoaderContext
  checkPolicyFile : Boolean = false
응용 프로그램에서 객체 자체를 로드하기 전에 로드되는 객체의 서버에서 URL 정책 파일을 다운로드할지 여부를 지정합니다.
LoaderContext
 Inheritedconstructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다.
Object
  imageDecodingPolicy : String
비트맵 이미지 데이터를 사용하거나 로드할 때 해당 비트맵 이미지 데이터를 디코딩할지 여부를 지정합니다.
LoaderContext
  parameters : Object
내용의 LoaderInfo 객체에 전달되는 매개 변수가 들어있는 객체입니다.
LoaderContext
  requestedContentParent : DisplayObjectContainer
로드된 내용이 Loader에 의해 추가될 부모입니다.
LoaderContext
  securityDomain : SecurityDomain = null
Loader.load() 작업에 사용할 보안 도메인을 지정합니다.
LoaderContext
공용 메서드
 메서드정의 주체
  
LoaderContext(checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null)
지정된 설정으로 새 LoaderContext 객체를 만듭니다.
LoaderContext
 Inherited
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다.
Object
 Inherited
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다.
Object
 Inherited
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다.
Object
 Inherited
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다.
Object
 Inherited
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다.
Object
 Inherited
지정된 객체의 문자열 표현을 반환합니다.
Object
 Inherited
지정된 객체의 프리미티브 값을 반환합니다.
Object
속성 세부 정보

allowCodeImport

속성
public var allowCodeImport:Boolean

언어 버전: ActionScript 3.0
런타임 버전: Flash Player 10.1, AIR 2.0

Loader 객체를 사용하여 SWF 파일과 같이 실행 가능 코드가 있는 내용을 호출자의 보안 샌드박스로 가져올 수 있는지 여부를 지정합니다. 두 가지 가져오기 작업이 영향을 받는데, 하나는 Loader.loadBytes() 메서드이고 다른 하나는 LoaderContext.securityDomain = SecurityDomain.currentDomainLoader.load() 메서드입니다. 두 번째 작업은 AIR 응용 프로그램 샌드박스에서 지원되지 않습니다. allowCodeImport 속성을 false로 설정한 경우 이러한 가져오기 작업은 이미지 로드와 같은 안전한 작업으로 제한됩니다. Loader.load() 메서드를 사용하여, 가져오기 작업에 포함되지 않는 일반적인 SWF 파일을 로드할 때는 이 속성 값에 영향을 받지 않습니다.

이 속성은 이미지 내용을 샌드박스로 가져올 때 유용합니다. 예를 들어 다른 도메인의 이미지를 복제하거나 처리하려 할 때 이미지 파일만 필요한데 SWF 파일까지 받음으로써 발생하는 보안 위험을 피하려는 경우가 여기에 해당합니다. SWF 파일에는 ActionScript 코드가 포함될 수 있기 때문에 SWF 파일을 가져오는 작업은 이미지 파일을 가져오는 작업보다 훨씬 위험합니다.

응용 프로그램 샌드박스의 AIR 내용에서는 기본값이 false이고 비응용 프로그램 내용(Flash Player의 모든 내용 포함)에서 기본값은 true입니다.

allowCodeImport 속성은 Flash Player 10.1 및 AIR 2.0을 지원할 목적으로 추가되었지만 Flash 런타임이 지원하는 경우 모든 버전의 SWF 파일 및 AIR 응용 프로그램에서 이 속성을 사용할 수 있습니다.

관련 API 요소

allowLoadBytesCodeExecution

속성 
allowLoadBytesCodeExecution:Boolean

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

allowCodeImport로 대체되었지만 호환성을 위해 여전히 지원되는 레거시 속성입니다. 이전에는 allowLoadBytesCodeExecution의 영향을 받는 작업이 Loader.loadBytes() 메서드뿐이었지만 Flash Player 10.1 및 AIR 2.0부터는 LoaderContext.securityDomain = SecurityDomain.currentDomainLoader.load()의 가져오기-로드 작업 또한 영향을 받게 되었습니다. 두 번째 작업은 AIR 응용 프로그램 샌드박스에서 지원되지 않습니다. 이러한 이중 영향이 속성 이름 allowLoadBytesCodeExecution을 지나치게 길게 만들어 지금은 allowCodeImport라는 속성 이름이 주로 사용됩니다. allowCodeImport 또는 allowLoadBytesCodeExecution 중 하나를 설정하면 두 값이 모두 영향을 받습니다.

Loader 객체를 사용하여 SWF 파일과 같이 실행 가능 코드가 있는 내용을 호출자의 보안 샌드박스로 가져올 수 있는지 여부를 지정합니다. 이 속성을 false로 설정한 경우 이러한 가져오기 작업은 이미지 로드와 같은 안전한 작업으로 제한됩니다.

응용 프로그램 샌드박스의 AIR 내용에서는 기본값이 false이고 응용 프로그램이 아닌 내용에서는 기본값이 true입니다.



구현
    public function get allowLoadBytesCodeExecution():Boolean
    public function set allowLoadBytesCodeExecution(value:Boolean):void

관련 API 요소

applicationDomain

속성 
public var applicationDomain:ApplicationDomain = null

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

Loader.load() 또는 Loader.loadBytes() 메서드에서 사용할 응용 프로그램 도메인을 지정합니다. 이 속성은 이미지 또는 ActionScript 1.0이나 ActionScript 2.0으로 작성된 SWF 파일이 아닌 ActionScript 3.0으로 작성된 SWF 파일을 로드할 때만 사용합니다.

모든 보안 도메인은 ApplicationDomain 객체로 나타내는 하나 이상의 응용 프로그램 도메인으로 분할됩니다. 응용 프로그램 도메인은 보안을 위한 것이 아니며 서로 관련된 ActionScript 코드 단위를 관리하기 위한 것입니다. 다른 도메인에서 SWF 파일을 로드하면서 파일을 다른 보안 도메인에 배치하면 로드된 SWF 파일을 배치할 응용 프로그램 도메인을 선택할 수 없으며, 이러한 응용 프로그램 도메인을 지정해도 무시됩니다. 그러나 SWF 파일이 자신의 도메인에 있거나 SWF 파일을 자신의 보안 도메인으로 가져오는 등 SWF 파일을 자신의 보안 도메인으로 로드하는 경우에는 로드된 SWF 파일의 응용 프로그램 도메인을 선택할 수 있습니다.

자신의 보안 도메인에 있는 응용 프로그램 도메인만 LoaderContext.applicationDomain에 전달할 수 있습니다. 다른 보안 도메인의 응용 프로그램 도메인을 전달하려고 하면 SecurityError 예외가 발생합니다.

네 가지 ApplicationDomain 속성 중 하나를 선택하여 사용할 수 있습니다.

  • 로더의 ApplicationDomain의 자식: 기본값입니다. 이 선택을 명시적으로 나타내려면 new ApplicationDomain(ApplicationDomain.currentDomain) 구문을 사용합니다. 이렇게 하면 로드된 SWF 파일에서 new MyClassDefinedInParent()와 같이 부모의 클래스를 직접 사용할 수 있습니다. 그러나 부모에서는 이 구문을 사용할 수 없습니다. 부모에서 자식의 클래스를 사용하려면 ApplicationDomain.getDefinition()을 호출하여 가져와야 합니다. 이 방법의 장점은 자식에서 부모에 이미 정의된 클래스와 이름이 같은 클래스를 정의해도 오류가 발생하지 않는다는 것입니다. 자식은 해당 클래스에 대한 부모의 정의를 상속하기만 하며, 자식의 충돌하는 정의는 자식이나 부모에서 ApplicationDomain.getDefinition() 메서드를 호출하여 검색하지 않는 한 사용되지 않습니다.
  • Loader 자신의 ApplicationDomain: 이 응용 프로그램 도메인은 ApplicationDomain.currentDomain을 사용할 때 필요합니다. 로드가 완료되면 부모와 자식이 상대방의 클래스를 직접 사용할 수 있습니다. 자녀가 이미 부모가 정의한 클래스와 같은 이름으로 클래스를 정의하고자 할 경우 부모 클래스가 사용되고 자녀 클래스는 무시하게 됩니다.
  • 시스템 ApplicationDomain의 자식: 이 응용 프로그램 도메인은 new ApplicationDomain(null)을 사용할 때 필요합니다. 이렇게 하면 로더와 로드되는 파일이 완전히 분리되므로 충돌이나 가려짐 없이 이름이 같은 클래스의 각 버전을 별도로 정의할 수 있습니다. 이러한 경우 상대방의 클래스를 보려면 ApplicationDomain.getDefinition() 메서드를 호출해야 합니다.
  • 다른 ApplicationDomain의 자식: ApplicationDomain 계층 구조가 상당히 복잡할 수도 있습니다. 이러한 경우 SWF 파일을 자신의 SecurityDomain에 있는 임의의 ApplicationDomain에 로드할 수 있습니다. 예를 들어 new ApplicationDomain(ApplicationDomain.currentDomain.parentDomain.parentDomain)을 사용하면 SWF 파일이 현재 도메인의 부모에 대한 그 상위 부모의 새로운 자식에 로드됩니다.

로드가 완료될 때 로드하는 파일이나 로드되는 파일에서는 ApplicationDomain.getDefinition()을 호출하기 위해 자신의 ApplicationDomain이나 상대방의 ApplicationDomain을 찾아야 할 수도 있습니다. 이러한 경우 ApplicationDomain.currentDomain을 사용하여 자신의 응용 프로그램 도메인에 대한 참조를 가져올 수 있습니다. 로드하는 SWF 파일에서는 Loader.contentLoaderInfo.applicationDomain을 통해 로드되는 SWF 파일의 ApplicationDomain에 대한 참조를 가져올 수 있습니다. 로드되는 SWF 파일에서는 자신이 로드된 방식을 알고 있는 경우 로드하는 SWF 파일의 ApplicationDomain 객체에 접근할 수 있습니다. 예를 들어 자식이 기본 방법으로 로드된 경우 ApplicationDomain.currentDomain.parentDomain을 사용하여 로드하는 SWF 파일의 응용 프로그램 도메인을 찾을 수 있습니다.

자세한 내용은 ActionScript 3.0 개발자 안내서에서 "클라이언트 시스템 환경" 장의 "ApplicationDomain 클래스" 단원을 참조하십시오.

관련 API 요소

checkPolicyFile

속성 
public var checkPolicyFile:Boolean = false

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

응용 프로그램에서 객체 자체를 로드하기 전에 로드되는 객체의 서버에서 URL 정책 파일을 다운로드할지 여부를 지정합니다. 이 플래그는 Loader.load() 메서드에 적용되지만 Loader.loadBytes() 메서드에는 적용되지 않습니다.

호출하는 SWF 파일의 자체 도메인 밖에 있는 JPEG, GIF 또는 PNG 이미지를 로드하는 경우 ActionScript에서 해당 이미지의 내용에 액세스하려면 이 플래그를 true로 설정합니다. 이미지 내용에 액세스하는 예로는 Loader.content 속성을 참조하여 Bitmap 객체 가져오기 및 BitmapData.draw() 메서드를 호출하여 로드된 이미지 픽셀의 복사본 가져오기 등이 있습니다. 로드할 때 checkPolicyFile을 지정하지 않고 이러한 작업 중 하나를 시도하면 필요한 정책 파일이 아직 다운로드되지 않았으므로 SecurityError 예외가 발생합니다.

Loader.load() 메서드(LoaderContext.checkPolicyFiletrue로 설정)를 호출하면 관련된 URL 정책 파일이 다운로드되거나 이러한 정책 파일이 없다는 사실이 발견될 때까지 응용 프로그램에서 URLRequest.url에 지정된 객체가 다운로드되지 않습니다. Flash Player 또는 AIR에서는 우선 이미 다운로드된 정책 파일을 확인한 다음 Security.loadPolicyFile() 메서드 호출에서 지정된 대기 중인 정책 파일을 다운로드하고, 마지막으로 URLRequest.url에 해당하는 기본 위치(URLRequest.url과 같은 서버의 /crossdomain.xml)에서 정책 파일을 다운로드합니다. 모든 경우에 지정한 정책 파일이 정책 파일의 위치인 URLRequest.url에 있어야 하고 하나 이상의 <allow-access-from> 태그에 의해 이 파일에 대한 액세스를 허용해야 합니다.

checkPolicyFiletrue로 설정하는 경우 Loader.load() 메서드에서 지정한 주 다운로드는 정책 파일이 완전히 처리되기 전까지 로드되지 않습니다. 따라서 필요한 정책 파일이 있는 한 Loader 객체의 contentLoaderInfo 속성에서 ProgressEvent.PROGRESS 또는 Event.COMPLETE 이벤트를 수신함과 동시에 정책 파일 다운로드가 완료되고 정책 파일을 사용한 작업을 안전하게 수행할 수 있습니다.

checkPolicyFiletrue로 설정하였는데 관련 정책 파일이 발견되지 않는 경우 SecurityError 예외를 발생시키는 작업을 시도하면 오류가 발생합니다. 그러나 LoaderInfo 객체에서 ProgressEvent.PROGRESS 또는 Event.COMPLETE 이벤트가 전달되면 LoaderInfo.childAllowsParent 속성 값을 확인하여 관련 정책 파일이 발견되었는지 여부를 테스트할 수 있습니다.

로드하는 이미지에 픽셀 수준으로 액세스할 필요가 없는 경우 checkPolicyFile 속성을 true로 설정하지 않는 것이 좋습니다. 이러한 경우 정책 파일을 확인하면 다운로드 시작이 지연되고 네트워크 대역폭이 불필요하게 소비될 수 있어 비효율적이기 때문입니다.

또한 Loader.load() 메서드를 사용하여 SWF 파일을 다운로드하는 경우 checkPolicyFiletrue로 설정하지 말아야 합니다. 이는 SWF 간 권한은 정책 파일이 아닌 Security.allowDomain() 메서드로 제어되므로 SWF 파일을 로드할 때는 checkPolicyFile이 효과가 없기 때문입니다. 이러한 경우 정책 파일을 확인하면 SWF 파일 다운로드가 지연되고 네트워크 대역폭이 불필요하게 소비될 수 있으므로 비효율적입니다. 정책 파일 다운로드는 주 다운로드에 앞서 실행되므로 Flash Player 또는 AIR에서는 주 다운로드가 SWF 파일인지 또는 이미지인지 파악할 수 없습니다.

서버측 HTTP 리디렉션을 사용할 수 있는 URL에서 객체를 다운로드하는 경우 checkPolicyFile을 주의하여 사용해야 합니다. 정책 파일은 항상 URLRequest.url에 지정하는 해당 초기 URL에서 검색합니다. HTTP 리디렉션으로 인해 최종 객체를 다른 URL에서 가져오는 경우, 처음에 다운로드된 정책 파일이 보안 결정에 중요한 URL인 객체의 최종 URL에 적용되지 않을 수도 있습니다. 이러한 경우에는 ProgressEvent.PROGRESS 또는 Event.COMPLETE 이벤트를 받은 후 객체의 최종 URL을 알려 주는 LoaderInfo.url 값을 검사할 수 있습니다. 그런 다음 객체의 최종 URL에 기초한 정책 파일 URL을 사용하여 Security.loadPolicyFile() 메서드를 호출합니다. 그런 다음 LoaderInfo.childAllowsParent 값이 true가 될 때까지 확인합니다.

응용 프로그램 샌드박스를 실행 중인 AIR 내용에 대해 이 속성을 설정할 필요가 없습니다. AIR 응용 프로그램 샌드박스의 내용은 로드된 이미지 내용을 소스로 사용하여 BitmapData.draw() 메서드를 호출할 수 있습니다.

관련 API 요소

imageDecodingPolicy

속성 
public var imageDecodingPolicy:String

언어 버전: ActionScript 3.0
런타임 버전: AIR 2.6, Flash Player 11

비트맵 이미지 데이터를 사용하거나 로드할 때 해당 비트맵 이미지 데이터를 디코딩할지 여부를 지정합니다.

기본 정책 ImageDecodingPolicy.ON_DEMAND에서는 런타임이 표시 또는 기타 용도로 이미지 데이터가 필요할 때 해당 이미지 데이터를 디코딩합니다. 이 정책은 이전 버전 런타임에서 사용된 디코딩 비헤이비어를 유지합니다.

ImageDecodingPolicy.ON_LOAD 정책에서는 런타임이 이미지를 로드한 직후 complete 이벤트를 전달하기 전에 이미지를 디코딩합니다. 필요할 때가 아니라 로드할 때 이미지를 디코딩하면 애니메이션 및 사용자 인터페이스 성능이 향상될 수 있습니다. 로드된 여러 이미지가 연속해서 빠르게 표시될 경우 성능이 향상될 수 있는데, 빠르게 표시되는 이미지의 예로는 스크롤 목록이나 커버 흐름 제어를 들 수 있습니다. 반면에 onLoad 정책을 사용하면 응용 프로그램의 최대 메모리 사용량이 무차별적으로 증가할 수 있습니다. onDemand 정책을 사용할 때보다 많은 디코딩된 이미지 데이터가 임의의 시간에 메모리에 존재할 수 있습니다.

두 정책 모두 이미지가 디코딩된 후 런타임이 동일한 캐시 및 플러시 비헤이비어를 사용합니다. 런타임은 언제든지 디코딩된 데이터를 플러시했다가 다음에 필요할 때 다시 디코딩할 수 있습니다.

이미지 디코딩 정책을 설정하려면(예를 들어 ON_LOAD로 설정)

     var loaderContext:LoaderContext = new LoaderContext(); 
     loaderContext.imageDecodingPolicy = ImageDecodingPolicy.ON_LOAD 
     var loader:Loader = new Loader(); 
     loader.load(new URLRequest("http://www.adobe.com/myimage.png"), loaderContext);
     

관련 API 요소

parameters

속성 
public var parameters:Object

언어 버전: ActionScript 3.0
런타임 버전: Flash Player 10.2, AIR 2.6

내용의 LoaderInfo 객체에 전달되는 매개 변수가 들어있는 객체입니다.

일반적으로 contentLoaderInfo.parameters 속성의 값은 요청 URL을 파싱하여 얻어집니다. parameters var가 설정된 경우 contentLoaderInfo.parameters는 요청 URL 대신 LoaderContext 객체에서 해당 값을 가져옵니다. parameters var는 URL 매개 변수와 비슷한 이름-값 문자열 쌍이 포함된 객체만 받아들입니다. 객체에 이름-값 문자열 쌍이 없으면 IllegalOperationError가 발생합니다.

이 API는 로드하는 SWF 파일에서 로드된 SWF 파일로 해당 매개 변수를 전달할 수 있도록 마련되었습니다. 이 기능은 특히 loadBytes() 메서드를 사용할 때 유용한데, LoadBytes는 URL을 통해 매개 변수를 전달하는 방법을 제공하지 않기 때문입니다. 다른 AS3 SWF 파일에만 매개 변수를 전달할 수 있습니다. 전달된 객체가 AVM1Movie의 AS3 loaderInfo.parameters가 되어도 AS1 또는 AS2 SWF 파일은 액세스 가능한 형식으로 매개 변수를 수신할 수 없습니다.

예를 들어 다음 URL을 살펴봅니다.

http://yourdomain/users/jdoe/test01/child.swf?foo=bar;

다음 코드에서는 LoaderContext.parameters 속성을 사용하여 이 URL에 전달되는 매개 변수를 복제합니다.

      import flash.system.LoaderContext; 
      import flash.display.Loader; 
      var l:Loader = new Loader(); 
      var lc:LoaderContext = new LoaderContext; 
      lc.parameters = { "foo": "bar" }; 
      l.load(new URLRequest("child.swf"), lc);
     

매개 변수가 올바르게 전달되었는지 확인하려면 이 코드를 실행한 후 다음 trace 문을 사용합니다.

trace(loaderInfo.parameters.foo);

내용이 올바르게 로드된 경우 이 trace 문은 "bar"를 인쇄합니다.

requestedContentParent

속성 
public var requestedContentParent:DisplayObjectContainer

언어 버전: ActionScript 3.0
런타임 버전: Flash Player 10.2, AIR 2.6

로드된 내용이 Loader에 의해 추가될 부모입니다.

내용이 완전히 로드되면 대개 Loader 객체가 해당 내용의 부모가 됩니다. requestedContentParent가 설정된 경우에는 런타임 오류로 인해 할당이 금지되지 않는 한 이 속성에서 지정하는 객체가 부모가 됩니다. 이와 같은 부모 재지정은 이 속성을 사용하지 않고도 complete 이벤트 후에 수행될 수 있습니다. 하지만 LoaderContext.requestedContentParent로 부모를 지정하면 불필요한 이벤트가 방지됩니다.

LoaderContext.requestedContentParent는 생성자가 실행된 후 로드된 내용에서 스크립트가 실행되는 프레임보다 한 프레임 앞에 원하는 부모를 설정합니다. requestedContentParent가 null이면(기본값) Loader 객체가 해당 내용의 부모가 됩니다.

로드된 내용이 AVM1Movie 객체이거나, addChild()requestedContentParent에서 호출될 때 오류가 발생하면 다음과 같은 동작이 발생합니다.

  • Loader 객체가 로드된 내용의 부모가 됩니다.
  • 런타임에서 AsyncErrorEvent를 전달합니다.

요청된 부모와 로드된 내용이 서로 다른 보안 샌드박스에 있고 요청된 부모가 로드된 내용을 액세스할 수 없는 경우 다음과 같은 동작이 발생합니다.

  • Loader가 로드된 내용의 부모가 됩니다.
  • 런타임에서 SecurityErrorEvent를 전달합니다.

다음 코드에서는 requestedContentParent를 사용하여 로드된 내용을 Sprite 객체에 배치합니다.

      import flash.system.LoaderContext; 
      import flash.display.Loader; 
      import flash.display.Sprite; 
     
      var lc:LoaderContext = new LoaderContext(); 
      var l:Loader = new Loader(); 
      var s:Sprite = new Sprite(); 
      lc.requestedContentParent = s; 
      addChild(s); 
      l.load(new URLRequest("child.swf"), lc);
     

이 코드를 실행하면 스테이지에 자식 SWF 파일이 나타납니다. 이를 통해 스테이지에 추가한 Sprite 객체는 로드된 child.swf 파일의 부모임을 알 수 있습니다.

securityDomain

속성 
public var securityDomain:SecurityDomain = null

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

Loader.load() 작업에 사용할 보안 도메인을 지정합니다. 이 속성은 이미지가 아닌 SWF 파일을 로드할 때만 사용합니다.

보안 도메인을 선택하는 것은 출처가 로드하는 SWF 파일과 다른 도메인(다른 서버)일 수 있는 SWF 파일을 로드하는 경우에만 의미가 있습니다. 자신의 도메인에서 SWF 파일을 로드하면 파일이 항상 자신의 보안 도메인에 배치됩니다. 그러나 다른 도메인의 SWF 파일을 로드할 때는 두 가지 옵션이 있습니다. 로드되는 SWF 파일이 로드하는 SWF 파일의 보안 도메인과 다른 "고유의" 보안 도메인에 배치되도록 할 수 있으며, 이는 기본 옵션입니다. 다른 옵션은 myLoaderContext.securityDomainSecurityDomain.currentDomain으로 설정하여 로드되는 SWF 파일이 로드하는 SWF 파일과 같은 보안 도메인에 배치되도록 지정하는 것입니다. 이를 가져오기 로딩이라고 하며, 보안을 위해 로드되는 SWF 파일을 자신의 서버로 복사한 다음 로드하는 것과 같습니다. 가져오기 로딩에 성공하려면 로드되는 SWF 파일의 서버에 로드하는 SWF 파일의 도메인을 신뢰하는 정책 파일이 있어야 합니다.

LoaderContext.securityDomain에는 자신의 보안 도메인만 전달할 수 있습니다. 다른 보안 도메인을 전달하려고 하면 SecurityError 예외가 발생합니다.

AIR 응용 프로그램 보안 샌드박스의 내용은 다른 샌드박스의 내용을 해당 SecurityDomain으로 로드할 수 없습니다.

자세한 내용은 ActionScript 3.0 개발자 안내서의 "보안" 장을 참조하십시오.

관련 API 요소

생성자 세부 정보

LoaderContext

()생성자
public function LoaderContext(checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null)

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

지정된 설정으로 새 LoaderContext 객체를 만듭니다. 이러한 설정에 대한 자세한 내용은 이 클래스의 속성 설명을 참조하십시오.

매개 변수
checkPolicyFile:Boolean (default = false) — 객체를 로드하기 전에 URL 정책 파일이 있는지 확인할지 여부를 지정합니다.
 
applicationDomain:ApplicationDomain (default = null) — Loader 객체에서 사용할 ApplicationDomain 객체를 지정합니다.
 
securityDomain:SecurityDomain (default = null) — Loader 객체에서 사용할 SecurityDomain 객체를 지정합니다.

참고: AIR 응용 프로그램 보안 샌드박스의 내용에서는 다른 샌드박스의 내용을 해당 SecurityDomain으로 로드할 수 없습니다.

관련 API 요소





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

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