/frameworks/projects/playerglobal/bundles/en_US/docs/flash.media.xml
XML | 3292 lines | 2671 code | 603 blank | 18 comment | 0 complexity | 398e875f47a89b5b98f6be69ec66f0de MD5 | raw file
Possible License(s): Apache-2.0
- <?xml version="1.0" encoding="UTF-8"?><apiPackage xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" id="flash.media" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiPackage/apiPackage "><apiName class="- topic/title reference/title apiRef/apiName ">flash.media</apiName><apiDetail class="- topic/body reference/refbody apiRef/apiDetail "/><apiClassifier languages="" id="flash.media:ID3Info" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">ID3Info</apiName><shortdesc class="- topic/shortdesc ">
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- The ID3Info class contains properties that reflect ID3 metadata.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The ID3Info class contains properties that reflect ID3 metadata. You can get additional
- metadata for MP3 files by accessing the <codeph class="+ topic/ph pr-d/codeph ">id3</codeph>
- property of the Sound class; for example, <codeph class="+ topic/ph pr-d/codeph ">mySound.id3.TIME</codeph>.
- For more information, see the entry for <codeph class="+ topic/ph pr-d/codeph ">Sound.id3</codeph> and
- the ID3 tag definitions at <xref href="http://www.id3.org" class="- topic/xref ">http://www.id3.org</xref>.
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Sound/id3" class="- topic/link "><linktext class="- topic/linktext ">Sound.id3</linktext></link></related-links><apiValue id="flash.media:ID3Info:album" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">album</apiName><shortdesc class="- topic/shortdesc ">
- The name of the album; corresponds to the ID3 2.0 tag TALB.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The name of the album; corresponds to the ID3 2.0 tag TALB.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:ID3Info:artist" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">artist</apiName><shortdesc class="- topic/shortdesc ">
- The name of the artist; corresponds to the ID3 2.0 tag TPE1.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The name of the artist; corresponds to the ID3 2.0 tag TPE1.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:ID3Info:comment" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">comment</apiName><shortdesc class="- topic/shortdesc ">
- A comment about the recording; corresponds to the ID3 2.0 tag COMM.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A comment about the recording; corresponds to the ID3 2.0 tag COMM.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:ID3Info:genre" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">genre</apiName><shortdesc class="- topic/shortdesc ">
- The genre of the song; corresponds to the ID3 2.0 tag TCON.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The genre of the song; corresponds to the ID3 2.0 tag TCON.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:ID3Info:songName" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">songName</apiName><shortdesc class="- topic/shortdesc ">
- The name of the song; corresponds to the ID3 2.0 tag TIT2.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The name of the song; corresponds to the ID3 2.0 tag TIT2.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:ID3Info:track" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">track</apiName><shortdesc class="- topic/shortdesc ">
- The track number; corresponds to the ID3 2.0 tag TRCK.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The track number; corresponds to the ID3 2.0 tag TRCK.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:ID3Info:year" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">year</apiName><shortdesc class="- topic/shortdesc ">
- The year of the recording; corresponds to the ID3 2.0 tag TYER.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="AS3" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The year of the recording; corresponds to the ID3 2.0 tag TYER.
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:MediaType" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">MediaType</apiName><shortdesc class="- topic/shortdesc ">
- The MediaType class enumerates the general types of media that can be returned by a camera.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The MediaType class enumerates the general types of media that can be returned by a camera.
-
- <p class="- topic/p ">Use the constants defined in this class as input to the <codeph class="+ topic/ph pr-d/codeph ">launch()</codeph> method
- of the CameraUI class. MediaType values are also used in the <codeph class="+ topic/ph pr-d/codeph ">mediaType</codeph> property
- of the MediaPromise class.</p>
-
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.media.xml#CameraUI/launch()" class="- topic/link "><linktext class="- topic/linktext ">CameraUI.launch()</linktext></link><link href="" invalidHref="flash.media.MediaPromise.mediaType.xml" class="- topic/link "><linktext class="- topic/linktext ">MediaPromise.mediaType</linktext></link></related-links><apiValue id="flash.media:MediaType:IMAGE" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">IMAGE</apiName><shortdesc class="- topic/shortdesc ">
- A single image.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">image</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A single image.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:MediaType:VIDEO" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">VIDEO</apiName><shortdesc class="- topic/shortdesc ">
- A video.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">video</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A video.
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiOperation id="globalOperation:flash.media:scanHardware" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">scanHardware</apiName><shortdesc class="- topic/shortdesc ">
- Forces a rescan of the microphones and cameras on the system.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.0" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Forces a rescan of the microphones and cameras on the system.
-
- </apiDesc></apiOperationDetail></apiOperation><apiClassifier languages="" id="flash.media:Camera" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">Camera</apiName><shortdesc class="- topic/shortdesc ">
- Use the Camera class to capture video from the client system's camera.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video
- </keyword></asCustoms></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Use the Camera class to capture video from the client system's camera.
- Use the Video class to monitor the video locally.
- Use the NetConnection and NetStream classes to transmit the video to Flash Media Server.
- Flash Media Server can send the video stream to other servers and broadcast it to other clients running Flash Player.
-
- <p class="- topic/p ">A Camera instance captures video in landscape aspect ratio. On devices that can change the screen orientation,
- such as mobile phones, a Video object attached to the camera will only show upright video in a landscape-aspect orientation.
- Thus, mobile apps should use a landscape orientation when displaying video and should not auto-rotate.</p>
-
- <p class="- topic/p ">As of AIR 2.6, autofocus is enabled automatically on mobile devices with an autofocus camera. If the camera does not support continuous autofocus,
- and many mobile device cameras do not, then the camera is focused when the Camera object is attached to a video stream and whenever
- the <codeph class="+ topic/ph pr-d/codeph ">setMode()</codeph> method is called. On desktop computers, autofocus behavior is dependent on the camera driver and settings.</p>
-
- <p class="- topic/p ">In an AIR application on Android and iOS, the camera does not capture video while an AIR app is not the active, foreground application.
- In addition, streaming connections can be lost when the application is in the background. On iOS, the camera video cannot be
- displayed when an application uses the GPU rendering mode. The camera video can still be streamed to a server.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Mobile Browser Support:</b> This class is not supported in mobile browsers.</p>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
- on desktop operating systems, but it is not supported on all mobile devices. It is not
- supported on AIR for TV devices. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
-
- <p class="- topic/p ">You can test
- for support at run time using the <codeph class="+ topic/ph pr-d/codeph ">Camera.isSupported</codeph> property.
- Note that for AIR for TV devices, <codeph class="+ topic/ph pr-d/codeph ">Camera.isSupported</codeph> is <codeph class="+ topic/ph pr-d/codeph ">true</codeph> but
- <codeph class="+ topic/ph pr-d/codeph ">Camera.getCamera()</codeph> always returns <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
-
- <p class="- topic/p ">
- For information about capturing audio, see the Microphone class.
- </p>
-
- <p class="- topic/p ">
- <b class="+ topic/ph hi-d/b ">Important: </b>Flash Player displays a Privacy dialog box that lets the user choose whether
- to allow or deny access to the camera. Make sure your application window size is at least 215 x 138 pixels;
- this is the minimum size required to display the dialog box.
- </p>
-
- <p class="- topic/p ">To create or reference a Camera object, use the <codeph class="+ topic/ph pr-d/codeph ">getCamera()</codeph> method.</p>
-
- </apiDesc><example conref="examples\CameraExample.as" class="- topic/example "> The following example shows the image from a camera after acknowledging the
- security warning. The Stage is set such that it cannot be scaled and is aligned to the
- top-left of the player window. The <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is dispatched at the
- start and end (if any) of the session and is captured by the <codeph class="+ topic/ph pr-d/codeph ">activityHandler()</codeph>
- method, which prints out information about the event.
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> A camera must be attached to your computer for this example
- to work correctly.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.display.StageAlign;
- import flash.display.StageScaleMode;
- import flash.events.*;
- import flash.media.Camera;
- import flash.media.Video;
- public class CameraExample extends Sprite {
- private var video:Video;
-
- public function CameraExample() {
- stage.scaleMode = StageScaleMode.NO_SCALE;
- stage.align = StageAlign.TOP_LEFT;
-
- var camera:Camera = Camera.getCamera();
-
- if (camera != null) {
- camera.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
- video = new Video(camera.width * 2, camera.height * 2);
- video.attachCamera(camera);
- addChild(video);
- } else {
- trace("You need a camera.");
- }
- }
-
- private function activityHandler(event:ActivityEvent):void {
- trace("activityHandler: " + event);
- }
- }
- }
- </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone</linktext></link><link href="http://coenraets.org/blog/2010/07/video-chat-for-android-in-30-lines-of-code/" class="- topic/link "><linktext class="- topic/linktext ">Cristophe Coenraets: Video Chat for Android in 30 Lines of Code</linktext></link><link href="http://www.riagora.com/2010/07/android-air-and-the-camera/" class="- topic/link "><linktext class="- topic/linktext ">Michael Chaize: Android, AIR, and the Camera</linktext></link></related-links><adobeApiEvent id="flash.media:Camera_flash.events.StatusEvent.STATUS_status" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">status</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a camera reports its status.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.StatusEvent.STATUS</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.StatusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a camera reports its status.
- Before accessing a camera, Flash Player displays a Privacy dialog box to let users
- allow or deny access to their camera. If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Camera.Muted"</codeph>,
- the user has refused to allow the SWF file access to the user's camera.
- If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Camera.Unmuted"</codeph>,
- the user has allowed the SWF file access to the user's camera.
- </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/getCamera()" class="- topic/link "><linktext class="- topic/linktext ">Camera.getCamera()</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.media:Camera_flash.events.ActivityEvent.ACTIVITY_activity" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">activity</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a camera begins or ends a session.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.ActivityEvent.ACTIVITY</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.ActivityEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a camera begins or ends a session.
- Call <codeph class="+ topic/ph pr-d/codeph ">Camera.setMotionLevel()</codeph> to specify the amount of motion
- required to trigger an <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event with an <codeph class="+ topic/ph pr-d/codeph ">activating</codeph>
- value of <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, or the time without activity
- that must elapse before triggering an <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event with an <codeph class="+ topic/ph pr-d/codeph ">activating</codeph>
- value of <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.
-
-
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><apiOperation id="flash.media:Camera:getCamera" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">getCamera</apiName><shortdesc class="- topic/shortdesc ">
- Returns a reference to a Camera object for capturing video.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, constructor, Camera.getCamera, getCamera
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">name</codeph> parameter is not specified, this method returns a reference
- to the default camera or, if it is in use by another application, to the first
- available camera. (If there is more than one camera installed, the user may specify
- the default camera in the Flash Player Camera Settings panel.) If no cameras are available
- or installed, the method returns <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
-
- </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.media:Camera</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">name</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies which camera to get, as determined from the array
- returned by the <codeph class="+ topic/ph pr-d/codeph ">names</codeph> property. For most applications, get the default camera
- by omitting this parameter. To specify a value for this parameter, use the string representation
- of the zero-based index position within the Camera.names array. For example, to specify the third
- camera in the array, use <codeph class="+ topic/ph pr-d/codeph ">Camera.getCamera("2")</codeph>.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Returns a reference to a Camera object for capturing video. To begin capturing
- the video, you must attach the Camera object to a Video object (see <codeph class="+ topic/ph pr-d/codeph ">Video.attachCamera()
- </codeph>). To transmit video to Flash Media Server, call <codeph class="+ topic/ph pr-d/codeph ">NetStream.attachCamera()</codeph>
- to attach the Camera object to a NetStream object.
-
- <p class="- topic/p ">Multiple calls to the <codeph class="+ topic/ph pr-d/codeph ">getCamera()</codeph> method reference the same camera driver.
- Thus, if your code contains code like <codeph class="+ topic/ph pr-d/codeph ">firstCam:Camera = getCamera()</codeph>
- and <codeph class="+ topic/ph pr-d/codeph ">secondCam:Camera = getCamera()</codeph>,
- both <codeph class="+ topic/ph pr-d/codeph ">firstCam</codeph> and <codeph class="+ topic/ph pr-d/codeph ">secondCam</codeph> reference the same camera,
- which is the user's default camera.</p>
-
- <p class="- topic/p ">On iOS devices with a both a front- and a rear-facing camera, you can only capture
- video from one camera at a time. On Android devices, you can only access the rear-facing camera.</p>
-
- <p class="- topic/p ">In general, you shouldn't pass a value for the <codeph class="+ topic/ph pr-d/codeph ">name</codeph> parameter; simply use
- <codeph class="+ topic/ph pr-d/codeph ">getCamera()</codeph> to return a reference to the default camera. By means of the Camera
- settings panel (discussed later in this section), the user can specify the default camera
- to use. </p>
-
- <p class="- topic/p ">You can't use ActionScript to set a user's Allow or Deny permission setting
- for access to the camera, but you can display the Adobe Flash Player Settings camera
- setting dialog box where the user can set the camera permission. When a SWF file using
- the <codeph class="+ topic/ph pr-d/codeph ">attachCamera()</codeph> method tries to
- attach the camera returned by the <codeph class="+ topic/ph pr-d/codeph ">getCamera()</codeph> method to a Video or
- NetStream object, Flash Player displays a dialog box that lets the user choose
- to allow or deny access to the camera. (Make sure your application window size is at least
- 215 x 138 pixels; this is the minimum size Flash Player requires to display the dialog box.)
- When the user responds to the camera setting dialog box, Flash Player returns an
- information object in the <codeph class="+ topic/ph pr-d/codeph ">status</codeph> event that indicates the user's response:
- <codeph class="+ topic/ph pr-d/codeph ">Camera.muted</codeph> indicates
- the user denied access to a camera; <codeph class="+ topic/ph pr-d/codeph ">Camera.Unmuted</codeph> indicates the user allowed access
- to a camera. To determine whether the user has denied or allowed access to the camera without
- handling the <codeph class="+ topic/ph pr-d/codeph ">status</codeph> event, use the <codeph class="+ topic/ph pr-d/codeph ">muted</codeph> property.</p>
-
- <p class="- topic/p ">In Flash Player, the user can specify permanent privacy settings for a particular domain by right-clicking
- (Windows and Linux) or Control-clicking (Macintosh) while a SWF file is playing, selecting Settings,
- opening the Privacy dialog, and selecting Remember. If the user selects Remember, Flash Player no longer
- asks the user whether to allow or deny SWF files from this domain access to your camera.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The <codeph class="+ topic/ph pr-d/codeph ">attachCamera()</codeph> method will not invoke the dialog box
- to Allow or Deny access to the camera if the user has denied access by selecting Remember
- in the Flash Player Settings dialog box. In this case, you can prompt the user to change the
- Allow or Deny setting by displaying the Flash Player Privacy panel for the user
- using <codeph class="+ topic/ph pr-d/codeph ">Security.showSettings(SecurityPanel.PRIVACY)</codeph>.</p>
-
- <p class="- topic/p ">If <codeph class="+ topic/ph pr-d/codeph ">getCamera()</codeph> returns <codeph class="+ topic/ph pr-d/codeph ">null</codeph>, either the camera is in use by another
- application, or there are no cameras installed on the system. To determine whether any cameras
- are installed, use the <codeph class="+ topic/ph pr-d/codeph ">names.length</codeph> property. To display the Flash Player Camera Settings panel,
- which lets the user choose the camera to be referenced by <codeph class="+ topic/ph pr-d/codeph ">getCamera()</codeph>, use
- <codeph class="+ topic/ph pr-d/codeph ">Security.showSettings(SecurityPanel.CAMERA)</codeph>. </p>
-
- <p class="- topic/p ">Scanning the hardware for cameras takes time. When the runtime finds at least one camera,
- the hardware is not scanned again for the lifetime of the player instance. However, if
- the runtime doesn't find any cameras, it will scan each time <codeph class="+ topic/ph pr-d/codeph ">getCamera</codeph> is called.
- This is helpful if the camera is present but is disabled; if your SWF file provides a
- Try Again button that calls <codeph class="+ topic/ph pr-d/codeph ">getCamera</codeph>, Flash Player can find the camera without the
- user having to restart the SWF file.</p>
-
- </apiDesc><example conref="examples\Camera_getCameraExample.as" class="- topic/example "> In the following example, after the user allows access to the camera, the attached
- camera is used to capture video images. Information about the video stream, such as
- the current frames per second, is also displayed.
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">Camera.getCamera()</codeph> method returns a reference to a camera object, or returns null if
- no camera is available or installed. The if statement checks whether the camera was found and whether
- the user allowed access to the camera. If the user denied access, the <codeph class="+ topic/ph pr-d/codeph ">muted</codeph>
- property is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</p>
-
- <p class="- topic/p ">Usually, when the <codeph class="+ topic/ph pr-d/codeph ">attachCamera()</codeph> method is invoked, a dialog box appears and prompts the
- user to allow or deny Flash Player access to the camera. However, if the user denied access
- and selected the <codeph class="+ topic/ph pr-d/codeph ">Remember</codeph> option, the dialog box does not appear and nothing displays.
- To make sure the user has the option to allow access to the camera, the <codeph class="+ topic/ph pr-d/codeph ">myTextField</codeph> text field
- instructs the user to click the text field to invoke the Flash Player Settings dialog box.</p>
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph> method calls <codeph class="+ topic/ph pr-d/codeph ">Security.showSettings()</codeph> method, which
- displays the <codeph class="+ topic/ph pr-d/codeph ">PRIVACY</codeph> panel of the Settings dialog box. If the user allows access,
- the <codeph class="+ topic/ph pr-d/codeph ">StatusEvent.STATUS</codeph> event is dispatched and the value of the event's <codeph class="+ topic/ph pr-d/codeph ">code</codeph>
- property is set to <codeph class="+ topic/ph pr-d/codeph ">Camera.Unmuted</codeph>. (The camera object's <codeph class="+ topic/ph pr-d/codeph ">mute</codeph> property is also
- set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.)</p>
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">statusHandler()</codeph> method, added to listen to the status change of the user's setting,
- invokes the <codeph class="+ topic/ph pr-d/codeph ">connectCamera()</codeph> method, if the user allows access. The <codeph class="+ topic/ph pr-d/codeph ">connectCamera()</codeph>
- method instantiates a video object with the captured stream's width and height. To display the
- camera's captured video, the reference to the video stream is attached to the video object, and the video
- object is added to the display list.</p>
-
- <p class="- topic/p ">A Timer object also is started. Every second, a Timer object's timer event is dispatched and the
- <codeph class="+ topic/ph pr-d/codeph ">timerHandler()</codeph> method is invoked. The <codeph class="+ topic/ph pr-d/codeph ">timerHandler()</codeph> method is displayed and updates
- a number of properties of the Camera object. </p>
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> For this example, the only property that changes
- is the <codeph class="+ topic/ph pr-d/codeph ">currentFPS</codeph> property.</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.media.Camera;
- import flash.media.Video;
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
- import flash.utils.Timer;
- import flash.events.TimerEvent;
- import flash.events.StatusEvent;
- import flash.events.MouseEvent;
- import flash.system.SecurityPanel;
- import flash.system.Security;
- public class Camera_getCameraExample extends Sprite {
- private var myTextField:TextField;
- private var cam:Camera;
- private var t:Timer = new Timer(1000);
-
- public function Camera_getCameraExample() {
- myTextField = new TextField();
- myTextField.x = 10;
- myTextField.y = 10;
- myTextField.background = true;
- myTextField.selectable = false;
- myTextField.autoSize = TextFieldAutoSize.LEFT;
-
- if (Camera.isSupported)
- {
- cam = Camera.getCamera();
-
- if (!cam) {
- myTextField.text = "No camera is installed.";
-
- } else if (cam.muted) {
- myTextField.text = "To enable the use of the camera,\n"
- + "please click on this text field.\n"
- + "When the Flash Player Settings dialog appears,\n"
- + "make sure to select the Allow radio button\n"
- + "to grant access to your camera.";
-
- myTextField.addEventListener(MouseEvent.CLICK, clickHandler);
-
- }else {
- myTextField.text = "Connecting";
- connectCamera();
- }
-
- addChild(myTextField);
-
- t.addEventListener(TimerEvent.TIMER, timerHandler);
- }else {
- myTextField.text = "The Camera class is not supported on this device.";
- }
- }
- private function clickHandler(e:MouseEvent):void {
- Security.showSettings(SecurityPanel.PRIVACY);
- cam.addEventListener(StatusEvent.STATUS, statusHandler);
- myTextField.removeEventListener(MouseEvent.CLICK, clickHandler);
- }
- private function statusHandler(event:StatusEvent):void {
- if (event.code == "Camera.Unmuted") {
- connectCamera();
- cam.removeEventListener(StatusEvent.STATUS, statusHandler);
- }
- }
- private function connectCamera():void {
- var vid:Video = new Video(cam.width, cam.height);
- vid.x = 10;
- vid.y = 10;
- vid.attachCamera(cam);
- addChild(vid);
- t.start();
- }
- private function timerHandler(event:TimerEvent):void {
- myTextField.y = cam.height + 20;
- myTextField.text = "";
- myTextField.appendText("bandwidth: " + cam.bandwidth + "\n");
- myTextField.appendText("currentFPS: " + Math.round(cam.currentFPS) + "\n");
- myTextField.appendText("fps: " + cam.fps + "\n");
- myTextField.appendText("keyFrameInterval: " + cam.keyFrameInterval + "\n");
- }
- }
- }
- </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/index" class="- topic/link "><linktext class="- topic/linktext ">index</linktext></link><link href="flash.media.xml#Camera/muted" class="- topic/link "><linktext class="- topic/linktext ">muted</linktext></link><link href="flash.media.xml#Camera/names" class="- topic/link "><linktext class="- topic/linktext ">names</linktext></link><link href="flash.media.xml#Camera/setMode()" class="- topic/link "><linktext class="- topic/linktext ">setMode()</linktext></link><link href="flash.media.xml#Camera/event:status" class="- topic/link "><linktext class="- topic/linktext ">status</linktext></link><link href="flash.media.xml#Video/attachCamera()" class="- topic/link "><linktext class="- topic/linktext ">Video.attachCamera()</linktext></link></related-links><adobeApiEvent id="flash.media:Camera:getCamera_status" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">status</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:StatusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched when a camera reports its status.
- Before accessing a camera, Flash Player displays a Privacy dialog box to let users
- allow or deny access to their camera. If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Camera.muted"</codeph>,
- the user has refused to allow the SWF file access to the user's camera.
- If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Camera.Unmuted"</codeph>,
- the user has allowed the SWF file access to the user's camera.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when a camera reports its status.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.media:Camera:setKeyFrameInterval" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setKeyFrameInterval</apiName><shortdesc class="- topic/shortdesc ">
- Specifies which video frames are transmitted in full (called keyframes)
- instead of being interpolated by the video compression algorithm.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">keyFrameInterval</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value that specifies which video frames are transmitted in full
- (as keyframes) instead of being interpolated by the video compression algorithm.
- A value of 1 means that every frame is a keyframe, a value of 3 means that every third frame
- is a keyframe, and so on. Acceptable values are 1 through 48.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies which video frames are transmitted in full (called <i class="+ topic/ph hi-d/i ">keyframes</i>)
- instead of being interpolated by the video compression algorithm. This method
- is applicable only if you are transmitting video using Flash Media Server.
-
- <p class="- topic/p ">The Flash Video compression algorithm compresses video by transmitting
- only what has changed since the last frame of the video; these portions are
- considered to be interpolated frames. Frames of a video can be interpolated according
- to the contents of the previous frame. A keyframe, however, is a video frame that
- is complete; it is not interpolated from prior frames.</p>
-
- <p class="- topic/p ">To determine how to set a value for the <codeph class="+ topic/ph pr-d/codeph ">keyFrameInterval</codeph> parameter,
- consider both bandwidth use and video playback accessibility. For example,
- specifying a higher value for <codeph class="+ topic/ph pr-d/codeph ">keyFrameInterval</codeph> (sending keyframes less frequently)
- reduces bandwidth use.
- However, this may increase the amount of time required to position the playhead
- at a particular point in the video; more prior video frames may have to be interpolated
- before the video can resume.</p>
-
- <p class="- topic/p ">Conversely, specifying a lower value for <codeph class="+ topic/ph pr-d/codeph ">keyFrameInterval</codeph>
- (sending keyframes more frequently) increases bandwidth use because entire video frames
- are transmitted more often, but may decrease the amount of time required to seek a
- particular video frame within a recorded video.</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/keyFrameInterval" class="- topic/link "><linktext class="- topic/linktext ">keyFrameInterval</linktext></link></related-links></apiOperation><apiOperation id="flash.media:Camera:setLoopback" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setLoopback</apiName><shortdesc class="- topic/shortdesc ">
- Specifies whether to use a compressed video stream for a local view of the camera.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">compress</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies whether to use a compressed video stream (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>)
- or an uncompressed stream (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>) for a local view of what the camera
- is receiving.
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies whether to use a compressed video stream for a local view of the camera.
- This method is applicable only if you are transmitting video using Flash Media Server;
- setting <codeph class="+ topic/ph pr-d/codeph ">compress</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> lets you see more precisely how the video
- will appear to users when they view it in real time.
-
- <p class="- topic/p ">Although a compressed stream is useful for testing purposes, such as previewing video
- quality settings, it has a significant processing cost, because the local view is not
- simply compressed; it is compressed, edited for transmission as it would be over a live
- connection, and then decompressed for local viewing.</p>
-
- <p class="- topic/p ">To set the amount of compression used when you set <codeph class="+ topic/ph pr-d/codeph ">compress</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
- use <codeph class="+ topic/ph pr-d/codeph ">Camera.setQuality()</codeph>.</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setQuality()" class="- topic/link "><linktext class="- topic/linktext ">setQuality()</linktext></link></related-links></apiOperation><apiOperation id="flash.media:Camera:setMode" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setMode</apiName><shortdesc class="- topic/shortdesc ">
- Sets the camera capture mode to the native mode that best meets the specified requirements.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.setMode, setMode
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">width</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The requested capture width, in pixels. The default value is 160.
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">height</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The requested capture height, in pixels. The default value is 120.
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">fps</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The requested rate at which the camera should capture data, in frames per second.
- The default value is 15.
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">favorArea</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">true</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies whether to manipulate the width, height, and frame rate if
- the camera does not have a native mode that meets the specified requirements.
- The default value is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, which means that maintaining capture size
- is favored; using this parameter selects the mode that most closely matches
- <codeph class="+ topic/ph pr-d/codeph ">width</codeph> and <codeph class="+ topic/ph pr-d/codeph ">height</codeph> values, even if doing so adversely affects
- performance by reducing the frame rate. To maximize frame rate at the expense
- of camera height and width, pass <codeph class="+ topic/ph pr-d/codeph ">false</codeph> for the <codeph class="+ topic/ph pr-d/codeph ">favorArea</codeph> parameter.
-
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Sets the camera capture mode to the native mode that best meets the specified requirements.
- If the camera does not have a native mode that matches all the parameters you pass,
- Flash Player selects a capture mode that most closely synthesizes the requested mode.
- This manipulation may involve cropping the image and dropping frames.
-
- <p class="- topic/p ">By default, Flash Player drops frames as needed to maintain image size. To minimize the number
- of dropped frames, even if this means reducing the size of the image, pass <codeph class="+ topic/ph pr-d/codeph ">false</codeph>
- for the <codeph class="+ topic/ph pr-d/codeph ">favorArea</codeph> parameter.</p>
-
- <p class="- topic/p ">When choosing a native mode, Flash Player tries to maintain the requested aspect ratio
- whenever possible. For example, if you issue the command <codeph class="+ topic/ph pr-d/codeph ">myCam.setMode(400, 400, 30)</codeph>,
- and the maximum width and height values available on the camera are 320 and 288, Flash Player sets
- both the width and height at 288; by setting these properties to the same value, Flash Player
- maintains the 1:1 aspect ratio you requested.</p>
-
- <p class="- topic/p ">To determine the values assigned to these properties after Flash Player selects the mode
- that most closely matches your requested values, use the <codeph class="+ topic/ph pr-d/codeph ">width</codeph>, <codeph class="+ topic/ph pr-d/codeph ">height</codeph>,
- and <codeph class="+ topic/ph pr-d/codeph ">fps</codeph> properties.</p>
-
- <p class="- topic/p ">
- If you are using Flash Media Server, you can also capture single frames or create time-lapse
- photography. For more information, see <codeph class="+ topic/ph pr-d/codeph ">NetStream.attachCamera()</codeph>.
- </p>
-
- </apiDesc><example conref="examples\Camera_setModeExample.as" class="- topic/example "> In the following example, when a user clicks on the Stage, the video
- is resized and the frames per second capture rate is set to a new value.
-
- <p class="- topic/p ">The Stage is set so it does not scale. The <codeph class="+ topic/ph pr-d/codeph ">Camera.getCamera()</codeph> method
- returns a reference to a camera object, or returns null if no camera is available or installed.
- If a camera exists, the <codeph class="+ topic/ph pr-d/codeph ">connectCamera()</codeph> method is called.
- The <codeph class="+ topic/ph pr-d/codeph ">connectCamera()</codeph> method instantiates a video object. To
- display the camera's captured video, the reference to the video stream is attached
- to the video object, and the video object is added to the display list. An event listener
- also is set for a <codeph class="+ topic/ph pr-d/codeph ">MouseEvent.CLICK</codeph> event. After the user clicks on the Stage,
- the <codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph> method is invoked. The method checks the width of the
- captured video and sets the camera capture mode's width, height, and the frame per second
- request rate. In order for these setting to take effect, the video object must be removed
- and re-created. The video's width and height also must be set to the camera object's width
- and height.</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.media.Camera;
- import flash.media.Video;
- import flash.events.MouseEvent;
- import flash.display.StageScaleMode;
- public class Camera_setModeExample extends Sprite {
- private var cam:Camera;
- private var vid:Video;
- public function Camera_setModeExample() {
- stage.scaleMode = StageScaleMode.NO_SCALE;
- cam = Camera.getCamera();
-
- if (!cam) {
- trace("No camera is installed.");
- }else {
- connectCamera();
- }
- }
- private function connectCamera():void {
- vid = new Video();
- vid.width = cam.width;
- vid.height = cam.height;
- vid.attachCamera(cam);
- addChild(vid);
- stage.addEventListener(MouseEvent.CLICK, clickHandler);
- }
-
- private function clickHandler(e:MouseEvent):void {
- switch (cam.width) {
- case 160:
- cam.setMode(320, 240, 10);
- break;
- case 320:
- cam.setMode(640, 480, 5);
- break;
- default:
- cam.setMode(160, 120, 15);
- break;
- }
- removeChild(vid);
- connectCamera();
- }
- }
- }
- </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/fps" class="- topic/link "><linktext class="- topic/linktext ">fps</linktext></link><link href="flash.media.xml#Camera/height" class="- topic/link "><linktext class="- topic/linktext ">height</linktext></link><link href="flash.media.xml#Camera/width" class="- topic/link "><linktext class="- topic/linktext ">width</linktext></link><link href="flash.net.xml#NetStream/attachCamera()" class="- topic/link "><linktext class="- topic/linktext ">flash.net.NetStream.attachCamera()</linktext></link></related-links></apiOperation><apiOperation id="flash.media:Camera:setMotionLevel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setMotionLevel</apiName><shortdesc class="- topic/shortdesc ">
- Specifies how much motion is required to dispatch the activity event.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.setMotionLevel, setMotionLevel
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">motionLevel</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies the amount of motion required to dispatch the
- <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event. Acceptable values range from 0 to 100. The default value is 50.
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">timeout</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">2000</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies how many milliseconds must elapse without activity
- before Flash Player considers activity to have stopped and dispatches the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event.
- The default value is 2000 milliseconds (2 seconds).
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies how much motion is required to dispatch the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event.
- Optionally sets the number of milliseconds that must elapse without activity before
- Flash Player considers motion to have stopped and dispatches the event.
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note: </b>Video can be displayed regardless of the value of the
- <codeph class="+ topic/ph pr-d/codeph ">motionLevel</codeph> parameter. This parameter determines only when and under
- what circumstances the event is dispatched—not whether video is actually being
- captured or displayed.</p>
- <p class="- topic/p ">
- To prevent the camera from detecting motion at all, pass a value of 100 for the
- <codeph class="+ topic/ph pr-d/codeph ">motionLevel</codeph> parameter; the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is never dispatched.
- (You would probably use this value only for testing purposes—for example, to
- temporarily disable any handlers that would normally be triggered when the event is dispatched.)
- </p>
- <p class="- topic/p ">
- To determine the amount of motion the camera is currently detecting, use the
- <codeph class="+ topic/ph pr-d/codeph ">activityLevel</codeph> property.
- Motion sensitivity values correspond directly to activity values.
- Complete lack of motion is an activity value of 0. Constant motion is an activity value of 100.
- Your activity value is less than your motion sensitivity value when you're not moving;
- when you are moving, activity values frequently exceed your motion sensitivity value.
- </p>
- <p class="- topic/p ">
- This method is similar in purpose to the <codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph> method;
- both methods are used to specify when the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event
- should be dispatched. However, these methods have a significantly different impact
- on publishing streams:
- </p>
-
- <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph> is designed to optimize bandwidth.
- When an audio stream is considered silent, no audio data is sent. Instead, a single message
- is sent, indicating that silence has started. </li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Camera.setMotionLevel()</codeph> is designed to detect motion and does not affect
- bandwidth usage. Even if a video stream does not detect motion, video is still sent.</li></ul>
-
-
-
- </apiDesc><example conref="examples\Camera_setMotionLevelExample.as" class="- topic/example "> In the following example, the user's camera is used as a monitor or
- a surveillance camera. The camera detects motion and a text field shows
- the activity level. (The example can be extended to sound an alarm or
- send a message through a web service to other applications.)
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">Camera.getCamera()</codeph> method returns a reference to a camera object,
- or returns null if no camera is available or installed. The if statement checks whether a camera
- is available, and invokes the <codeph class="+ topic/ph pr-d/codeph ">connectCamera()</codeph> method when it is available.
- The <codeph class="+ topic/ph pr-d/codeph ">connectCamera()</codeph> method instantiates a video object with the captured stream's
- width and height. To display the camera's captured video, the reference to the
- video stream is attached to the video object, and the video object is added to the display list.
- (Usually, when the <codeph class="+ topic/ph pr-d/codeph ">attachCamera()</codeph> method is invoked, a dialog box appears and
- prompts the user to allow or deny Flash Player access to the camera. However, if the
- user denied access and selected the <codeph class="+ topic/ph pr-d/codeph ">Remember</codeph> option, the dialog box does not appear
- and nothing is displayed. To make sure the user has the option to allow access to the camera, use the
- <codeph class="+ topic/ph pr-d/codeph ">system.Security.showSettings()</codeph> method to invoke the Flash Player
- Settings dialog box.)</p>
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">setMotionLevel()</codeph> method sets the level of activity (amount of motion), before
- the activity event is invoked, to five, for minimal motion. The time between when the camera stops
- detecting motion and when the activity event is invoked, is set to 1 second (1000 millisecond). After 1 second
- passes without activity or the level of activity reaches five, the <codeph class="+ topic/ph pr-d/codeph ">ActivityEvent.ACTIVITY</codeph>
- event is dispatched and the <codeph class="+ topic/ph pr-d/codeph ">activityHandler()</codeph> method is invoked. If the event
- was triggered by the level of activity, the <codeph class="+ topic/ph pr-d/codeph ">activating</codeph> property is set to
- <codeph class="+ topic/ph pr-d/codeph ">true</codeph> and a Timer object is started. Every second, a Timer object’s timer event
- is dispatched and the <codeph class="+ topic/ph pr-d/codeph ">timerHandler()</codeph> method is invoked, which displays the current
- level of activity. (Although a level of five or larger triggers the timer, the displayed
- current level of activity might be a smaller number.)</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.media.Camera;
- import flash.media.Video;
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
- import flash.utils.Timer;
- import flash.events.TimerEvent;
- import flash.events.ActivityEvent;
- public class Camera_setMotionLevelExample extends Sprite {
- private var myTextField:TextField;
- private var cam:Camera;
- private var t:Timer = new Timer(1000);
- public function Camera_setMotionLevelExample() {
- myTextField = new TextField();
- myTextField.background = true;
- myTextField.selectable = false;
- myTextField.autoSize = TextFieldAutoSize.LEFT;
-
- cam = Camera.getCamera();
-
- if (!cam) {
- myTextField.text = "No camera is installed.";
- }else {
- myTextField.text = "Waiting to connect.";
- connectCamera();
- }
- addChild(myTextField);
- t.addEventListener(TimerEvent.TIMER, timerHandler);
- }
- private function connectCamera():void {
- var vid:Video = new Video(cam.width, cam.height);
- vid.x = 10;
- vid.y = 10;
- vid.attachCamera(cam);
- addChild(vid);
- cam.setMotionLevel(5, 1000);
- cam.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
- }
- private function activityHandler(e:ActivityEvent):void {
- if (e.activating == true) {
- t.start();
- } else {
- myTextField.text = "Everything is quiet.";
- t.stop();
- }
- }
- private function timerHandler(event:TimerEvent):void {
- myTextField.x = 10;
- myTextField.y = cam.height + 20;
- myTextField.text = "There is some activity. Level: " + cam.activityLevel;
- }
- }
- }
- </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/motionLevel" class="- topic/link "><linktext class="- topic/linktext ">motionLevel</linktext></link><link href="flash.media.xml#Camera/motionTimeout" class="- topic/link "><linktext class="- topic/linktext ">motionTimeout</linktext></link><link href="flash.media.xml#Microphone/setSilenceLevel()" class="- topic/link "><linktext class="- topic/linktext ">Microphone.setSilenceLevel()</linktext></link></related-links></apiOperation><apiOperation id="flash.media:Camera:setQuality" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setQuality</apiName><shortdesc class="- topic/shortdesc ">
- Sets the maximum amount of bandwidth per second or the required picture quality
- of the current outgoing video feed.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera.setQuality, setQuality
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">bandwidth</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies the maximum amount of bandwidth that the current outgoing video
- feed can use, in bytes per second. To specify that Flash Player video can use as much bandwidth
- as needed to maintain the value of <codeph class="+ topic/ph pr-d/codeph ">quality</codeph>, pass 0 for
- <codeph class="+ topic/ph pr-d/codeph ">bandwidth</codeph>. The default value is 16384.
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">quality</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An integer that specifies the required level of picture quality,
- as determined by the amount of compression being applied to each video frame.
- Acceptable values range from 1 (lowest quality, maximum compression) to 100 (highest
- quality, no compression). To specify that picture quality can vary as needed to avoid
- exceeding bandwidth, pass 0 for <codeph class="+ topic/ph pr-d/codeph ">quality</codeph>.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Sets the maximum amount of bandwidth per second or the required picture quality
- of the current outgoing video feed. This method is generally applicable only if
- you are transmitting video using Flash Media Server.
-
- <p class="- topic/p ">Use this method to specify which element of the outgoing video feed is more
- important to your application—bandwidth use or picture quality.</p>
-
- <ul class="- topic/ul "><li class="- topic/li ">To indicate that bandwidth use takes precedence, pass a value for <codeph class="+ topic/ph pr-d/codeph ">bandwidth</codeph>
- and 0 for <codeph class="+ topic/ph pr-d/codeph ">quality</codeph>. Flash Player transmits video at the highest quality
- possible within the specified bandwidth. If necessary, Flash Player reduces picture
- quality to avoid exceeding the specified bandwidth. In general, as motion increases,
- quality decreases.</li><li class="- topic/li ">To indicate that quality takes precedence, pass 0 for <codeph class="+ topic/ph pr-d/codeph ">bandwidth</codeph>
- and a numeric value for <codeph class="+ topic/ph pr-d/codeph ">quality</codeph>. Flash Player uses as much bandwidth
- as required to maintain the specified quality. If necessary, Flash Player reduces the frame
- rate to maintain picture quality. In general, as motion increases, bandwidth use also
- increases.</li><li class="- topic/li ">To specify that both bandwidth and quality are equally important, pass numeric
- values for both parameters. Flash Player transmits video that achieves the specified quality
- and that doesn't exceed the specified bandwidth. If necessary, Flash Player reduces the
- frame rate to maintain picture quality without exceeding the specified bandwidth.</li></ul>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/getCamera()" class="- topic/link "><linktext class="- topic/linktext ">getCamera()</linktext></link><link href="flash.media.xml#Camera/quality" class="- topic/link "><linktext class="- topic/linktext ">quality</linktext></link></related-links></apiOperation><apiValue id="flash.media:Camera:activityLevel:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">activityLevel</apiName><shortdesc class="- topic/shortdesc ">
- The amount of motion the camera is detecting.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The amount of motion the camera is detecting. Values range from 0 (no motion is being detected) to
- 100 (a large amount of motion is being detected). The value of this property can help you determine if you need to pass a setting
- to the <codeph class="+ topic/ph pr-d/codeph ">setMotionLevel()</codeph> method.
- <p class="- topic/p ">If the camera is available but is not yet being used because the
- <codeph class="+ topic/ph pr-d/codeph ">Video.attachCamera()</codeph> method has not been called, this property
- is set to -1.</p>
- <p class="- topic/p ">If you are streaming only uncompressed local video, this property is set only if you have assigned a function to the event
- handler. Otherwise, it is undefined.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/motionLevel" class="- topic/link "><linktext class="- topic/linktext ">motionLevel</linktext></link><link href="flash.media.xml#Camera/setMotionLevel()" class="- topic/link "><linktext class="- topic/linktext ">setMotionLevel()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:bandwidth:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">bandwidth</apiName><shortdesc class="- topic/shortdesc ">
- The maximum amount of bandwidth the current outgoing video feed can use, in bytes.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.bandwidth, bandwidth
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The maximum amount of bandwidth the current outgoing video feed can use, in bytes.
- A value of 0 means the feed can use as much bandwidth as needed to maintain the desired frame quality.
- <p class="- topic/p ">To set this property, use the <codeph class="+ topic/ph pr-d/codeph ">setQuality()</codeph> method.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setQuality()" class="- topic/link "><linktext class="- topic/linktext ">setQuality()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:currentFPS:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">currentFPS</apiName><shortdesc class="- topic/shortdesc ">
- The rate at which the camera is capturing data, in frames per second.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.currentFPS, currentFPS
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The rate at which the camera is capturing data, in frames per second.
- This property cannot be set; however, you can use the <codeph class="+ topic/ph pr-d/codeph ">setMode()</codeph> method
- to set a related property—<codeph class="+ topic/ph pr-d/codeph ">fps</codeph>—which specifies the maximum
- frame rate at which you would like the camera to capture data.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setMode()" class="- topic/link "><linktext class="- topic/linktext ">setMode()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:fps:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">fps</apiName><shortdesc class="- topic/shortdesc ">
- The maximum rate at which the camera can capture data, in frames per second.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.fps, fps
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The maximum rate at which the camera can capture data, in frames per second.
- The maximum rate possible depends on the capabilities of the camera; this frame rate may not be achieved.
- <ul class="- topic/ul "><li class="- topic/li ">To set a desired value for this property, use the <codeph class="+ topic/ph pr-d/codeph ">setMode()</codeph> method.</li><li class="- topic/li ">To determine the rate at which the camera is currently capturing data, use the <codeph class="+ topic/ph pr-d/codeph ">currentFPS</codeph> property.</li></ul>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/currentFPS" class="- topic/link "><linktext class="- topic/linktext ">currentFPS</linktext></link><link href="flash.media.xml#Camera/setMode()" class="- topic/link "><linktext class="- topic/linktext ">setMode()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:height:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">height</apiName><shortdesc class="- topic/shortdesc ">
- The current capture height, in pixels.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.height, height
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The current capture height, in pixels. To set a value for this property,
- use the <codeph class="+ topic/ph pr-d/codeph ">setMode()</codeph> method.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/width" class="- topic/link "><linktext class="- topic/linktext ">width</linktext></link><link href="flash.media.xml#Camera/setMode()" class="- topic/link "><linktext class="- topic/linktext ">setMode()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:index:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">index</apiName><shortdesc class="- topic/shortdesc ">
- A zero-based integer that specifies the index of the camera, as reflected in
- the array returned by the names property.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.index, index
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A zero-based integer that specifies the index of the camera, as reflected in
- the array returned by the <codeph class="+ topic/ph pr-d/codeph ">names</codeph> property.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/names" class="- topic/link "><linktext class="- topic/linktext ">names</linktext></link><link href="flash.media.xml#Camera/getCamera()" class="- topic/link "><linktext class="- topic/linktext ">getCamera()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:isSupported:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isSupported</apiName><shortdesc class="- topic/shortdesc ">
- The isSupported property is set to true if the
- Camera class is supported on the current platform, otherwise it is
- set to false.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The <codeph class="+ topic/ph pr-d/codeph ">isSupported</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> if the
- Camera class is supported on the current platform, otherwise it is
- set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:Camera:keyFrameInterval:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">keyFrameInterval</apiName><shortdesc class="- topic/shortdesc ">
- The number of video frames transmitted in full (called keyframes)
- instead of being interpolated by the video compression algorithm.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The number of video frames transmitted in full (called <i class="+ topic/ph hi-d/i ">keyframes</i>)
- instead of being interpolated by the video compression algorithm.
- The default value is 15, which means that every 15th frame is a keyframe.
- A value of 1 means that every frame is a keyframe. The allowed values are
- 1 through 48.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setKeyFrameInterval()" class="- topic/link "><linktext class="- topic/linktext ">setKeyFrameInterval()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:loopback:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">loopback</apiName><shortdesc class="- topic/shortdesc ">
- Indicates whether a local view of what the camera is capturing is compressed
- and decompressed (true), as it would be for live transmission using
- Flash Media Server, or uncompressed (false).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Indicates whether a local view of what the camera is capturing is compressed
- and decompressed (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>), as it would be for live transmission using
- Flash Media Server, or uncompressed (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>). The default value is
- <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.
-
- <p class="- topic/p ">
- Although a compressed stream is useful for testing, such as when previewing
- video quality settings, it has a significant processing cost. The local view
- is compressed, edited for transmission as it would be over a live connection,
- and then decompressed for local viewing.
- </p>
-
- <p class="- topic/p ">To set this value, use <codeph class="+ topic/ph pr-d/codeph ">Camera.setLoopback()</codeph>. To set the amount of
- compression used when this property is true, use <codeph class="+ topic/ph pr-d/codeph ">Camera.setQuality()</codeph>.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setLoopback()" class="- topic/link "><linktext class="- topic/linktext ">setLoopback()</linktext></link><link href="flash.media.xml#Camera/setQuality()" class="- topic/link "><linktext class="- topic/linktext ">setQuality()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:motionLevel:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">motionLevel</apiName><shortdesc class="- topic/shortdesc ">
- The amount of motion required to invoke the activity event.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.motionLevel, motionLevel
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The amount of motion required to invoke the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event. Acceptable values range from 0 to 100.
- The default value is 50.
- <p class="- topic/p ">Video can be displayed regardless of the value of the <codeph class="+ topic/ph pr-d/codeph ">motionLevel</codeph> property. For more information, see <codeph class="+ topic/ph pr-d/codeph ">
- setMotionLevel()</codeph>.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setMotionLevel()" class="- topic/link "><linktext class="- topic/linktext ">setMotionLevel()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:motionTimeout:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">motionTimeout</apiName><shortdesc class="- topic/shortdesc ">
- The number of milliseconds between the time the camera stops detecting motion and the time the activity event is invoked.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.motionTimeout, motionTimeout
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The number of milliseconds between the time the camera stops detecting motion and the time the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is invoked. The
- default value is 2000 (2 seconds).
- <p class="- topic/p ">To set this value, use <codeph class="+ topic/ph pr-d/codeph ">setMotionLevel()</codeph>. </p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setMotionLevel()" class="- topic/link "><linktext class="- topic/linktext ">setMotionLevel()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:muted:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">muted</apiName><shortdesc class="- topic/shortdesc ">
- A Boolean value indicating whether the user has denied access to the camera
- (true) or allowed access (false) in the Flash Player Privacy dialog box.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.muted, muted
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A Boolean value indicating whether the user has denied access to the camera
- (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>) or allowed access (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>) in the Flash Player Privacy dialog box.
-
- When this value changes, the <codeph class="+ topic/ph pr-d/codeph ">status</codeph>event is dispatched.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/getCamera()" class="- topic/link "><linktext class="- topic/linktext ">getCamera()</linktext></link><link href="flash.media.xml#Camera/event:status" class="- topic/link "><linktext class="- topic/linktext ">status</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:name:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">name</apiName><shortdesc class="- topic/shortdesc ">
- The name of the current camera, as returned by the camera hardware.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.name, name
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The name of the current camera, as returned by the camera hardware.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/names" class="- topic/link "><linktext class="- topic/linktext ">names</linktext></link><link href="flash.media.xml#Camera/getCamera()" class="- topic/link "><linktext class="- topic/linktext ">getCamera()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:names:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">names</apiName><shortdesc class="- topic/shortdesc ">
- An array of strings indicating the names of all available cameras
- without displaying the Flash Player Privacy dialog box.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.names, names
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- An array of strings indicating the names of all available cameras
- without displaying the Flash Player Privacy dialog box. This array behaves in the
- same way as any other ActionScript array, implicitly providing the zero-based
- index of each camera and the number of cameras on the system (by means of
- <codeph class="+ topic/ph pr-d/codeph ">names.length</codeph>). For more information, see the <codeph class="+ topic/ph pr-d/codeph ">names</codeph> Array class entry.
-
- <p class="- topic/p ">Calling the <codeph class="+ topic/ph pr-d/codeph ">names</codeph> property requires an extensive examination of the hardware.
- In most cases, you can just use the default camera.</p>
-
- <p class="- topic/p ">On Android, only one camera is supported, even if the device has more than one camera devices. The
- name of the camera is always, "Default."</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/getCamera()" class="- topic/link "><linktext class="- topic/linktext ">getCamera()</linktext></link><link href="flash.media.xml#Camera/index" class="- topic/link "><linktext class="- topic/linktext ">index</linktext></link><link href="flash.media.xml#Camera/name" class="- topic/link "><linktext class="- topic/linktext ">name</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:quality:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">quality</apiName><shortdesc class="- topic/shortdesc ">
- The required level of picture quality, as determined by the amount of compression being applied to each video
- frame.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.quality, quality
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The required level of picture quality, as determined by the amount of compression being applied to each video
- frame. Acceptable quality values range from 1 (lowest quality, maximum compression) to 100 (highest quality, no compression). The
- default value is 0, which means that picture quality can vary as needed to avoid exceeding available bandwidth.
-
- <p class="- topic/p ">To set this property, use the <codeph class="+ topic/ph pr-d/codeph ">setQuality()</codeph> method.</p>
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setQuality()" class="- topic/link "><linktext class="- topic/linktext ">setQuality()</linktext></link></related-links></apiValue><apiValue id="flash.media:Camera:width:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">width</apiName><shortdesc class="- topic/shortdesc ">
- The current capture width, in pixels.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Camera, video, Camera.width, width
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The current capture width, in pixels. To set a desired value for this property,
- use the <codeph class="+ topic/ph pr-d/codeph ">setMode()</codeph> method.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setMode()" class="- topic/link "><linktext class="- topic/linktext ">setMode()</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:SoundTransform" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">SoundTransform</apiName><shortdesc class="- topic/shortdesc ">
- The SoundTransform class contains properties for volume and panning.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundTransform class contains properties for volume and panning.
-
- </apiDesc><example conref="examples\SoundTransformExample.as" class="- topic/example "> The following example loads and plays an MP3 file. As the MP3 file plays,
- move the mouse or other user input device; the
- volume and panning change as you move the user input device over the Stage.
- To run this example, place a file named MySound.mp3 in the same directory as your SWF file.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.display.StageAlign;
- import flash.display.StageScaleMode;
- import flash.events.*;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundTransform;
- import flash.net.URLRequest;
- import flash.utils.Timer;
- public class SoundTransformExample extends Sprite {
- private var url:String = "MySound.mp3";
- private var soundFactory:Sound;
- private var channel:SoundChannel;
- private var positionTimer:Timer;
- public function SoundTransformExample() {
- stage.align = StageAlign.TOP_LEFT;
- stage.scaleMode = StageScaleMode.NO_SCALE;
- var request:URLRequest = new URLRequest(url);
- soundFactory = new Sound();
- soundFactory.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
- soundFactory.load(request);
- channel = soundFactory.play();
- stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
- }
- private function ioErrorHandler(event:Event):void {
- trace("ioErrorHandler: " + event);
- }
- private function setPan(pan:Number):void {
- trace("setPan: " + pan.toFixed(2));
- var transform:SoundTransform = channel.soundTransform;
- transform.pan = pan;
- channel.soundTransform = transform;
- }
- private function setVolume(volume:Number):void {
- trace("setVolume: " + volume.toFixed(2));
- var transform:SoundTransform = channel.soundTransform;
- transform.volume = volume;
- channel.soundTransform = transform;
- }
- private function mouseMoveHandler(event:MouseEvent):void {
- var halfStage:uint = Math.floor(stage.stageWidth / 2);
- var xPos:uint = event.stageX;
- var yPos:uint = event.stageY;
- var value:Number;
- var pan:Number;
- if (xPos > halfStage) {
- value = xPos / halfStage;
- pan = value - 1;
- } else if (xPos < halfStage) {
- value = (xPos - halfStage) / halfStage;
- pan = value;
- } else {
- pan = 0;
- }
- var volume:Number = 1 - (yPos / stage.stageHeight);
- setVolume(volume);
- setPan(pan);
-
- }
- }
- }
- </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#SimpleButton/soundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.display.SimpleButton.soundTransform</linktext></link><link href="flash.display.xml#Sprite/soundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Sprite.soundTransform</linktext></link><link href="flash.media.xml#Microphone/soundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.soundTransform</linktext></link><link href="flash.media.xml#SoundChannel/soundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.media.SoundChannel.soundTransform</linktext></link><link href="flash.media.xml#SoundMixer/soundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.media.SoundMixer.soundTransform</linktext></link><link href="flash.net.xml#NetStream/soundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.net.NetStream.soundTransform</linktext></link></related-links><apiConstructor id="flash.media:SoundTransform:SoundTransform" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">SoundTransform</apiName><shortdesc class="- topic/shortdesc ">
- Creates a SoundTransform object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">vol</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">1</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The volume, ranging from 0 (silent) to 1 (full volume).
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">panning</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">0</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The left-to-right panning of the sound, ranging from -1 (full pan left)
- to 1 (full pan right). A value of 0 represents no panning (center).
-
-
- </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a SoundTransform object.
-
- </apiDesc><example conref="examples\SoundTransform_constructorExample.as" class="- topic/example "> In the following example, the sound plays only from the
- right channel, and the volume is set to 50 percent.
-
- <p class="- topic/p ">In the constructor, the sound is loaded and is assigned to a sound channel
- (<codeph class="+ topic/ph pr-d/codeph ">channel</codeph>). A SoundTranform object (<codeph class="+ topic/ph pr-d/codeph ">transform</codeph>) is also
- created. Its first argument sets the volume at 50 percent (the range is 0.0
- to 1.0). Its second argument sets the panning. In this example, panning is set to 1.0, which means
- the sound comes from the right speaker only. In order for these settings to
- take effect, the <codeph class="+ topic/ph pr-d/codeph ">transform</codeph> SoundTranform object is
- assigned to the sound channel's <codeph class="+ topic/ph pr-d/codeph ">souundTransform</codeph> property.</p>
- <p class="- topic/p "> <b class="+ topic/ph hi-d/b ">Note:</b> There is
- limited error handling written for this example.</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.net.URLRequest;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundTransform;
- import flash.events.IOErrorEvent;
- public class SoundTransform_constructorExample extends Sprite
- {
- public function SoundTransform_constructorExample() {
- var mySound:Sound = new Sound();
- var url:URLRequest = new URLRequest("mySound.mp3");
- var channel:SoundChannel;
- var transform:SoundTransform = new SoundTransform(0.5, 1.0);
- mySound.load(url);
- channel = mySound.play();
- channel.soundTransform = transform;
- mySound.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
- }
- private function errorHandler(errorEvent:IOErrorEvent):void {
- trace("The sound could not be loaded: " + errorEvent.text);
- }
- }
- }
- </codeblock></example></apiConstructorDetail></apiConstructor><apiValue id="flash.media:SoundTransform:leftToLeft:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">leftToLeft</apiName><shortdesc class="- topic/shortdesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the left input is played in the
- left speaker.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the left input is played in the
- left speaker.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundTransform:leftToRight:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">leftToRight</apiName><shortdesc class="- topic/shortdesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the left input is played in the
- right speaker.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the left input is played in the
- right speaker.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundTransform:pan:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">pan</apiName><shortdesc class="- topic/shortdesc ">
- The left-to-right panning of the sound, ranging from -1 (full pan left)
- to 1 (full pan right).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The left-to-right panning of the sound, ranging from -1 (full pan left)
- to 1 (full pan right). A value of 0 represents no panning (balanced center between
- right and left).
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundTransform:rightToLeft:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">rightToLeft</apiName><shortdesc class="- topic/shortdesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the right input is played in the
- left speaker.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the right input is played in the
- left speaker.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundTransform:rightToRight:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">rightToRight</apiName><shortdesc class="- topic/shortdesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the right input is played in the
- right speaker.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A value, from 0 (none) to 1 (all), specifying how much of the right input is played in the
- right speaker.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundTransform:volume:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">volume</apiName><shortdesc class="- topic/shortdesc ">
- The volume, ranging from 0 (silent) to 1 (full volume).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The volume, ranging from 0 (silent) to 1 (full volume).
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:StageVideoAvailability" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">StageVideoAvailability</apiName><shortdesc class="- topic/shortdesc ">
- This class defines an enumeration that indicates whether stage video is currently available.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">An enumeration that indicates whether stage video is currently available.
- </apiTipText></apiTipTexts><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- This class defines an enumeration that indicates whether stage video is currently available.
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.events.xml#StageVideoAvailabilityEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.StageVideoAvailabilityEvent</linktext></link></related-links><apiValue id="flash.media:StageVideoAvailability:AVAILABLE" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">AVAILABLE</apiName><shortdesc class="- topic/shortdesc ">
- Stage video is currently available.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">available</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Stage video is currently available.
- </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Stage video is currently available.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageVideoAvailability:UNAVAILABLE" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">UNAVAILABLE</apiName><shortdesc class="- topic/shortdesc ">
- Stage video is not currently available.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">unavailable</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Stage video is not currently available.
- </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Stage video is not currently available.
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:StageWebView" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">StageWebView</apiName><shortdesc class="- topic/shortdesc ">
- The StageWebView class displays HTML content in a stage view port.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The StageWebView class displays HTML content in a stage view port.
-
- <p class="- topic/p ">The StageWebView class provides a simple means to display HTML content on
- devices where the HTMLLoader class is not supported. The class provides no
- interaction between ActionScript and the HTML content except through
- the methods and properties of the StageWebView class itself. There is, for example,
- no way to pass values or call functions between ActionScript and JavaScript.</p>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
- on all desktop operating systems and mobile devices, but is not supported on AIR for TV devices. You can test
- for support at run time using the <codeph class="+ topic/ph pr-d/codeph ">StageWebView.isSupported</codeph> property. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
-
- <p class="- topic/p ">On devices in the mobile and extended mobile profiles, the StageWebView class uses
- the system web control provided by the device operating system. Thus, the available
- features and rendering appearance may vary from device to device. On desktop computers (in the
- desktop and extended desktop profiles), the StageWebView class uses the internal AIR
- WebKit engine. The features available and rendering appearance are the same as those of the
- HTMLLoader class (without the close integration and script bridging between ActionScript and
- JavaScript provided by an HTMLLoader instance). Test the <codeph class="+ topic/ph pr-d/codeph ">isSupported</codeph> property
- of the StageWebView class to determine whether the class is supported on the current device.</p>
-
- <p class="- topic/p ">The StageWebView class is NOT a display object and cannot be added to the Flash display list.
- Instead you display a StageWebView object by attaching it directly to a stage using the
- <codeph class="+ topic/ph pr-d/codeph ">stage</codeph> property. The StageWebView instance attached to a stage is displayed on top
- of any Flash display objects. You control the size and position of the rendering area with the
- <codeph class="+ topic/ph pr-d/codeph ">viewPort</codeph> property. There is no way to control the depth ordering of different
- StageWebView objects. Overlapping two instances is not recommended.</p>
-
- <p class="- topic/p ">When the content within the StageWebView object has focus, the StageWebView object has the first
- opportunity to handle keyboard input. The stage to which the StageWebView object is attached
- dispatches any keyboard input that is not handled. The normal event capture/bubble cycle does not
- apply here since the StageWebView instance is not part of the display list.</p>
-
- <p class="- topic/p ">In Android 3.0+, an application must enable hardware acceleration in the Android manifestAdditions
- element of the AIR application descriptor to display plug-in content in a StageWebView object.</p>
-
- </apiDesc><example conref="examples\StageWebViewExample.1.as" class="- topic/example "> The following example sets up a StageWebView object to fill the stage. The example
- loads a web site with the <codeph class="+ topic/ph pr-d/codeph ">loadURL()</codeph> method and uses the device Back and Search
- softkeys for history navigation.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.MovieClip;
- import flash.media.StageWebView;
- import flash.geom.Rectangle;
- import flash.events.KeyboardEvent;
- import flash.ui.Keyboard;
- import flash.desktop.NativeApplication;
-
- public class StageWebViewExample extends MovieClip{
- private var webView:StageWebView = new StageWebView();
-
- public function StageWebViewExample()
- {
- webView.stage = this.stage;
- webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
- webView.loadURL( "http://www.example.com" );
-
- stage.addEventListener( KeyboardEvent.KEY_DOWN, onKey );
- }
-
- private function onKey( event:KeyboardEvent ):void
- {
- if( event.keyCode == Keyboard.BACK && webView.isHistoryBackEnabled )
- {
- trace("Back.");
- webView.historyBack();
- event.preventDefault();
- }
- if( event.keyCode == Keyboard.SEARCH && webView.isHistoryForwardEnabled )
- {
- trace("Forward.");
- webView.historyForward();
- }
- }
- }
- }
- </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="../../flash/html/HTMLLoader.html" class="- topic/link "><linktext class="- topic/linktext ">HTMLLoader class</linktext></link><link href="http://www.flashmobileblog.com/2010/06/18/air-on-android-tweetrapp-video-walk-through/" class="- topic/link "><linktext class="- topic/linktext ">Mark Doherty: AIR on Android: TweetrApp</linktext></link><link href="http://www.flashmobileblog.com/2010/07/17/air2-5-stagewebview-demo-oauth-support/" class="- topic/link "><linktext class="- topic/linktext ">Mark Doherty: OAuth Support</linktext></link><link href="http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffe.html#WS365a66ad37c9f5102ec8a8ba12f2d91095a-8000" class="- topic/link "><linktext class="- topic/linktext ">Enabling Flash Player and other plug-ins in a StageWebView object</linktext></link></related-links><adobeApiEvent id="flash.media:StageWebView_flash.events.FocusEvent_focusOut" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">focusOut</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when the StageWebView relinquishes focus.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.FocusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when the StageWebView relinquishes focus.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:StageWebView_flash.events.FocusEvent_focusIn" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">focusIn</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when this StageWebView object receives focus.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.FocusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when this StageWebView object receives focus.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:StageWebView_flash.events.ErrorEvent_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><shortdesc class="- topic/shortdesc ">
- Signals that an error has occurred.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Signals that an error has occurred.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:StageWebView_flash.events.Event.COMPLETE_complete" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">complete</apiName><shortdesc class="- topic/shortdesc ">
- Signals that the last load operation requested by loadString() or
- loadURL() method has completed.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.COMPLETE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Signals that the last load operation requested by loadString() or
- load() method has completed.
-
- </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Signals that the last load operation requested by <codeph class="+ topic/ph pr-d/codeph ">loadString()</codeph> or
- <codeph class="+ topic/ph pr-d/codeph ">loadURL()</codeph> method has completed.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:StageWebView_flash.events.LocationChangeEvent.LOCATION_CHANGING_locationChanging" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">locationChanging</apiName><shortdesc class="- topic/shortdesc ">
- Signals that the location property of the StageWebView object is about to change.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.LocationChangeEvent.LOCATION_CHANGING</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.LocationChangeEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Signals that the location property of the StageWebView object is about to change.
-
- </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Signals that the <codeph class="+ topic/ph pr-d/codeph ">location</codeph> property of the StageWebView object is about to change.
-
- <p class="- topic/p ">A locationChanging event is only dispatched when the location change is initiated through
- HTML content or code running inside the StageWebView object,such as when a user clicks a link.
- By default, the new location is displayed in this
- StageWebView object. You can call the <codeph class="+ topic/ph pr-d/codeph ">preventDefault()</codeph> method of the event
- object to cancel the default behavior. For example, you could use the <codeph class="+ topic/ph pr-d/codeph ">flash.net.navigateToURL()</codeph>
- function to open the page in the system browser based on the <codeph class="+ topic/ph pr-d/codeph ">location</codeph>
- property of the event object</p>
-
- <p class="- topic/p ">A locationChanging event is not dispatched when you change the location with the following methods:</p>
- <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">historyBack()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">historyForward()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">historyGo()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">loadString()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">loadURL()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">reload()</codeph></li></ul>
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:StageWebView_flash.events.LocationChangeEvent.LOCATION_CHANGE_locationChange" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">locationChange</apiName><shortdesc class="- topic/shortdesc ">
- Signals that the location property of the StageWebView object has changed.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.LocationChangeEvent.LOCATION_CHANGE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.LocationChangeEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Signals that the location property of the StageWebView object has changed.
-
- </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Signals that the <codeph class="+ topic/ph pr-d/codeph ">location</codeph> property of the StageWebView object has changed.
-
- <p class="- topic/p ">The event cannot be canceled.</p>
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.media:StageWebView:StageWebView" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">StageWebView</apiName><shortdesc class="- topic/shortdesc ">
- Creates a StageWebView object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a StageWebView object.
-
- <p class="- topic/p ">The object is invisible until it is attached to a stage and until the <codeph class="+ topic/ph pr-d/codeph ">viewPort</codeph>
- is set.</p>
-
- </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.media:StageWebView:assignFocus" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">assignFocus</apiName><shortdesc class="- topic/shortdesc ">
- Assigns focus to the content within this StageWebView object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">direction</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">none</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">specifies whether the first or last focusable object
- in the displayed content should receive focus.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Assigns focus to the content within this StageWebView object.
-
- <p class="- topic/p ">Direction values are defined in FocusDirection class and include:
- "bottom", "none", and "top".</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#FocusDirection" class="- topic/link "><linktext class="- topic/linktext ">FocusDirection</linktext></link></related-links></apiOperation><apiOperation id="flash.media:StageWebView:dispose" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">dispose</apiName><shortdesc class="- topic/shortdesc ">
- Disposes of this StageWebView object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Disposes of this StageWebView object.
-
- <p class="- topic/p ">Calling <codeph class="+ topic/ph pr-d/codeph ">dispose()</codeph> is optional. If you do not maintain a reference to this
- StageWebView instance it will be eligible for garbage collection. Calling <codeph class="+ topic/ph pr-d/codeph ">dispose()</codeph>
- can make garbage collection occur sooner, or at a more convenient time.</p>
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:drawViewPortToBitmapData" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">drawViewPortToBitmapData</apiName><shortdesc class="- topic/shortdesc ">
- Draws the StageWebView's view port to a bitmap.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.6" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc "> The bitmap's width or height is different from view port's width or height.
- </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The bitmap is null.
- </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">Error</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Error</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">bitmap</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:BitmapData</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The BitmapData object on which to draw the visible portion of the StageWebView's view port.
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Draws the StageWebView's view port to a bitmap.
- <p class="- topic/p ">Capture the bitmap and set the stage to <codeph class="+ topic/ph pr-d/codeph ">null</codeph> for displaying the content above the StageWebView object. </p>
-
- </apiDesc><example conref="examples\StageWebView.bitmapcapture.as" class="- topic/example "> The following example displays two labels: google and facebook.
- Clicking on the label captures the corresponding web page and displays it as a snapshot on the stage.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package
- {
- import flash.display.Bitmap;
- import flash.display.BitmapData;
- import flash.display.Sprite;
- import flash.events.*;
- import flash.geom.Rectangle;
- import flash.media.StageWebView;
- import flash.net.*;
- import flash.text.TextField;
-
- public class stagewebview1 extends Sprite
- {
- public var webView:StageWebView = new StageWebView();
- public var textGoogle:TextField=new TextField();
- public var textFacebook:TextField=new TextField();
-
- public function stagewebview()
-
- {
- textGoogle.htmlText="<b>Google</b>";
- textGoogle.x=300;
- textGoogle.y=-80;
- addChild(textGoogle);
- textFacebook.htmlText="<b>Facebook</b>";
- textFacebook.x=0;
- textFacebook.y=-80;
- addChild(textFacebook);
- textGoogle.addEventListener(MouseEvent.CLICK,goGoogle);
- textFacebook.addEventListener(MouseEvent.CLICK,goFaceBook);
- webView.stage = this.stage;
- webView.viewPort = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
- }
-
- public function goGoogle(e:Event):void
-
- {
- webView.loadURL("http://www.google.com");
- webView.stage = null;
- webView.addEventListener(Event.COMPLETE,handleLoad);
- }
-
- public function goFaceBook(e:Event):void
- {
- webView.loadURL("http://www.facebook.com");
- webView.stage = null;
- webView.addEventListener(Event.COMPLETE,handleLoad);
- }
-
- public function handleLoad(e:Event):void
- {
- var bitmapData:BitmapData = new BitmapData(webView.viewPort.width, webView.viewPort.height);
- webView.drawViewPortToBitmapData(bitmapData);
- var webViewBitmap:Bitmap=new Bitmap(bitmapData);
- addChild(webViewBitmap);
- }
- }
- }
- </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:historyBack" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">historyBack</apiName><shortdesc class="- topic/shortdesc ">
- Navigates to the previous page in the browsing history.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Navigates to the previous page in the browsing history.
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:historyForward" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">historyForward</apiName><shortdesc class="- topic/shortdesc ">
- Navigates to the next page in the browsing history.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Navigates to the next page in the browsing history.
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:loadString" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">loadString</apiName><shortdesc class="- topic/shortdesc ">
- Loads and displays the specified HTML string.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">text</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">the string of HTML or XHTML content to display.
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">mimeType</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">text/html</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The MIME type of the content, either "text/html" or "application/xhtml+xml".
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Loads and displays the specified HTML string.
-
- <p class="- topic/p ">When the <codeph class="+ topic/ph pr-d/codeph ">loadString()</codeph> method is used, the <codeph class="+ topic/ph pr-d/codeph ">location</codeph>
- is reported as "about:blank." Only standard URI schemes can be used in URLs within
- the HTML string. The AIR URI schemes, "app:" and "app-storage:" are not allowed.</p>
-
- <p class="- topic/p ">The HTML content cannot load local resources, such as image files. XMLHttpRequests
- are not allowed.</p>
-
- <p class="- topic/p ">Only the "text/html" and "application/xhtml+xml" MIME types are supported.</p>
-
- </apiDesc><example conref="examples\StageWebView.loadString.1.as" class="- topic/example "> The following example sets up a StageWebView object to fill the stage. The example
- loads an HTML page with the <codeph class="+ topic/ph pr-d/codeph ">loadString()</codeph> method.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- var webView:StageWebView = new StageWebView();
- webView.stage = this.stage;
- webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
- var htmlString:String = "<!DOCTYPE HTML>" +
- "<html>" +
- "<body>" +
- "<h1>Example</h1>" +
- "<p>King Phillip cut open five green snakes.</p>" +
- "</body>" +
- "</html>";
- webView.loadString( htmlString, "text/html" );
- </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:loadURL" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">loadURL</apiName><shortdesc class="- topic/shortdesc ">
- Loads the page at the specified URL.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">url</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Loads the page at the specified URL.
-
- <p class="- topic/p ">The URL can use the following URI schemes: http:, https:, file:, data:, and javascript:.
- Content loaded with the file: scheme can load other local resources.</p>
-
- </apiDesc><example conref="examples\StageWebView.loadURL.1.as" class="- topic/example "> The following example sets up a StageWebView object to fill the stage. The example
- loads a web site with the <codeph class="+ topic/ph pr-d/codeph ">loadURL()</codeph> method.
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> On Android, you must specify the INTERNET permission in your AIR application
- descriptor to load remote URLs.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- var webView:StageWebView = new StageWebView();
- webView.stage = this.stage;
- webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
- webView.loadURL( "http://www.example.com" );
-
- </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:reload" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">reload</apiName><shortdesc class="- topic/shortdesc ">
- Reloads the current page.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reloads the current page.
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:StageWebView:stop" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">stop</apiName><shortdesc class="- topic/shortdesc ">
- Halts the current load operation.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Halts the current load operation.
-
- </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.media:StageWebView:isHistoryBackEnabled:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isHistoryBackEnabled</apiName><shortdesc class="- topic/shortdesc ">
- Reports whether there is a previous page in the browsing history.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reports whether there is a previous page in the browsing history.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageWebView:isHistoryForwardEnabled:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isHistoryForwardEnabled</apiName><shortdesc class="- topic/shortdesc ">
- Reports whether there is a next page in the browsing history.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reports whether there is a next page in the browsing history.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageWebView:isSupported:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isSupported</apiName><shortdesc class="- topic/shortdesc ">
- Reports whether the StageWebView class is supported on the current device.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reports whether the StageWebView class is supported on the current device.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageWebView:location:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">location</apiName><shortdesc class="- topic/shortdesc ">
- The URL of the current location.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The URL of the current location.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageWebView:stage:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">stage</apiName><shortdesc class="- topic/shortdesc ">
- The stage on which this StageWebView object is displayed.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.display:Stage</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The stage on which this StageWebView object is displayed.
-
- <p class="- topic/p ">Set <codeph class="+ topic/ph pr-d/codeph ">stage</codeph> to <codeph class="+ topic/ph pr-d/codeph ">null</codeph> to hide this StageWebView object.</p>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageWebView:title:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">title</apiName><shortdesc class="- topic/shortdesc ">
- The HTML title value.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The HTML title value.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:StageWebView:viewPort:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">viewPort</apiName><shortdesc class="- topic/shortdesc ">
- The area on the stage in which the StageWebView object is displayed.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.geom:Rectangle</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The Rectangle value is not valid.
- </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The area on the stage in which the StageWebView object is displayed.
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:VideoStatus" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">VideoStatus</apiName><shortdesc class="- topic/shortdesc ">
- This class defines an enumeration that describes possible levels of video decoding.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">An enumeration that describes possible levels of video decoding.
- </apiTipText></apiTipTexts><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- This class defines an enumeration that describes possible levels of video decoding.
- </apiDesc></apiClassifierDetail><apiValue id="flash.media:VideoStatus:ACCELERATED" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">ACCELERATED</apiName><shortdesc class="- topic/shortdesc ">
- Indicates hardware-accelerated (GPU) video decoding.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">accelerated</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Indicates hardware-accelerated (GPU) video decoding.
- </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Indicates hardware-accelerated (GPU) video decoding.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:VideoStatus:SOFTWARE" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">SOFTWARE</apiName><shortdesc class="- topic/shortdesc ">
- Indicates software video decoding.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">software</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Indicates software video decoding.
- </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Indicates software video decoding.
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:VideoStatus:UNAVAILABLE" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">UNAVAILABLE</apiName><shortdesc class="- topic/shortdesc ">
- Video decoding is not supported.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="(unsupported)" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">unavailable</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Video is not supported.
- </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Video decoding is not supported.
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:MediaPromise" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">MediaPromise</apiName><shortdesc class="- topic/shortdesc ">
- The MediaPromise class represents the promise to deliver a media object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseInterface>flash.desktop:IFilePromise</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The MediaPromise class represents the promise to deliver a media object.
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">data</codeph> property of a MediaEvent object is a MediaPromise
- instance. You can use the MediaPromise methods to access the promised media
- object. Supported media formats include still images and video.</p>
-
- <p class="- topic/p ">You cannot create a MediaPromise object. Calling <codeph class="+ topic/ph pr-d/codeph ">new MediaPromise()</codeph>
- generates a run-time error.</p>
-
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.events.xml#MediaEvent" class="- topic/link "><linktext class="- topic/linktext ">MediaEvent</linktext></link><link href="flash.desktop.xml#IFilePromise" class="- topic/link "><linktext class="- topic/linktext ">IFilePromise</linktext></link><link href="flash.display.xml#Loader/loadFilePromise()" class="- topic/link "><linktext class="- topic/linktext ">Loader.LoadFilePromise()</linktext></link><link href="flash.utils.xml#IDataInput" class="- topic/link "><linktext class="- topic/linktext ">IDataInput</linktext></link><link href="flash.media.xml#CameraRoll/browseForImage()" class="- topic/link "><linktext class="- topic/linktext ">CameraRoll.browseForImage()</linktext></link><link href="flash.media.xml#CameraUI" class="- topic/link "><linktext class="- topic/linktext ">CameraUI</linktext></link></related-links><adobeApiEvent id="flash.media:MediaPromise_flash.events.Event.COMPLETE_complete" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">complete</apiName><shortdesc class="- topic/shortdesc ">
- A MediaPromise object dispatches a complete event when all data has been read.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.COMPLETE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A MediaPromise object dispatches a <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event when all data has been read.
- The event indicates that there is no more data available in the underlying stream.
-
- <p class="- topic/p ">A <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event is not dispatched by a synchronous data source.</p>
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:MediaPromise_flash.events.ProgressEvent.PROGRESS_progress" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">progress</apiName><shortdesc class="- topic/shortdesc ">
- A MediaPromise object dispatches progress events as the data becomes available.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.ProgressEvent.PROGRESS</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.ProgressEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A MediaPromise object dispatches <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> events as the data becomes available.
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">bytesTotal</codeph> property of all progress events except the last has the value 0.
- If all the data is available immediately, no <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> events may be dispatched.
- No <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> events are dispatched by synchronous data sources.</p>
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:MediaPromise_flash.events.IOErrorEvent.IOERROR_ioError" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">ioError</apiName><shortdesc class="- topic/shortdesc ">
- A MediaPromise object dispatches an ioError event when an error is encountered while reading
- the underlying data stream.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.IOErrorEvent.IOERROR</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A MediaPromise object dispatches an <codeph class="+ topic/ph pr-d/codeph ">ioError</codeph> event when an error is encountered while reading
- the underlying data stream. No more data can be read after this event is dispatched.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:MediaPromise_flash.events.Event.CLOSE_close" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">close</apiName><shortdesc class="- topic/shortdesc ">
- A MediaPromise object dispatches a close event when the underlying data stream has closed.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.CLOSE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- A MediaPromise object dispatches a <codeph class="+ topic/ph pr-d/codeph ">close</codeph> event when the underlying data stream has closed.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><apiOperation id="flash.media:MediaPromise:close" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">close</apiName><shortdesc class="- topic/shortdesc ">
- Closes the data source.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Closes the data source.
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:MediaPromise:open" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">open</apiName><shortdesc class="- topic/shortdesc ">
- Opens the underlying data source and returns the IDataInput instance allowing you to read it.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><returns>the underlying data source.
-
- </returns></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.utils:IDataInput</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Opens the underlying data source and returns the IDataInput instance allowing you to read it.
-
- <p class="- topic/p ">If the underlying data source is asynchronous, then the MediaPromise object dispatches
- <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> and <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> events to indicate whether data is available
- to be read. If the data source is synchronous, all data is available immediately and these
- events are not dispatched.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> You can load a MediaPromise object using the <codeph class="+ topic/ph pr-d/codeph ">loadFilePromise()</codeph>
- method of the Loader class instead of reading the data manually.</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Loader/loadFilePromise()" class="- topic/link "><linktext class="- topic/linktext ">Loader.loadFilePromise()</linktext></link></related-links></apiOperation><apiOperation id="flash.media:MediaPromise:reportError" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">reportError</apiName><shortdesc class="- topic/shortdesc ">
- Used by the runtime to report errors.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">e</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.events:ErrorEvent</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">the error vent to dispatch.
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Used by the runtime to report errors.
-
- <p class="- topic/p ">Application code should not call this method.</p>
-
- </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.media:MediaPromise:file:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">file</apiName><shortdesc class="- topic/shortdesc ">
- The File instance representing the media object, if one exists.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The File instance representing the media object, if one exists.
-
- <p class="- topic/p ">This property references a File object if the underlying data source is file-based and the
- file is accessible to your application.
- Otherwise, the property is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:MediaPromise:isAsync:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isAsync</apiName><shortdesc class="- topic/shortdesc ">
- Reports whether the underlying data source is asynchronous or synchronous.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reports whether the underlying data source is asynchronous or synchronous.
-
- <p class="- topic/p "/>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:MediaPromise:mediaType:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">mediaType</apiName><shortdesc class="- topic/shortdesc ">
- The general type of media, either image or video.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The general type of media, either image or video.
-
- <p class="- topic/p ">The constants in the MediaType class define possible values of this property:</p>
- <ul class="- topic/ul "><li class="- topic/li ">MediaType.IMAGE</li><li class="- topic/li ">MediaType.VIDEO</li></ul>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#MediaType" class="- topic/link "><linktext class="- topic/linktext ">MediaType</linktext></link></related-links></apiValue><apiValue id="flash.media:MediaPromise:relativePath:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">relativePath</apiName><shortdesc class="- topic/shortdesc ">
- The file name of the media object, if one exists.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The file name of the media object, if one exists.
-
- <p class="- topic/p ">A file name is available if the underlying data source is file-based and the
- file is accessible to your application.
- Otherwise, the property is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:SoundLoaderContext" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">SoundLoaderContext</apiName><shortdesc class="- topic/shortdesc ">
- The SoundLoaderContext class provides security checks for files that load sound.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundLoaderContext class provides security checks for files that load sound.
- SoundLoaderContext objects are passed as an argument to the constructor and the
- <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method of the Sound class.
-
- <p class="- topic/p ">When you use this class, consider the following security model: </p>
-
- <ul class="- topic/ul "><li class="- topic/li ">Loading and playing a sound is not allowed if the calling file is in a network sandbox
- and the sound file to be loaded is local.</li><li class="- topic/li ">By default, loading and playing a sound is not allowed if the calling is local and
- tries to load and play a remote sound. A user must grant explicit permission to allow this.</li><li class="- topic/li ">Certain operations dealing with sound are restricted. The data in a loaded sound cannot
- be accessed by a file in a different domain unless you implement a URL policy file.
- Sound-related APIs that fall under this restriction are the <codeph class="+ topic/ph pr-d/codeph ">Sound.id3</codeph> property and the
- <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.computeSpectrum()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.bufferTime</codeph>,
- and <codeph class="+ topic/ph pr-d/codeph ">SoundTransform()</codeph> methods.</li></ul>
-
- <p class="- topic/p ">However, in Adobe AIR, content in the <codeph class="+ topic/ph pr-d/codeph ">application</codeph> security sandbox (content
- installed with the AIR application) are not restricted by these security limitations.</p>
-
- <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
- <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
-
- </apiDesc></apiClassifierDetail><apiConstructor id="flash.media:SoundLoaderContext:SoundLoaderContext" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">SoundLoaderContext</apiName><shortdesc class="- topic/shortdesc ">
- Creates a new sound loader context object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">bufferTime</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">1000</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The number of seconds to preload a streaming sound into a buffer
- before the sound starts to stream.
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">checkPolicyFile</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Specifies whether the existence of a URL policy file
- should be checked upon loading the object (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>) or not.
-
- </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a new sound loader context object.
-
- </apiDesc><example conref="examples\SoundLoaderContextExample.as" class="- topic/example "> In the following example, the buffer for the sound that will be loaded
- is set to three seconds.
-
- <p class="- topic/p ">The first parameter of a SoundLoaderContext object (<codeph class="+ topic/ph pr-d/codeph ">context</codeph>) is used to increase
- the default buffer value of one second to three seconds. (The value is in milliseconds.)
- If the second parameter of the SoundLoaderContext object is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
- Flash Player will check for a cross-domain policy file upon loading the object. Here it is
- set to the default value <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, so no policy file will be checked.
- The <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method of the sound object will use the context setting to make sure
- it will take three seconds to preload the streaming sound into a buffer before the sound starts
- to stream. The <codeph class="+ topic/ph pr-d/codeph ">URLRequest</codeph> object determines the location of the file, which is a
- podcast from Adobe. If an <codeph class="+ topic/ph pr-d/codeph ">IOErrorEvent.IO_ERROR</codeph> error occurs during the loading
- of the sound file, the <codeph class="+ topic/ph pr-d/codeph ">errorHandler()</codeph> method is invoked.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.net.URLRequest;
- import flash.media.Sound;
- import flash.media.SoundLoaderContext;
- import flash.events.IOErrorEvent;
-
- public class SoundLoaderContextExample extends Sprite {
- public function SoundLoaderContextExample() {
- var snd:Sound = new Sound();
- var req:URLRequest = new URLRequest("http://av.adobe.com/podcast/csbu_dev_podcast_epi_2.mp3");
- var context:SoundLoaderContext = new SoundLoaderContext(3000, false);
- snd.load(req, context);
- snd.play();
-
- snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
- }
- private function errorHandler(errorEvent:IOErrorEvent):void {
- trace("The sound could not be loaded: " + errorEvent.text);
- }
- }
- }
- </codeblock></example></apiConstructorDetail></apiConstructor><apiValue id="flash.media:SoundLoaderContext:bufferTime" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">bufferTime</apiName><shortdesc class="- topic/shortdesc ">
- The number of milliseconds to preload a streaming sound into a buffer
- before the sound starts to stream.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">1000</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The number of milliseconds to preload a streaming sound into a buffer
- before the sound starts to stream.
-
- <p class="- topic/p ">Note that you cannot override the value of <codeph class="+ topic/ph pr-d/codeph ">SoundLoaderContext.bufferTime</codeph>
- by setting the global <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.bufferTime</codeph> property.
- <ph class="- topic/ph ">The <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.bufferTime</codeph> property affects the buffer time
- for embedded streaming sounds in a SWF file and is independent of dynamically created
- Sound objects (that is, Sound objects created in ActionScript).</ph></p>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundLoaderContext:checkPolicyFile" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">checkPolicyFile</apiName><shortdesc class="- topic/shortdesc ">
- Specifies whether the application should try to download a URL policy file from the
- loaded sound's server before beginning to load the sound.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><internal>: please review at same time: checkPolicyFile property in LoaderContext, NetStream
- </internal></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies whether the application should try to download a URL policy file from the
- loaded sound's server before beginning to load the sound. This property applies to
- sound that is loaded from outside
- the calling file's own domain using the <codeph class="+ topic/ph pr-d/codeph ">Sound.load()</codeph> method.
-
-
-
- <p class="- topic/p ">Set this property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> when you load a sound from outside the
- calling file's own domain and code in the calling file needs low-level access to
- the sound's data. Examples of low-level access to a sound's data
- include referencing the <codeph class="+ topic/ph pr-d/codeph ">Sound.id3</codeph> property to get an
- ID3Info object or calling the <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.computeSpectrum()</codeph> method to get
- sound samples from the loaded sound. If you try to access sound data without
- setting the <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> at loading time,
- you may get a SecurityError exception because the required policy file has not been downloaded.</p>
-
- <p class="- topic/p ">If you don't need low-level access to the sound data that you are loading, avoid setting
- <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>. Checking for a policy file consumes
- network bandwidth
- and might delay the start of your download, so it should only be done when necessary.</p>
-
- <p class="- topic/p ">When you call <codeph class="+ topic/ph pr-d/codeph ">Sound.load()</codeph> with <codeph class="+ topic/ph pr-d/codeph ">SoundLoaderContext.checkPolicyFile</codeph> set
- to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, Flash Player or AIR must
- either successfully download a relevant URL policy file or determine that no such policy file
- exists before it begins downloading the specified sound.
- <ph class="- topic/ph ">Flash Player or</ph> AIR performs the following
- actions, in this order, to verify the existence of a policy file:</p>
-
- <ul class="- topic/ul "><li class="- topic/li ">Flash Player or AIR considers policy files that have already been downloaded.</li><li class="- topic/li ">Flash Player or AIR tries to download any pending policy files specified in calls to
- <codeph class="+ topic/ph pr-d/codeph ">Security.loadPolicyFile()</codeph>.</li><li class="- topic/li ">Flash Player or AIR tries to download a
- policy file from the default location that corresponds to the sound's URL, which is
- <codeph class="+ topic/ph pr-d/codeph ">/crossdomain.xml</codeph> on the same server as <codeph class="+ topic/ph pr-d/codeph ">URLRequest.url</codeph>.
- (The sound's URL is specified in the <codeph class="+ topic/ph pr-d/codeph ">url</codeph> property of the URLRequest object
- passed to <codeph class="+ topic/ph pr-d/codeph ">Sound.load()</codeph> or the Sound() constructor function.)</li></ul>
-
- <p class="- topic/p ">In all cases, Flash Player or AIR
- requires that an appropriate policy file exist on the sound's server, that it provide access
- to the sound file at <codeph class="+ topic/ph pr-d/codeph ">URLRequest.url</codeph> by virtue of the policy file's location, and
- that it allow the domain of the calling file to access the sound, through one or more
- <codeph class="+ topic/ph pr-d/codeph "><allow-access-from></codeph> tags.
- </p>
-
- <p class="- topic/p ">If you set <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
- Flash Player or AIR waits until the policy file is verified
- before loading the sound. You should wait to perform
- any low-level operations on the sound data, such as calling <codeph class="+ topic/ph pr-d/codeph ">Sound.id3</codeph> or
- <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.computeSpectrum()</codeph>, until <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> and <codeph class="+ topic/ph pr-d/codeph ">complete</codeph>
- events are dispatched from the Sound object.
- </p>
-
- <p class="- topic/p ">If you set <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> but no appropriate policy file is found,
- you will not receive an error until you perform an operation that requires
- a policy file, and then Flash Player or AIR throws a
- <codeph class="+ topic/ph pr-d/codeph ">SecurityError</codeph> exception. After you receive a <codeph class="+ topic/ph pr-d/codeph ">complete</codeph>
- event, you can test whether a relevant policy file was found by getting the value
- of <codeph class="+ topic/ph pr-d/codeph ">Sound.id3</codeph> within a <codeph class="+ topic/ph pr-d/codeph ">try</codeph> block and seeing if a
- <codeph class="+ topic/ph pr-d/codeph ">SecurityError</codeph> is thrown.</p>
-
-
- <p class="- topic/p ">Be careful with <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> if you are downloading sound from a URL that
- uses server-side HTTP redirects. Flash Player or AIR tries to retrieve policy files that
- correspond to the <codeph class="+ topic/ph pr-d/codeph ">url</codeph> property of the URLRequest object
- passed to <codeph class="+ topic/ph pr-d/codeph ">Sound.load()</codeph>. If the final
- sound file comes from a different URL because of HTTP redirects, then the initially downloaded
- policy files might not be applicable to the sound's final URL, which is the URL that matters
- in security decisions.</p>
-
- <p class="- topic/p ">If you find yourself in this situation, here is one possible solution.
- After you receive a <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> or <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event, you can examine the value of
- the <codeph class="+ topic/ph pr-d/codeph ">Sound.url</codeph> property, which contains the sound's final URL.
- Then call the <codeph class="+ topic/ph pr-d/codeph ">Security.loadPolicyFile()</codeph> method
- with a policy file URL that you calculate based on the sound's final URL. Finally, poll the value
- of <codeph class="+ topic/ph pr-d/codeph ">Sound.id3</codeph> until no exception is thrown.</p>
-
- <p class="- topic/p ">This does not apply to content in the AIR application sandbox.
- Content in the application sandbox always has programatic access to sound content, regardless
- of its origin.</p>
-
- <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
- <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Sound/load()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Sound.load()</linktext></link><link href="flash.media.xml#Sound/id3" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Sound.id3</linktext></link><link href="flash.media.xml#SoundMixer/computeSpectrum()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.SoundMixer.computeSpectrum()</linktext></link><link href="flash.media.xml#Sound/url" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Sound.url</linktext></link><link href="flash.system.xml#Security/loadPolicyFile()" class="- topic/link "><linktext class="- topic/linktext ">flash.system.Security.loadPolicyFile()</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:SoundChannel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">SoundChannel</apiName><shortdesc class="- topic/shortdesc ">
- The SoundChannel class controls a sound in an application.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundChannel class controls a sound in an application. Every sound
- is assigned to a sound channel, and the application can have multiple
- sound channels that are mixed together. The SoundChannel class contains a <codeph class="+ topic/ph pr-d/codeph ">stop()</codeph> method,
- properties for monitoring the amplitude (volume) of the channel, and a property for assigning a
- SoundTransform object to the channel.
-
- </apiDesc><example conref="examples\SoundChannelExample.as" class="- topic/example "> The following example loads an MP3 file, plays it, and displays
- information about sound events that take place as the MP3 file is loaded and played. A Timer
- object provides updated information about the position of the playhead every 50 milliseconds.
- To run this example, place a file named MySound.mp3 in the same directory as your SWF file.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.events.*;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.net.URLRequest;
- import flash.utils.Timer;
- public class SoundChannelExample extends Sprite {
- private var url:String = "MySound.mp3";
- private var soundFactory:Sound;
- private var channel:SoundChannel;
- private var positionTimer:Timer;
- public function SoundChannelExample() {
- var request:URLRequest = new URLRequest(url);
- soundFactory = new Sound();
- soundFactory.addEventListener(Event.COMPLETE, completeHandler);
- soundFactory.addEventListener(Event.ID3, id3Handler);
- soundFactory.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
- soundFactory.addEventListener(ProgressEvent.PROGRESS, progressHandler);
- soundFactory.load(request);
- channel = soundFactory.play();
- channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
- positionTimer = new Timer(50);
- positionTimer.addEventListener(TimerEvent.TIMER, positionTimerHandler);
- positionTimer.start();
- }
-
- private function positionTimerHandler(event:TimerEvent):void {
- trace("positionTimerHandler: " + channel.position.toFixed(2));
- }
- private function completeHandler(event:Event):void {
- trace("completeHandler: " + event);
- }
- private function id3Handler(event:Event):void {
- trace("id3Handler: " + event);
- }
- private function ioErrorHandler(event:Event):void {
- trace("ioErrorHandler: " + event);
- positionTimer.stop();
- }
- private function progressHandler(event:ProgressEvent):void {
- trace("progressHandler: " + event);
- }
- private function soundCompleteHandler(event:Event):void {
- trace("soundCompleteHandler: " + event);
- positionTimer.stop();
- }
- }
- }
- </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Sound" class="- topic/link "><linktext class="- topic/linktext ">Sound</linktext></link><link href="flash.media.xml#SoundTransform" class="- topic/link "><linktext class="- topic/linktext ">SoundTransform</linktext></link></related-links><adobeApiEvent id="flash.media:SoundChannel_flash.events.Event.SOUND_COMPLETE_soundComplete" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">soundComplete</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a sound has finished playing.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.SOUND_COMPLETE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a sound has finished playing.
- </apiDesc><example conref="examples\SoundChannel_event_soundCompleteExample.as" class="- topic/example "> In the following example, the user selects songs from a playlist,
- and then selects Play to play the song in the order selected.
-
- <p class="- topic/p ">In the constructor, a text field is defined that holds the song list
- and a line for the selection to play. (Usually, buttons are
- used for play and list boxes for a song list.) A text format object is
- defined that changes the format of the song lines to italic after they are
- selected. When a user selects the text field, the <codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph>
- method is invoked.</p>
-
- <p class="- topic/p ">In the <codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph> method, the <codeph class="+ topic/ph pr-d/codeph ">getLineIndexAtPoint()</codeph>
- method of the text field object returns the index of the line that the user selected. Using
- the line index, the <codeph class="+ topic/ph pr-d/codeph ">getLineText()</codeph> method gets the content of the text.
- The if statement checks whether the user selected to play a song or add a song to the
- play list. If a user selected to play and a song has been selected, then the event
- listener for mouse click is removed and the <codeph class="+ topic/ph pr-d/codeph ">playNext()</codeph> method is called to
- begin playing the songs. If the user selected a song title, the content of the
- line is added to the <codeph class="+ topic/ph pr-d/codeph ">songList</codeph> array and the format of the line is set to italic.</p>
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">playNext()</codeph> method iterates through the array list to load
- and play each song. The song is also assigned to a sound channel. An event listener
- for the sound channel is added to respond when the song finishes playing and the
- <codeph class="+ topic/ph pr-d/codeph ">Event.SOUND_COMPLETE</codeph> event is dispatched. The <codeph class="+ topic/ph pr-d/codeph ">soundCompleteHandler()</codeph>
- method then invokes the <codeph class="+ topic/ph pr-d/codeph ">playNext()</codeph> method to play the next song. This process
- continues until all the songs listed in the array finish playing.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
- import flash.events.MouseEvent;
- import flash.text.TextFormat;
- import flash.net.URLRequest;
- import flash.events.Event;
- import flash.events.IOErrorEvent;
- public class SoundChannel_event_soundCompleteExample extends Sprite {
- private var channel:SoundChannel = new SoundChannel();
- private var songList:Array = new Array();
- private var listTextField:TextField = new TextField();
- private var songFormat:TextFormat = new TextFormat();
- private var arrayIndex:int = 0;
- private var songSelected:Boolean = false;
-
- public function SoundChannel_event_soundCompleteExample() {
-
- listTextField.autoSize = TextFieldAutoSize.LEFT;
- listTextField.border = true
- listTextField.background = true;
- listTextField.text = "Song1.mp3\n" + "Song2.mp3\n"
- + "Song3.mp3\n" + "Song4.mp3\n" + "PLAY";
-
- songFormat.italic = true;
-
- listTextField.addEventListener(MouseEvent.CLICK, clickHandler);
-
- addChild(listTextField);
- }
-
- private function clickHandler(e:MouseEvent):void {
- var index:int = listTextField.getLineIndexAtPoint(e.localX, e.localY);
- var line:String = listTextField.getLineText(index);
- var firstIndex:uint = listTextField.getLineOffset(index);
- var playLine:uint = listTextField.numLines - 1;
- if((index == playLine) && (songSelected == true)) {
- listTextField.removeEventListener(MouseEvent.CLICK, clickHandler);
- playNext();
- } else if (index != playLine) {
- songList.push(line.substr(0, (line.length - 1)));
- listTextField.setTextFormat(songFormat, firstIndex,
- (firstIndex + listTextField.getLineLength(index)));
- songSelected = true;
- }
- }
- private function playNext():void {
-
- if(arrayIndex < songList.length) {
- var snd:Sound = new Sound();
- snd.load(new URLRequest(songList[arrayIndex]));
- channel = snd.play();
-
- channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
- arrayIndex++;
-
- } else {
- songSelected = false;
-
- while(arrayIndex > 0) {
- songList.pop();
- arrayIndex--;
- }
- }
- }
- private function soundCompleteHandler(e:Event):void {
- playNext();
- }
- private function errorHandler(errorEvent:IOErrorEvent):void {
- trace(errorEvent.text);
- }
- }
- }
- </codeblock></example></adobeApiEventDetail></adobeApiEvent><apiOperation id="flash.media:SoundChannel:stop" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">stop</apiName><shortdesc class="- topic/shortdesc ">
- Stops the sound playing in the channel.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Stops the sound playing in the channel.
-
- </apiDesc><example conref="examples\SoundChannel_stopExample.as" class="- topic/example "> In the following example, the user can pause and replay a sound file.
-
- <p class="- topic/p ">In the constructor, the sound file is loaded. (This example assumes that the file is
- in the same directory as the SWF file.) A text field is used as a button for the user
- to play or pause the sound. When the user selects the <codeph class="+ topic/ph pr-d/codeph ">button</codeph>
- text field, the <codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph> method is invoked.</p>
-
- <p class="- topic/p ">In the <codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph> method, the first time the user selects
- the text field, the sound is set to play and is assigned to a sound channel. Next, when
- the user selects the text field to pause, the sound stops playing. The sound channel's
- <codeph class="+ topic/ph pr-d/codeph ">position</codeph> property records the position of the sound at the
- time it was stopped. This property is used to resume the sound starting at that position, after
- the user selects the text field to start playing again. Each time the
- <codeph class="+ topic/ph pr-d/codeph ">Sound.play()</codeph> method is called, a new SoundChannel object is created and
- assigned to the <codeph class="+ topic/ph pr-d/codeph ">channel</codeph> variable. The Sound object must be
- assigned to a SoundChannel object in order to use the sound channel's
- <codeph class="+ topic/ph pr-d/codeph ">stop()</codeph> method to pause the sound.</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.net.URLLoader;
- import flash.net.URLRequest;
- import flash.text.TextField;
- import flash.events.MouseEvent;
- import flash.text.TextFieldAutoSize;
-
- public class SoundChannel_stopExample extends Sprite {
- private var snd:Sound = new Sound();
- private var channel:SoundChannel = new SoundChannel();
- private var button:TextField = new TextField();
- public function SoundChannel_stopExample() {
- var req:URLRequest = new URLRequest("MySound.mp3");
- snd.load(req);
-
- button.x = 10;
- button.y = 10;
- button.text = "PLAY";
- button.border = true;
- button.background = true;
- button.selectable = false;
- button.autoSize = TextFieldAutoSize.CENTER;
- button.addEventListener(MouseEvent.CLICK, clickHandler);
- this.addChild(button);
- }
- private function clickHandler(e:MouseEvent):void {
- var pausePosition:int = channel.position;
- if(button.text == "PLAY") {
- channel = snd.play(pausePosition);
- button.text = "PAUSE";
- }
- else {
- channel.stop();
- button.text = "PLAY";
- }
- }
- }
- }
- </codeblock></example></apiOperationDetail></apiOperation><apiValue id="flash.media:SoundChannel:leftPeak:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">leftPeak</apiName><shortdesc class="- topic/shortdesc ">
- The current amplitude (volume) of the left channel, from 0 (silent) to 1 (full amplitude).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The current amplitude (volume) of the left channel, from 0 (silent) to 1 (full amplitude).
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundChannel:position:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">position</apiName><shortdesc class="- topic/shortdesc ">
- When the sound is playing, the position property indicates in milliseconds the current point
- that is being played in the sound file.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- When the sound is playing, the <codeph class="+ topic/ph pr-d/codeph ">position</codeph> property indicates in milliseconds the current point
- that is being played in the sound file. When the sound is stopped or paused, the
- <codeph class="+ topic/ph pr-d/codeph ">position</codeph> property indicates the last point that was played in the sound file.
-
- <p class="- topic/p ">A common use case is to save the value of the <codeph class="+ topic/ph pr-d/codeph ">position</codeph> property when the
- sound is stopped. You can resume the sound later by restarting it from that saved position.
- </p>
-
- <p class="- topic/p ">If the sound is looped, <codeph class="+ topic/ph pr-d/codeph ">position</codeph> is reset to 0 at the beginning of each loop.</p>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundChannel:rightPeak:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">rightPeak</apiName><shortdesc class="- topic/shortdesc ">
- The current amplitude (volume) of the right channel, from 0 (silent) to 1 (full amplitude).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The current amplitude (volume) of the right channel, from 0 (silent) to 1 (full amplitude).
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundChannel:soundTransform:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">soundTransform</apiName><shortdesc class="- topic/shortdesc ">
- The SoundTransform object assigned to the sound channel.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.media:SoundTransform</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundTransform object assigned to the sound channel. A SoundTransform object
- includes properties for setting volume, panning, left speaker assignment, and right
- speaker assignment.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#SoundTransform" class="- topic/link "><linktext class="- topic/linktext ">SoundTransform</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:SoundMixer" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">SoundMixer</apiName><shortdesc class="- topic/shortdesc ">
- The SoundMixer class contains static properties and methods for global sound control
- in the application.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundMixer class contains static properties and methods for global sound control
- in the application. The SoundMixer class controls embedded and streaming sounds in the application.
- it does not control dynamically created sounds (that is, sounds generated in response
- to a Sound object dispatching a <codeph class="+ topic/ph pr-d/codeph ">sampleData</codeph> event).
- </apiDesc></apiClassifierDetail><apiOperation id="flash.media:SoundMixer:areSoundsInaccessible" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">areSoundsInaccessible</apiName><shortdesc class="- topic/shortdesc ">
- Determines whether any sounds are not accessible due to security restrictions.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The string representation of the boolean.
- </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Determines whether any sounds are not accessible due to security restrictions. For example,
- a sound loaded from a domain other than that of the content calling this method is not accessible if
- the server for the sound has no URL policy file that grants access to
- the domain of that domain. The sound can still be loaded and played, but low-level
- operations, such as getting ID3 metadata for the sound, cannot be performed on
- inaccessible sounds.
-
- <p class="- topic/p ">For AIR application content in the application security sandbox, calling this method always
- returns <codeph class="+ topic/ph pr-d/codeph ">false</codeph>. All sounds, including those loaded from other domains, are accessible
- to content in the application security sandbox.</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#SoundMixer/computeSpectrum()" class="- topic/link "><linktext class="- topic/linktext ">computeSpectrum()</linktext></link></related-links></apiOperation><apiOperation id="flash.media:SoundMixer:computeSpectrum" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">computeSpectrum</apiName><shortdesc class="- topic/shortdesc ">
- Takes a snapshot of the current sound wave and places it into the specified ByteArray object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><internal>Should confirm if the floating point numbers are single- or double-precision.
-
- </internal></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">outputArray</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.utils:ByteArray</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A ByteArray object that holds the values associated with the sound.
- If any sounds are not available due to security restrictions
- (<codeph class="+ topic/ph pr-d/codeph ">areSoundsInaccessible == true</codeph>), the <codeph class="+ topic/ph pr-d/codeph ">outputArray</codeph> object
- is left unchanged. If all sounds are stopped, the <codeph class="+ topic/ph pr-d/codeph ">outputArray</codeph> object is
- filled with zeros.
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">FFTMode</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">false</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Boolean value indicating whether a Fourier transformation is performed
- on the sound data first. Setting this parameter to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> causes the method to return a
- frequency spectrum instead of the raw sound wave. In the frequency spectrum, low frequencies
- are represented on the left and high frequencies are on the right.
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">stretchFactor</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">0</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The resolution of the sound samples.
- If you set the <codeph class="+ topic/ph pr-d/codeph ">stretchFactor</codeph> value to 0, data is sampled at 44.1 KHz;
- with a value of 1, data is sampled at 22.05 KHz; with a value of 2, data is sampled 11.025 KHz;
- and so on.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Takes a snapshot of the current sound wave and places it into the specified ByteArray object.
- The values are formatted as normalized floating-point values, in the range -1.0 to 1.0.
- The ByteArray object passed to the <codeph class="+ topic/ph pr-d/codeph ">outputArray</codeph> parameter is overwritten with the new values.
- The size of the ByteArray object created is fixed to 512 floating-point values, where the
- first 256 values represent the left channel, and the second 256 values represent
- the right channel.
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> This method is subject to local file security restrictions and
- restrictions on cross-domain loading. If you are working with local files or sounds loaded from a server in a
- different domain than the calling content, you might need to address sandbox restrictions
- through a cross-domain policy file. For more information, see the Sound class description.
- In addition, this method cannot be used to extract data from RTMP streams, even when
- it is called by content that reside in the same domain as the RTMP server.</p>
-
-
- <p class="- topic/p ">This method is supported over RTMP in Flash Player 9.0.115.0
- and later and in Adobe AIR. You can control access to streams on
- Flash Media Server in a server-side script. For more information, see the <codeph class="+ topic/ph pr-d/codeph ">Client.audioSampleAccess</codeph>
- and <codeph class="+ topic/ph pr-d/codeph ">Client.videoSampleAccess</codeph> properties in <xref href="http://www.adobe.com/go/documentation" scope="external" class="- topic/xref "><i class="+ topic/ph hi-d/i ">
- Server-Side ActionScript Language Reference for Adobe Flash Media Server</i></xref>.</p>
-
- </apiDesc><example conref="examples\SoundMixer_computeSpectrumExample.as" class="- topic/example "> In the following example, the <codeph class="+ topic/ph pr-d/codeph ">computeSpectrum()</codeph> method is
- used to produce a graphic representation of the sound wave data.
-
- <p class="- topic/p ">In the constructor, a sound file is loaded and set to play. (There is no error handling
- in this example and it is assumed that the sound file is in the same directory as the SWF file.)
- The example listens for the <codeph class="+ topic/ph pr-d/codeph ">Event.ENTER_FRAME</codeph> event while the sound plays, repeatedly
- triggering the <codeph class="+ topic/ph pr-d/codeph ">onEnterFrame()</codeph> method to draw a graph of the sound data values.
- When the sound finishes playing the <codeph class="+ topic/ph pr-d/codeph ">onPlaybackComplete()</codeph> method stops the drawing process
- by removing the listener for the <codeph class="+ topic/ph pr-d/codeph ">Event.ENTER_FRAME</codeph> event.</p>
-
- <p class="- topic/p ">In the <codeph class="+ topic/ph pr-d/codeph ">onEnterFrame()</codeph> method, the <codeph class="+ topic/ph pr-d/codeph ">computeSpectrum()</codeph> method stores the raw
- sound in the <codeph class="+ topic/ph pr-d/codeph ">bytes</codeph> byte array object. The data is sampled at 44.1 KHz.
- The byte array containing 512 bytes of data, each of which contains a floating-point value
- between -1 and 1. The first 256 values represent the left channel, and the second 256 values
- represent the right channel. The first for loop, reads the first 256 data values (the left stereo channel)
- and draws a line from each point to the next using the <codeph class="+ topic/ph pr-d/codeph ">Graphics.lineTo()</codeph> method. (The vector
- graphic display of the sound wave is written directly on to the class's sprite object.) The sound bytes
- are read as 32-bit floating-point number from the byte stream and multiplied by the plot height to allow
- for the vertical range of the graph. The width is set to twice the width of the channel length. The
- second for loop reads the next set of 256 values (the right stereo channel), and plots the lines in
- reverse order. The <codeph class="+ topic/ph pr-d/codeph ">g.lineTo(CHANNEL_LENGTH * 2, PLOT_HEIGHT);</codeph> and <codeph class="+ topic/ph pr-d/codeph ">g.lineTo(0, PLOT_HEIGHT);</codeph>
- methods draw the baseline for the waves. The resulting waveform plot produces a mirror-image effect.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.display.Graphics;
- import flash.events.Event;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundMixer;
- import flash.net.URLRequest;
- import flash.utils.ByteArray;
- import flash.text.TextField;
- public class SoundMixer_computeSpectrumExample extends Sprite {
- public function SoundMixer_computeSpectrumExample() {
- var snd:Sound = new Sound();
- var req:URLRequest = new URLRequest("Song1.mp3");
- snd.load(req);
-
- var channel:SoundChannel;
- channel = snd.play();
- addEventListener(Event.ENTER_FRAME, onEnterFrame);
- channel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
- }
- private function onEnterFrame(event:Event):void {
- var bytes:ByteArray = new ByteArray();
- const PLOT_HEIGHT:int = 200;
- const CHANNEL_LENGTH:int = 256;
- SoundMixer.computeSpectrum(bytes, false, 0);
-
- var g:Graphics = this.graphics;
-
- g.clear();
-
- g.lineStyle(0, 0x6600CC);
- g.beginFill(0x6600CC);
- g.moveTo(0, PLOT_HEIGHT);
-
- var n:Number = 0;
-
- for (var i:int = 0; i < CHANNEL_LENGTH; i++) {
- n = (bytes.readFloat() * PLOT_HEIGHT);
- g.lineTo(i * 2, PLOT_HEIGHT - n);
- }
- g.lineTo(CHANNEL_LENGTH * 2, PLOT_HEIGHT);
- g.endFill();
-
- g.lineStyle(0, 0xCC0066);
- g.beginFill(0xCC0066, 0.5);
- g.moveTo(CHANNEL_LENGTH * 2, PLOT_HEIGHT);
-
- for (i = CHANNEL_LENGTH; i > 0; i--) {
- n = (bytes.readFloat() * PLOT_HEIGHT);
- g.lineTo(i * 2, PLOT_HEIGHT - n);
- }
-
- g.lineTo(0, PLOT_HEIGHT);
- g.endFill();
- }
-
- private function onPlaybackComplete(event:Event):void {
- removeEventListener(Event.ENTER_FRAME, onEnterFrame);
- }
- }
- }
- </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#SoundMixer/areSoundsInaccessible()" class="- topic/link "><linktext class="- topic/linktext ">areSoundsInaccessible()</linktext></link><link href="flash.utils.xml#ByteArray" class="- topic/link "><linktext class="- topic/linktext ">flash.utils.ByteArray</linktext></link><link href="flash.media.xml#Sound" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Sound</linktext></link><link href="flash.media.xml#SoundLoaderContext/checkPolicyFile" class="- topic/link "><linktext class="- topic/linktext ">flash.media.SoundLoaderContext.checkPolicyFile</linktext></link></related-links></apiOperation><apiOperation id="flash.media:SoundMixer:stopAll" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">stopAll</apiName><shortdesc class="- topic/shortdesc ">
- Stops all sounds currently playing.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Stops all sounds currently playing.
-
- <p class="- topic/p ">>In Flash Professional, this method does not stop the playhead.
- Sounds set to stream will resume playing as the playhead moves over the frames in which they
- are located.</p>
-
- <p class="- topic/p ">When using this property, consider the following security model:</p>
-
- <ul class="- topic/ul "><li class="- topic/li "> By default, calling the <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.stopAll()</codeph> method stops
- only sounds in the same security sandbox as the object that is calling the method.
- Any sounds whose playback was not started from the same sandbox as the calling object
- are not stopped.</li><li class="- topic/li ">When you load the sound, using the <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method of the Sound class, you can
- specify a <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter, which is a SoundLoaderContext object. If you set the
- <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> property of the SoundLoaderContext object to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
- <ph class="- topic/ph ">Flash Player or</ph> Adobe AIR
- checks for a cross-domain policy file on the server from which the sound is loaded. If the server has a
- cross-domain policy file, and the file permits the domain of the calling content, then the file can stop the loaded
- sound by using the <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.stopAll()</codeph> method; otherwise it cannot.</li></ul>
-
- <p class="- topic/p ">However, in Adobe AIR, content in the <codeph class="+ topic/ph pr-d/codeph ">application</codeph> security sandbox (content
- installed with the AIR application) are not restricted by these security limitations.</p>
-
- <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
- <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
-
- </apiDesc><example conref="examples\SoundMixer_stopAllExample.as" class="- topic/example "> In the following example, the <codeph class="+ topic/ph pr-d/codeph ">stopAll()</codeph> method is used to mute two
- sounds that are playing at the same time.
-
- <p class="- topic/p ">In the constructor, two different sound files are loaded and set to play. The first sound is
- loaded locally and is assigned to a sound channel. (It is assumed that the file is
- in the same directory as the SWF file.) The second file is loaded and streamed from the Adobe
- site. In order to use the <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.stopAll()</codeph> method, all sound must be accessible.
- (A SoundLoaderContext object can be used to check for the cross-domain policy file.) Each sound
- also has an event listener that is invoked if an IO error occurred while loading the sound file.
- A <codeph class="+ topic/ph pr-d/codeph ">muteButton</codeph> text field is also created. It listens for a click event, which
- will invoke the <codeph class="+ topic/ph pr-d/codeph ">muteButtonClickHandler()</codeph> method.</p>
-
- <p class="- topic/p ">In the <codeph class="+ topic/ph pr-d/codeph ">muteButtonClickHandler()</codeph> method, if the text field content is "MUTE,"
- the <codeph class="+ topic/ph pr-d/codeph ">areSoundsInaccessible()</codeph> method checks if the sound mixer has access to the files.
- If the files are accessible, the <codeph class="+ topic/ph pr-d/codeph ">stopAll()</codeph> method stops the sounds. By selecting the
- text field again, the first sound begins playing and the text field's content changes to
- "MUTE" again. This time, the <codeph class="+ topic/ph pr-d/codeph ">stopAll()</codeph> method mutes the one sound that is running.
- Note that sound channel <codeph class="+ topic/ph pr-d/codeph ">stop()</codeph> method can also be used to stop a specific sound
- assigned to the channel. (To use the channel functionally, the sound needs to be reassigned
- to the channel each time the <codeph class="+ topic/ph pr-d/codeph ">play()</codeph> method is invoked.)</p>
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.net.URLRequest;
- import flash.media.Sound;
- import flash.media.SoundLoaderContext;
- import flash.media.SoundChannel;
- import flash.media.SoundMixer;
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
- import flash.events.MouseEvent;
- import flash.events.IOErrorEvent;
- public class SoundMixer_stopAllExample extends Sprite {
- private var firstSound:Sound = new Sound();
- private var secondSound:Sound = new Sound();
- private var muteButton:TextField = new TextField();
- private var channel1:SoundChannel = new SoundChannel();
-
- public function SoundMixer_stopAllExample() {
- firstSound.load(new URLRequest("mySound.mp3"));
- secondSound.load(new URLRequest("http://av.adobe.com/podcast/csbu_dev_podcast_epi_2.mp3"));
- firstSound.addEventListener(IOErrorEvent.IO_ERROR, firstSoundErrorHandler);
- secondSound.addEventListener(IOErrorEvent.IO_ERROR, secondSoundErrorHandler);
-
- channel1 = firstSound.play();
- secondSound.play();
-
- muteButton.autoSize = TextFieldAutoSize.LEFT;
- muteButton.border = true;
- muteButton.background = true;
- muteButton.text = "MUTE";
-
- muteButton.addEventListener(MouseEvent.CLICK, muteButtonClickHandler);
-
- this.addChild(muteButton);
- }
- private function muteButtonClickHandler(event:MouseEvent):void {
- if(muteButton.text == "MUTE") {
-
- if(SoundMixer.areSoundsInaccessible() == false) {
- SoundMixer.stopAll();
- muteButton.text = "click to play only one of sound.";
- }
- else {
- muteButton.text = "The sounds are not accessible.";
- }
- }
- else {
- firstSound.play();
- muteButton.text = "MUTE";
- }
- }
- private function firstSoundErrorHandler(errorEvent:IOErrorEvent):void {
- trace(errorEvent.text);
- }
- private function secondSoundErrorHandler(errorEvent:IOErrorEvent):void {
- trace(errorEvent.text);
- }
- }
- }
- </codeblock></example></apiOperationDetail></apiOperation><apiValue id="flash.media:SoundMixer:bufferTime:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">bufferTime</apiName><shortdesc class="- topic/shortdesc ">
- The number of seconds to preload an embedded streaming sound into a buffer before it starts
- to stream.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The number of seconds to preload an embedded streaming sound into a buffer before it starts
- to stream. The data in a loaded sound, including its buffer time,
- cannot be accessed by a SWF file that is in a different domain
- unless you implement a cross-domain policy file.
- For more information about security and sound, see the Sound class description.
- <ph class="- topic/ph ">The data in a loaded sound, including its buffer time,
- cannot be accessed by code in a file that is in a different domain
- unless you implement a cross-domain policy file. However, in the application sandbox
- in an AIR application, code can access data in sound files from any source.
- For more information about security and sound, see the Sound class description.</ph>
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.bufferTime</codeph> property only affects the buffer time
- for embedded streaming sounds in a SWF and is independent of dynamically created
- Sound objects (that is, Sound objects created in ActionScript).
- The value of <codeph class="+ topic/ph pr-d/codeph ">SoundMixer.bufferTime</codeph> cannot override
- or set the default of the buffer time specified in the SoundLoaderContext object
- that is passed to the <codeph class="+ topic/ph pr-d/codeph ">Sound.load()</codeph> method.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Sound" class="- topic/link "><linktext class="- topic/linktext ">Sound</linktext></link></related-links></apiValue><apiValue id="flash.media:SoundMixer:soundTransform:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">soundTransform</apiName><shortdesc class="- topic/shortdesc ">
- The SoundTransform object that controls global sound properties.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Lite" version="4" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><refpath>
-
- </refpath></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.media:SoundTransform</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundTransform object that controls global sound properties. A SoundTransform object
- includes properties for setting volume, panning, left speaker assignment, and right
- speaker assignment. The SoundTransform object used in this property provides final sound settings
- that are applied to all sounds after any individual sound settings are applied.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#SoundTransform" class="- topic/link "><linktext class="- topic/linktext ">SoundTransform</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:CameraUI" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">CameraUI</apiName><shortdesc class="- topic/shortdesc ">
- The CameraUI class allows you to capture a still image or video using the default camera application on a device.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The CameraUI class allows you to capture a still image or video using the default camera application on a device.
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">launch()</codeph> method requests that the device open the default camera application.
- The captured image or video is available in the MediaEvent object dispatched for the complete event.
- Since the default camera application can save the image or video in a variety of formats, there
- is no guarantee that returned media object can be loaded and displayed by the AIR runtime. </p>
-
- <p class="- topic/p ">On some platforms, the media object returned by the camera is accessible as a file-based media promise. On others,
- the media promise is not file-based and the <codeph class="+ topic/ph pr-d/codeph ">file</codeph> and <codeph class="+ topic/ph pr-d/codeph ">relativePath</codeph>
- properties of the MediaPromise object are <codeph class="+ topic/ph pr-d/codeph ">null</codeph>. Do not use these properties in
- code that is used on more than one platform.</p>
-
- <p class="- topic/p ">On some platforms, the media object is automatically stored in the device media library. On those
- platforms on which images and video are not automatically stored by the default camera application, you can use the
- CameraRoll <codeph class="+ topic/ph pr-d/codeph ">addBitmapData()</codeph> function to store the media object.</p>
-
- <p class="- topic/p ">On Android, the default camera application does not open if the external storage card is not available
- (such as when the user has mounted the card as a USB mass storage device). In addition, the AIR application
- that launches the camera loses focus. If the device runs low on resources, the AIR application can be
- terminated by the operating system before the media capture is complete.</p>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
- on mobile devices, but it is not supported on desktop operating systems or AIR for TV devices. You can test
- for support at run time using the <codeph class="+ topic/ph pr-d/codeph ">CameraUI.isSupported</codeph> property. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
-
- </apiDesc><example conref="examples\CameraUIExample.Still.1.as" class="- topic/example "> The following example uses the CameraUI class to launch the default camera
- application on the device. When a picture is taken by the user, the example places the
- image on the display list.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.desktop.NativeApplication;
- import flash.display.Loader;
- import flash.display.MovieClip;
- import flash.display.StageAlign;
- import flash.display.StageScaleMode;
- import flash.events.ErrorEvent;
- import flash.events.Event;
- import flash.events.IOErrorEvent;
- import flash.events.MediaEvent;
- import flash.media.CameraUI;
- import flash.media.MediaPromise;
- import flash.media.MediaType;
-
- public class CameraUIStillImage extends MovieClip{
- private var deviceCameraApp:CameraUI = new CameraUI();
- private var imageLoader:Loader;
-
- public function CameraUIStillImage() {
- this.stage.align = StageAlign.TOP_LEFT;
- this.stage.scaleMode = StageScaleMode.NO_SCALE;
-
- if( CameraUI.isSupported )
- {
- trace( "Initializing camera..." );
-
- deviceCameraApp.addEventListener( MediaEvent.COMPLETE, imageCaptured );
- deviceCameraApp.addEventListener( Event.CANCEL, captureCanceled );
- deviceCameraApp.addEventListener( ErrorEvent.ERROR, cameraError );
- deviceCameraApp.launch( MediaType.IMAGE );
- }
- else
- {
- trace( "Camera interface is not supported.");
- }
- }
-
- private function imageCaptured( event:MediaEvent ):void
- {
- trace( "Media captured..." );
-
- var imagePromise:MediaPromise = event.data;
-
- if( imagePromise.isAsync )
- {
- trace( "Asynchronous media promise." );
- imageLoader = new Loader();
- imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, asyncImageLoaded );
- imageLoader.addEventListener( IOErrorEvent.IO_ERROR, cameraError );
-
- imageLoader.loadFilePromise( imagePromise );
- }
- else
- {
- trace( "Synchronous media promise." );
- imageLoader.loadFilePromise( imagePromise );
- showMedia( imageLoader );
- }
- }
-
- private function captureCanceled( event:Event ):void
- {
- trace( "Media capture canceled." );
- NativeApplication.nativeApplication.exit();
- }
-
- private function asyncImageLoaded( event:Event ):void
- {
- trace( "Media loaded in memory." );
- showMedia( imageLoader );
- }
-
- private function showMedia( loader:Loader ):void
- {
- this.addChild( loader );
- }
-
- private function cameraError( error:ErrorEvent ):void
- {
- trace( "Error:" + error.text );
- NativeApplication.nativeApplication.exit();
- }
- }
- }
- </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="http://www.riagora.com/2010/07/android-air-and-the-camera/" class="- topic/link "><linktext class="- topic/linktext ">Michael Chaize: Android, AIR, and the Camera</linktext></link></related-links><adobeApiEvent id="flash.media:CameraUI_flash.events.Event.CANCEL_cancel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">cancel</apiName><shortdesc class="- topic/shortdesc ">
- The cancel event is dispatched when the user closes the Camera UI without
- saving a picture or video.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.CANCEL</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The <codeph class="+ topic/ph pr-d/codeph ">cancel</codeph> event is dispatched when the user closes the Camera UI without
- saving a picture or video.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:CameraUI_flash.events.ErrorEvent.ERROR_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><shortdesc class="- topic/shortdesc ">
- The error event is dispatched when the default camera cannot be opened.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.ErrorEvent.ERROR</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The <codeph class="+ topic/ph pr-d/codeph ">error</codeph> event is dispatched when the default camera cannot be opened.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:CameraUI_flash.events.MediaEvent.COMPLETE_complete" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">complete</apiName><shortdesc class="- topic/shortdesc ">
- The complete event is dispatched when the user either captures a still picture or
- video in the Camera UI.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.MediaEvent.COMPLETE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MediaEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event is dispatched when the user either captures a still picture or
- video in the Camera UI.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.media:CameraUI:CameraUI" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">CameraUI</apiName><shortdesc class="- topic/shortdesc ">
- Creates a CameraUI object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a CameraUI object.
-
- </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.media:CameraUI:launch" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">launch</apiName><shortdesc class="- topic/shortdesc ">
- Launches the default camera application on the device.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">requestedMediaType</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The type of media object to capture. The valid values for this parameter
- are defined in the MediaType class:
- <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">MediaType.IMAGE</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">MediaType.VIDEO</codeph></li></ul>
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Launches the default camera application on the device.
-
- <p class="- topic/p ">You can capture either still images or video with this class. Video capture uses the
- "Quality Low" camcorder profile on the device.</p>
-
- <p class="- topic/p ">When the <codeph class="+ topic/ph pr-d/codeph ">launch()</codeph> method is called, the default camera application on
- the device is invoked. The AIR application loses focus and waits for the user to
- capture a still image or to finish capturing video. Once the desired media is captured by the user,
- the AIR application regains focus and this CameraUI object dispatches a <codeph class="+ topic/ph pr-d/codeph ">complete</codeph>
- event. If the user cancels the operation, this CameraUI object dispatches a <codeph class="+ topic/ph pr-d/codeph ">cancel</codeph>
- event instead.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> It is possible for the AIR application to be shut down by the Android operating
- system while it is in the background waiting for the user to capture an image or video. If this happens,
- the user must restart the application. The AIR application does not dispatch a media event for the
- previous image capture.</p>
-
- <p class="- topic/p ">You can access the captured media file using the <codeph class="+ topic/ph pr-d/codeph ">data</codeph> property of the
- MediaEvent object dispatched for the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event. This property is an instance
- of the MediaPromise class, which you can load into your application using the
- <codeph class="+ topic/ph pr-d/codeph ">loadFilePromise()</codeph> method of the Loader class. Note that the device camera can
- save captured media in a variety of formats. Video is particularly problematic in this regard.
- It might not be possible to display the captured media in AIR.</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#MediaType" class="- topic/link "><linktext class="- topic/linktext ">MediaType</linktext></link><link href="flash.media.xml#MediaPromise" class="- topic/link "><linktext class="- topic/linktext ">MediaPromise</linktext></link><link href="flash.display.xml#Loader/loadFilePromise()" class="- topic/link "><linktext class="- topic/linktext ">Loader.loadFilePromise()</linktext></link></related-links><adobeApiEvent id="flash.media:CameraUI:launch_complete" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">complete</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:MediaEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched when a media object is captured.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when a media object is captured.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.media:CameraUI:launch_cancel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">cancel</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched when the user exits from the native camera without capturing a media object.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when the user exits from the native camera without capturing a media object.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.media:CameraUI:launch_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched if the default camera application is already in use.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched if the default camera application is already in use.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.media:CameraUI:launch_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched if the AIR application is in the background when it calls this function.
-
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched if the AIR application is in the background when it calls this function.</shortdesc></adobeApiEvent></apiOperation><apiValue id="flash.media:CameraUI:isSupported:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isSupported</apiName><shortdesc class="- topic/shortdesc ">
- Reports whether the CameraUI class is supported on the current device.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reports whether the CameraUI class is supported on the current device.
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:SoundCodec" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">SoundCodec</apiName><shortdesc class="- topic/shortdesc ">
- The SoundCodec class is an enumeration of constant values used in setting the codec property
- of the Microphone class.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The SoundCodec class is an enumeration of constant values used in setting the <codeph class="+ topic/ph pr-d/codeph ">codec</codeph> property
- of the <codeph class="+ topic/ph pr-d/codeph ">Microphone</codeph> class.
- </apiDesc></apiClassifierDetail><apiValue id="flash.media:SoundCodec:NELLYMOSER" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">NELLYMOSER</apiName><shortdesc class="- topic/shortdesc ">
- Specifies that the Nellymoser codec be used for compressing audio.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">NellyMoser</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies that the Nellymoser codec be used for compressing audio.
- This constant is the default value of the <codeph class="+ topic/ph pr-d/codeph ">Microphone.codec</codeph> property.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:SoundCodec:SPEEX" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">SPEEX</apiName><shortdesc class="- topic/shortdesc ">
- Specifies that the Speex codec be used for compressing audio.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiData class="- topic/ph reference/ph apiRef/apiData ">Speex</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies that the Speex codec be used for compressing audio.
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:CameraRoll" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">CameraRoll</apiName><shortdesc class="- topic/shortdesc ">
- The CameraRoll class allows you to access image data in the system media library or "camera roll."
- AIR profile support: This feature is supported
- on mobile devices, but it is not supported on desktop operating systems or AIR for TV devices.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The CameraRoll class allows you to access image data in the system media library or "camera roll."
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
- on mobile devices, but it is not supported on desktop operating systems or AIR for TV devices. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.addBitmapData()</codeph> method adds an image to the device's dedicated media library. To check at run time whether your
- application supports the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.addBitmapData()</codeph> method, check the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.supportsAddBitmapData</codeph> property.</p>
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.browseForImage()</codeph> method opens an image-choosing dialog that allows a user to choose an image in the
- media library. When the user selects an image, the CameraRoll object dispatches a <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event. Use the MediaEvent object
- dispatched for this event to access the chosen image. To check at run time whether your
- application supports the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.browseForImage()</codeph> method, check the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.supportsBrowseForImage</codeph> property.</p>
- </apiDesc></apiClassifierDetail><adobeApiEvent id="flash.media:CameraRoll_flash.events.Event.CANCEL_cancel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">cancel</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a user cancels a browse-for-image operation without selecting an image.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.CANCEL</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a user cancels a browse-for-image operation without selecting an image.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:CameraRoll_flash.events.MediaEvent.SELECT_select" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">select</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a user selects an image from the device media library.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.MediaEvent.SELECT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MediaEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a user selects an image from the device media library.
-
- <p class="- topic/p ">The MediaEvent object dispatched for this event provides access to the chosen media.</p>
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:CameraRoll_flash.events.ErrorEvent.ERROR_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><shortdesc class="- topic/shortdesc ">
- The error event is dispatched when an error occurs.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.ErrorEvent.ERROR</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The <codeph class="+ topic/ph pr-d/codeph ">error</codeph> event is dispatched when an error occurs.
-
- <p class="- topic/p ">Sources of errors include:</p>
- <ul class="- topic/ul "><li class="- topic/li ">An image browser cannot be opened.</li><li class="- topic/li ">An image browser is already in use.</li><li class="- topic/li ">The AIR application attempts to browse for an image while in the background.</li><li class="- topic/li ">An image cannot be added to the media library.</li><li class="- topic/li ">A method is called that is not supported on the device.</li></ul>
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.media:CameraRoll_flash.events.Event.COMPLETE_complete" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">complete</apiName><shortdesc class="- topic/shortdesc ">
- Signals that an addBitmapData() operation completed successfully.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.Event.COMPLETE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Signals that an addBitmapData() operation completed successfully.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.media:CameraRoll:CameraRoll" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation apiOperation/apiConstructor"><apiName class="- topic/title reference/title apiRef/apiName ">CameraRoll</apiName><shortdesc class="- topic/shortdesc ">
- Creates a CameraRoll object.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiConstructorDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail apiOperation/apiConstructorDetail"><apiConstructorDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiConstructorDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Creates a CameraRoll object.
-
- <p class="- topic/p ">There is only a single media library supported by ActionScript. All CameraRoll objects
- save to the same image repository.</p>
-
- </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.media:CameraRoll:addBitmapData" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">addBitmapData</apiName><shortdesc class="- topic/shortdesc ">
- Adds an image to the device camera roll.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">bitmapData</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:BitmapData</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">a BitmapData object containing the image to send to the camera roll.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Adds an image to the device camera roll.
-
-
- <p class="- topic/p ">To check at run time whether your application supports the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.addBitmapData()</codeph> method,
- check the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.supportsAddBitmapData</codeph> property.</p>
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:CameraRoll:browseForImage" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">browseForImage</apiName><shortdesc class="- topic/shortdesc ">
- Opens an image browser dialog to allow the user to select an existing image from the device camera roll.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Opens an image browser dialog to allow the user to select an existing image from the device camera roll.
-
- <p class="- topic/p ">When the user selects an image, this CameraRoll instance dispatches a <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event containing a MediaEvent
- object. Use the <codeph class="+ topic/ph pr-d/codeph ">data</codeph> property of the MediaEvent object to load the image. The <codeph class="+ topic/ph pr-d/codeph ">data</codeph> property
- is a MediaPromise object, which you can load using the <codeph class="+ topic/ph pr-d/codeph ">loadFilePromise()</codeph> method of the Loader class.</p>
-
- <p class="- topic/p ">To check at run time whether your application supports the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.browseForImage()</codeph> method,
- check the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.supportsBrowseForImage</codeph> property.</p>
-
- </apiDesc><example conref="examples\CameraRoll_browseForImage_1.as" class="- topic/example "><codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">package flash.media.examples
- {
- import flash.media.CameraRoll;
- import flash.media.MediaPromise;
- import flash.media.MediaType;
- import flash.events.MediaEvent;
- import flash.events.Event;
- import flash.display.Loader;
- import flash.display.Sprite;
- import flash.events.IOErrorEvent;
- import flash.display.StageAlign;
- import flash.display.StageScaleMode;
-
- public class CameraRollTest extends Sprite{
- private var mediaSource:CameraRoll = new CameraRoll();
-
- public function CameraRollTest() {
- this.stage.align = StageAlign.TOP_LEFT;
- this.stage.scaleMode = StageScaleMode.NO_SCALE;
-
- if( CameraRoll.supportsBrowseForImage )
- {
- log( "Browsing for image..." );
- mediaSource.addEventListener( MediaEvent.SELECT, imageSelected );
- mediaSource.addEventListener( Event.CANCEL, browseCanceled );
-
- mediaSource.browseForImage();
- }
- else
- {
- log( "Browsing in camera roll is not supported.");
- }
- }
-
- private var imageLoader:Loader;
- private function imageSelected( event:MediaEvent ):void
- {
- log( "Image selected..." );
-
- var imagePromise:MediaPromise = event.data;
-
- imageLoader = new Loader();
- if( imagePromise.isAsync )
- {
- log( "Asynchronous media promise." );
- imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, imageLoaded );
- imageLoader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, imageLoadFailed );
- imageLoader.loadFilePromise( imagePromise );
- }
- else
- {
- log( "Synchronous media promise." );
- imageLoader.loadFilePromise( imagePromise );
- this.addChild( imageLoader );
- }
- }
-
- private function browseCanceled( event:Event ):void
- {
- log( "Image browse canceled." );
- }
-
- private function imageLoaded( event:Event ):void
- {
- log( "Image loaded asynchronously." );
- this.addChild( imageLoader );
- }
-
- private function imageLoadFailed( event:Event ):void
- {
- log( "Image load failed." );
- }
-
- private function log( text:String ):void
- {
- trace( text );
- }
-
- }
-
- }
- </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.events.xml#MediaEvent" class="- topic/link "><linktext class="- topic/linktext ">MediaEvent</linktext></link><link href="flash.media.xml#MediaPromise" class="- topic/link "><linktext class="- topic/linktext ">MediaPromise</linktext></link><link href="flash.display.xml#Loader/loadFilePromise()" class="- topic/link "><linktext class="- topic/linktext ">Loader.loadFilePromise()</linktext></link></related-links><adobeApiEvent id="flash.media:CameraRoll:browseForImage_select" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">select</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:MediaEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched when the user chooses an image.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when the user chooses an image.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.media:CameraRoll:browseForImage_cancel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">cancel</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched when a user cancels the browse operation.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when a user cancels the browse operation.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.media:CameraRoll:browseForImage_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched if the default image browser application is already in use.
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched if the default image browser application is already in use.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.media:CameraRoll:browseForImage_error" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">error</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched if the AIR application is in the background when it calls this function.
-
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched if the AIR application is in the background when it calls this function.</shortdesc></adobeApiEvent></apiOperation><apiValue id="flash.media:CameraRoll:supportsAddBitmapData:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">supportsAddBitmapData</apiName><shortdesc class="- topic/shortdesc ">
- Whether the CameraRoll.addBitmapData() method is supported.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Whether the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.addBitmapData()</codeph> method is supported. Currently, the feature
- is only supported in AIR applications on mobile devices.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:CameraRoll:supportsBrowseForImage:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">supportsBrowseForImage</apiName><shortdesc class="- topic/shortdesc ">
- Reports whether the CameraRoll.browseForImage() method is supported.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Reports whether the CameraRoll browseForImage() method is supported.
- </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Reports whether the <codeph class="+ topic/ph pr-d/codeph ">CameraRoll.browseForImage()</codeph> method is supported. Currently, the feature
- is only supported in AIR applications on mobile devices.
-
- </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:Microphone" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">Microphone</apiName><shortdesc class="- topic/shortdesc ">
- Use the Microphone class to monitor or capture audio from a microphone.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound
- </keyword></asCustoms></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiFinal class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiFinal "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Use the Microphone class to monitor or capture audio from a microphone.
-
- <p class="- topic/p ">
- To get a reference to a Microphone instance, use the <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph> method
- or the <codeph class="+ topic/ph pr-d/codeph ">Microphone.getEnhancedMicrophone()</codeph> method. An enhanced microphone instance can
- perform acoustic echo cancellation. Use acoustic echo cancellation to create real-time audio/video applications
- that don't require headsets.
- </p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Create a real-time chat application</b></p>
- <p class="- topic/p ">To create a real-time chat application, capture audio and send it to Flash Media Server.
- Use the NetConnection and NetStream classes to send the audio stream to Flash Media Server.
- Flash Media Server can broadcast the audio to other clients.
- To create a chat application that doesn't require headsets, use acoustic echo
- cancellation. Acoustic echo cancellation prevents the feedback loop that occurs when audio enters a microphone,
- travels out the speakers, and enters the microphone again. To use acoustic echo cancellation, call
- the <codeph class="+ topic/ph pr-d/codeph ">Microphone.getEnhancedMicrophone()</codeph> method to get a reference to a Microphone instance.
- Set <codeph class="+ topic/ph pr-d/codeph ">Microphone.enhancedOptions</codeph> to an instance of the <codeph class="+ topic/ph pr-d/codeph ">MicrophoneEnhancedOptions</codeph> class to
- configure settings.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Play microphone audio locally</b></p>
- <p class="- topic/p ">Call the Microphone <codeph class="+ topic/ph pr-d/codeph ">setLoopback()</codeph> method to route the microphone audio directly to
- the local computer or device audio output. Uncontrolled audio feedback is an inherent danger and is likely
- to occur whenever the audio output can be picked up by the microphone input. The
- <codeph class="+ topic/ph pr-d/codeph ">setUseEchoSuppression()</codeph> method can reduce, but not eliminate, the risk of feedback
- amplification.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Capture microphone audio for local recording or processing</b></p>
- <p class="- topic/p ">To capture microphone audio, listen for the <codeph class="+ topic/ph pr-d/codeph ">sampleData</codeph> events dispatched by a
- Microphone instance. The SampleDataEvent object dispatched for this event contains the audio data.</p>
-
- <p class="- topic/p ">For information about capturing video, see the Camera class.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Runtime microphone support</b></p>
- <p class="- topic/p ">The Microphone class is not supported in Flash Player running in a mobile browser.</p>
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> The Microphone class is supported
- on desktop operating systems, but it is not supported on all mobile devices.
- It is not supported on AIR for TV devices. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
-
- <p class="- topic/p ">You can test for support at run time using the <codeph class="+ topic/ph pr-d/codeph ">Microphone.isSupported</codeph> property.
- Note that for AIR for TV devices, <codeph class="+ topic/ph pr-d/codeph ">Microphone.isSupported</codeph> is <codeph class="+ topic/ph pr-d/codeph ">true</codeph> but
- <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph> always returns <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Privacy controls</b></p>
- <p class="- topic/p ">
- Flash Player displays a Privacy dialog
- box that lets the user choose whether to allow or deny access to
- the microphone. Your application window size must be at least 215 x 138
- pixels, the minimum size required to display the dialog box, or access is denied automatically.
- </p>
- <p class="- topic/p ">Content running in the AIR application sandbox does not need permission to access the microphone
- and no dialog is displayed. AIR content running outside the application sandbox does require permission
- and the Privacy dialog is displayed.</p>
-
- </apiDesc><example conref="examples\MicrophoneExample.as" class="- topic/example "> The following example captures sound using echo suppression from a microphone after the
- user allows access to their computer's microphone.
- The <codeph class="+ topic/ph pr-d/codeph ">Security.showSettings()</codeph> method displays the Flash Player dialog box, which requests
- permission to access the user's microphone. The call to <codeph class="+ topic/ph pr-d/codeph ">setLoopBack(true)</codeph> reroutes
- input to the local speaker, so you can hear the sound while you run the example.
-
- <p class="- topic/p ">Two listeners listen for <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> and
- <codeph class="+ topic/ph pr-d/codeph ">status</codeph> events. The <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is dispatched at the
- start and end (if any) of the session and is captured by the <codeph class="+ topic/ph pr-d/codeph ">activityHandler()</codeph>
- method, which traces information on the event. The <codeph class="+ topic/ph pr-d/codeph ">status</codeph> event is dispatched if
- the attached microphone object reports any status information; it is captured and traced using
- the <codeph class="+ topic/ph pr-d/codeph ">statusHandler()</codeph> method.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> A microphone must be attached to your computer for this example
- to work correctly.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.events.*;
- import flash.media.Microphone;
- import flash.system.Security;
- public class MicrophoneExample extends Sprite {
- public function MicrophoneExample() {
- var mic:Microphone = Microphone.getMicrophone();
- Security.showSettings("2");
- mic.setLoopBack(true);
-
- if (mic != null) {
- mic.setUseEchoSuppression(true);
- mic.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
- mic.addEventListener(StatusEvent.STATUS, statusHandler);
- }
- }
- private function activityHandler(event:ActivityEvent):void {
- trace("activityHandler: " + event);
- }
- private function statusHandler(event:StatusEvent):void {
- trace("statusHandler: " + event);
- }
- }
- }
- </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Camera</linktext></link><link href="flash.media.xml#MicrophoneEnhancedMode" class="- topic/link "><linktext class="- topic/linktext ">flash.media.MicrophoneEnhancedMode</linktext></link><link href="flash.media.xml#MicrophoneEnhancedOptions" class="- topic/link "><linktext class="- topic/linktext ">flash.media.MicrophoneEnhancedOptions</linktext></link><link href="http://mrbinitie.blogspot.com/2011/03/implementing-acoustic-echo-suppression.html" class="- topic/link "><linktext class="- topic/linktext ">aYo Binitie: Implementing Acoustic Echo Suppression in Flash/Flex applications</linktext></link><link href="http://coenraets.org/blog/air-for-android-samples/voice-notes-for-android/" class="- topic/link "><linktext class="- topic/linktext ">Cristophe Coenraets: Voice Notes for Android</linktext></link><link href="http://www.riagora.com/2010/08/air-android-and-the-microphone/" class="- topic/link "><linktext class="- topic/linktext ">Michael Chaize: AIR, Android, and the Microphone</linktext></link></related-links><adobeApiEvent id="flash.media:Microphone_flash.events.StatusEvent.STATUS_status" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">status</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a microphone reports its status.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.StatusEvent.STATUS</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.StatusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a microphone reports its status.
- If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Microphone.Muted"</codeph>,
- the user has refused to allow the SWF file access to the microphone.
- If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Microphone.Unmuted"</codeph>,
- the user has allowed the SWF file access to the microphone.
-
- <p class="- topic/p ">Status events are not dispatched in Adobe AIR applications; access to the microphone
- cannot be changed dynamically. On most platforms, AIR applications can always access the microphone.
- On Android, an application must specify the Android RECORD_AUDIO permission in the application
- descriptor. Otherwise, Android denies access to the microphone altogether.</p>
-
- </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">Microphone.getMicrophone()</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.media:Microphone_flash.events.SampleDataEvent.SAMPLE_DATA_sampleData" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">sampleData</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when the microphone has sound data in the buffer.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.SampleDataEvent.SAMPLE_DATA</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.SampleDataEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when the microphone has sound data in the buffer.
- <p class="- topic/p ">
- The <codeph class="+ topic/ph pr-d/codeph ">Microphone.rate</codeph> property determines the number of samples generated
- per second. The number of samples per event is a factor of the number of samples
- per second and the latency between event calls.
- </p>
-
- </apiDesc><example conref="examples\Microphone.sampleDataEvent.1.as" class="- topic/example "> The following example captures 4 seconds of audio samples from the default microphone
- and then plays the audio back. Be sure that there is a microphone attached. The the <codeph class="+ topic/ph pr-d/codeph ">micSampleDataHandler()</codeph>
- is the event listener for the <codeph class="+ topic/ph pr-d/codeph ">sampleData</codeph> event of the Microphone object. The <codeph class="+ topic/ph pr-d/codeph ">micSampleDataHandler()</codeph>
- method gets the samples as they become available and appends their values to a ByteArray object. A Timer
- object is set for 4 seconds. The Timer removes the <codeph class="+ topic/ph pr-d/codeph ">sampleData</codeph> event of the Microphone object event listener,
- creates a Sound object, and adds a <codeph class="+ topic/ph pr-d/codeph ">sampleData</codeph> event listener for the Sound object. The <codeph class="+ topic/ph pr-d/codeph ">sampleData</codeph>
- event listener for the Sound object, the <codeph class="+ topic/ph pr-d/codeph ">playbackSampleHandler()</codeph> method, provides audio samples
- for the Sound object to play. These audio samples are retrieved from the ByteArray object that stored the
- Microphone samples. The samples are written to the Sound object twice since the Microphone samples are
- recorded in monaural sound and the Sound object requests stereo pairs of samples. The <codeph class="+ topic/ph pr-d/codeph ">rate</codeph>
- property of the Microphone object is set to 44, to match the 44-kHz sample rate used by Sound objects.
-
-
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- const DELAY_LENGTH:int = 4000;
- var mic:Microphone = Microphone.getMicrophone();
- mic.setSilenceLevel(0, DELAY_LENGTH);
- mic.gain = 100;
- mic.rate = 44;
- mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);
- var timer:Timer = new Timer(DELAY_LENGTH);
- timer.addEventListener(TimerEvent.TIMER, timerHandler);
- timer.start();
- var soundBytes:ByteArray = new ByteArray();
- function micSampleDataHandler(event:SampleDataEvent):void
- {
- while(event.data.bytesAvailable)
- {
- var sample:Number = event.data.readFloat();
- soundBytes.writeFloat(sample);
- }
- }
- function timerHandler(event:TimerEvent):void
- {
- mic.removeEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler);
- timer.stop();
- soundBytes.position = 0;
- var sound:Sound = new Sound();
- sound.addEventListener(SampleDataEvent.SAMPLE_DATA, playbackSampleHandler);
- sound.play();
- }
- function playbackSampleHandler(event:SampleDataEvent):void
- {
- for (var i:int = 0; i < 8192 && soundBytes.bytesAvailable > 0; i++)
- {
- var sample:Number = soundBytes.readFloat();
- event.data.writeFloat(sample);
- event.data.writeFloat(sample);
- }
- }
- </codeblock></example><example conref="examples\MicrophoneExample.as" class="- topic/example "> The following example captures sound using echo suppression from a microphone after the
- user allows access to their computer's microphone.
- The <codeph class="+ topic/ph pr-d/codeph ">Security.showSettings()</codeph> method displays the Flash Player dialog box, which requests
- permission to access the user's microphone. The call to <codeph class="+ topic/ph pr-d/codeph ">setLoopBack(true)</codeph> reroutes
- input to the local speaker, so you can hear the sound while you run the example.
-
- <p class="- topic/p ">Two listeners listen for <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> and
- <codeph class="+ topic/ph pr-d/codeph ">status</codeph> events. The <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is dispatched at the
- start and end (if any) of the session and is captured by the <codeph class="+ topic/ph pr-d/codeph ">activityHandler()</codeph>
- method, which traces information on the event. The <codeph class="+ topic/ph pr-d/codeph ">status</codeph> event is dispatched if
- the attached microphone object reports any status information; it is captured and traced using
- the <codeph class="+ topic/ph pr-d/codeph ">statusHandler()</codeph> method.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> A microphone must be attached to your computer for this example
- to work correctly.</p>
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- package {
- import flash.display.Sprite;
- import flash.events.*;
- import flash.media.Microphone;
- import flash.system.Security;
- public class MicrophoneExample extends Sprite {
- public function MicrophoneExample() {
- var mic:Microphone = Microphone.getMicrophone();
- Security.showSettings("2");
- mic.setLoopBack(true);
-
- if (mic != null) {
- mic.setUseEchoSuppression(true);
- mic.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
- mic.addEventListener(StatusEvent.STATUS, statusHandler);
- }
- }
- private function activityHandler(event:ActivityEvent):void {
- trace("activityHandler: " + event);
- }
- private function statusHandler(event:StatusEvent):void {
- trace("statusHandler: " + event);
- }
- }
- }
- </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.events.xml#SampleDataEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.SampleDataEvent</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.media:Microphone_flash.events.ActivityEvent.ACTIVITY_activity" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">activity</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched when a microphone starts or stops recording due to detected silence.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.ActivityEvent.ACTIVITY</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.ActivityEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched when a microphone starts or stops recording due to detected silence.
-
- <p class="- topic/p ">
- To specify the amount of sound required to trigger this event
- with an <codeph class="+ topic/ph pr-d/codeph ">activating</codeph> property of <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
- or the amount of time that must elapse without sound to
- trigger this event with an <codeph class="+ topic/ph pr-d/codeph ">activating</codeph> property of
- <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, use <codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph>.
- </p>
- <p class="- topic/p ">For a Microphone object to dispatch activity events, the application must be monitoring
- the input, either by calling <codeph class="+ topic/ph pr-d/codeph ">setLoopback( true )</codeph>, by listening for
- sampleData events, or by attaching the microphone to a NetStream object.</p>
-
- </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/setSilenceLevel()" class="- topic/link "><linktext class="- topic/linktext ">setSilenceLevel()</linktext></link></related-links></adobeApiEvent><apiOperation id="flash.media:Microphone:getEnhancedMicrophone" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">getEnhancedMicrophone</apiName><shortdesc class="- topic/shortdesc ">
- Returns a reference to an enhanced Microphone object that can
- perform acoustic echo cancellation.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.3" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2.7" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A reference to a Microphone object for capturing audio. If enhanced audio fails to initialize, returns <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
- </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.media:Microphone</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">index</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">-1</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index value of the microphone.
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Returns a reference to an enhanced Microphone object that can
- perform acoustic echo cancellation. Use acoustic echo cancellation to create audio/video chat applications
- that don't require headsets.
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">index</codeph> parameter for the <codeph class="+ topic/ph pr-d/codeph ">Microphone.getEnhancedMicrophone()</codeph> method and the <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph>
- method work the same way.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Important:</b> At any given time you can have only a single instance of enhanced microphone device.
- All other Microphone instances stop providing audio data and receive a <codeph class="+ topic/ph pr-d/codeph ">StatusEvent</codeph> with the
- <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property <codeph class="+ topic/ph pr-d/codeph ">Microphone.Unavailable</codeph>. When enhanced audio fails to initialize,
- calls to this method return <codeph class="+ topic/ph pr-d/codeph ">null</codeph>, setting a value for <codeph class="+ topic/ph pr-d/codeph ">Microphone.enhancedOptions</codeph> has no effect,
- and all existing Microphone instances function as before.</p>
-
- <p class="- topic/p ">To configure an enhanced Microphone object, set the <codeph class="+ topic/ph pr-d/codeph ">Microphone.enhancedOptions</codeph> property. The following
- code uses an enhanced Microphone object and full-duplex acoustic echo cancellation in a local test:</p>
-
- <pre xml:space="preserve" class="- topic/pre ">
- var mic:Microphone = Microphone.getEnhancedMicrophone();
- var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
- options.mode = MicrophoneEnhancedMode.FULL_DUPLEX;
- mic.enhancedOptions = options;
- mic.setLoopBack(true);
- </pre>
-
- <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">setUseEchoSuppression()</codeph> method is ignored when using acoustic echo cancellation.
- </p>
-
- <p class="- topic/p ">
- When a SWF file tries to access the object returned by <codeph class="+ topic/ph pr-d/codeph ">Microphone.getEnhancedMicrophone()</codeph>
- —for example, when you call <codeph class="+ topic/ph pr-d/codeph ">NetStream.attachAudio()</codeph>—
- Flash Player displays a Privacy dialog box that lets the user choose whether to
- allow or deny access to the microphone. (Make sure your Stage size is at least
- 215 x 138 pixels; this is the minimum size Flash Player requires to display the dialog box.)
- </p>
-
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">Microphone.getMicrophone()</linktext></link><link href="flash.media.xml#Microphone/enhancedOptions" class="- topic/link "><linktext class="- topic/linktext ">Microphone.enhancedOptions</linktext></link><link href="flash.media.xml#Microphone/event:status" class="- topic/link "><linktext class="- topic/linktext ">Microphone.status</linktext></link></related-links></apiOperation><apiOperation id="flash.media:Microphone:getMicrophone" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">getMicrophone</apiName><shortdesc class="- topic/shortdesc ">
-
- Returns a reference to a Microphone object for capturing audio.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, Microphone.getMicropone, getMicrophone
-
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A reference to a Microphone object for capturing audio.
-
- </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.media:Microphone</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">index</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">-1</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index value of the microphone.
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
-
- Returns a reference to a Microphone object for capturing audio.
- To begin capturing the audio, you must attach the Microphone
- object to a NetStream object (see <codeph class="+ topic/ph pr-d/codeph ">NetStream.attachAudio()</codeph>).
-
- <p class="- topic/p ">
- Multiple calls to <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph> reference the same microphone.
- Thus, if your code contains the lines <codeph class="+ topic/ph pr-d/codeph ">mic1 = Microphone.getMicrophone()</codeph>
- and
- <codeph class="+ topic/ph pr-d/codeph ">mic2 = Microphone.getMicrophone()</codeph>
- , both <codeph class="+ topic/ph pr-d/codeph ">mic1</codeph> and <codeph class="+ topic/ph pr-d/codeph ">mic2</codeph>
- reference the same (default) microphone.</p>
-
- <p class="- topic/p ">
- In general, you should not pass a value for <codeph class="+ topic/ph pr-d/codeph ">index</codeph>. Simply call
- <codeph class="+ topic/ph pr-d/codeph ">air.Microphone.getMicrophone()</codeph>
- to return a reference to the default microphone.
- Using the Microphone Settings section in the Flash Player settings panel, the user can specify the default
- microphone the application should use. (The user access the Flash Player settings panel by right-clicking
- Flash Player content running in a web browser.) If you pass a value for <codeph class="+ topic/ph pr-d/codeph ">index</codeph>, you can
- reference a microphone other than the one the user chooses. You can use <codeph class="+ topic/ph pr-d/codeph ">index</codeph> in
- rare cases—for example, if your application is capturing audio from two microphones
- at the same time. Content running in Adobe AIR also uses the Flash Player setting for the default
- microphone.</p>
-
- <p class="- topic/p ">
- Use the <codeph class="+ topic/ph pr-d/codeph ">Microphone.index</codeph> property to get the index value of the current
- Microphone object. You can then pass this value to other methods of the
- Microphone class.
- </p>
-
- <p class="- topic/p ">
- When a SWF file tries to access the object returned by <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph>
- —for example, when you call <codeph class="+ topic/ph pr-d/codeph ">NetStream.attachAudio()</codeph>—
- Flash Player displays a Privacy dialog box that lets the user choose whether to
- allow or deny access to the microphone. (Make sure your Stage size is at least
- 215 x 138 pixels; this is the minimum size Flash Player requires to display the dialog box.)
- </p>
-
- <p class="- topic/p ">
- When the user responds to this dialog box, a <codeph class="+ topic/ph pr-d/codeph ">status</codeph> event is dispatched
- that indicates the user's response. You can also check the <codeph class="+ topic/ph pr-d/codeph ">Microphone.muted</codeph>
- property to determine if the user has allowed or denied access to the microphone.
- </p>
-
- <p class="- topic/p ">
- If <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph> returns <codeph class="+ topic/ph pr-d/codeph ">null</codeph>, either the microphone is in use
- by another application, or there are no microphones installed on the system. To determine
- whether any microphones are installed, use <codeph class="+ topic/ph pr-d/codeph ">Microphones.names.length</codeph>. To display
- the Flash Player Microphone Settings panel, which lets the user choose the microphone to be
- referenced by <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone</codeph>, use <codeph class="+ topic/ph pr-d/codeph ">Security.showSettings()</codeph>.
-
- </p>
-
- </apiDesc><example conref="examples\Microphone_getMicrophone.as" class="- topic/example "> The following example shows how you can request access to the user's microphone using the static Microphone.getMicrophone() method and listening for the status event.
- Example provided by
- <xref href="http://actionscriptexamples.com/2008/12/04/detecting-the-microphone-in-flash-using-actionscript-30/" scope="_mmexternal" class="- topic/xref ">ActionScriptExamples.com</xref>.
- <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
- var mic:Microphone = Microphone.getMicrophone();
- mic.setLoopBack();
- mic.addEventListener(StatusEvent.STATUS, mic_status);
-
- var tf:TextField = new TextField();
- tf.autoSize = TextFieldAutoSize.LEFT;
- tf.text = "Detecting microphone...";
- addChild(tf);
-
- function mic_status(evt:StatusEvent):void {
- tf.text = "Microphone is muted?: " + mic.muted;
- switch (evt.code) {
- case "Microphone.Unmuted":
- tf.appendText("\n" + "Microphone access was allowed.");
- break;
- case "Microphone.Muted":
- tf.appendText("\n" + "Microphone access was denied.");
- break;
- }
- }
- </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/event:status" class="- topic/link "><linktext class="- topic/linktext ">Microphone.status</linktext></link><link href="flash.net.xml#NetStream/attachAudio()" class="- topic/link "><linktext class="- topic/linktext ">flash.net.NetStream.attachAudio()</linktext></link><link href="flash.system.xml#Security/showSettings()" class="- topic/link "><linktext class="- topic/linktext ">flash.system.Security.showSettings()</linktext></link></related-links><adobeApiEvent id="flash.media:Microphone:getMicrophone_status" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">status</apiName><prolog class="- topic/prolog "/><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events:StatusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched when a microphone reports its status.
- If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Microphone.Muted"</codeph>,
- the user has refused to allow the SWF file access to the user's microphone.
- If the value of the <codeph class="+ topic/ph pr-d/codeph ">code</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">"Microphone.Unmuted"</codeph>,
- the user has allowed the SWF file access to the user's microphone.
-
- </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when a microphone reports its status.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.media:Microphone:setLoopBack" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setLoopBack</apiName><shortdesc class="- topic/shortdesc ">
- Routes audio captured by a microphone to the local speakers.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><internal>Document this better with examples.
- </internal></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">state</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">true</apiData></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Routes audio captured by a microphone to the local speakers.
-
- </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.media:Microphone:setSilenceLevel" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setSilenceLevel</apiName><shortdesc class="- topic/shortdesc ">
- Sets the minimum input level that should be considered sound and (optionally) the amount
- of silent time signifying that silence has actually begun.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.setSilenceLevel, setSilenceLevel
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">silenceLevel</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The amount of sound required to activate the microphone
- and dispatch the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event. Acceptable values range from 0 to 100.
-
- </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">timeout</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">-1</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The number of milliseconds that must elapse without
- activity before Flash Player or Adobe AIR considers sound to have stopped and dispatches the
- <codeph class="+ topic/ph pr-d/codeph ">dispatch</codeph> event. The default value is 2000 (2 seconds).
- (<b class="+ topic/ph hi-d/b ">Note</b>: The default value shown
- in the signature, -1, is an internal value that indicates to Flash Player or Adobe AIR to use 2000.)
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Sets the minimum input level that should be considered sound and (optionally) the amount
- of silent time signifying that silence has actually begun.
- <ul class="- topic/ul "><li class="- topic/li ">To prevent the microphone from detecting sound at all, pass a value of 100 for
- <codeph class="+ topic/ph pr-d/codeph ">silenceLevel</codeph>; the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is never dispatched. </li><li class="- topic/li ">To determine the amount of sound the microphone is currently detecting, use <codeph class="+ topic/ph pr-d/codeph ">Microphone.activityLevel</codeph>. </li></ul>
-
- <p class="- topic/p ">Speex includes voice activity detection (VAD) and automatically reduces bandwidth when no voice is detected.
- When using the Speex codec, Adobe recommends that you set the silence level to 0.</p>
-
- <p class="- topic/p ">Activity detection is the ability to detect when audio levels suggest that a person is talking.
- When someone is not talking, bandwidth can be saved because there is no need to send the associated
- audio stream. This information can also be used for visual feedback so that users know
- they (or others) are silent.</p>
-
- <p class="- topic/p ">Silence values correspond directly to activity values. Complete silence is an activity value of 0.
- Constant loud noise (as loud as can be registered based on the current gain setting) is an activity value
- of 100. After gain is appropriately adjusted, your activity value is less than your silence value when
- you're not talking; when you are talking, the activity value exceeds your silence value.</p>
-
- <p class="- topic/p ">This method is similar to <codeph class="+ topic/ph pr-d/codeph ">Camera.setMotionLevel()</codeph>; both methods are used to
- specify when the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is dispatched. However, these methods have
- a significantly different impact on publishing streams:</p>
-
- <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Camera.setMotionLevel()</codeph> is designed to detect motion and does not affect bandwidth
- usage. Even if a video stream does not detect motion, video is still sent.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph> is designed to optimize bandwidth. When an audio
- stream is considered silent, no audio data is sent. Instead, a single message is sent, indicating
- that silence has started. </li></ul>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Camera/setMotionLevel()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Camera.setMotionLevel()</linktext></link><link href="flash.media.xml#Microphone/activityLevel" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.activityLevel</linktext></link><link href="flash.media.xml#Microphone/event:activity" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.activity</linktext></link><link href="flash.media.xml#Microphone/gain" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.gain</linktext></link><link href="flash.media.xml#Microphone/silenceLevel" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.silenceLevel</linktext></link><link href="flash.media.xml#Microphone/silenceTimeout" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.silenceTimeout</linktext></link></related-links></apiOperation><apiOperation id="flash.media:Microphone:setUseEchoSuppression" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">setUseEchoSuppression</apiName><shortdesc class="- topic/shortdesc ">
- Specifies whether to use the echo suppression feature of the audio codec.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.setUseEchoSuppression, setUseEchoSuppression
- </keyword></asCustoms></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">useEchoSuppression</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Boolean value indicating whether to use echo suppression
- (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>) or not (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>).
-
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies whether to use the echo suppression feature of the audio codec. The default value is
- <codeph class="+ topic/ph pr-d/codeph ">false</codeph> unless the user has selected Reduce Echo in the Flash Player Microphone
- Settings panel.
-
- <p class="- topic/p ">Echo suppression is an effort to reduce the effects of audio feedback, which is caused when
- sound going out the speaker is picked up by the microphone on the same system. (This is different
- from acoustic echo cancellation, which completely removes the feedback. The <codeph class="+ topic/ph pr-d/codeph ">setUseEchoSuppression()</codeph> method
- is ignored when you call the <codeph class="+ topic/ph pr-d/codeph ">getEnhancedMicrophone()</codeph> method to use acoustic echo cancellation.)</p>
-
- <p class="- topic/p ">Generally, echo suppression is advisable when the sound being captured is played through
- speakers — instead of a headset —. If your SWF file allows users to specify the
- sound output device, you may want to call <codeph class="+ topic/ph pr-d/codeph ">Microphone.setUseEchoSuppression(true)</codeph>
- if they indicate they are using speakers and will be using the microphone as well. </p>
-
- <p class="- topic/p ">Users can also adjust these settings in the Flash Player Microphone Settings panel.</p>
-
- </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/setUseEchoSuppression()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.setUseEchoSuppression()</linktext></link><link href="flash.media.xml#Microphone/useEchoSuppression" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.useEchoSuppression</linktext></link></related-links></apiOperation><apiValue id="flash.media:Microphone:activityLevel:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">activityLevel</apiName><shortdesc class="- topic/shortdesc ">
- The amount of sound the microphone is detecting.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.activityLevel, activityLevel
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The amount of sound the microphone is detecting. Values range from
- 0 (no sound is detected) to 100 (very loud sound is detected). The value of this property can
- help you determine a good value to pass to the <codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph> method.
-
- <p class="- topic/p ">If the microphone <codeph class="+ topic/ph pr-d/codeph ">muted</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, the value of this property is always -1.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.getMicrophone()</linktext></link><link href="flash.media.xml#Microphone/setSilenceLevel()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.setSilenceLevel()</linktext></link><link href="flash.media.xml#Microphone/gain" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.gain</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:codec:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">codec</apiName><shortdesc class="- topic/shortdesc ">
- The codec to use for compressing audio.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.getCodec, getCodec
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The codec to use for compressing audio. Available codecs are Nellymoser (the default) and Speex. The enumeration class <codeph class="+ topic/ph pr-d/codeph ">SoundCodec</codeph> contains
- the various values that are valid for the <codeph class="+ topic/ph pr-d/codeph ">codec</codeph> property.
-
- <p class="- topic/p ">If you use the Nellymoser codec, you can set the sample rate using <codeph class="+ topic/ph pr-d/codeph ">Microphone.rate()</codeph>.
- If you use the Speex codec, the sample rate is set to 16 kHz.</p>
-
- <p class="- topic/p ">Speex includes voice activity detection (VAD) and automatically reduces bandwidth when no voice is detected.
- When using the Speex codec, Adobe recommends that you set the silence level to 0. To set the silence level, use the
- <codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph> method.</p>
-
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/setSilenceLevel()" class="- topic/link "><linktext class="- topic/linktext ">setSilenceLevel()</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:enableVAD:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">enableVAD</apiName><shortdesc class="- topic/shortdesc ">
- Enable Speex voice activity detection.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound,
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Enable Speex voice activity detection.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:Microphone:encodeQuality:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">encodeQuality</apiName><shortdesc class="- topic/shortdesc ">
- The encoded speech quality when using the Speex codec.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound,
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The encoded speech quality when using the Speex codec. Possible values are from 0 to 10. The default value is 6.
- Higher numbers represent higher quality but require more bandwidth, as shown in the following table. The bit rate values that are listed
- represent net bit rates and do not include packetization overhead.
- <p class="- topic/p ">
- <adobetable class="innertable"><tgroup cols="2" class="- topic/tgroup "><thead class="- topic/thead "><row class="- topic/row "><entry class="- topic/entry ">Quality value</entry><entry class="- topic/entry ">Required bit rate (kilobits per second)</entry></row></thead><tbody class="- topic/tbody "><row class="- topic/row "><entry class="- topic/entry ">0</entry><entry class="- topic/entry "> 3.95</entry></row><row class="- topic/row "><entry class="- topic/entry ">1</entry><entry class="- topic/entry ">5.75</entry></row><row class="- topic/row "><entry class="- topic/entry ">2</entry><entry class="- topic/entry ">7.75</entry></row><row class="- topic/row "><entry class="- topic/entry ">3</entry><entry class="- topic/entry ">9.80</entry></row><row class="- topic/row "><entry class="- topic/entry ">4</entry><entry class="- topic/entry ">12.8</entry></row><row class="- topic/row "><entry class="- topic/entry ">5</entry><entry class="- topic/entry ">16.8</entry></row><row class="- topic/row "><entry class="- topic/entry ">6</entry><entry class="- topic/entry ">20.6</entry></row><row class="- topic/row "><entry class="- topic/entry ">7</entry><entry class="- topic/entry ">23.8</entry></row><row class="- topic/row "><entry class="- topic/entry ">8</entry><entry class="- topic/entry ">27.8</entry></row><row class="- topic/row "><entry class="- topic/entry ">9</entry><entry class="- topic/entry ">34.2</entry></row><row class="- topic/row "><entry class="- topic/entry ">10</entry><entry class="- topic/entry ">42.2</entry></row></tbody></tgroup></adobetable>
- </p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/codec" class="- topic/link "><linktext class="- topic/linktext ">codec</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:enhancedOptions:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">enhancedOptions</apiName><shortdesc class="- topic/shortdesc ">
- Controls enhanced microphone options.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.3" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2.7" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.media:MicrophoneEnhancedOptions</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Controls enhanced microphone options. For more information, see
- <codeph class="+ topic/ph pr-d/codeph ">MicrophoneEnhancedOptions</codeph> class. This property is ignored for non-enhanced Microphone instances.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#MicrophoneEnhancedOptions" class="- topic/link "><linktext class="- topic/linktext ">flash.media.MicrophoneEnhancedOptions</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:framesPerPacket:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">framesPerPacket</apiName><shortdesc class="- topic/shortdesc ">
- Number of Speex speech frames transmitted in a packet (message).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="1.5" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound,
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Number of Speex speech frames transmitted in a packet (message).
- Each frame is 20 ms long. The default value is two frames per packet.
-
- <p class="- topic/p ">The more Speex frames in a message, the lower the bandwidth required but the longer the delay in sending the
- message. Fewer Speex frames increases bandwidth required but reduces delay.</p>
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:Microphone:gain:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">gain</apiName><shortdesc class="- topic/shortdesc ">
- The amount by which the microphone boosts the signal.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.gain, gain
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The amount by which the microphone boosts the signal. Valid values are 0 to 100. The default value is 50.
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/gain" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.gain</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:index:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">index</apiName><shortdesc class="- topic/shortdesc ">
- The index of the microphone, as reflected in the array returned by
- Microphone.names.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.index, index
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The index of the microphone, as reflected in the array returned by
- <codeph class="+ topic/ph pr-d/codeph ">Microphone.names</codeph>.
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.getMicrophone()</linktext></link><link href="flash.media.xml#Microphone/names" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.names</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:isSupported:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">isSupported</apiName><shortdesc class="- topic/shortdesc ">
- The isSupported property is set to true if the
- Microphone class is supported on the current platform, otherwise it is
- set to false.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The <codeph class="+ topic/ph pr-d/codeph ">isSupported</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> if the
- Microphone class is supported on the current platform, otherwise it is
- set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:Microphone:muted:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">muted</apiName><shortdesc class="- topic/shortdesc ">
- Specifies whether the user has denied access to the microphone (true)
- or allowed access (false).</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.muted, muted
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies whether the user has denied access to the microphone (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>)
- or allowed access (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>). When this value changes,
- a <codeph class="+ topic/ph pr-d/codeph ">status</codeph> event is dispatched.
- For more information, see <codeph class="+ topic/ph pr-d/codeph ">Microphone.getMicrophone()</codeph>.
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.getMicrophone()</linktext></link><link href="flash.media.xml#Microphone/event:status" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.status</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:name:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">name</apiName><shortdesc class="- topic/shortdesc ">
- The name of the current sound capture device, as returned by the sound capture hardware.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.name, name
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The name of the current sound capture device, as returned by the sound capture hardware.
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.getMicrophone()</linktext></link><link href="flash.media.xml#Microphone/names" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.names</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:names:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">names</apiName><shortdesc class="- topic/shortdesc ">
- An array of strings containing the names of all available sound capture devices.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.names, names
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- An array of strings containing the names of all available sound capture devices.
- The names are returned without
- having to display the Flash Player Privacy Settings panel to the user. This array
- provides the zero-based index of each sound capture device and the
- number of sound capture devices on the system, through the <codeph class="+ topic/ph pr-d/codeph ">Microphone.names.length</codeph> property.
- For more information, see the Array class entry.
-
- <p class="- topic/p ">Calling <codeph class="+ topic/ph pr-d/codeph ">Microphone.names</codeph> requires an extensive examination of the hardware, and it
- may take several seconds to build the array. In most cases, you can just use the default microphone.</p>
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> To determine the name of the current microphone,
- use the <codeph class="+ topic/ph pr-d/codeph ">name</codeph> property.</p>
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="#Array" class="- topic/link "><linktext class="- topic/linktext ">Array</linktext></link><link href="flash.media.xml#Microphone/name" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.name</linktext></link><link href="flash.media.xml#Microphone/getMicrophone()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.getMicrophone()</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:noiseSuppressionLevel:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">noiseSuppressionLevel</apiName><shortdesc class="- topic/shortdesc ">
- Maximum attenuation of the noise in dB (negative number) used for Speex encoder.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound,
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Maximum attenuation of the noise in dB (negative number) used for Speex encoder. If enabled, noise suppression is applied to sound captured from Microphone before
- Speex compression. Set to 0 to disable noise suppression. Noise suppression is enabled by default with maximum attenuation of -30 dB. Ignored when Nellymoser
- codec is selected.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:Microphone:rate:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">rate</apiName><shortdesc class="- topic/shortdesc ">
- The rate at which the microphone is capturing sound, in kHz.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.rate, rate
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The rate at which the microphone is capturing sound, in kHz. Acceptable values are 5, 8, 11, 22, and 44. The default value is 8
- kHz if your sound capture device supports this value. Otherwise, the default value is the next available capture level above 8 kHz
- that your sound capture device supports, usually 11 kHz.
-
- <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The actual rate differs slightly from the <codeph class="+ topic/ph pr-d/codeph ">rate</codeph> value, as noted
- in the following table:</p>
-
- <adobetable class="+ topic/table adobe-d/adobetable "><tgroup cols="2" class="- topic/tgroup "><thead class="- topic/thead "><row class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">rate</codeph> value</entry><entry class="- topic/entry ">Actual frequency</entry></row></thead><tbody class="- topic/tbody "><row class="- topic/row "><entry class="- topic/entry ">44</entry><entry class="- topic/entry ">44,100 Hz</entry></row><row class="- topic/row "><entry class="- topic/entry ">22</entry><entry class="- topic/entry ">22,050 Hz</entry></row><row class="- topic/row "><entry class="- topic/entry ">11</entry><entry class="- topic/entry ">11,025 Hz</entry></row><row class="- topic/row "><entry class="- topic/entry ">8</entry><entry class="- topic/entry ">8,000 Hz</entry></row><row class="- topic/row "><entry class="- topic/entry ">5</entry><entry class="- topic/entry ">5,512 Hz</entry></row></tbody></tgroup></adobetable>
-
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/rate" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.rate</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:silenceLevel:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">silenceLevel</apiName><shortdesc class="- topic/shortdesc ">
- The amount of sound required to activate the microphone and dispatch
- the activity event.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.silenceLevel, silenceLevel
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The amount of sound required to activate the microphone and dispatch
- the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event. The default value is 10.
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/gain" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.gain</linktext></link><link href="flash.media.xml#Microphone/setSilenceLevel()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.setSilenceLevel()</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:silenceTimeout:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">silenceTimeout</apiName><shortdesc class="- topic/shortdesc ">
- The number of milliseconds between the time the microphone stops
- detecting sound and the time the activity event is dispatched.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.silenceTimeout, silenceTimeout
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The number of milliseconds between the time the microphone stops
- detecting sound and the time the <codeph class="+ topic/ph pr-d/codeph ">activity</codeph> event is dispatched. The default
- value is 2000 (2 seconds).
-
- <p class="- topic/p ">To set this value, use the <codeph class="+ topic/ph pr-d/codeph ">Microphone.setSilenceLevel()</codeph> method.</p>
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/setSilenceLevel()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.setSilenceLevel()</linktext></link></related-links></apiValue><apiValue id="flash.media:Microphone:soundTransform:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">soundTransform</apiName><shortdesc class="- topic/shortdesc ">
- Controls the sound of this microphone object when it is in loopback mode.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><internal>Document this better with examples.
- </internal></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.media:SoundTransform</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Controls the sound of this microphone object when it is in loopback mode.
-
- </apiDesc></apiValueDetail></apiValue><apiValue id="flash.media:Microphone:useEchoSuppression:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">useEchoSuppression</apiName><shortdesc class="- topic/shortdesc ">
- Set to true if echo suppression is enabled; false otherwise.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="Flash" version="9" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><keyword class="- topic/keyword ">Microphone, audio, sound, Microphone.useEchoSuppression, useEchoSuppression
- </keyword></asCustoms></prolog><apiValueDetail class="- topic/body reference/refbody apiRef/apiDetail apiValue/apiValueDetail "><apiValueDef class="- topic/section reference/section apiRef/apiDef apiValue/apiValueDef "><apiProperty class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiProperty "/><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiDynamic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiDynamic "/><apiValueAccess value="read" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> if echo suppression is enabled; <codeph class="+ topic/ph pr-d/codeph ">false</codeph> otherwise. The default value is
- <codeph class="+ topic/ph pr-d/codeph ">false</codeph> unless the user has selected Reduce Echo in the Flash Player Microphone Settings panel.
-
-
- </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#Microphone/setUseEchoSuppression()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Microphone.setUseEchoSuppression()</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.media:StageVideo" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiClassifier/apiClassifier "><apiName class="- topic/title reference/title apiRef/apiName ">StageVideo</apiName><shortdesc class="- topic/shortdesc ">
- The StageVideo object uses the device's hardware acceleration capabilities, if available, to display
- live or recorded video in an application.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiClassifierDetail class="- topic/body reference/refbody apiRef/apiDetail apiClassifier/apiClassifierDetail "><apiClassifierDef class="- topic/section reference/section apiRef/apiDef apiClassifier/apiClassifierDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiStatic class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiStatic "/><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- The StageVideo object uses the device's hardware acceleration capabilities, if available, to display
- live or recorded video in an application. Hardware acceleration capabilities are available on most devices.
- The StageVideo object supports the same video formats as the Video object.
- See the flash.net.NetStream class for more information about these formats.
-
- <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> In AIR 2.5, this feature is supported
- only on devices that run AIR for TV. See
- <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
- AIR Profile Support</xref> for more information regarding API support across multiple profiles.
- </p>
-
- <p class="- topic/p ">The video displayed by the StageVideo object always appears in a rectangular area on the stage
- behind all Flash display list objects. Therefore, the StageVideo object takes advantage of hardware acceleration
- while supporting the most common case for displaying video: a rectangular display area overlaid with
- video controls.</p>
-
-
- <p class="- topic/p ">The benefits to using a StageVideo object instead of the Video object are:</p>
-
- <p class="- topic/p "><ul class="- topic/ul "><li class="- topic/li ">Optimal video playback performance because of using hardware acceleration.</li><li class="- topic/li ">Decreased processor and power usage.</li><li class="- topic/li ">Flexibility and creativity for development of content, such as video controls,
- that appears in front of the StageVideo object.</li></ul></p>
-
- <p class="- topic/p ">Because the StageVideo object uses device hardware capabilities, a StageVideo object is subject to the following constraints
- compared to a Video object:</p>
-
- <p class="- topic/p "><ul class="- topic/ul "><li class="- topic/li ">The video display area can only be a rectangle. You cannot use more advanced display areas, such as
- elliptical or irregular shapes.</li><li class="- topic/li ">You cannot rotate a StageVideo object.</li><li class="- topic/li ">You cannot bitmap cache a StageVideo object,</li><li class="- topic/li ">You cannot use BitmapData to access the video data.</li><li class="- topic/li ">You cannot embed the video in the SWF file. You can use a StageVideo object only with the NetStream object.</li><li class="- topic/li ">You cannot apply filters, blend modes, or alpha values to a StageVideo object.</li><li class="- topic/li ">You cannot apply color transforms, 3D transforms, or matrix transforms to a StageVideo object.</li><li class="- topic/li ">You cannot apply a mask or scale9Grid to a StageVideo object.</li><li class="- topic/li ">Blend modes that you apply to display objects that are in front of a StageVideo object do not apply to the StageVideo object.</li><li class="- topic/li ">You can place a StageVideo object only on full pixel boundaries.</li><li class="- topic/li ">For each SWF file, Flash Player limits the number of StageVideo objects that can concurrently display
- videos to four. However, the actual limit can be lower, depending on device hardware resources.
- On AIR for TV devices, only one StageVideo object at a time can display a video.</li><li class="- topic/li ">The video timing is not synchronized with the timing of Flash content that the runtime displays.</li><li class="- topic/li ">Though the video presentation is the best available for the given device hardware, it is not 100% "pixel identical" across devices.
- Slight variations can occur due to driver and hardware differences.</li><li class="- topic/li ">A few devices do not support all required color spaces. For example, some devices do not support BT.709, the H.264 standard. In such
- cases you can use BT.601 for fast display.</li><li class="- topic/li ">You cannot use stage video with WMODE settings such as <codeph class="+ topic/ph pr-d/codeph ">normal</codeph>, <codeph class="+ topic/ph pr-d/codeph ">opaque</codeph>, or <codeph class="+ topic/ph pr-d/codeph ">transparent</codeph>.
- Stage video supports only <codeph class="+ topic/ph pr-d/codeph ">WMODE=direct</codeph> when not in full screen mode. WMODE has no effect in Safari 4 or higher, IE 9 or higher,
- or in AIR for TV.</li></ul></p>
-
- <p class="- topic/p ">The following steps summarize how to use a StageVideo object to play a video:</p>
-
- <p class="- topic/p "><ol class="- topic/ol "><li class="- topic/li ">Listen for the StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY event to find out when the
- Stage.stageVideos vector has changed. (Not supported for AIR 2.5 for TV.) </li><li class="- topic/li ">If the StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY event reports that stage video is available,
- use the <codeph class="+ topic/ph pr-d/codeph ">Stage.stageVideos</codeph> Vector object within the event handler to access a StageVideo object.
- In AIR 2.5 for TV, access <codeph class="+ topic/ph pr-d/codeph ">Stage.stageVideos</codeph> after the first SWF frame has rendered.
- <b class="+ topic/ph hi-d/b ">Note:</b> You cannot create a StageVideo object.</li><li class="- topic/li ">Attach a NetStream object using <codeph class="+ topic/ph pr-d/codeph ">StageVideo.attachNetStream()</codeph>.</li><li class="- topic/li ">Play the video using <codeph class="+ topic/ph pr-d/codeph ">NetStream.play()</codeph>.</li><li class="- topic/li ">Listen for the <codeph class="+ topic/ph pr-d/codeph ">StageVideoEvent.RENDER_STATE</codeph> event on the StageVideo object to determine the status of playing the video.
- Receipt of this event also indicates that the width and height properties of the video have been initialized or changed. </li><li class="- topic/li ">Listen for the <codeph class="+ topic/ph pr-d/codeph ">VideoEvent.RENDER_STATE</codeph> event on the Video object. This event provides the same statuses as
- StageVideoEvent.RENDER_STATE, so you can also use it to determine whether GPU acceleration is available. Receipt of this event
- also indicates that the width and height properties of the video have been initialized or changed. (Not supported for AIR 2.5 for TV.)</li></ol></p>
-
-
- <p class="- topic/p ">If a <codeph class="+ topic/ph pr-d/codeph ">StageVideoEvent.RENDER_STATE</codeph> event indicates that the video cannot be played,
- you can revert to using a Video object instead of a StageVideo object. This event is
- dispatched after the video has been attached to a NetStream object and is playing. Also, depending on the platform,
- any change in the playing status can result in dispatching the event.
- Handle the <codeph class="+ topic/ph pr-d/codeph ">StageVideoEvent.RENDER_STATE</codeph> event to ensure that the application plays the video
- or gracefully does not play the video.
- </p>
-
- <p class="- topic/p ">If a running video goes into full screen mode from a WMODE that does not support stage video, stage video can become available.
- Likewise, if the user exits full screen mode, stage video can become unavailable. In these cases, the Stage.stageVideos vector changes.
- To receive notification of this change, listen to the StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABITY event. <b class="+ topic/ph hi-d/b ">NOTE:</b> This notification
- is not available in AIR 2.5 for TV.</p>
- </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.events.xml#StageVideoEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.StageVideoEvent</linktext></link><link href="flash.events.xml#StageVideoAvailabilityEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.StageVideoAvailabilityEvent</linktext></link><link href="flash.events.xml#VideoEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.VideoEvent</linktext></link><link href="flash.display.xml#Stage/stageVideos" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Stage.stageVideos</linktext></link><link href="flash.media.xml#Video" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Video</linktext></link><link href="flash.net.xml#NetStream" class="- topic/link "><linktext class="- topic/linktext ">flash.net.NetStream</linktext></link><link href="http://www.adobe.com/go/learn_as3_stageVideo_en" class="- topic/link "><linktext class="- topic/linktext ">Using the StageVideo class for hardware-accelerated rendering</linktext></link></related-links><adobeApiEvent id="flash.media:StageVideo_flash.events.StageVideoEvent.RENDER_STATE_renderState" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">renderState</apiName><shortdesc class="- topic/shortdesc ">
- Dispatched by the StageVideo object when the render state of the StageVideo object changes.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><adobeApiEventDetail class="- topic/body reference/refbody apiRef/apiDetail adobeApiEvent/adobeApiEventDetail "><adobeApiEventDef class="- topic/section reference/section apiRef/apiDef adobeApiEvent/adobeApiEventDef "><apiEventType class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiEventType ">flash.events.StageVideoEvent.RENDER_STATE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.StageVideoEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Dispatched by the StageVideo object when the render state of the StageVideo object changes.
-
- </apiDesc></adobeApiEventDetail></adobeApiEvent><apiOperation id="flash.media:StageVideo:attachNetStream" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiOperation/apiOperation "><apiName class="- topic/title reference/title apiRef/apiName ">attachNetStream</apiName><shortdesc class="- topic/shortdesc ">
- Specifies a video stream to be displayed within the boundaries of the StageVideo object in the application.</shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><apiLanguage version="3.0" class="+ topic/ph adobe-api-d/apiLanguage "/><apiPlatform description="" name="AIR" version="2.5" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata></prolog><apiOperationDetail class="- topic/body reference/refbody apiRef/apiDetail apiOperation/apiOperationDetail "><apiOperationDef class="- topic/section reference/section apiRef/apiDef apiOperation/apiOperationDef "><apiAccess value="public" class="- topic/state reference/state apiRef/apiQualifier adobe-api-d/apiAccess "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiType value="void" name="type" class="- topic/state reference/state apiRef/apiType "/></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">netStream</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.net:NetStream</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A NetStream object. To drop the connection to the StageVideo object, pass
- <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
- </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
- Specifies a video stream to be displayed within the boundaries of the StageVideo object in the application.
- The video stream is either a video file played with NetStream.play(), or <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
- A video file can be stored on the local file
- system or on Flash Media Server. If the value of the <codeph class="+ topic/ph pr-d/codeph ">netStream</codeph> argument is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>,
- the video is no longer played in the StageVideo object.
-
-
- <p class="- topic/p ">Before calling <codeph class="+ topic/ph pr-d/codeph ">attachNetStream()</codeph> a second time,
- call the currently attached NetStream object's <codeph class="+ topic/ph pr-d/codeph ">close()</codeph> method.
- Calling <codeph class="+ topic/ph pr-d/codeph ">close()</codeph>
- releases all the resources, including hardware decoders, involved with playing the video.
- Then you can call <codeph class="+ topic/ph pr-d/codeph ">attachNetStream()</codeph>
- with either another NetStream object or <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
-
- <p class="- topic/p ">
- You do not need to use this method if a video file contains only audio; the audio
- portion of a video file is played automatically
- when you call <codeph class="+ topic/ph pr-d/codeph ">NetStream.play()</codeph>. To control the audio
- associated with a video file, use the <codeph class="+ topic/ph pr-d/codeph ">soundTransform</codeph> property
- of the NetStream object that plays the video file.
- </p>
-
- </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.media:StageVideo:colorSpaces:get" ditaarch:DITAArchVersion="1.0" domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic pr-d api-d)" class="- topic/topic reference/reference apiRef/apiRef apiValue/apiValue "><apiName class="- topic/title reference/title apiRef/apiName ">colorSpaces</ap