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

URLRequest  - 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.net
클래스public final class URLRequest
상속URLRequest Inheritance Object

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

URLRequest 클래스는 하나의 HTTP 요청에 포함된 모든 정보를 캡처합니다. URLRequest 객체는 Loader, URLStream 및 URLLoader 클래스의 load() 메서드 및 URL 다운로드를 시작하는 기타 로드 작업에 전달됩니다. FileReference 클래스의 upload()download() 메서드에도 전달됩니다.

local-with-filesystem 샌드박스에 있는 SWF 파일은 network 샌드박스에 있는 리소스에서 데이터를 로드하거나 이러한 리소스에 데이터를 제공할 수 없습니다.

기본적으로 호출하는 SWF 파일과 로드하는 URL은 같은 도메인에 있어야 합니다. 예를 들어 www.adobe.com에 있는 SWF 파일은 같은 도메인인 www.adobe.com에 있는 소스에서만 데이터를 로드할 수 있습니다. 다른 도메인에서 데이터를 로드하려면 해당 데이터를 호스팅하는 서버에 URL 정책 파일을 배치합니다.

그러나 Adobe AIR에서 application 보안 샌드박스의 내용(AIR 응용 프로그램과 함께 설치된 내용)에는 이러한 보안 제한 사항이 적용되지 않습니다. application 보안 샌드박스에 있는 파일은 Adobe AIR에서 실행되는 내용에 대해 다음 URL 체계 중 하나를 사용하여 URL에 액세스할 수 있습니다.

  • httphttps
  • file
  • app-storage
  • app

Adobe AIR에서 실행되지만 application 보안 샌드박스에 속하지 않는 내용에는 브라우저(Flash Player)에서 실행되는 내용과 동일한 제한 사항이 적용되며 로드는 내용의 도메인과 URL 정책 파일에 부여된 권한에 따라 제어됩니다.

참고: App Transport Security는 iOS9에서 Apple이 도입한 기능으로, 앱과 웹 서비스 간의 비보안 연결을 허용하지 않습니다. 이러한 변경으로 인해 Loader, URLLoader를 통해 비보안 웹 사이트에 대해 수행되는 모든 연결의 경우 연결이 중단되며 App Transport Security로 인해 작동하지 않습니다. 해당 앱의 응용 프로그램 설명자에 키를 추가하여 기본 비헤이비어에 대한 예외를 지정하십시오.

해당 앱의 응용 프로그램 설명자의 InfoAdditions 태그에 키를 추가하여 기본 비헤이비어에 대한 예외를 지정하십시오.

  <iPhone>
  <InfoAdditions>
                   <![CDATA[
                          <key>NSAppTransportSecurity</key>
                              <dict>
                                        <key>NSExceptionDomains</key>
                              <dict>
                                       <key>www.example.com</key>
                              <dict>
                                     <!--Include to allow subdomains-->
                                     <key>NSIncludesSubdomains</key>
                                     <true/>
                                     <!--Include to allow HTTP requests-->
                                     <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                                     <true/>
                                      <!--Include to specify minimum TLS version-->
                                      <key>NSTemporaryExceptionMinimumTLSVersion</key>
                                      <string>TLSv1.1</string>
                              </dict>
                              </dict>
                              </dict>
                  ]]>
         </InfoAdditions>
  </iPhone>
  

보안에 대한 자세한 내용은 Flash Player 개발자 센터 항목: 보안을 참조하십시오.

예제 보기

관련 API 요소



공용 속성
 속성정의 주체
      authenticate : Boolean
이 요청에 대한 인증 요청을 처리할지(true) 아니면 처리하지 않을지(false) 여부를 지정합니다.
URLRequest
      cacheResponse : Boolean
이 요청에 대해 성공한 응답 데이터를 캐시할지 여부를 지정합니다.
URLRequest
 Inheritedconstructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다.
Object
  contentType : String
data 속성에 있는 내용의 MIME 내용 유형입니다.
URLRequest
  data : Object
URL 요청과 함께 전송될 데이터를 포함하는 객체입니다.
URLRequest
  digest : String
Flash Player 캐시에 저장(또는 캐시에서 검색)할 서명된 Adobe 플랫폼 구성 요소를 고유하게 식별하는 문자열입니다.
URLRequest
  followRedirects : Boolean
