適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隱藏篩選
mx.resources 

IResourceManager  - AS3 Flex

套件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 標籤
不建議元素清單
AccessibilityImplementation 常數
如何使用 ActionScript 範例
法律聲明
套件mx.resources
介面public interface IResourceManager extends IEventDispatcher

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The APIs of the IResourceManager interface provide localization support for Flex applications.

There are three main concepts involved in localization: locales, resources, and resource bundles.

A locale specifies a language and a country for which your application has been localized. For example, the locale "en_US" specifies English as spoken in the United States. (See the mx.resources.Locale class for more information.)

A resource is a named value that is locale-dependent. For example, your application might have a resource whose name is "OPEN" and whose value for an English locale is "Open" but whose value for a French locale is "Ouvrir".

A resource bundle is a named group of resources whose values have been localized for a particular locale. A resource bundle is identified by the combination of its bundleName and its locale, and has a content object that contains the name-value pairs for the bundle's resources. See the documentation for mx.resources.IResourceBundle for information about how you typically create resource bundles from properties files.

A single ResourceManager object implementing the IResourceManager interface manages multiple resource bundles, possibly for multiple locales, and provides access to the resources that they contain. For example, you can retrieve a specific resource as a String by calling resourceManager.getString(bundleName, resourceName).

All classes that extend UIComponent, Formatter, or Validator have a resourceManager property that provides a reference to the object implementing this interface. Other classes can call ResourceManager.getInstance() to obtain this object.

Resource retrieval methods such as getString() search for resources in the locales specified by the localeChain property. By changing this property, you can make your application suddenly use, for example, Japanese rather than English resources.

When your application starts, the ResourceManager is automatically populated with whatever resource bundles were compiled into the application. If you create a code module, by default the resources that its classes need are compiled into the module. When the module is loaded into an application, any bundles that the application does not already have are added to the ResourceManager.

You can compile "resource modules" which have only resources in them, and load them with the loadResourceModule() method of IResourceManager. With resource modules, you can support multiple locales by loading the resources you need at run time rather than compiling them into your application.

Although the ResourceManager is normally populated with resource bundles that were compiled into your application or loaded from modules, you can also programmatically create resource bundles and add them to the ResourceManager yourself with the addResourceBundle() method.

相關 API 元素



公用屬性
 屬性定義自
  localeChain : Array
An Array of locale Strings, such as [ "en_US" ], which specifies one or more locales to be searched for resources.
IResourceManager
公用方法
 方法定義自
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
IEventDispatcher
  
addResourceBundle(resourceBundle:IResourceBundle, useWeakReference:Boolean = false):void
Adds the specified ResourceBundle to the ResourceManager so that its resources can be accessed by ResourceManager methods such as getString().
IResourceManager
 Inherited
會將事件傳送到事件流程。
IEventDispatcher
  
Searches the locales in the localeChain for the specified resource and returns the first resource bundle in which it is found.
IResourceManager
  
getBoolean(bundleName:String, resourceName:String, locale:String = null):Boolean
Gets the value of a specified resource as a Boolean.
IResourceManager
  
Returns an Array of Strings specifying the bundle names for all ResourceBundle objects that exist in the ResourceManager and that belong to the specified locale.
IResourceManager
  
getClass(bundleName:String, resourceName:String, locale:String = null):Class
Gets the value of a specified resource as a Class.
IResourceManager
  
getInt(bundleName:String, resourceName:String, locale:String = null):int
Gets the value of a specified resource as an int.
IResourceManager
  
Returns an Array of Strings specifying all locales for which ResourceBundle objects exist in the ResourceManager.
IResourceManager
  
getNumber(bundleName:String, resourceName:String, locale:String = null):Number
Gets the value of a specified resource as a Number.
IResourceManager
  
getObject(bundleName:String, resourceName:String, locale:String = null):*
Gets the value of a specified resource as an Object.
IResourceManager
  
Returns an Array of Strings specifying all locales for which ResourceBundle objects exist in the ResourceManager, ordered using user preferences as reported by Capabilities.language or Capabilities.languages.
IResourceManager
  
Returns a ResourceBundle with the specified locale and bundleName that has been previously added to the ResourceManager with addResourceBundle().
IResourceManager
  
getString(bundleName:String, resourceName:String, parameters:Array = null, locale:String = null):String
Gets the value of a specified resource as a String, after substituting specified values for placeholders.
IResourceManager
  
getStringArray(bundleName:String, resourceName:String, locale:String = null):Array
Gets the value of a specified resource as an Array of Strings.
IResourceManager
  
getUint(bundleName:String, resourceName:String, locale:String = null):uint
Gets the value of a specified resource as a uint.
IResourceManager
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
IEventDispatcher
  
