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 タグ
使用されなくなったエレメントのリスト
Accessibility Implementation 定数
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 ファイルをロードする場合、次の 2 つのことを決定します。ロードした SWF ファイルをどのセキュリティドメインに配置するか、およびそのセキュリティドメイン内のどのアプリケーションドメインに配置するかです。これらの選択の詳細については、applicationDomain および securityDomain プロパティを参照してください。

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 ファイルなどのコンテンツを読み込むことができるかどうかを指定します。影響を受ける読み込み操作が 2 つあります。Loader.loadBytes() メソッドと、LoaderContext.securityDomain = SecurityDomain.currentDomain を指定した Loader.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.currentDomain が指定されている Loader.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 ファイルに対するアプリケーションドメインの選択を制御できます。

独自のセキュリティドメインからのみ、LoaderContext.applicationDomain でアプリケーションドメインを渡すことができます。その他のセキュリティドメインからアプリケーションドメインを渡そうとすると、SecurityError 例外になります。

使用する ApplicationDomain プロパティは、次の 4 種類から選択できます。

  • ローダーの ApplicationDomain の子。 デフォルト。この選択は、シンタックス new ApplicationDomain(ApplicationDomain.currentDomain) で明示的に表すことができます。この選択では、ロードされた SWF ファイルは親のクラスを直接使用できます。例えば、new MyClassDefinedInParent() を記述します。ただし、親はこのシンタックスを使用できません。親が子のクラスを使用する場合、ApplicationDomain.getDefinition() を呼び出して取得する必要があります。この選択の利点は、親によって既に定義されているクラスと同じ名前のクラスを子が定義する場合にエラーが発生しないことです。子は、そのクラスの親の定義を継承します。子の競合する定義は、子または親が ApplicationDomain.getDefinition() メソッドを呼び出してその定義を取得しない限り使用されません。
  • ローダー自体の ApplicationDomain。 このアプリケーションドメインは、ApplicationDomain.currentDomain を使用する場合に使用します。ロードが完了すると、親および子はいずれも互いのクラスの両方を直接使用できます。親が既に定義しているクラスと同じ名前のクラスを子が定義しようとすると、親クラスが使用され、子クラスは無視されます。
  • システム ApplicationDomain の子。 このアプリケーションドメインは、new ApplicationDomain(null) を使用する場合に使用します。ローダーとローディーは完全に分離され、競合や影響を発生させずに同じ名前で別々のバージョンのクラスを定義できます。一方が他方のクラスを参照する唯一の方法は、ApplicationDomain.getDefinition() メソッドの呼び出しです。
  • 他の ApplicationDomain の子。複雑な ApplicationDomain 階層がある場合があります。独自の SecurityDomain から任意の ApplicationDomain に SWF ファイルをロードできます。例えば、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() メソッドには適用できません。

イメージ(JPEG、GIF または PNG)を呼び出し元 SWF ファイル自体のドメイン外からロードし、そのイメージのコンテンツに ActionScript からアクセスする必要がある場合に、このフラグを true に設定します。イメージコンテンツへのアクセスの例には、ビットマップオブジェクトを取得するための Loader.content プロパティの参照や、ロードされたイメージのピクセルのコピーを取得するための 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 から SWF への権限はポリシーファイルではなく Security.allowDomain() メソッドによって制御され、SWF ファイルをロードする場合は checkPolicyFile は無効であるためです。この場合、ポリシーファイルの確認は時間の浪費になります。SWF ファイルのダウンロードが遅れ、ネットワーク帯域幅を不必要に消費する場合があるためです。ポリシーファイルのダウンロードは主要なダウンロードの前に行われるので、SWF ファイルとイメージのどちらが主要なダウンロードであるかを Flash Player または AIR で判別することはできません。

サーバーサイド HTTP リダイレクトを使用する可能性がある URL からオブジェクトをダウンロードする場合は、checkPolicyFile に注意してください。ポリシーファイルは常に、URLRequest.url で指定された対応する初期 URL から取得されます。 最終的なオブジェクトが HTTP リダイレクトによって別の URL から取得される場合、最初にダウンロードされたポリシーファイルはオブジェクトの最終的な URL に適用できないことがあります。この URL はセキュリティ判定において重要です。このような場合、ProgressEvent.PROGRESS または Event.COMPLETE イベントを受け取った後で、LoaderInfo.url の値を調べることができます。これにより、オブジェクトの最終的な 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 は、ロードされたコンテンツ内のフレーム 1 のスクリプトの実行前、コンストラクターの実行後に、目的の親を設定します。requestedContentParent が null の場合(デフォルト)、Loader オブジェクトがコンテンツの親となります。

ロードされたコンテンツが AVM1Movie オブジェクトの場合、または requestedContentParent オブジェクトに対して addChild() が呼び出されたときにエラーがスローされた場合、次のアクションが発生します。

  • 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 ファイルを別のドメインからロードする場合は、2 つのオプションがあります。ロードされる SWF ファイルを、ロード元 SWF ファイルとは異なる "通常の" セキュリティドメインに配置できます。これはデフォルトの設定です。もう 1 つのオプションでは、myLoaderContext.securityDomainSecurityDomain.currentDomain が等しくなるように設定して、ロードされる SWF ファイルをロード元 SWF ファイルと同じセキュリティドメインに配置するように指定します。これは読み込みロードと呼ばれます。これは、セキュリティのために、ロードされる SWF ファイルを独自のサーバーにコピーしてそこからロードする場合と同じです。読み込みロードが成功するには、ロードされる SWF ファイルのサーバーに、ロード元 SWF ファイルのドメインを信頼するポリシーファイルが必要です。

LoaderContext.securityDomain で、独自のセキュリティドメインのみを渡すことができます。その他のセキュリティドメインを渡そうとすると、SecurityError 例外になります。

AIR アプリケーションセキュリティサンドボックスのコンテンツでは、他のサンドボックスからその SecurityDomain にコンテンツをロードすることはできません。

詳しくは、『ActionScript 3.0 Developer's Guide』の「セキュリティ」の章を参照してください。

関連する 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 クラスは英語で表示されます。