리디렉션을 수행할지(true) 아니면 수행하지 않을지(false) 여부를 지정합니다.
URLRequest
      idleTimeout : Number
이 요청에 대해 유휴 시간 초과 값(밀리초)을 지정합니다.
URLRequest
      manageCookies : Boolean
HTTP 프로토콜 스택이 이 요청에 대한 쿠키를 관리할지 여부를 지정합니다.
URLRequest
  method : String
HTTP 양식 제출 메서드를 제어합니다.
URLRequest
  requestHeaders : Array
HTTP 요청에 추가할 HTTP 요청 헤더의 배열입니다.
URLRequest
  url : String
요청할 URL입니다.
URLRequest
      useCache : Boolean
이 URLRequest에서 데이터를 페치하기 전에 로컬 캐시를 참조할지 여부를 지정합니다.
URLRequest
  userAgent : String
HTTP 요청에 사용할 사용자 에이전트 문자열을 지정합니다.
URLRequest
공용 메서드
 메서드정의 주체
  
URLRequest(url:String = null)
URLRequest 객체를 만듭니다.
URLRequest
 Inherited
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다.
Object
 Inherited
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다.
Object
 Inherited
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다.
Object
 Inherited
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다.
Object
 Inherited
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다.
Object
 Inherited
지정된 객체의 문자열 표현을 반환합니다.
Object
  
useRedirectedURL(sourceRequest:URLRequest, wholeURL:Boolean = false, pattern:* = null, replace:String = null):void
소스 URLRequest에서 리디렉션된 URL로 새 URLRequest의 URL 일부를 대체할 수 있습니다.
URLRequest
 Inherited
지정된 객체의 프리미티브 값을 반환합니다.
Object
속성 세부 정보
    

authenticate

속성
authenticate:Boolean

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0

이 요청에 대한 인증 요청을 처리할지(true) 아니면 처리하지 않을지(false) 여부를 지정합니다. false인 경우 인증 문제로 HTTP 오류가 반환됩니다.

지원되는 인증 방법은 다음과 같습니다.

  • Windows - HTTP Basic/다이제스트, Windows 통합 인증(NTLM 및 Kerberos 포함) 및 SSL 인증서 인증
  • Mac - HTTP Basic/다이제스트, NTLM 및 SSL 인증서 인증

참고: FileReference.upload(), FileReference.download()HTMLLoader.load() 메서드는 URLRequest.authenticate 속성을 지원하지 않습니다.

기본값: true.



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

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

    

cacheResponse

속성 
cacheResponse:Boolean

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0

이 요청에 대해 성공한 응답 데이터를 캐시할지 여부를 지정합니다. true로 설정하면 AIR 응용 프로그램은 운영 체제의 HTTP 캐시를 사용합니다.

참고: HTMLLoader.load() 메서드는 URLRequest.cacheResponse 속성을 지원하지 않습니다.

기본값: true.



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

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

contentType

속성 
contentType:String

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

data 속성에 있는 내용의 MIME 내용 유형입니다.

기본값은 application/x-www-form-urlencoded입니다.

참고: FileReference.upload(), FileReference.download()HTMLLoader.load() 메서드는 URLRequest.contentType 속성을 지원하지 않습니다.

POST 요청을 보낼 때 contentTypedata 속성의 값이 적절하게 대응되어야 합니다. contentType 속성의 값은 data 속성의 값을 해석하는 방법을 서버에게 알려줍니다.

  • data 속성의 값이 URLVariables 객체인 경우 contentType의 값은 application/x-www-form-urlencoded여야 합니다.
  • data 속성의 값이 다른 유형인 경우 contentType의 값은 보낼 POST 데이터의 유형(data 속성의 값에 포함되어 있는 이진 또는 문자열 데이터)을 나타내야 합니다.
  • FileReference.upload()의 경우 요청의 Content-Type이 자동으로 multipart/form-data로 설정되고 contentType 속성의 값이 무시됩니다.