Initializes the localeChain property of the ResourceManager using an algorithm that compares the operating system's list of user-preferred locales with the list of locales available in the SWF.
IResourceManager
  
installCompiledResourceBundles(applicationDomain:ApplicationDomain, locales:Array, bundleNames:Array, useWeakReference:Boolean = false):Array
Creates instances of all ResourceBundle subclasses that were compiled into the SWF and adds them to the ResourceManager.
IResourceManager
  
loadResourceModule(url:String, update:Boolean = true, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):IEventDispatcher
Begins loading a resource module containing resource bundles.
IResourceManager
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
會從 EventDispatcher 物件移除偵聽程式。
IEventDispatcher
  
Removes the specified ResourceBundle from the ResourceManager so that its resources can no longer be accessed by ResourceManager methods such as getString().
IResourceManager
  
Removes all ResourceBundles for the specified locale from the ResourceManager so that their resources can no longer be accessed by ResourceManager methods such as getString().
IResourceManager
  
Begins unloading a loaded resource module.
IResourceManager
  
Dispatches a change event from the ResourceManager.
IResourceManager
 Inherited
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
IEventDispatcher
屬性詳細資訊

localeChain

屬性
localeChain:Array

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

An Array of locale Strings, such as [ "en_US" ], which specifies one or more locales to be searched for resources.

When you call the ResourceManager methods getObject(), getString(), getStringArray(), getNumber(), getInt(), getUint(), getBoolean(), or getClass() to get the value of a resource, you specify a bundle name and a resource name, but not a locale. The ResourceManager starts with the first locale in the localeChain and looks for a ResourceBundle with the specified bundle name for that locale. If such a ResourceBundle exists, and the specified resource exists in it, then the value of that resource is returned. Otherwise, the ResourceManager proceeds on to the other locales in the localeChain.

This scheme makes it possible to have locales that do not necessarily contain a complete set of localized resources. For example, if you are localizing your application for Indian English rather than U.S. English, you need only supply resources for the en_IN locale in which the Indian spelling or usage differs from that in the U.S., and then set the localeChain property to [ "en_IN", "en_US" ].

Many framework classes assume that they can always obtain, from some locale, the resources that they expect, and they will throw errors if they cannot do so. Therefore, you must ensure that the localeChain always contains a complete set of resources. Unless you have done a complete localization of all the framework's resources as well as your own application's resources, you can keep the "en_US" locale at the end of your localeChain to ensure this.

Setting this property causes the ResourceManager to dispatch a "change" Event.



實作
    public function get localeChain():Array
    public function set localeChain(value:Array):void
方法詳細資訊

addResourceBundle

()方法
public function addResourceBundle(resourceBundle:IResourceBundle, useWeakReference:Boolean = false):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Adds the specified ResourceBundle to the ResourceManager so that its resources can be accessed by ResourceManager methods such as getString().

參數

resourceBundle:IResourceBundle — The resource bundle to be added.
 
useWeakReference:Boolean (default = false) — Determines if the ResourceManager keeps a weak reference to the resource bundle. If useWeakReference is true then the ResourceManager provides a weak reference to the resource bundle. When the caller chooses to use a weak reference it becomes the caller's responsibility to keep a hard reference the resource bundle so it is not garbaged collected prematurely. If useWeakReference is false, the ResourceManager keeps a hard reference to the resource bundle so it will not be garbage collected.

When a Flex sub-application or module automatically adds its compiled resource bundles to the ResourceManager, it calls the addResourceBundle() with useWeakReference set to true, to avoid becoming pinned in memory. If you create resource bundles at runtime in a sub-application or module, you should do the same. You then need to hold on to these resource bundles with a hard reference to prevent them from being garbage collected.

findResourceBundleWithResource

()方法 
public function findResourceBundleWithResource(bundleName:String, resourceName:String):IResourceBundle

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Searches the locales in the localeChain for the specified resource and returns the first resource bundle in which it is found. If the resource isn't found, this method returns null.

參數

bundleName:String — A bundle name such as "MyResources".
 
resourceName:String — The name of a resource in the resource bundle.

傳回值
IResourceBundle — The first ResourceBundle in the localeChain that contains the specified resource, or null.

getBoolean

()方法 
public function getBoolean(bundleName:String, resourceName:String, locale:String = null):Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as a Boolean.

This method first calls getString() and converts the result to lowercase. It then returns true if the result was "true". and false otherwise.

If the specified resource is not found, this method returns false.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
Boolean — The resource value, as a Boolean, or false if it is not found.

getBundleNamesForLocale

()方法 
public function getBundleNamesForLocale(locale:String):Array

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns an Array of Strings specifying the bundle names for all ResourceBundle objects that exist in the ResourceManager and that belong to the specified locale.

The order of bundle names in this Array is not specified.