Flash Player 10 이상에서는 multipart Content-Type(예: "multipart/form-data")을 사용하고 POST 본문 내 "content-disposition" 헤더에 "filename" 매개 변수를 지정하여 업로드를 처리하는 경우 POST 작업이 업로드에 적용되는 보안 규칙의 영향을 받을 수 있습니다.

  • POST 작업은 마우스 클릭이나 키 누르기 같은 사용자 동작에 대한 응답으로 수행됩니다.
  • POST 작업이 크로스 도메인인 경우, 즉 POST 대상이 POST 요청을 보내는 SWF 파일과 같은 서버에 없는 경우 대상 서버는 크로스 도메인 액세스를 허용하는 URL 정책 파일을 제공해야 합니다.

또한 multipart Content-Type의 경우 구문이 RFC2046 표준에 따라 유효해야 합니다. 구문이 유효하지 않은 경우 POST 작업은 업로드에 적용되는 보안 규칙의 영향을 받을 수 있습니다.



구현
    public function get contentType():String
    public function set contentType(value:String):void

관련 API 요소

data

속성 
data:Object

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

URL 요청과 함께 전송될 데이터를 포함하는 객체입니다.

이 속성은 method 속성과 함께 사용됩니다. method의 값이 GET이면 HTTP 쿼리 문자열 구문을 사용하여 data의 값이 URLRequest.url 값에 추가됩니다. method 값이 POST이거나 GET 이외의 값이면 data의 값이 HTTP 요청의 본문을 통해 전송됩니다.

URLRequest API는 문자열뿐 아니라, 이진 POST 데이터 및 URL 인코딩된 변수도 지원합니다. 데이터 객체는 ByteArray, URLVariables 또는 String 객체일 수 있습니다.

데이터의 사용 방법은 다음과 같이 사용하는 객체의 유형에 따라 달라집니다.

  • 객체가 ByteArray 객체인 경우 ByteArray 객체의 이진 데이터가 POST 데이터로 사용됩니다. GET에는 ByteArray 유형의 데이터가 지원되지 않습니다. 또한 FileReference.upload()FileReference.download()에 대해서도 ByteArray 유형의 데이터가 지원되지 않습니다.
  • 객체가 URLVariables 객체이고 메서드가 POST인 경우 변수는 x-www-form-urlencoded 형식을 사용하여 인코딩되고 결과 문자열은 POST 데이터로 사용됩니다. 예외적인 경우로 FileReference.upload() 호출 시에는 multipart/form-data 포스트의 개별 필드로 변수가 전송됩니다.
  • 객체가 URLVariables 객체이고 메서드가 GET인 경우 URLVariables 객체는 URLRequest 객체와 함께 전송될 변수를 정의합니다.
  • 그렇지 않으면 객체는 문자열로 변환되고 이 문자열은 POST 또는 GET 데이터로 사용됩니다.

이 데이터는 navigateToURL() 또는 FileReference.upload() 같은 메서드에서 URLRequest 객체를 사용해야만 전송됩니다.

참고: contentType의 값은 data 속성의 데이터 유형과 일치해야 합니다. contentType 속성의 설명을 참조하십시오.



구현
    public function get data():Object
    public function set data(value:Object):void

관련 API 요소


예제  ( 예제 사용 방법 )
다음 예제에서는 http://www.[yourDomain].com/application.jsp에서 호스트되는 원격 응용 프로그램을 새 브라우저 창에서 열고 URLVariables 객체에 캡처된 사용자 세션에 대한 데이터를 응용 프로그램으로 전달합니다.

이 예제에서 중요한 부분은 다음과 같습니다.

  1. 생성자 함수는 request라는 이름의 URLRequest 인스턴스를 만들고, 원격 응용 프로그램의 URL을 매개 변수로 이용합니다.
  2. URLVariables 객체가 만들어지고 두 가지 속성에 값이 할당됩니다.
  3. URLVariables 객체는 URLRequest 객체의 data 속성에 할당됩니다.
  4. navigateToURL이 새 브라우저 창을 원격 응용 프로그램의 URL로 엽니다.

참고: 이 예제를 실행하려면 예제의 원격 응용 프로그램 URL을 실제 사용 중인 URL로 바꿔야 합니다. 또한 Flash Player에서 URLVariables 객체에 캡처한 정보를 처리하려면 서버 코드가 필요할 수 있습니다.

package {
    import flash.display.Sprite;
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import flash.net.URLVariables;

    public class URLVariablesExample extends Sprite {

        public function URLVariablesExample() {
            var url:String = "http://www.[yourDomain].com/application.jsp";
            var request:URLRequest = new URLRequest(url);
            var variables:URLVariables = new URLVariables();
            variables.exampleSessionId = new Date().getTime();
            variables.exampleUserLabel = "guest";
            request.data = variables;
            navigateToURL(request);
        }
    }
}

digest

속성 
digest:String

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

Flash Player 캐시에 저장(또는 캐시에서 검색)할 서명된 Adobe 플랫폼 구성 요소를 고유하게 식별하는 문자열입니다. Adobe 플랫폼 구성 요소는 사용자 컴퓨터에 영구적으로 캐시된 SWF 내용을 포함하는 서명된 파일(SWZ 파일)입니다. 모든 SWZ 파일에는 Adobe의 서명이 되어 있습니다. 다이제스트는 캐시된 단일 파일에 해당합니다. 어떠한 방식으로든 해당 파일을 변경하면 다이제스트가 예상치 못한 방식으로 변경됩니다. 다이제스트를 사용하여 여러 도메인의 캐시된 파일을 확인할 수 있습니다. 다이제스트가 동일한 두 파일은 같은 파일이며 다이제스트가 다른 두 파일은 같은 파일이 아닙니다. 특정 다이제스트를 "스푸핑(spoofing)"하면서 다른 다이제스트인 것처럼 가장하는 파일은 사실상 만들 수 없습니다.

다이제스트는 SHA-256 메시지 다이제스트 알고리즘(16진수 형식의 64자 문자)을 사용합니다.

예를 들어 Flex SDK는 Flex 프레임워크용 SWZ를 포함하며 SWZ 파일에 대한 다이제스트 문자열을 제공합니다. 이 SWZ를 웹 서버에 게시하고 URLLoader 객체의 load() 메서드를 사용하여 SWF 파일에 로드할 수 있습니다. 최종 사용자의 컴퓨터에 이미 일치하는 SWZ 파일이 캐시되어 있는 경우 응용 프로그램에서 캐시된 SWZ 파일을 사용합니다. SWZ 파일은 해당 digest가 사용자가 제공한 것과 일치하는 경우 일치합니다. 그렇지 않은 경우 응용 프로그램은 사용자가 지정한 URL에서 SWZ 파일을 다운로드합니다.

SWZ 파일을 로드할 때는 URLRequest 객체가 URLLoader.load() 메서드 호출에 사용되는 경우에만 URLRequest 객체의 digest 매개 변수를 설정해야 합니다. URLRequest 객체가 다른 메서드에 사용되는 경우 URLRequest 객체의 digest 속성을 설정하면 응용 프로그램에서 IOError 예외가 발생합니다.



구현
    public function get digest():String
    public function set digest(value:String):void

오류
ArgumentError — 제공된 다이제스트가 다운로드한 서명된 파일 또는 캐시에서 로드한 서명된 파일에서 추출된 파일의 다이제스트와 일치하지 않습니다. Flash Player에서는 제공된 다이제스트의 길이가 잘못되었거나 16진수가 아닌 잘못된 문자가 포함된 경우에도 이 오류가 발생합니다.

예제  ( 예제 사용 방법 )
다음 예제에서는 원격 파일을 캐시로 로드합니다. 로드가 끝나면 바이트 배열에 서명된 파일이 아닌 실제 파일이 포함됩니다. 예제에서는 다음과 같이 loadBytes()를 호출하여 로드 작업을 완료합니다.
 
var myURLReq:URLRequest = new URLRequest();
myURLReq.url = "http://yourdomain/users/jdoe/test01/_rsc/Automated/AssetCaching_rsc/test01/rsl.swz";
myURLReq.digest = "3B0AA28C7A990385E044D80F5637FB036317BB41E044D80F5637FB036317BB41";
var myURLLoader:URLLoader = new URLLoader();
myURLLoader.dataFormat = URLLoaderDataFormat.BINARY;
myURLLoader.addEventListener("complete", onC);

myURLLoad.load(myURLReq);