參數

locale:String — A locale string such as "en_US".

傳回值
Array — An Array of bundle names.

相關 API 元素

getClass

()方法 
public function getClass(bundleName:String, resourceName:String, locale:String = null):Class

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as a Class.

This method calls getObject() and coerces it to type Class using the as operator. The result will be null if the resource value was not a class reference. It is useful if you have written a lines such as

      IMAGE=Embed("image.jpg")
      BUTTON_SKIN=ClassReference("skins.ButtonSkin_en_US")
      

in a properties file and want to obtain the Class that the Embed() or ClassReference() directive produced.

If the specified resource is not found, this method returns null.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
Class — The resource value, as a Class, or null if it is not found.

getInt

()方法 
public function getInt(bundleName:String, resourceName:String, locale:String = null):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as an int.

This method calls getObject() and casts the result to an int. It is useful if you have written a line such as:

      MINIMUM=5
      

in a properties file and want to obtain the value 5 rather than "5".

If the specified resource is not found, this method returns 0.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
int — The resource value, as an int, or 0 if it is not found.

getLocales

()方法 
public function getLocales():Array

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns an Array of Strings specifying all locales for which ResourceBundle objects exist in the ResourceManager.

The order of locales in this array is not specified.

傳回值
Array — An Array of locale Strings.

getNumber

()方法 
public function getNumber(bundleName:String, resourceName:String, locale:String = null):Number

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as a Number.

This method calls getObject() and casts the result to a Number. It is useful if you have written a line such as:

      LONGITUDE=170.3
      

in a properties file and want to obtain the value 170.3 rather than "170.3".

If the specified resource is not found, this method returns NaN.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
Number — The resource value, as a Number, or NaN if it is not found.

getObject

()方法 
public function getObject(bundleName:String, resourceName:String, locale:String = null):*

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as an Object.

The value is returned exactly as it is stored in the content Object of the ResourceBundle, with no conversion. If the resource was compiled from a properties files, the resource value in the content Object is always a String unless you used the Embed() or ClassReference() directive, in which case it is a Class. Use the getString(), getStringArray(), getNumber(), getInt() getUint(), getBoolean(), and getClass() methods to convert the value to more specific types.

If the specified resource is not found, this method returns undefined.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
* — The resource value, exactly as it is stored in the content Object, or undefined if the resource is not found.

getPreferredLocaleChain

()方法 
public function getPreferredLocaleChain():Array

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns an Array of Strings specifying all locales for which ResourceBundle objects exist in the ResourceManager, ordered using user preferences as reported by Capabilities.language or Capabilities.languages.

傳回值
Array — An Array of locale Strings.

getResourceBundle

()方法 
public function getResourceBundle(locale:String, bundleName:String):IResourceBundle

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns a ResourceBundle with the specified locale and bundleName that has been previously added to the ResourceManager with addResourceBundle(). If no such ResourceBundle exists, this method returns null.

參數

locale:String — A locale string such as "en_US".
 
bundleName:String — A bundle name such as "MyResources".

傳回值
IResourceBundle — The ResourceBundle with the specified locale and bundleName if one exists; otherwise null.

相關 API 元素

getString

()方法 
public function getString(bundleName:String, resourceName:String, parameters:Array = null, locale:String = null):String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as a String, after substituting specified values for placeholders.

This method calls getObject() and then casts the result to a String.

If a parameters Array is passed to this method, the parameters in it are converted to Strings and then substituted, in order, for the placeholders "{0}", "{1}", and so on, in the String before it is returned.

If the specified resource is not found, this method returns null.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
parameters:Array (default = null) — An Array of parameters that are substituted for the placeholders. Each parameter is converted to a String with the toString() method before being substituted.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
String — The resource value, as a String, or null if it is not found.

getStringArray

()方法 
public function getStringArray(bundleName:String, resourceName:String, locale:String = null):Array

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as an Array of Strings.

This method assumes that the resource value is a String containing a comma-separated list of items. It calls the getString() method, splits the String into items at the commas, and trims white space before and after each item. It is useful if you have written a line such as:

      COUNTRIES=India, China, Japan
      

in a properties file and you want to obtain the value [ "India", "China", "Japan" ] rather than the value "India, China, Japan".

If the specified resource is not found, this method returns null.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
Array — The resource value, as an Array of Strings, or null if it is not found.

getUint

()方法 
public function getUint(bundleName:String, resourceName:String, locale:String = null):uint

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets the value of a specified resource as a uint.

This method calls the getObject() method and casts the result to a uint. It is useful if you have written a line such as:

      MINIMUM=5
      

in a properties file and want to obtain the value 5 rather than "5".

If the specified resource is not found, this method returns 0.

參數

bundleName:String — The name of a resource bundle.
 