function onC(e) {
    var someLoader:Loader = new Loader();
    addChild(someLoader);
    someLoader.loadBytes((ByteArray)(myURLLoad.data)); 
}

followRedirects

속성 
followRedirects:Boolean

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

리디렉션을 수행할지(true) 아니면 수행하지 않을지(false) 여부를 지정합니다.

참고: FileReference.upload(), FileReference.download()HTMLLoader.load() 메서드는 URLRequest.followRedirects 속성을 지원하지 않습니다.

기본값: true.



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

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

    

idleTimeout

속성 
idleTimeout:Number

언어 버전: ActionScript 3.0
런타임 버전: AIR 2

이 요청에 대해 유휴 시간 초과 값(밀리초)을 지정합니다.

유휴 제한 시간은 클라이언트가 연결이 설정된 후 요청을 포기할 때까지 서버 응답을 기다리는 시간 간격(밀리초)입니다.

참고: HTMLLoader.load() 메서드는 URLRequest.idleTimeout 속성을 지원하지 않습니다. HTMLLoader 클래스에서는 idleTimeout 속성을 정의합니다.

기본값: initialized from the URLRequestDefaults.idleTimeout property.



구현
    public function get idleTimeout():Number
    public function set idleTimeout(value:Number):void

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

    

manageCookies

속성 
manageCookies:Boolean

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0

HTTP 프로토콜 스택이 이 요청에 대한 쿠키를 관리할지 여부를 지정합니다. true이면 쿠키가 요청에 추가되고 응답 쿠키가 기억됩니다. false이면 쿠키가 요청에 추가되지 않고 응답 쿠키가 기억되지 않지만 사용자가 직접 헤더를 조작하여 쿠키를 관리할 수 있습니다. 참고: Windows에서는 manageCookiestrue로 설정되면 쿠키를 URL 요청에 수동으로 추가할 수 없습니다. 다른 운영 체제에서는 manageCookiestrue로 설정되든, false로 설정되든 관계없이 쿠키를 요청에 추가할 수 있습니다. 쿠키 추가가 허용되면 쿠키 데이터가 있는 URLRequestHeader 객체를 requestHeaders 배열에 추가하는 방식으로 수동으로 쿠키를 요청에 추가할 수 있습니다.

Mac OS의 경우 쿠키는 Safari와 공유됩니다. Mac OS에서 쿠키를 지우려면

  1. Safari를 엽니다.
  2. [Safari] > [환경설정]을 선택하고 [보안] 패널을 클릭합니다.
  3. [쿠키 표시] 버튼을 클릭합니다.
  4. [모두 제거] 버튼을 클릭합니다.

Windows에서 쿠키를 지우려면

  1. [인터넷 옵션] 제어판을 열고 [일반] 탭을 클릭합니다.
  2. [쿠키 삭제] 버튼을 클릭합니다.

기본값: true.



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

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

method

속성 
method:String

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

HTTP 양식 제출 메서드를 제어합니다.

Flash Player(브라우저)에서 실행 중인 SWF 내용의 경우 이 속성은 GET 또는 POST 작업으로 제한되며 유효한 값은 URLRequestMethod.GET 또는 URLRequestMethod.POST입니다.

Adobe AIR에서 실행되는 내용의 경우 내용이 application 보안 샌드박스에 있으면 모든 문자열 값을 사용할 수 있습니다. 그렇지 않으면 Flash Player에서 실행되는 내용과 마찬가지로 GET 또는 POST 작업만 사용할 수 있습니다.

현재 Adobe AIR에서 실행 중인 내용의 경우 navigateToURL() 함수를 사용하면 런타임에서는 해당 method 속성이 URLRequestMethod.POST로 설정된 POST 메서드를 사용하는 URLRequest가 GET 메서드를 사용하는 것으로 간주합니다.

참고: Flash Player에서 실행 중이고 참조된 양식에 본문이 없는 경우 메서드가 URLRequestMethod.POST로 설정되어 있어도 Flash Player에서는 자동으로 GET 작업을 사용합니다. 따라서 올바른 method가 사용되도록 항상 "모조" 본문을 포함하는 것이 좋습니다.

기본값: URLRequestMethod.GET.



구현
    public function get method():String
    public function set method(value:String):void

오류
ArgumentError value 매개 변수가 URLRequestMethod.GET 또는 URLRequestMethod.POST가 아닌 경우입니다.

관련 API 요소


예제  ( 예제 사용 방법 )
다음 예제에서는 http://www.[yourDomain].com/application.jsp에서 호스트되는 원격 응용 프로그램을 새 브라우저 창에서 열고 URLVariables 객체에 캡처된 사용자 세션에 대한 데이터를 응용 프로그램으로 전달합니다. 또한 URLRequest.method 속성의 값을 URLRequestMethod.POST로 명시적으로 설정합니다.

이 예제에서 중요한 부분은 다음과 같습니다.

  1. 생성자 함수는 request라는 이름의 URLRequest 인스턴스를 만들고, 원격 응용 프로그램의 URL을 매개 변수로 이용합니다.
  2. URLVariables 객체가 만들어지고 두 가지 속성에 값이 할당됩니다.
  3. URLVariables 객체는 URLRequest 객체의 data 속성에 할당됩니다.
  4. URLRequest.method 속성의 값이 URLRequestMethod.POST로 설정됩니다.
  5. navigateToURL이 새 브라우저 창을 원격 응용 프로그램의 URL로 엽니다.

참고: 이 예제를 실행하려면 예제의 원격 응용 프로그램 URL을 실제 사용 중인 URL로 바꿔야 합니다. 또한 Flash Player에서 URLVariables 객체에 캡처한 정보를 처리하려면 서버 코드가 필요할 수 있습니다.

package {
    import flash.display.Sprite;
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import flash.net.URLRequestMethod;
    import flash.net.URLVariables;

    public class URLRequest_method extends Sprite {

        public function URLRequest_method() {
            var url:String = "http://www.[yourDomain].com/application.jsp";
            var request:URLRequest = new URLRequest(url);
            
            var variables:URLVariables = new URLVariables();
            variables.exampleSessionId = new Date().getTime();
            variables.exampleUserLabel = "guest";
            request.data = variables;
            request.method = URLRequestMethod.POST;
            
            navigateToURL(request);
        }
    }
}

requestHeaders

속성 
requestHeaders:Array

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

HTTP 요청에 추가할 HTTP 요청 헤더의 배열입니다. 이 배열은 URLRequestHeader 객체로 구성됩니다. 배열의 각 객체는 다음과 같이 이름 문자열과 값 문자열을 포함하는 URLRequestHeader 객체여야 합니다.

     var rhArray:Array = new Array(new URLRequestHeader("Content-Type", "text/html"));
     

Flash Player 및 AIR 런타임은 요청 헤더에 특정 제한 사항을 적용합니다. 자세한 내용은 URLRequestHeader 클래스 설명을 참조하십시오.

URLRequest 매개 변수를 받는 모든 메서드가 requestHeaders 속성을 지원하지는 않습니다. 자세한 내용은 호출하는 메서드에 대한 설명서를 참조하십시오. 예를 들어 FileReference.upload()FileReference.download() 메서드는 URLRequest.requestHeaders 속성을 지원하지 않습니다.

브라우저의 제한 사항으로 인해 사용자 정의 HTTP 요청은 POST 요청에만 지원되며 GET 요청에는 지원되지 않습니다.



구현
    public function get requestHeaders():Array
    public function set requestHeaders(value:Array):void

관련 API 요소

url

속성 
url:String

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

요청할 URL입니다.