resourceName:String — The name of a resource in the resource bundle.
 
locale:String (default = null) — A specific locale to be used for the lookup, or null to search all locales in the localeChain. This parameter is optional and defaults to null; you should seldom need to specify it.

傳回值
uint — The resource value, as a uint, or 0 if it is not found.

initializeLocaleChain

()方法 
public function initializeLocaleChain(compiledLocales:Array):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Initializes the localeChain property of the ResourceManager using an algorithm that compares the operating system's list of user-preferred locales with the list of locales available in the SWF.

For example, if the user has indicated in the operating system that she prefers French, and the SWF was compiled for the locales en_US, fr_FR, and de_DE, then the localeChain will be set so that the first locale in it is fr_FR.

This method is used only by classes that implement the IFlexModuleFactory interface.

參數

compiledLocales:Array — An Array of Strings specifying the locales for which the SWF was compiled.

相關 API 元素

installCompiledResourceBundles

()方法 
public function installCompiledResourceBundles(applicationDomain:ApplicationDomain, locales:Array, bundleNames:Array, useWeakReference:Boolean = false):Array

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Creates instances of all ResourceBundle subclasses that were compiled into the SWF and adds them to the ResourceManager.

For example, if the locales parameter is [ "en_US", "ja_JP" ] and the bundleNames parameter is [ "core", "controls" ], then four resource bundles will be installed.

This method is used only by classes that implement the IFlexModuleFactory interface.

參數

applicationDomain:ApplicationDomain — The ApplicationDomain that is used to look up the resource bundle classes by name.
 
locales:Array — An Array of Strings that specify the locales for which the SWF was compiled.
 
bundleNames:Array — An Array of Strings that specify the names of the resource bundles that were compiled into the SWF.
 
useWeakReference:Boolean (default = false) — A flag that specifyies whether the resource bundles should be intalled into the ResourceManager using a weak reference.

傳回值
Array — An Array of the ResourceBundle instances that were created and added to the ResourceManager.

相關 API 元素

loadResourceModule

()方法 
public function loadResourceModule(url:String, update:Boolean = true, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):IEventDispatcher

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Begins loading a resource module containing resource bundles.

Each call to this method returns a new event-dispatching object that you can use to learn how the loading is progressing and whether it completes successfully or results in an error. This object dispatches ResourceEvent.PROGRESS, ResourceEvent.COMPLETE, and ResourceEvent.ERROR events.

When the module has been loaded, the resource bundles are added to the ResourceManager, but the localeChain is left unchanged. If the update parameter is true, the update() method will be called.

參數

url:String — The URL from which to load the resource module.
 
update:Boolean (default = true) — Whether to call the update() method when the module finishes loading.
 
applicationDomain:ApplicationDomain (default = null) — The ApplicationDomain passed to the load() method of the IModuleInfo class that loads the resource module. This parameter is optional and defaults to null.
 
securityDomain:SecurityDomain (default = null) — The SecurityDomain passed to the load() method of the IModuleInfo class that loads the resource module. This parameter is optional and defaults to null.

傳回值
IEventDispatcher — An object that is associated with this particular load operation that dispatches ResourceEvent.PROGRESS, ResourceEvent.COMPLETE, and ResourceEvent.ERROR events.

相關 API 元素

removeResourceBundle

()方法 
public function removeResourceBundle(locale:String, bundleName:String):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Removes the specified ResourceBundle from the ResourceManager so that its resources can no longer be accessed by ResourceManager methods such as getString().

參數

locale:String — A locale string such as "en_US".
 
bundleName:String — A bundle name such as "MyResources".

相關 API 元素

removeResourceBundlesForLocale

()方法 
public function removeResourceBundlesForLocale(locale:String):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Removes all ResourceBundles for the specified locale from the ResourceManager so that their resources can no longer be accessed by ResourceManager methods such as getString().

參數

locale:String — A locale string such as "en_US".

相關 API 元素

unloadResourceModule

()方法 
public function unloadResourceModule(url:String, update:Boolean = true):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Begins unloading a loaded resource module.

When the module is unloaded, its resource bundles are removed from the ResourceManager, but the localeChain is left unchanged. If the update parameter is true, the update() method will be called.

參數

url:String — The URL that was used to load the resource module.
 
update:Boolean (default = true) — Whether to call the update() method when the module finishes unloading.

update

()方法 
public function update():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Dispatches a change event from the ResourceManager.

This causes binding expressions to re-evaluate if they involve the ResourceManager methods getObject(), getString(), getStringArray(), getNumber(), getInt(), getUint(), getBoolean(), or getClass().

This also causes the resourcesChanged() method of a UIComponent, Formatter, or Validator to execute. Many components implement this method to update their state based on the latest resources.





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。