Uniform Resource Locator 사양(http://www.faqs.org/rfcs/rfc1738.html 참조)에 안전하지 않은 것으로 설명된 모든 문자 또는 URLRequest 객체의 URL 스킴에 예약된 모든 문자(예약된 용도로 사용되지 않는 경우)는 인코딩해야 합니다. 예를 들어 "http://www.example.com/orderForm.cfm?item=%23B-3&discount=50%25"에서와 같이 퍼센트 심볼(%)로 "%25", 숫자 기호(#)로 "%23"을 사용합니다.

기본적으로 URL은 호출하는 파일과 같은 도메인에 있어야 하지만 Adobe AIR application 보안 샌드박스에서 실행되는 내용은 예외입니다. 다른 도메인에서 데이터를 로드하려면 해당 데이터를 호스팅하는 서버에 URL 정책 파일을 배치합니다. 자세한 내용은 URLRequest 클래스의 설명을 참조하십시오.

application 보안 샌드박스에 있는 파일(AIR 응용 프로그램과 함께 설치된 파일)은 Adobe AIR에서 실행되는 내용에 대해 다음 URL 체계 중 하나를 사용하여 URL에 액세스할 수 있습니다.

  • httphttps
  • file
  • app-storage
  • app

참고: IPv6(Internet Protocol version 6)은 AIR 및 Flash Player 9.0.115.0 이상에서 지원됩니다. IPv6은 128비트 주소를 지원하는 인터넷 프로토콜입니다(이전에 32비트 주소 체계를 지원하는 IPv4를 개선한 새 버전). 네트워크 인터페이스에서 IPv6를 활성화시켜야 합니다. 자세한 내용은 데이터를 호스팅하는 운영 체제의 도움말을 참조하십시오. 호스팅 시스템에서 IPv6를 지원하는 경우 다음과 같이 대괄호([])로 묶은 URL에 숫자 IPv6 리터럴 주소를 지정할 수 있습니다.

     rtmp://[2001:db8:ccc3:ffff:0:444d:555e:666f]:1935/test
     



구현
    public function get url():String
    public function set url(value:String):void

예제  ( 예제 사용 방법 )
다음 예제는 ActionScript 3.0의 Loader 클래스를 사용하여 이미지를 동적으로 로드하는 방법을 보여 줍니다. 이 예제는 ActionScriptExamples.com에서 제공합니다.
var url:String = "http://www.helpexamples.com/flash/images/image2.jpg";
var urlRequest:URLRequest = new URLRequest(url);
var loader:Loader = new Loader();
loader.load(urlRequest);
addChild(loader);
    

useCache

속성 
useCache:Boolean

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0

이 URLRequest에서 데이터를 페치하기 전에 로컬 캐시를 참조할지 여부를 지정합니다.

참고: HTMLLoader.load() 메서드는 URLRequest.useCache 속성을 지원하지 않습니다.

기본값: true.



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

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

userAgent

속성 
userAgent:String

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

HTTP 요청에 사용할 사용자 에이전트 문자열을 지정합니다.

기본값은 Flash Player에서 사용되는 것과 동일한 사용자 에이전트 문자열이며 이는 Mac, Linux 및 Windows에서와 다릅니다.

참고: URLRequest 객체를 HTMLLoader 객체의 load() 메서드와 함께 사용하면 이 속성이 사용자 에이전트 문자열에 영향을 주지 않습니다. HTMLLoader 객체의 사용자 에이전트 문자열을 설정하려면 HTMLLoader 객체의 userAgent 속성을 설정하거나 정적 URLRequestDefaults.userAgent 속성을 설정합니다.



구현
    public function get userAgent():String
    public function set userAgent(value:String):void

오류
SecurityError — 호출자가 AIR 응용 프로그램 보안 샌드박스에 없습니다.

관련 API 요소

생성자 세부 정보

URLRequest

()생성자
public function URLRequest(url:String = null)

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

URLRequest 객체를 만듭니다. System.useCodePagetrue인 경우 해당 요청은 유니코드가 아닌 시스템 코드 페이지를 사용하여 인코딩됩니다. System.useCodePagefalse인 경우 해당 요청은 시스템 코드 페이지가 아닌 유니코드를 사용하여 인코딩됩니다.

매개 변수
url:String (default = null) — 요청할 URL입니다. url 속성을 사용하여 이후에 URL을 설정할 수 있습니다.

관련 API 요소


예제  ( 예제 사용 방법 )

다음 예제는 navigateToURL() 메서드를 사용하여 Flash Player에서 새 브라우저 창을 여는 방법을 보여 줍니다. ActionScriptExamples.com에서 제공하는 예제입니다.
// Requires
// - Button symbol on Stage (or a display object, such as a MovieClip) with instance name "buttonSymbol"
//
buttonSymbol.addEventListener(MouseEvent.CLICK, buttonSymbol_click);
 
function buttonSymbol_click(evt:MouseEvent):void {
    var req:URLRequest = new URLRequest("http://www.adobe.com/");
    navigateToURL(req, "_blank");
}
메서드 세부 정보

useRedirectedURL

()메서드
public function useRedirectedURL(sourceRequest:URLRequest, wholeURL:Boolean = false, pattern:* = null, replace:String = null):void

언어 버전: ActionScript 3.0
런타임 버전: Flash Player 11.8, AIR 3.8

소스 URLRequest에서 리디렉션된 URL로 새 URLRequest의 URL 일부를 대체할 수 있습니다. 초기 요청이 리디렉션된 후 이러한 방법으로 이후 요청이 리디렉션된 서버 위치로 직접 전달되도록 할 수 있습니다.

초기 URLRequest가 완료된 후 HTTPStatusEvent.redirected가 true일 경우 초기 요청을 sourceRequest로 사용하여 이 메서드를 호출할 수 있습니다. 기본적으로 리디렉션된 URL의 도메인이 이 URLRequest URL의 도메인 대신에 사용됩니다. URLRequest.url은 이 메서드를 호출하기 전에 설정해야 합니다. 이 URLRequest가 로드되기 전에 메서드를 호출해야 합니다. 또는 wholeURL 매개 변수가 true인 경우 소스 URLRequest의 전체 URL에서 파일 이름을 뺀 값으로 이 URLRequest의 전체 URL에서 최종 파일 이름을 뺀 값을 대체합니다. 또한 호출자가 pattern 매개 변수에 문자열 또는 일반 표현식을 제공할 수도 있습니다. 패턴을 검색하여 replace 매개 변수의 문자열로 대체합니다. 이 검색 및 대체는 URL 대체 후에 발생합니다.

매개 변수

sourceRequest:URLRequest — 이미 요청되어 리디렉션된 URLRequest 객체입니다. 리디렉션된 URL을 사용하여 이 URLRequest 객체의 URL 일부를 대체합니다.
 
wholeURL:Boolean (default = false) — sourceRequest 최종 URL의 도메인을 사용하여 이 요청 URL의 도메인을 대체할지, 아니면 전체 URL에서 파일 이름을 뺀 값을 사용할지를 나타냅니다. 기본값은 false입니다.
 
pattern:* (default = null) — URL에서 검색할 패턴입니다. String 또는 RegExp 객체일 수 있습니다. 기본값은 null입니다.
 
replace:String (default = null) — URL에서 패턴이 발견될 경우 패턴을 대체하기 위해 사용할 문자열입니다. 기본값은 null입니다.

관련 API 요소

URLRequestExample.as

다음 예제에서는 새 Loader 객체를 만들고 XML 파일에 대한 경로를 포함하고 있는 URLRequest 객체를 전달합니다. 로드 작업에 성공하는 경우 complete 이벤트가 전달되고 XML 파일의 데이터가 출력으로 보내집니다. 추가 이벤트 핸들러에서 오류 이벤트를 포함하여 기타 이벤트를 캡처합니다.

이 예제를 실행하려면 XMLFile.xml이라는 이름의 파일을 사용자의 SWF 파일과 동일한 디렉토리에 넣습니다.

package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.net.*;

    public class URLRequestExample extends Sprite {
        private var loader:URLLoader;
        
        public function URLRequestExample() {
            loader = new URLLoader();
            configureListeners(loader);

            var request:URLRequest = new URLRequest("XMLFile.xml");
            try {
                loader.load(request);
            } catch (error:Error) {
                trace("Unable to load requested document.");
            }
        }

        private function configureListeners(dispatcher:IEventDispatcher):void {
            dispatcher.addEventListener(Event.COMPLETE, completeHandler);
            dispatcher.addEventListener(Event.OPEN, openHandler);
            dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
            dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
            dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
            dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        }

        private function completeHandler(event:Event):void {
            var loader:URLLoader = URLLoader(event.target);
            trace("completeHandler: " + loader.data);
        }

        private function openHandler(event:Event):void {
            trace("openHandler: " + event);
        }

        private function progressHandler(event:ProgressEvent):void {
            trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
        }

        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        }

        private function httpStatusHandler(event:HTTPStatusEvent):void {
            trace("httpStatusHandler: " + event);
        }

        private function ioErrorHandler(event:IOErrorEvent):void {
            trace("ioErrorHandler: " + event);
        }
    }
}




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

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