/frameworks/projects/playerglobal/bundles/en_US/docs/flash.display.xml

https://github.com/adufilie/flex-sdk · XML · 6540 lines · 5341 code · 1181 blank · 18 comment · 0 complexity · 6a674eb57b74f902e3c15f3c167b0dd9 MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?><apiPackage xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" id="flash.display" 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.display</apiName><apiDetail class="- topic/body reference/refbody apiRef/apiDetail "/><apiClassifier languages="" id="flash.display:FrameLabel" 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 ">FrameLabel</apiName><shortdesc class="- topic/shortdesc ">
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. The FrameLabel object contains properties that specify a frame number and the
  17. corresponding label name.</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 ">
  18. The FrameLabel object contains properties that specify a frame number and the
  19. corresponding label name.
  20. The Scene class includes a <codeph class="+ topic/ph pr-d/codeph ">labels</codeph> property, which is an array
  21. of FrameLabel objects for the scene.
  22. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Scene/labels" class="- topic/link "><linktext class="- topic/linktext ">Scene.labels</linktext></link><link href="flash.display.xml#MovieClip/currentLabel" class="- topic/link "><linktext class="- topic/linktext ">MovieClip.currentLabel</linktext></link><link href="flash.display.xml#MovieClip/currentScene" class="- topic/link "><linktext class="- topic/linktext ">MovieClip.currentScene</linktext></link><link href="flash.display.xml#MovieClip/scenes" class="- topic/link "><linktext class="- topic/linktext ">MovieClip.scenes</linktext></link><link href="flash.display.xml#MovieClip/gotoAndPlay()" class="- topic/link "><linktext class="- topic/linktext ">MovieClip.gotoAndPlay()</linktext></link><link href="flash.display.xml#MovieClip/gotoAndStop()" class="- topic/link "><linktext class="- topic/linktext ">MovieClip.gotoAndStop()</linktext></link></related-links><apiValue id="flash.display:FrameLabel:frame: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 ">frame</apiName><shortdesc class="- topic/shortdesc ">
  23. The frame number containing the label.</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 ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  24. The frame number containing the label.
  25. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:FrameLabel: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 ">
  26. The name of the label.</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 ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  27. The name of the label.
  28. </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:InteractiveObject" 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 ">InteractiveObject</apiName><shortdesc class="- topic/shortdesc ">
  29. The InteractiveObject class is the abstract base class for all display objects with which the user can
  30. interact, using the mouse, keyboard, or other user input 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="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 ">flash.display:DisplayObject</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  31. The InteractiveObject class is the abstract base class for all display objects with which the user can
  32. interact, using the mouse, keyboard, or other user input device.
  33. <p class="- topic/p ">You cannot instantiate the InteractiveObject class directly. A call to the <codeph class="+ topic/ph pr-d/codeph ">new
  34. InteractiveObject()</codeph> constructor throws an <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception.</p>
  35. <p class="- topic/p ">The InteractiveObject class itself does not include any APIs for rendering content onscreen.
  36. To create a custom subclass of the InteractiveObject class,
  37. extend one of the subclasses that do have APIs for rendering content onscreen,
  38. such as the Sprite, SimpleButton, TextField, or MovieClip classes.</p>
  39. </apiDesc><example conref="examples\InteractiveObjectExample.as" class="- topic/example "> The following example uses the <codeph class="+ topic/ph pr-d/codeph ">InteractiveObjectExample</codeph> class, which in
  40. turn uses the <codeph class="+ topic/ph pr-d/codeph ">ChildSprite</codeph> class to draw a rectangle and then manipulate that rectangle
  41. based on various mouse events. This task is accomplished by performing the following steps:
  42. <ol class="- topic/ol "><li class="- topic/li ">In the <codeph class="+ topic/ph pr-d/codeph ">InteractiveObjectExample</codeph> constructor, a new ChildSprite object of type Sprite
  43. called <codeph class="+ topic/ph pr-d/codeph ">child</codeph> is created, which calls the ChildSprite constructor method to draw the shape
  44. and add mouse events for the shape (as explained in the following steps). The <codeph class="+ topic/ph pr-d/codeph ">child</codeph>
  45. object is added to the top of the display list at coordinates <i class="+ topic/ph hi-d/i ">x = 0, y = 0</i>. </li><li class="- topic/li ">In the <codeph class="+ topic/ph pr-d/codeph ">ChildSprite</codeph> class, declare the <codeph class="+ topic/ph pr-d/codeph ">size</codeph> and
  46. <codeph class="+ topic/ph pr-d/codeph ">overSize</codeph> properties that are used later in the <codeph class="+ topic/ph pr-d/codeph ">draw()</codeph> method and
  47. MouseEvent methods.</li><li class="- topic/li ">Declare properties that set the background color to orange, the mouse-over color to
  48. dark yellow, and the mouse-down color to light blue.</li><li class="- topic/li ">In the <codeph class="+ topic/ph pr-d/codeph ">ChildSprite</codeph> constructor, an orange square is drawn by using methods from
  49. the Graphics class and the <codeph class="+ topic/ph pr-d/codeph ">draw()</codeph> method.</li><li class="- topic/li ">The constructor adds four MouseEvent event listener methods:
  50. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseOverHandler</codeph>: redraws a larger 60 x 60 pixel square with a dark-yellow color
  51. at the original coordinates.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseOutHandler</codeph>: returns the square to its original size and color.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseDownHandler</codeph>: redraws a larger 60 x 60 pixel square with a light-blue color
  52. at the original coordinates.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseUpHandler</codeph>: same as <codeph class="+ topic/ph pr-d/codeph ">mouseOverHandler</codeph>.</li></ul>
  53. </li></ol>
  54. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  55. package {
  56. import flash.display.Sprite;
  57. public class InteractiveObjectExample extends Sprite {
  58. public function InteractiveObjectExample() {
  59. var child:Sprite = new ChildSprite();
  60. addChild(child);
  61. }
  62. }
  63. }
  64. import flash.display.Sprite;
  65. import flash.events.MouseEvent;
  66. class ChildSprite extends Sprite {
  67. private var size:uint = 50;
  68. private var overSize:uint = 60;
  69. private var backgroundColor:uint = 0xFFCC00;
  70. private var overColor:uint = 0xCCFF00;
  71. private var downColor:uint = 0x00CCFF;
  72. public function ChildSprite() {
  73. buttonMode = true;
  74. draw(size, size, backgroundColor);
  75. addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
  76. addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
  77. addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
  78. addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
  79. }
  80. private function draw(w:uint, h:uint, bgColor:uint):void {
  81. graphics.clear();
  82. graphics.beginFill(bgColor);
  83. graphics.drawRect(0, 0, w, h);
  84. graphics.endFill();
  85. }
  86. public function mouseOverHandler(event:MouseEvent):void {
  87. trace("mouseOverHandler");
  88. draw(overSize, overSize, overColor);
  89. }
  90. public function mouseOutHandler(event:MouseEvent):void {
  91. trace("mouseOutHandler");
  92. draw(size, size, backgroundColor);
  93. }
  94. public function mouseDownHandler(event:MouseEvent):void {
  95. trace("mouseDownHandler");
  96. draw(overSize, overSize, downColor);
  97. }
  98. public function mouseUpHandler(event:MouseEvent):void {
  99. trace("mouseUpHandler");
  100. draw(overSize, overSize, overColor);
  101. }
  102. }
  103. </codeblock></example></apiClassifierDetail><adobeApiEvent id="flash.display:InteractiveObject_flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE_softKeyboardDeactivate" 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 ">softKeyboardDeactivate</apiName><shortdesc class="- topic/shortdesc ">
  104. Dispatched immediately after the soft keyboard is lowered.</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="2.6" 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.SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.SoftKeyboardEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Dispatched immediately after the soft keyboard is lowered.
  105. </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  106. Dispatched immediately after the soft keyboard is lowered.
  107. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.events.xml#SoftKeyboardEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.SoftKeyboardEvent</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE_softKeyboardActivate" 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 ">softKeyboardActivate</apiName><shortdesc class="- topic/shortdesc ">
  108. Dispatched immediately after the soft keyboard is raised.</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="2.6" 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.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.SoftKeyboardEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Dispatched immediately after the soft keyboard is raised.
  109. </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  110. Dispatched immediately after the soft keyboard is raised.
  111. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.events.xml#SoftKeyboardEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.SoftKeyboardEvent</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING_softKeyboardActivating" 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 ">softKeyboardActivating</apiName><shortdesc class="- topic/shortdesc ">
  112. Dispatched immediately before the soft keyboard is raised.</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="2.6" 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.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.SoftKeyboardEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Dispatched immediately before the soft keyboard is raised.
  113. </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  114. Dispatched immediately before the soft keyboard is raised.
  115. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.events.xml#SoftKeyboardEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.SoftKeyboardEvent</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TextEvent.TEXT_INPUT_textInput" 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 ">textInput</apiName><shortdesc class="- topic/shortdesc ">
  116. Dispatched when a user enters one or more
  117. characters of text.</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.TextEvent.TEXT_INPUT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TextEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  118. Dispatched when a user enters one or more
  119. characters of text. Various
  120. text input methods can generate this event, including standard keyboards,
  121. input method editors (IMEs), voice or speech recognition systems, and even the act
  122. of pasting plain text with no formatting or style information.
  123. </apiDesc><example conref="examples\TextField_textInput.as" class="- topic/example "/></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.IMEEvent_imeStartComposition" 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 ">imeStartComposition</apiName><shortdesc class="- topic/shortdesc ">
  124. This event is dispatched to any client app that supports inline input with an IME
  125. </shortdesc><prolog class="- topic/prolog "><asMetadata class="+ topic/metadata adobe-api-d/asMetadata "><apiVersion class="+ topic/ph adobe-api-d/apiVersion "><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 "><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.IMEEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  126. This event is dispatched to any client app that supports inline input with an IME
  127. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.CONTEXT_MENU_contextMenu" 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 ">contextMenu</apiName><shortdesc class="- topic/shortdesc ">
  128. Dispatched when a user gesture triggers the context menu associated with this interactive
  129. object in an AIR 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="1.0" 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.MouseEvent.CONTEXT_MENU</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  130. Dispatched when a user gesture triggers the context menu associated with this interactive
  131. object in an AIR application.
  132. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/contextMenu" class="- topic/link "><linktext class="- topic/linktext ">contextMenu</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_COMPLETE_nativeDragComplete" 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 ">nativeDragComplete</apiName><shortdesc class="- topic/shortdesc ">
  133. Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture.</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_COMPLETE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  134. Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture.
  135. <p class="- topic/p ">The event's dropAction property indicates the action set
  136. by the drag target object; a value of "none" (<codeph class="+ topic/ph pr-d/codeph ">DragActions.NONE</codeph>)
  137. indicates that the drop was canceled or was not accepted.</p>
  138. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">nativeDragComplete</codeph> event handler is a convenient place
  139. to update the state of the initiating display object, for example, by removing
  140. an item from a list (on a drag action of "move"), or by changing the visual
  141. properties.</p>
  142. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_UPDATE_nativeDragUpdate" 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 ">nativeDragUpdate</apiName><shortdesc class="- topic/shortdesc ">
  143. Dispatched during a drag operation by the InteractiveObject that is
  144. specified as the drag initiator in the DragManager.doDrag() call.</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_UPDATE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  145. Dispatched during a drag operation by the InteractiveObject that is
  146. specified as the drag initiator in the DragManager.doDrag() call.
  147. <p class="- topic/p "><codeph class="+ topic/ph pr-d/codeph ">nativeDragUpdate</codeph> events are not dispatched on Linux.</p>
  148. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_START_nativeDragStart" 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 ">nativeDragStart</apiName><shortdesc class="- topic/shortdesc ">
  149. Dispatched at the beginning of a drag operation by the InteractiveObject that is
  150. specified as the drag initiator in the DragManager.doDrag() call.</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_START</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  151. Dispatched at the beginning of a drag operation by the InteractiveObject that is
  152. specified as the drag initiator in the DragManager.doDrag() call.
  153. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_EXIT_nativeDragExit" 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 ">nativeDragExit</apiName><shortdesc class="- topic/shortdesc ">
  154. Dispatched by an InteractiveObject when a drag gesture leaves its boundary.</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_EXIT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  155. Dispatched by an InteractiveObject when a drag gesture leaves its boundary.
  156. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_DROP_nativeDragDrop" 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 ">nativeDragDrop</apiName><shortdesc class="- topic/shortdesc ">
  157. Dispatched by the target InteractiveObject when a dragged object is
  158. dropped on it and the drop has been accepted with a call to
  159. DragManager.acceptDragDrop().</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_DROP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  160. Dispatched by the target InteractiveObject when a dragged object is
  161. dropped on it and the drop has been accepted with a call to
  162. DragManager.acceptDragDrop().
  163. <p class="- topic/p ">Access the dropped data using the event object <codeph class="+ topic/ph pr-d/codeph ">clipboard</codeph>
  164. property.</p>
  165. <p class="- topic/p ">The handler for this event should set the <codeph class="+ topic/ph pr-d/codeph ">DragManager.dropAction</codeph>
  166. property to provide feedback to the initiator object about which drag action
  167. was taken. If no value is set, the DragManager will select a default value
  168. from the list of allowed actions.</p>
  169. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_OVER_nativeDragOver" 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 ">nativeDragOver</apiName><shortdesc class="- topic/shortdesc ">
  170. Dispatched by an InteractiveObject continually while a drag gesture remains within its
  171. boundary.</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_OVER</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  172. Dispatched by an InteractiveObject continually while a drag gesture remains within its
  173. boundary.
  174. <p class="- topic/p "><codeph class="+ topic/ph pr-d/codeph ">nativeDragOver</codeph> events are dispatched whenever the mouse is moved. On Windows and
  175. Mac, they are also dispatched on a short timer interval even when the mouse has not moved.</p>
  176. <p class="- topic/p ">Handle either the <codeph class="+ topic/ph pr-d/codeph ">nativeDragOver</codeph> or <codeph class="+ topic/ph pr-d/codeph ">nativeDragEnter</codeph>
  177. events to allow the display object to become the drop target.</p>
  178. <p class="- topic/p ">To determine whether the dispatching display object can accept the drop,
  179. check the suitability of the data in <codeph class="+ topic/ph pr-d/codeph ">clipboard</codeph> property of
  180. the event object, and the allowed drag actions in the <codeph class="+ topic/ph pr-d/codeph ">allowedActions</codeph>
  181. property.</p>
  182. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.NativeDragEvent.NATIVE_DRAG_ENTER_nativeDragEnter" 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 ">nativeDragEnter</apiName><shortdesc class="- topic/shortdesc ">
  183. Dispatched by an InteractiveObject when a drag gesture enters its boundary.</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="1.0" 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.NativeDragEvent.NATIVE_DRAG_ENTER</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.NativeDragEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  184. Dispatched by an InteractiveObject when a drag gesture enters its boundary.
  185. <p class="- topic/p ">Handle either the <codeph class="+ topic/ph pr-d/codeph ">nativeDragEnter</codeph> or <codeph class="+ topic/ph pr-d/codeph ">nativeDragOver</codeph>
  186. events to allow the display object to become the drop target.</p>
  187. <p class="- topic/p ">To determine whether the dispatching display object can accept the drop,
  188. check the suitability of the data in <codeph class="+ topic/ph pr-d/codeph ">clipboard</codeph> property of
  189. the event object, and the allowed drag actions in the <codeph class="+ topic/ph pr-d/codeph ">allowedActions</codeph>
  190. property.</p>
  191. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.TAB_INDEX_CHANGE_tabIndexChange" 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 ">tabIndexChange</apiName><shortdesc class="- topic/shortdesc ">
  192. Dispatched when the value of the object's tabIndex property 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="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.Event.TAB_INDEX_CHANGE</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 ">
  193. Dispatched when the value of the object's <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> property changes.
  194. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.TAB_ENABLED_CHANGE_tabEnabledChange" 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 ">tabEnabledChange</apiName><shortdesc class="- topic/shortdesc ">
  195. Dispatched when the object's tabEnabled flag 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="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.Event.TAB_ENABLED_CHANGE</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 ">
  196. Dispatched when the object's <codeph class="+ topic/ph pr-d/codeph ">tabEnabled</codeph> flag changes.
  197. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.TAB_CHILDREN_CHANGE_tabChildrenChange" 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 ">tabChildrenChange</apiName><shortdesc class="- topic/shortdesc ">
  198. Dispatched when the value of the object's tabChildren flag 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="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.Event.TAB_CHILDREN_CHANGE</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 ">
  199. Dispatched when the value of the object's <codeph class="+ topic/ph pr-d/codeph ">tabChildren</codeph> flag changes.
  200. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.KeyboardEvent.KEY_UP_keyUp" 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 ">keyUp</apiName><shortdesc class="- topic/shortdesc ">
  201. Dispatched when the user releases a key.</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.KeyboardEvent.KEY_UP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.KeyboardEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  202. Dispatched when the user releases a key. Mappings between keys and specific characters vary
  203. by device and operating system. This event type is generated after such a mapping occurs
  204. but before the processing of an input method editor (IME). IMEs are used to enter
  205. characters, such as Chinese ideographs, that the standard QWERTY keyboard is
  206. ill-equipped to produce. This event occurs after a <codeph class="+ topic/ph pr-d/codeph ">keyDown</codeph> event and has
  207. the following characteristics:
  208. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.KeyboardEvent.KEY_DOWN_keyDown" 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 ">keyDown</apiName><shortdesc class="- topic/shortdesc ">
  209. Dispatched when the user presses a key.</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.KeyboardEvent.KEY_DOWN</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.KeyboardEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  210. Dispatched when the user presses a key. Mappings between keys and specific characters
  211. vary by device and operating system. This event type is generated after such a mapping
  212. occurs but before the processing of an input method
  213. editor (IME). IMEs are used to enter characters, such as Chinese ideographs, that the standard QWERTY keyboard is ill-equipped
  214. to produce. This event occurs before the <codeph class="+ topic/ph pr-d/codeph ">keyUp</codeph> event.
  215. <p class="- topic/p ">In AIR, canceling this event prevents the character from being entered into a text field.</p>
  216. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.RIGHT_MOUSE_UP_rightMouseUp" 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 ">rightMouseUp</apiName><shortdesc class="- topic/shortdesc ">
  217. Dispatched when a user releases the pointing device button over an
  218. InteractiveObject instance.</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="1.0" 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.MouseEvent.RIGHT_MOUSE_UP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  219. Dispatched when a user releases the pointing device button over an
  220. InteractiveObject instance.
  221. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.RIGHT_MOUSE_DOWN_rightMouseDown" 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 ">rightMouseDown</apiName><shortdesc class="- topic/shortdesc ">
  222. Dispatched when a user presses the pointing device button over an InteractiveObject instance.</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="1.0" 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.MouseEvent.RIGHT_MOUSE_DOWN</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  223. Dispatched when a user presses the pointing device button over an InteractiveObject instance.
  224. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.RIGHT_CLICK_rightClick" 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 ">rightClick</apiName><shortdesc class="- topic/shortdesc ">
  225. Dispatched when a user presses and releases the right button of the user's
  226. pointing device over the same InteractiveObject.</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="1.0" 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.MouseEvent.RIGHT_CLICK</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  227. Dispatched when a user presses and releases the right button of the user's
  228. pointing device over the same InteractiveObject. For a <codeph class="+ topic/ph pr-d/codeph ">rightClick</codeph> event to occur, it must always follow this series of
  229. events in the order of occurrence: <codeph class="+ topic/ph pr-d/codeph ">rightMouseDown</codeph> event, then <codeph class="+ topic/ph pr-d/codeph ">rightMouseUp</codeph>. The target object
  230. must be identical for both of these events; otherwise the <codeph class="+ topic/ph pr-d/codeph ">rightClick</codeph> event does not
  231. occur. Any number of other mouse events can occur at any time between the
  232. <codeph class="+ topic/ph pr-d/codeph ">rightMouseDown</codeph> or <codeph class="+ topic/ph pr-d/codeph ">rightMouseUp</codeph> events; the <codeph class="+ topic/ph pr-d/codeph ">rightClick</codeph> event
  233. still occurs.
  234. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MIDDLE_MOUSE_UP_middleMouseUp" 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 ">middleMouseUp</apiName><shortdesc class="- topic/shortdesc ">
  235. Dispatched when a user releases the pointing device button over an
  236. InteractiveObject instance.</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="1.0" 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.MouseEvent.MIDDLE_MOUSE_UP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  237. Dispatched when a user releases the pointing device button over an
  238. InteractiveObject instance.
  239. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MIDDLE_MOUSE_DOWN_middleMouseDown" 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 ">middleMouseDown</apiName><shortdesc class="- topic/shortdesc ">
  240. Dispatched when a user presses the middle pointing device button over an InteractiveObject instance.</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="1.0" 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.MouseEvent.MIDDLE_MOUSE_DOWN</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  241. Dispatched when a user presses the middle pointing device button over an InteractiveObject instance.
  242. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MIDDLE_CLICK_middleClick" 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 ">middleClick</apiName><shortdesc class="- topic/shortdesc ">
  243. Dispatched when a user presses and releases the middle button of the user's
  244. pointing device over the same InteractiveObject.</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="1.0" 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.MouseEvent.MIDDLE_CLICK</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  245. Dispatched when a user presses and releases the middle button of the user's
  246. pointing device over the same InteractiveObject. For a <codeph class="+ topic/ph pr-d/codeph ">middleClick</codeph> event to occur, it must always follow this series of
  247. events in the order of occurrence: <codeph class="+ topic/ph pr-d/codeph ">middleMouseDown</codeph> event, then <codeph class="+ topic/ph pr-d/codeph ">middleMouseUp</codeph>. The target object
  248. must be identical for both of these events; otherwise the <codeph class="+ topic/ph pr-d/codeph ">middleClick</codeph> event does not
  249. occur. Any number of other mouse events can occur at any time between the
  250. <codeph class="+ topic/ph pr-d/codeph ">middleMouseDown</codeph> or <codeph class="+ topic/ph pr-d/codeph ">middleMouseUp</codeph> events; the <codeph class="+ topic/ph pr-d/codeph ">middleClick</codeph> event
  251. still occurs.
  252. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TransformGestureEvent.GESTURE_SWIPE_gestureSwipe" 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 ">gestureSwipe</apiName><shortdesc class="- topic/shortdesc ">
  253. Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three
  254. fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen).</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 "/><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.TransformGestureEvent.GESTURE_SWIPE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TransformGestureEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  255. Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three
  256. fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen).
  257. Moving several fingers in parallel is a common swipe gesture,
  258. but each device and operating system can have its own requirements for a swipe.
  259. Some devices might also interpret this contact as a combination of several mouse events, as well.
  260. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, and then moves the fingers together, the InteractiveObject instance can
  261. dispatch a <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph>
  262. event and a <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event (among others), in addition to the <codeph class="+ topic/ph pr-d/codeph ">gestureSwipe</codeph> event, or all if the current environment supports it.
  263. Choose how you want to handle the user interaction.
  264. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event, then the same event handler will run on a touch-enabled device and
  265. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">gestureSwipe</codeph> event, you can design your event handler
  266. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  267. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  268. <p class="- topic/p ">When handling the properties of the event object, note that the <codeph class="+ topic/ph pr-d/codeph ">localX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">localY</codeph> properties are set to the
  269. primary point of contact. The <codeph class="+ topic/ph pr-d/codeph ">offsetX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">offsetY</codeph> properties are the distance to the point of contact where the swipe gesture
  270. is complete.</p>
  271. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> While some devices using the Mac OS operating system can
  272. interpret a four-finger swipe, this API only supports a three-finger swipe.</p>
  273. </apiDesc><example conref="..\events\examples\TransformGesture_swipe.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">GESTURE_SWIPE</codeph> events.
  274. While the user performs a swipe gesture on the touch-enabled device, myTextField populates with the phase <codeph class="+ topic/ph pr-d/codeph ">all</codeph>,
  275. which is the only phase for swipe events.
  276. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  277. Multitouch.inputMode = MultitouchInputMode.GESTURE;
  278. var mySprite = new Sprite();
  279. mySprite.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
  280. mySprite.graphics.beginFill(0x336699);
  281. mySprite.graphics.drawRect(0, 0, 100, 80);
  282. var myTextField = new TextField();
  283. myTextField.y = 200;
  284. addChild(mySprite);
  285. addChild(myTextField);
  286. function onSwipe(evt:TransformGestureEvent):void {
  287. if (evt.offsetX == 1 ) {
  288. myTextField.text = "right";
  289. }
  290. if (evt.offsetY == -1) {
  291. myTextField.text = "up";
  292. }
  293. myTextField.text = evt.phase;
  294. }
  295. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:rollOver" class="- topic/link "><linktext class="- topic/linktext ">rollOver event</linktext></link><link href="flash.display.xml#InteractiveObject/event:touchOver" class="- topic/link "><linktext class="- topic/linktext ">touchOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TransformGestureEvent.GESTURE_ZOOM_gestureZoom" 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 ">gestureZoom</apiName><shortdesc class="- topic/shortdesc ">
  296. Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two
  297. fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen).</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 "/><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.TransformGestureEvent.GESTURE_ZOOM</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TransformGestureEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  298. Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two
  299. fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen).
  300. Moving fingers apart is a common zoom gesture,
  301. but each device and operating system can have its own requirements to indicate zoom.
  302. Some devices might also interpret this contact as a combination of several mouse events, as well.
  303. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, and then moves the fingers apart, the InteractiveObject instance can
  304. dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph>
  305. event and a <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event (among others), in addition to the <codeph class="+ topic/ph pr-d/codeph ">gestureZoom</codeph> event, or all if the current environment supports it.
  306. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  307. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  308. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event, then the same event handler will run on a touch-enabled device and
  309. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">gestureZoom</codeph> event, you can design your event handler
  310. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  311. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  312. <p class="- topic/p ">When handling the properties of the event object, note that the <codeph class="+ topic/ph pr-d/codeph ">localX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">localY</codeph> properties are set to the
  313. primary point of contact. The <codeph class="+ topic/ph pr-d/codeph ">offsetX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">offsetY</codeph> properties are the distance to the point of contact where the zoom gesture
  314. is complete.</p>
  315. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  316. </apiDesc><example conref="..\events\examples\TransformGesture_zoom.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">GESTURE_ZOOM</codeph> events.
  317. While the user performs a zoom gesture on the touch-enabled device, myTextField populates with the current phase.
  318. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  319. Multitouch.inputMode = MultitouchInputMode.GESTURE;
  320. var mySprite = new Sprite();
  321. mySprite.addEventListener(TransformGestureEvent.GESTURE_ZOOM , onZoom);
  322. mySprite.graphics.beginFill(0x336699);
  323. mySprite.graphics.drawRect(0, 0, 100, 80);
  324. var myTextField = new TextField();
  325. myTextField.y = 200;
  326. addChild(mySprite);
  327. addChild(myTextField);
  328. function onZoom(evt:TransformGestureEvent):void {
  329. evt.target.scaleX++;
  330. if (evt.phase==GesturePhase.BEGIN) {
  331. myTextField.text = "Begin";
  332. }
  333. if (evt.phase==GesturePhase.UPDATE) {
  334. myTextField.text = "Update";
  335. }
  336. if (evt.phase==GesturePhase.END) {
  337. myTextField.text = "End";
  338. }
  339. }
  340. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseOver" class="- topic/link "><linktext class="- topic/linktext ">mouseOver event</linktext></link><link href="flash.display.xml#InteractiveObject/event:touchOver" class="- topic/link "><linktext class="- topic/linktext ">touchOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TransformGestureEvent.GESTURE_ROTATE_gestureRotate" 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 ">gestureRotate</apiName><shortdesc class="- topic/shortdesc ">
  341. Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers
  342. and rotating them over a display object on a mobile phone or tablet with a touch screen).</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 "/><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.TransformGestureEvent.GESTURE_ROTATE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TransformGestureEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  343. Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers
  344. and rotating them over a display object on a mobile phone or tablet with a touch screen). Two-finger rotation is a common rotation gesture,
  345. but each device and operating system can have its own requirements to indicate rotation.
  346. Some devices might also interpret this contact as a combination of several mouse events, as well.
  347. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can
  348. dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph>
  349. event and a <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event (among others), in addition to the <codeph class="+ topic/ph pr-d/codeph ">gestureRotate</codeph> event, or all if the current environment supports it.
  350. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  351. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  352. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event, then the same event handler will run on a touch-enabled device and
  353. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">gestureRotate</codeph> event, you can design your event handler
  354. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  355. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  356. <p class="- topic/p ">When handling the properties of the event object, note that the <codeph class="+ topic/ph pr-d/codeph ">localX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">localY</codeph> properties are set to the
  357. primary point of contact. The <codeph class="+ topic/ph pr-d/codeph ">offsetX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">offsetY</codeph> properties are the distance to the point of contact where the rotation gesture
  358. is complete.</p>
  359. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  360. </apiDesc><example conref="..\events\examples\TransformGestureEventExample.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">GESTURE_ROTATE</codeph> events.
  361. While the user performs a rotation gesture on the touch-enabled device, mySprite rotates and myTextField populates with the current phase.
  362. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  363. Multitouch.inputMode = MultitouchInputMode.GESTURE;
  364. var mySprite = new Sprite();
  365. mySprite.addEventListener(TransformGestureEvent.GESTURE_ROTATE , onRotate );
  366. mySprite.graphics.beginFill(0x336699);
  367. mySprite.graphics.drawRect(0, 0, 100, 80);
  368. var myTextField = new TextField();
  369. myTextField.y = 200;
  370. addChild(mySprite);
  371. addChild(myTextField);
  372. function onRotate(evt:TransformGestureEvent):void {
  373. evt.target.rotation -= 45;
  374. if (evt.phase==GesturePhase.BEGIN) {
  375. myTextField.text = "Begin";
  376. }
  377. if (evt.phase==GesturePhase.UPDATE) {
  378. myTextField.text = "Update";
  379. }
  380. if (evt.phase==GesturePhase.END) {
  381. myTextField.text = "End";
  382. }
  383. }
  384. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseOver" class="- topic/link "><linktext class="- topic/linktext ">mouseOver event</linktext></link><link href="flash.display.xml#InteractiveObject/event:touchOver" class="- topic/link "><linktext class="- topic/linktext ">touchOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP_gesturePressAndTap" 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 ">gesturePressAndTap</apiName><shortdesc class="- topic/shortdesc ">
  385. Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps
  386. on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item
  387. on a mobile phone or tablet with a touch screen).</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 "/><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.PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.PressAndTapGestureEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  388. Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps
  389. on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item
  390. on a mobile phone or tablet with a touch screen).
  391. Some devices might also interpret this contact as a combination of several mouse events, as well.
  392. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, and then provides a secondary tap, the InteractiveObject instance can
  393. dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph>
  394. event and a <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event (among others) as well as the <codeph class="+ topic/ph pr-d/codeph ">gesturePressAndTap</codeph> event, or all if the current environment supports it.
  395. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  396. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  397. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event, then the same event handler will run on a touch-enabled device and
  398. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">gesturePressAndTap</codeph> event, you can design your event handler
  399. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  400. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  401. <p class="- topic/p ">When handling the properties of the event object, note that the <codeph class="+ topic/ph pr-d/codeph ">localX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">localY</codeph> properties are set to the
  402. primary point of contact (the "push"). The <codeph class="+ topic/ph pr-d/codeph ">offsetX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">offsetY</codeph> properties are the distance to the secondary point of
  403. contact (the "tap").</p>
  404. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseOver" class="- topic/link "><linktext class="- topic/linktext ">mouseOver event</linktext></link><link href="flash.display.xml#InteractiveObject/event:touchOver" class="- topic/link "><linktext class="- topic/linktext ">touchOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TransformGestureEvent.GESTURE_PAN_gesturePan" 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 ">gesturePan</apiName><shortdesc class="- topic/shortdesc ">
  405. Dispatched when the user moves a point of contact over the InteractiveObject instance
  406. on a touch-enabled device (such as moving a finger from left to right over a display object
  407. on a mobile phone or tablet with a touch screen).</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 "/><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.TransformGestureEvent.GESTURE_PAN</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TransformGestureEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  408. Dispatched when the user moves a point of contact over the InteractiveObject instance
  409. on a touch-enabled device (such as moving a finger from left to right over a display object
  410. on a mobile phone or tablet with a touch screen).
  411. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event and as a <codeph class="+ topic/ph pr-d/codeph ">touchOver</codeph> event.
  412. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph>
  413. event or a <codeph class="+ topic/ph pr-d/codeph ">touchOver</codeph> event or a <codeph class="+ topic/ph pr-d/codeph ">gesturePan</codeph> event, or all if the current environment supports it.
  414. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  415. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  416. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event, then the same event handler will run on a touch-enabled device and
  417. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">gesturePan</codeph> event, you can design your event handler
  418. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  419. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  420. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  421. </apiDesc><example conref="..\events\examples\TransformGesture_pan.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">GESTURE_PAN</codeph> events.
  422. While the user performs a pan gesture on the touch-enabled device, myTextField populates with the current phase.
  423. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  424. Multitouch.inputMode = MultitouchInputMode.GESTURE;
  425. var mySprite = new Sprite();
  426. mySprite.addEventListener(TransformGestureEvent.GESTURE_PAN , onPan);
  427. mySprite.graphics.beginFill(0x336699);
  428. mySprite.graphics.drawRect(0, 0, 100, 80);
  429. var myTextField = new TextField();
  430. myTextField.y = 200;
  431. addChild(mySprite);
  432. addChild(myTextField);
  433. function onPan(evt:TransformGestureEvent):void {
  434. evt.target.localX++;
  435. if (evt.phase==GesturePhase.BEGIN) {
  436. myTextField.text = "Begin";
  437. }
  438. if (evt.phase==GesturePhase.UPDATE) {
  439. myTextField.text = "Update";
  440. }
  441. if (evt.phase==GesturePhase.END) {
  442. myTextField.text = "End";
  443. }
  444. }
  445. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseOver" class="- topic/link "><linktext class="- topic/linktext ">mouseOver event</linktext></link><link href="flash.display.xml#InteractiveObject/event:touchOver" class="- topic/link "><linktext class="- topic/linktext ">touchOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.GestureEvent.GESTURE_TWO_FINGER_TAP_gestureTwoFingerTap" 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 ">gestureTwoFingerTap</apiName><shortdesc class="- topic/shortdesc ">
  446. Dispatched when the user presses two points of contact over the same InteractiveObject instance
  447. on a touch-enabled device (such as presses and releases two fingers over a display object
  448. on a mobile phone or tablet with a touch screen).</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 "/><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.GestureEvent.GESTURE_TWO_FINGER_TAP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.GestureEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  449. Dispatched when the user presses two points of contact over the same InteractiveObject instance
  450. on a touch-enabled device (such as presses and releases two fingers over a display object
  451. on a mobile phone or tablet with a touch screen).
  452. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> event.
  453. <p class="- topic/p ">Specifically, if a user taps two fingers over an InteractiveObject, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph>
  454. event or a <codeph class="+ topic/ph pr-d/codeph ">gestureTwoFingerTap</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  455. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  456. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  457. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> event, then the same event handler will run on a touch-enabled device and
  458. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">gestureTwoFingerTap</codeph> event, you can design your event handler
  459. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  460. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  461. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  462. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:doubleClick" class="- topic/link "><linktext class="- topic/linktext ">doubleClick event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_TAP_touchTap" 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 ">touchTap</apiName><shortdesc class="- topic/shortdesc ">
  463. Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated
  464. on a touch-enabled device (such as presses and releases a finger from a single point over a display object
  465. on a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_TAP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  466. Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated
  467. on a touch-enabled device (such as presses and releases a finger from a single point over a display object
  468. on a mobile phone or tablet with a touch screen).
  469. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event.
  470. <p class="- topic/p ">Specifically, if a user taps a finger over an InteractiveObject, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">click</codeph>
  471. event or a <codeph class="+ topic/ph pr-d/codeph ">touchTap</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  472. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  473. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  474. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event, then the same event handler will run on a touch-enabled device and
  475. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchTap</codeph> event, you can design your event handler
  476. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  477. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  478. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  479. </apiDesc><example conref="..\ui\examples\Multitouch_inputMode.as" class="- topic/example "> The following example displays a message when the
  480. square drawn on mySprite is tapped on a touch-enabled screen:
  481. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  482. Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;
  483. var mySprite:Sprite = new Sprite();
  484. var myTextField:TextField = new TextField();
  485. mySprite.graphics.beginFill(0x336699);
  486. mySprite.graphics.drawRect(0,0,40,40);
  487. addChild(mySprite);
  488. mySprite.addEventListener(TouchEvent.TOUCH_TAP, taphandler);
  489. function taphandler(e:TouchEvent): void {
  490. myTextField.text = "I've been tapped";
  491. myTextField.y = 50;
  492. addChild(myTextField);
  493. }
  494. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:click" class="- topic/link "><linktext class="- topic/linktext ">click event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_ROLL_OVER_touchRollOver" 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 ">touchRollOver</apiName><shortdesc class="- topic/shortdesc ">
  495. Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device
  496. (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_ROLL_OVER</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  497. Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device
  498. (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).
  499. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event.
  500. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph>
  501. event or a <codeph class="+ topic/ph pr-d/codeph ">touchRollOver</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  502. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  503. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  504. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event, then the same event handler will run on a touch-enabled device and
  505. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchRollOver</codeph> event, you can design your event handler
  506. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  507. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  508. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  509. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:rollOver" class="- topic/link "><linktext class="- topic/linktext ">rollOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_ROLL_OUT_touchRollOut" 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 ">touchRollOut</apiName><shortdesc class="- topic/shortdesc ">
  510. Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device
  511. (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_ROLL_OUT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  512. Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device
  513. (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen).
  514. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event.
  515. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph>
  516. event or a <codeph class="+ topic/ph pr-d/codeph ">touchRollOut</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  517. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  518. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  519. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event, then the same event handler will run on a touch-enabled device and
  520. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchRollOut</codeph> event, you can design your event handler
  521. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  522. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  523. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  524. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:rollOut" class="- topic/link "><linktext class="- topic/linktext ">rollOut event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_OVER_touchOver" 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 ">touchOver</apiName><shortdesc class="- topic/shortdesc ">
  525. Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device
  526. (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_OVER</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  527. Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device
  528. (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).
  529. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event.
  530. <p class="- topic/p ">Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph>
  531. event or a <codeph class="+ topic/ph pr-d/codeph ">touchOver</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  532. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  533. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  534. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event, then the same event handler will run on a touch-enabled device and
  535. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchOver</codeph> event, you can design your event handler
  536. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  537. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  538. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  539. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseOver" class="- topic/link "><linktext class="- topic/linktext ">mouseOver event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_OUT_touchOut" 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 ">touchOut</apiName><shortdesc class="- topic/shortdesc ">
  540. Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device
  541. (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_OUT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  542. Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device
  543. (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen).
  544. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">mouseOut</codeph> event.
  545. <p class="- topic/p ">Specifically, if a user moves a finger across a touch screen, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseOut</codeph>
  546. event or a <codeph class="+ topic/ph pr-d/codeph ">touchOut</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  547. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  548. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  549. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseOut</codeph> event, then the same event handler will run on a touch-enabled device and
  550. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchOut</codeph> event, you can design your event handler
  551. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  552. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  553. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  554. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseOut" class="- topic/link "><linktext class="- topic/linktext ">mouseOut event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_MOVE_touchMove" 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 ">touchMove</apiName><shortdesc class="- topic/shortdesc ">
  555. Dispatched when the user moves the point of contact with a touch-enabled device (such as drags a finger across a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_MOVE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  556. Dispatched when the user moves the point of contact with a touch-enabled device (such as drags a finger across a mobile phone or tablet with a touch screen).
  557. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">mouseMove</codeph> event.
  558. <p class="- topic/p ">Specifically, if a user moves a finger across a touch screen, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseMove</codeph>
  559. event or a <codeph class="+ topic/ph pr-d/codeph ">touchMove</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  560. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  561. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  562. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseMove</codeph> event, then the same event handler will run on a touch-enabled device and
  563. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchMove</codeph> event, you can design your event handler
  564. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  565. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  566. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  567. </apiDesc><example conref="..\events\examples\TouchEventExample.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">TOUCH_BEGIN</codeph>, <codeph class="+ topic/ph pr-d/codeph ">TOUCH_MOVE</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">TOUCH_END</codeph> events.
  568. While the point of contact moves across the screen (<codeph class="+ topic/ph pr-d/codeph ">onTouchMove</codeph>), the x-coordinate relative to the stage is traced to output.
  569. For the <codeph class="+ topic/ph pr-d/codeph ">Sprite.startTouchDrag</codeph> parameters in the <codeph class="+ topic/ph pr-d/codeph ">onTouchBegin</codeph> function, the value for touchPointID is the value assigned to the event object.
  570. The bounds parameter is the rectangle defining the boundaries of
  571. the parent display object (bg is a display object containing MySprite).
  572. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  573. Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  574. MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
  575. MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
  576. MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
  577. function onTouchBegin(eBegin:TouchEvent) {
  578. eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
  579. trace("touch begin");
  580. }
  581. function onTouchMove(eMove:TouchEvent) {
  582. trace(eMove.stageX);
  583. }
  584. function onTouchEnd(eEnd:TouchEvent) {
  585. eEnd.target.stopTouchDrag(eEnd.touchPointID);
  586. trace("touch end");
  587. }
  588. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseMove" class="- topic/link "><linktext class="- topic/linktext ">mouseMove event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_END_touchEnd" 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 ">touchEnd</apiName><shortdesc class="- topic/shortdesc ">
  589. Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_END</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  590. Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen).
  591. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph> event.
  592. <p class="- topic/p ">Specifically, if a user lifts a finger from a touch screen, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph>
  593. event or a <codeph class="+ topic/ph pr-d/codeph ">touchEnd</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  594. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  595. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  596. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph> event, then the same event handler will run on a touch-enabled device and
  597. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchEnd</codeph> event, you can design your event handler
  598. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  599. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  600. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  601. </apiDesc><example conref="..\events\examples\TouchEventExample.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">TOUCH_BEGIN</codeph>, <codeph class="+ topic/ph pr-d/codeph ">TOUCH_MOVE</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">TOUCH_END</codeph> events.
  602. While the point of contact moves across the screen (<codeph class="+ topic/ph pr-d/codeph ">onTouchMove</codeph>), the x-coordinate relative to the stage is traced to output.
  603. For the <codeph class="+ topic/ph pr-d/codeph ">Sprite.startTouchDrag</codeph> parameters in the <codeph class="+ topic/ph pr-d/codeph ">onTouchBegin</codeph> function, the value for touchPointID is the value assigned to the event object.
  604. The bounds parameter is the rectangle defining the boundaries of
  605. the parent display object (bg is a display object containing MySprite).
  606. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  607. Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  608. MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
  609. MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
  610. MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
  611. function onTouchBegin(eBegin:TouchEvent) {
  612. eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
  613. trace("touch begin");
  614. }
  615. function onTouchMove(eMove:TouchEvent) {
  616. trace(eMove.stageX);
  617. }
  618. function onTouchEnd(eEnd:TouchEvent) {
  619. eEnd.target.stopTouchDrag(eEnd.touchPointID);
  620. trace("touch end");
  621. }
  622. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseUp" class="- topic/link "><linktext class="- topic/linktext ">mouseUp event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.TouchEvent.TOUCH_BEGIN_touchBegin" 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 ">touchBegin</apiName><shortdesc class="- topic/shortdesc ">
  623. Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen).</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 "/><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.TouchEvent.TOUCH_BEGIN</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.TouchEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  624. Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen).
  625. Some devices might also interpret this contact as a <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph> event.
  626. <p class="- topic/p ">Specifically, if a user touches a finger to a touch screen, the InteractiveObject instance can dispatch a <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph>
  627. event or a <codeph class="+ topic/ph pr-d/codeph ">touchBegin</codeph> event, or both if the current environment supports it. Choose how you want to handle the user interaction.
  628. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling,
  629. simple touch point event handling, or disable touch events so only mouse events are dispatched).
  630. If you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph> event, then the same event handler will run on a touch-enabled device and
  631. a mouse enabled device. However, if you choose to handle the <codeph class="+ topic/ph pr-d/codeph ">touchBegin</codeph> event, you can design your event handler
  632. to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled
  633. experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.</p>
  634. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> See the Multitouch class for environment compatibility information.</p>
  635. </apiDesc><example conref="..\events\examples\TouchEventExample.as" class="- topic/example "> The following example shows event handling for the <codeph class="+ topic/ph pr-d/codeph ">TOUCH_BEGIN</codeph>, <codeph class="+ topic/ph pr-d/codeph ">TOUCH_MOVE</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">TOUCH_END</codeph> events.
  636. While the point of contact moves across the screen (<codeph class="+ topic/ph pr-d/codeph ">onTouchMove</codeph>), the x-coordinate relative to the stage is traced to output.
  637. For the <codeph class="+ topic/ph pr-d/codeph ">Sprite.startTouchDrag</codeph> parameters in the <codeph class="+ topic/ph pr-d/codeph ">onTouchBegin</codeph> function, the value for touchPointID is the value assigned to the event object.
  638. The bounds parameter is the rectangle defining the boundaries of
  639. the parent display object (bg is a display object containing MySprite).
  640. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  641. Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  642. MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
  643. MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
  644. MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
  645. function onTouchBegin(eBegin:TouchEvent) {
  646. eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
  647. trace("touch begin");
  648. }
  649. function onTouchMove(eMove:TouchEvent) {
  650. trace(eMove.stageX);
  651. }
  652. function onTouchEnd(eEnd:TouchEvent) {
  653. eEnd.target.stopTouchDrag(eEnd.touchPointID);
  654. trace("touch end");
  655. }
  656. </codeblock></example></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:mouseDown" class="- topic/link "><linktext class="- topic/linktext ">mouseDown event</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.ROLL_OVER_rollOver" 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 ">rollOver</apiName><shortdesc class="- topic/shortdesc ">
  657. Dispatched when the user moves a pointing device over an InteractiveObject instance.</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.MouseEvent.ROLL_OVER</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  658. Dispatched when the user moves a pointing device over an InteractiveObject instance.
  659. The event target is the object under the pointing device or a parent of that object.
  660. The <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> is the object that was previously under the pointing
  661. device. The <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> events are dispatched consecutively down the parent
  662. chain of the object, starting with the highest parent that is neither the root
  663. nor an ancestor of the <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> and ending with the object.
  664. <p class="- topic/p ">The purpose of the <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event is to simplify the coding of rollout behaviors for
  665. display object containers with children. When the mouse enters the area of a display
  666. object or the area of any of its children from an object that is not one of its
  667. children, the display object dispatches the <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event. This is different behavior
  668. than that of the <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event, which is dispatched each time the mouse
  669. enters the area of any child object of the display object container, even if the mouse
  670. was already over another child object of the display object container. </p>
  671. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.ROLL_OUT_rollOut" 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 ">rollOut</apiName><shortdesc class="- topic/shortdesc ">
  672. Dispatched when the user moves a pointing device away from an InteractiveObject
  673. instance.</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.MouseEvent.ROLL_OUT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  674. Dispatched when the user moves a pointing device away from an InteractiveObject
  675. instance. The event target is the object previously under the pointing device or a parent of
  676. that object. The <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> is the object that the pointing device has moved to.
  677. The <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> events are dispatched consecutively up the parent chain of the object,
  678. starting with the object and ending with the highest parent that is neither the root nor an
  679. ancestor of the <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph>.
  680. <p class="- topic/p ">The purpose of the <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event is to simplify the
  681. coding of rollover behaviors for display object containers with children. When the mouse leaves
  682. the area of a display object or the area of any of its children to go to an object that is not
  683. one of its children, the display object dispatches the <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event. This is different behavior
  684. than that of the <codeph class="+ topic/ph pr-d/codeph ">mouseOut</codeph> event, which is dispatched each time the mouse leaves the
  685. area of any child object of the display object container, even if the mouse remains over another
  686. child object of the display object container.</p>
  687. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MOUSE_WHEEL_mouseWheel" 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 ">mouseWheel</apiName><shortdesc class="- topic/shortdesc ">
  688. Dispatched when a mouse wheel is spun over an InteractiveObject instance.</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.MouseEvent.MOUSE_WHEEL</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  689. Dispatched when a mouse wheel is spun over an InteractiveObject instance.
  690. If the target is a text field, the text scrolls as the default behavior.
  691. Only available on Microsoft Windows operating systems.
  692. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MOUSE_UP_mouseUp" 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 ">mouseUp</apiName><shortdesc class="- topic/shortdesc ">
  693. Dispatched when a user releases the pointing device button over an
  694. InteractiveObject instance.</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.MouseEvent.MOUSE_UP</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  695. Dispatched when a user releases the pointing device button over an
  696. InteractiveObject instance.
  697. If the target is a SimpleButton instance, the object displays the <codeph class="+ topic/ph pr-d/codeph ">upState</codeph>
  698. display object.
  699. If the target is a selectable text field, the text field ends selection as the default
  700. behavior.
  701. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MOUSE_OVER_mouseOver" 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 ">mouseOver</apiName><shortdesc class="- topic/shortdesc ">
  702. Dispatched when the user moves a pointing device over an InteractiveObject instance.</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.MouseEvent.MOUSE_OVER</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  703. Dispatched when the user moves a pointing device over an InteractiveObject instance.
  704. The <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> is the object that was previously under
  705. the pointing device.
  706. If the target is a SimpleButton instance, the object displays the <codeph class="+ topic/ph pr-d/codeph ">overState</codeph>
  707. or <codeph class="+ topic/ph pr-d/codeph ">upState</codeph> display object, depending on whether the mouse button is down, as the default behavior.
  708. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">mouseOver</codeph> event is dispatched each time the mouse enters the area of any child object of the display object container,
  709. even if the mouse was already over another child object of the display object container.
  710. This is different behavior than the purpose of the <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event, which is to simplify the coding of rollout behaviors for
  711. display object containers with children. When the mouse enters the area of a display object or the area of any of its children from an object
  712. that is not one of its children, the display object dispatches the <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> event.
  713. The <codeph class="+ topic/ph pr-d/codeph ">rollOver</codeph> events are dispatched consecutively down the parent chain of the object,
  714. starting with the highest parent that is neither the root nor an ancestor of the <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> and ending with the object.</p>
  715. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MOUSE_OUT_mouseOut" 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 ">mouseOut</apiName><shortdesc class="- topic/shortdesc ">
  716. Dispatched when the user moves a pointing device away from an InteractiveObject instance.</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.MouseEvent.MOUSE_OUT</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  717. Dispatched when the user moves a pointing device away from an InteractiveObject instance.
  718. The event target is the object previously under the pointing device. The <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph>
  719. is the object the pointing device has moved to.
  720. If the target is a SimpleButton instance, the button displays the <codeph class="+ topic/ph pr-d/codeph ">upState</codeph>
  721. display object as the default behavior.
  722. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">mouseOut</codeph> event is dispatched each time the mouse leaves the
  723. area of any child object of the display object container, even if the mouse remains over another
  724. child object of the display object container. This is different behavior than the purpose of the <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event, which is to simplify the
  725. coding of rollover behaviors for display object containers with children. When the mouse leaves
  726. the area of a display object or the area of any of its children to go to an object that is not
  727. one of its children, the display object dispatches the <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> event.The <codeph class="+ topic/ph pr-d/codeph ">rollOut</codeph> events are dispatched consecutively
  728. up the parent chain of the object, starting with the object and ending with the highest parent that is neither the root nor an
  729. ancestor of the <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph>.</p>
  730. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MOUSE_MOVE_mouseMove" 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 ">mouseMove</apiName><shortdesc class="- topic/shortdesc ">
  731. Dispatched when a user moves the pointing device while it is over an InteractiveObject.</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.MouseEvent.MOUSE_MOVE</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  732. Dispatched when a user moves the pointing device while it is over an InteractiveObject.
  733. If the target is a text field that the user is selecting, the selection is updated as the default behavior.
  734. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.MOUSE_DOWN_mouseDown" 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 ">mouseDown</apiName><shortdesc class="- topic/shortdesc ">
  735. Dispatched when a user presses the pointing device button over an InteractiveObject instance.</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.MouseEvent.MOUSE_DOWN</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  736. Dispatched when a user presses the pointing device button over an InteractiveObject instance.
  737. If the target is a SimpleButton instance, the SimpleButton instance displays the
  738. <codeph class="+ topic/ph pr-d/codeph ">downState</codeph> display object as the default behavior. If the target is a
  739. selectable text field, the text field begins selection as the default behavior.
  740. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.DOUBLE_CLICK_doubleClick" 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 ">doubleClick</apiName><shortdesc class="- topic/shortdesc ">
  741. Dispatched when a user presses and releases the main button of a pointing device twice in
  742. rapid succession over the same InteractiveObject when that object's
  743. doubleClickEnabled flag is set to true.</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.MouseEvent.DOUBLE_CLICK</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  744. Dispatched when a user presses and releases the main button of a pointing device twice in
  745. rapid succession over the same InteractiveObject when that object's
  746. <codeph class="+ topic/ph pr-d/codeph ">doubleClickEnabled</codeph> flag is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  747. For a <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> event to occur, it must immediately follow the following
  748. series of events: <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph>, <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph>, <codeph class="+ topic/ph pr-d/codeph ">click</codeph>,
  749. <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph>, <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph>. All of these events must share the same
  750. target as the <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> event. The second click, represented by
  751. the second <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph> and <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph> events, must occur within
  752. a specific period of time after the <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event. The allowable length of
  753. this period varies by operating system and can often be configured by the user.
  754. If the target is a selectable text field, the word under the pointer is selected as the
  755. default behavior. If the target InteractiveObject does not have its
  756. <codeph class="+ topic/ph pr-d/codeph ">doubleClickEnabled</codeph> flag set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> it receives two
  757. <codeph class="+ topic/ph pr-d/codeph ">click</codeph> events.
  758. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">doubleClickEnabled</codeph> property defaults
  759. to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>. </p>
  760. <p class="- topic/p ">The double-click text selection behavior of a TextField object
  761. is not related to the <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> event. Use
  762. <codeph class="+ topic/ph pr-d/codeph ">TextField.doubleClickEnabled</codeph> to control TextField selections.</p>
  763. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/doubleClickEnabled" class="- topic/link "><linktext class="- topic/linktext ">doubleClickEnabled</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.MouseEvent.CLICK_click" 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 ">click</apiName><shortdesc class="- topic/shortdesc ">
  764. Dispatched when a user presses and releases the main button of the user's
  765. pointing device over the same InteractiveObject.</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.MouseEvent.CLICK</apiEventType><adobeApiEventClassifier class="- topic/xref reference/xref apiRef/apiRelation adobeApiEvent/adobeApiEventClassifier ">flash.events.MouseEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  766. Dispatched when a user presses and releases the main button of the user's
  767. pointing device over the same InteractiveObject. For a click event to occur, it must always follow this series of
  768. events in the order of occurrence: mouseDown event, then mouseUp. The target object
  769. must be identical for both of these events; otherwise the <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event does not
  770. occur. Any number of other mouse events can occur at any time between the
  771. <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph> or <codeph class="+ topic/ph pr-d/codeph ">mouseUp</codeph> events; the <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event
  772. still occurs.
  773. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.FocusEvent.MOUSE_FOCUS_CHANGE_mouseFocusChange" 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 ">mouseFocusChange</apiName><shortdesc class="- topic/shortdesc ">
  774. Dispatched when the user attempts to change focus by using a pointer 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="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.FocusEvent.MOUSE_FOCUS_CHANGE</apiEventType><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 ">
  775. Dispatched when the user attempts to change focus by using a pointer device.
  776. The default behavior of this event is to change the focus and dispatch the corresponding
  777. <codeph class="+ topic/ph pr-d/codeph ">focusIn</codeph> and <codeph class="+ topic/ph pr-d/codeph ">focusOut</codeph> events.
  778. <p class="- topic/p ">This event is dispatched to the object that currently has focus. The related object for this event is the
  779. InteractiveObject instance that receives focus if you do not prevent the default behavior. You can prevent the change in
  780. focus by calling <codeph class="+ topic/ph pr-d/codeph ">preventDefault()</codeph> in an event listener that is properly registered with the target object.
  781. The <codeph class="+ topic/ph pr-d/codeph ">shiftKey</codeph> property is not used. Focus changes and
  782. <codeph class="+ topic/ph pr-d/codeph ">focusIn</codeph> and <codeph class="+ topic/ph pr-d/codeph ">focusOut</codeph> events are dispatched by default.</p>
  783. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.FocusEvent.KEY_FOCUS_CHANGE_keyFocusChange" 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 ">keyFocusChange</apiName><shortdesc class="- topic/shortdesc ">
  784. Dispatched when the user attempts to change focus by using keyboard navigation.</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.FocusEvent.KEY_FOCUS_CHANGE</apiEventType><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 ">
  785. Dispatched when the user attempts to change focus by using keyboard navigation.
  786. The default behavior of this event is to change the focus and dispatch the
  787. corresponding <codeph class="+ topic/ph pr-d/codeph ">focusIn</codeph> and <codeph class="+ topic/ph pr-d/codeph ">focusOut</codeph> events.
  788. <p class="- topic/p ">This event is dispatched to the object that currently has focus.
  789. The related object for this event is the InteractiveObject instance that receives focus
  790. if you do not prevent the default behavior.
  791. You can prevent the change in focus by calling the <codeph class="+ topic/ph pr-d/codeph ">preventDefault()</codeph> method
  792. in an event listener that is properly registered with the target object.
  793. Focus changes and <codeph class="+ topic/ph pr-d/codeph ">focusIn</codeph> and <codeph class="+ topic/ph pr-d/codeph ">focusOut</codeph>
  794. events are dispatched by default.</p>
  795. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.FocusEvent.FOCUS_OUT_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 ">
  796. Dispatched after a display object loses 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="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.FocusEvent.FOCUS_OUT</apiEventType><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 ">
  797. Dispatched <i class="+ topic/ph hi-d/i ">after</i> a display object loses focus.
  798. This happens when a user highlights a different object with a pointing device or keyboard navigation.
  799. The object that loses focus is called the target object of this event, while the corresponding InteractiveObject
  800. instance that receives focus is called the related object. A reference to the related object is stored in the target object's
  801. <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> property. The <codeph class="+ topic/ph pr-d/codeph ">shiftKey</codeph> property is not used. This event precedes the dispatch
  802. of the <codeph class="+ topic/ph pr-d/codeph ">focusIn</codeph> event by the related object.
  803. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.FocusEvent.FOCUS_IN_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 ">
  804. Dispatched after a display object gains 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="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.FocusEvent.FOCUS_IN</apiEventType><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 ">
  805. Dispatched <i class="+ topic/ph hi-d/i ">after</i> a display object gains focus.
  806. This situation happens when a user highlights the object with a pointing device or keyboard navigation.
  807. The recipient of such focus is called the target object of this event,
  808. while the corresponding InteractiveObject instance that lost focus because of this change is called the related object.
  809. A reference to the related object is stored in the receiving object's <codeph class="+ topic/ph pr-d/codeph ">relatedObject</codeph> property.
  810. The <codeph class="+ topic/ph pr-d/codeph ">shiftKey</codeph> property is not used.
  811. This event follows the dispatch of the previous object's <codeph class="+ topic/ph pr-d/codeph ">focusOut</codeph> event.
  812. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.SELECT_ALL_selectAll" 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 ">selectAll</apiName><shortdesc class="- topic/shortdesc ">
  813. Dispatched when the user activates the platform-specific accelerator key combination for a select all operation
  814. or selects 'Select All' from the text context menu.</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><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.SELECT_ALL</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 ">
  815. Dispatched when the user activates the platform-specific accelerator key combination for a select all operation
  816. or selects 'Select All' from the text context menu.
  817. This event is dispatched to the object that currently has focus.
  818. If the object that currently has focus is a TextField, the default behavior of this event is to cause
  819. all the contents of the text field to be selected.
  820. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.PASTE_paste" 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 ">paste</apiName><shortdesc class="- topic/shortdesc ">
  821. Dispatched when the user activates the platform-specific accelerator key combination for a paste operation
  822. or selects 'Paste' from the text context menu.</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><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.PASTE</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 ">
  823. Dispatched when the user activates the platform-specific accelerator key combination for a paste operation
  824. or selects 'Paste' from the text context menu.
  825. This event is dispatched to the object that currently has focus.
  826. If the object that currently has focus is a TextField, the default behavior of this event is to cause
  827. the contents of the clipboard to be pasted into the text field at the current insertion point
  828. replacing any currently selected text in the text field.
  829. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.CUT_cut" 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 ">cut</apiName><shortdesc class="- topic/shortdesc ">
  830. Dispatched when the user activates the platform-specific accelerator key combination for a cut operation
  831. or selects 'Cut' from the text context menu.</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><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.CUT</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 ">
  832. Dispatched when the user activates the platform-specific accelerator key combination for a cut operation
  833. or selects 'Cut' from the text context menu.
  834. This event is dispatched to the object that currently has focus.
  835. If the object that currently has focus is a TextField, the default behavior of this event is to cause
  836. any currently selected text in the text field to be cut to the clipboard.
  837. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.COPY_copy" 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 ">copy</apiName><shortdesc class="- topic/shortdesc ">
  838. Dispatched when the user activates the platform-specific accelerator key combination for a copy operation
  839. or selects 'Copy' from the text context menu.</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><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.COPY</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 ">
  840. Dispatched when the user activates the platform-specific accelerator key combination for a copy operation
  841. or selects 'Copy' from the text context menu.
  842. This event is dispatched to the object that currently has focus.
  843. If the object that currently has focus is a TextField, the default behavior of this event is to cause
  844. any currently selected text in the text field to be copied to the clipboard.
  845. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:InteractiveObject_flash.events.Event.CLEAR_clear" 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 ">clear</apiName><shortdesc class="- topic/shortdesc ">
  846. Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu.</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 "/><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.CLEAR</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 ">
  847. Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu.
  848. This event is dispatched to the object that currently has focus.
  849. If the object that currently has focus is a TextField, the default behavior of this event is to cause
  850. any currently selected text in the text field to be deleted.
  851. </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.display:InteractiveObject:InteractiveObject" 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 ">InteractiveObject</apiName><shortdesc class="- topic/shortdesc ">
  852. Calling the new InteractiveObject() constructor
  853. throws an ArgumentError exception.</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 "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  854. Calling the <codeph class="+ topic/ph pr-d/codeph ">new InteractiveObject()</codeph> constructor
  855. throws an <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception.
  856. You can, however, call constructors for the following subclasses of InteractiveObject:
  857. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new SimpleButton()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new TextField()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new Loader()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new Sprite()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new MovieClip()</codeph></li></ul>
  858. </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.display:InteractiveObject:requestSoftKeyboard" 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 ">requestSoftKeyboard</apiName><shortdesc class="- topic/shortdesc ">
  859. Raises a virtual keyboard.</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="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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value of <codeph class="+ topic/ph pr-d/codeph ">true</codeph> means that the soft keyboard request was granted; <codeph class="+ topic/ph pr-d/codeph ">false</codeph> means that the soft keyboard was not raised.
  860. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">If the current context supports it, show the keyboard.
  861. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  862. Raises a virtual keyboard.
  863. <p class="- topic/p ">Calling this method focuses the InteractiveObject instance and raises the soft keyboard, if necessary.
  864. The <codeph class="+ topic/ph pr-d/codeph ">needsSoftKeyboard</codeph> must also be <codeph class="+ topic/ph pr-d/codeph ">true</codeph>. A keyboard is not raised
  865. if a hardware keyboard is available, or if the client system does not support virtual keyboards.</p>
  866. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> This method is not supported in AIR applications on iOS.</p>
  867. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/needsSoftKeyboard" class="- topic/link "><linktext class="- topic/linktext ">needsSoftKeyboard</linktext></link></related-links></apiOperation><apiValue id="flash.display:InteractiveObject:accessibilityImplementation: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 ">accessibilityImplementation</apiName><shortdesc class="- topic/shortdesc ">
  868. The current accessibility implementation (AccessibilityImplementation)
  869. for this InteractiveObject instance.</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 "/></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.accessibility:AccessibilityImplementation</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  870. The current accessibility implementation (AccessibilityImplementation)
  871. for this InteractiveObject instance.
  872. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.accessibility.xml#AccessibilityImplementation" class="- topic/link "><linktext class="- topic/linktext ">flash.accessibility.AccessibilityImplementation</linktext></link></related-links></apiValue><apiValue id="flash.display:InteractiveObject:contextMenu: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 ">contextMenu</apiName><shortdesc class="- topic/shortdesc ">
  873. Specifies the context menu associated with this 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><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:NativeMenu</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">The context menu associated with this object
  874. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  875. Specifies the context menu associated with this object.
  876. <p class="- topic/p ">For content running in Flash Player, this property is a ContextMenu object. In the AIR runtime,
  877. the ContextMenu class extends the NativeMenu class, however Flash Player only supports the
  878. ContextMenu class, not the NativeMenu class.
  879. </p>
  880. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> TextField objects always include a clipboard menu in the context menu. The clipboard menu contains
  881. Cut, Copy, Paste, Clear, and Select All commands. You cannot remove these commands from the context menu for TextField objects.
  882. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate <codeph class="+ topic/ph pr-d/codeph ">clear</codeph>,
  883. <codeph class="+ topic/ph pr-d/codeph ">copy</codeph>, <codeph class="+ topic/ph pr-d/codeph ">cut</codeph>, <codeph class="+ topic/ph pr-d/codeph ">paste</codeph>, or <codeph class="+ topic/ph pr-d/codeph ">selectAll</codeph> events.</p>
  884. </apiDesc><example conref="examples\ContextMenu_custom.as" class="- topic/example "> The following example shows how you can add a custom context menu item to a Sprite object by setting the Sprite's contextMenu property to a ContextMenu object.
  885. Example provided by
  886. <xref href="http://actionscriptexamples.com/2009/03/05/creating-a-custom-context-menu-item-in-flash-using-actionscript-30/" scope="_mmexternal" class="- topic/xref "> ActionScriptExamples.com</xref>.
  887. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  888. var red_cmi:ContextMenuItem = new ContextMenuItem("red");
  889. red_cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, cmi_menuItemSelect);
  890. var cm:ContextMenu = new ContextMenu();
  891. cm.customItems.push(red_cmi);
  892. cm.hideBuiltInItems();
  893. var spr:Sprite = new Sprite();
  894. spr.contextMenu = cm;
  895. spr.graphics.beginFill(0x000000);
  896. spr.graphics.drawRect(0, 0, 120, 90);
  897. spr.graphics.endFill();
  898. spr.x = 10;
  899. spr.y = 10;
  900. addChild(spr);
  901. function cmi_menuItemSelect(evt:ContextMenuEvent):void {
  902. spr.graphics.clear();
  903. spr.graphics.beginFill(0xFF0000);
  904. spr.graphics.drawRect(0, 0, 120, 90);
  905. spr.graphics.endFill();
  906. }
  907. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:InteractiveObject:doubleClickEnabled: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 ">doubleClickEnabled</apiName><shortdesc class="- topic/shortdesc ">
  908. Specifies whether the object receives doubleClick events.</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="readwrite" 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 ">Whether this object receives double click messages.
  909. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  910. Specifies whether the object receives <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> events. The default value
  911. is <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, which means that by default an InteractiveObject instance does not receive
  912. <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> events. If the <codeph class="+ topic/ph pr-d/codeph ">doubleClickEnabled</codeph> property is set to
  913. <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, the instance receives <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> events within its bounds.
  914. The <codeph class="+ topic/ph pr-d/codeph ">mouseEnabled</codeph> property of the InteractiveObject instance must also be
  915. set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> for the object to receive <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> events.
  916. <p class="- topic/p ">No event is dispatched by setting this property. You must use the
  917. <codeph class="+ topic/ph pr-d/codeph ">addEventListener()</codeph> method to add an event listener
  918. for the <codeph class="+ topic/ph pr-d/codeph ">doubleClick</codeph> event.</p>
  919. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:doubleClick" class="- topic/link "><linktext class="- topic/linktext ">doubleClick</linktext></link><link href="flash.display.xml#InteractiveObject/mouseEnabled" class="- topic/link "><linktext class="- topic/linktext ">mouseEnabled</linktext></link><link href="flash.display.xml#DisplayObjectContainer/mouseChildren" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer.mouseChildren</linktext></link></related-links></apiValue><apiValue id="flash.display:InteractiveObject:focusRect: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 ">focusRect</apiName><shortdesc class="- topic/shortdesc ">
  920. Specifies whether this object displays a focus rectangle.</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>FP IMD: See the AS2 MovieClip._focusRect, Button._focusRect, and
  921. _focusRect (global property) topics for information to migrate to the ASDoc description of this
  922. AS3 property.
  923. </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 ">Object</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  924. Specifies whether this object displays a focus rectangle. It can take one of three
  925. values: <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, or <codeph class="+ topic/ph pr-d/codeph ">null</codeph>. Values of <codeph class="+ topic/ph pr-d/codeph ">true</codeph>
  926. and <codeph class="+ topic/ph pr-d/codeph ">false</codeph> work as expected, specifying whether or not the focus rectangle
  927. appears. A value of <codeph class="+ topic/ph pr-d/codeph ">null</codeph> indicates that this object obeys the
  928. <codeph class="+ topic/ph pr-d/codeph ">stageFocusRect</codeph> property of the Stage.
  929. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:InteractiveObject:mouseEnabled: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 ">mouseEnabled</apiName><shortdesc class="- topic/shortdesc ">
  930. Specifies whether this object receives mouse, or other user input, messages.</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="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 ">
  931. Specifies whether this object receives mouse, or other user input, messages. The default value is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
  932. which means that by default any InteractiveObject instance that is on the display list
  933. receives mouse events or other user input events.
  934. If <codeph class="+ topic/ph pr-d/codeph ">mouseEnabled</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, the instance does not receive any
  935. mouse events (or other user input events like keyboard events). Any children of this instance on the display list are not affected. To change
  936. the <codeph class="+ topic/ph pr-d/codeph ">mouseEnabled</codeph> behavior for all children of an object on the display list, use
  937. <codeph class="+ topic/ph pr-d/codeph ">flash.display.DisplayObjectContainer.mouseChildren</codeph>.
  938. <p class="- topic/p "> No event is dispatched by setting this property. You must use the
  939. <codeph class="+ topic/ph pr-d/codeph ">addEventListener()</codeph> method to create interactive functionality.</p>
  940. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/mouseChildren" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer.mouseChildren</linktext></link></related-links></apiValue><apiValue id="flash.display:InteractiveObject:needsSoftKeyboard: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 ">needsSoftKeyboard</apiName><shortdesc class="- topic/shortdesc ">
  941. Specifies whether a virtual keyboard (an on-screen, software keyboard) should display
  942. when this InteractiveObject instance 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="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2.6" 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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  943. Specifies whether a virtual keyboard (an on-screen, software keyboard) should display
  944. when this InteractiveObject instance receives focus.
  945. <p class="- topic/p ">By default, the value is <codeph class="+ topic/ph pr-d/codeph ">false</codeph> and focusing an InteractiveObject instance does
  946. not raise a soft keyboard. If the <codeph class="+ topic/ph pr-d/codeph ">needsSoftKeyboard</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
  947. the runtime raises a soft keyboard when the InteractiveObject instance is ready to accept user input.
  948. An InteractiveObject instance is ready to accept user input after a programmatic call to set the Stage
  949. <codeph class="+ topic/ph pr-d/codeph ">focus</codeph> property or a user interaction, such as a "tap." If the client system has a
  950. hardware keyboard available or does not support virtual keyboards, then the soft keyboard is not raised.</p>
  951. <p class="- topic/p ">The InteractiveObject instance dispatches <codeph class="+ topic/ph pr-d/codeph ">softKeyboardActivating</codeph>,
  952. <codeph class="+ topic/ph pr-d/codeph ">softKeyboardActivate</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">softKeyboardDeactivate</codeph> events
  953. when the soft keyboard raises and lowers.</p>
  954. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> This property is not supported in AIR applications on iOS.</p>
  955. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/event:softKeyboardActivating" class="- topic/link "><linktext class="- topic/linktext ">softKeyboardActivating</linktext></link><link href="flash.display.xml#InteractiveObject/event:softKeyboardActivate" class="- topic/link "><linktext class="- topic/linktext ">softKeyboardActivate</linktext></link><link href="flash.display.xml#InteractiveObject/event:softKeyboardDeactivate" class="- topic/link "><linktext class="- topic/linktext ">softKeyboardDeactivate</linktext></link></related-links></apiValue><apiValue id="flash.display:InteractiveObject:softKeyboardInputAreaOfInterest: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 ">softKeyboardInputAreaOfInterest</apiName><shortdesc class="- topic/shortdesc ">
  956. Defines the area that should remain on-screen when a soft keyboard 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="Flash" version="10.2" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2.6" 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><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Sets the area to be displayed on-screen when the soft keyboard opens.
  957. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  958. Defines the area that should remain on-screen when a soft keyboard is displayed.
  959. <p class="- topic/p ">If the <codeph class="+ topic/ph pr-d/codeph ">needsSoftKeyboard</codeph> property of this InteractiveObject is
  960. <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, then the runtime adjusts the display as needed to keep the
  961. object in view while the user types. Ordinarily, the runtime uses the object
  962. bounds obtained from the <codeph class="+ topic/ph pr-d/codeph ">DisplayObject.getBounds()</codeph> method. You can
  963. specify a different area using this <codeph class="+ topic/ph pr-d/codeph ">softKeyboardInputAreaOfInterest</codeph>
  964. property.</p>
  965. <p class="- topic/p ">Specify the <codeph class="+ topic/ph pr-d/codeph ">softKeyboardInputAreaOfInterest</codeph> in stage coordinates.</p>
  966. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> On Android, the <codeph class="+ topic/ph pr-d/codeph ">softKeyboardInputAreaOfInterest</codeph> is not
  967. respected in landscape orientations.</p>
  968. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/getBounds()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject.getBounds()</linktext></link></related-links></apiValue><apiValue id="flash.display:InteractiveObject:tabEnabled: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 ">tabEnabled</apiName><shortdesc class="- topic/shortdesc ">
  969. Specifies whether this object is in the tab order.</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>FP IMD: See the AS2 MovieClip.tabEnabled, Button.tabEnabled, and
  970. TextField.tabEnabled topics for information to migrate to the ASDoc description of this
  971. AS3 property.
  972. </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 ">Boolean</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Whether this object is in the tab order.
  973. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  974. Specifies whether this object is in the tab order. If this object is in the tab order,
  975. the value is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>; otherwise, the value is <codeph class="+ topic/ph pr-d/codeph ">false</codeph>. By default,
  976. the value is <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, except for the following:
  977. <ul class="- topic/ul "><li class="- topic/li ">For a SimpleButton object, the value is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</li><li class="- topic/li ">For a TextField object with <codeph class="+ topic/ph pr-d/codeph ">type = "input"</codeph>, the value is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</li><li class="- topic/li ">For a Sprite object or MovieClip object with <codeph class="+ topic/ph pr-d/codeph ">buttonMode = true</codeph>, the value is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</li></ul>
  978. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:InteractiveObject:tabIndex: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 ">tabIndex</apiName><shortdesc class="- topic/shortdesc ">
  979. Specifies the tab ordering of objects in a SWF 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 "/></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 ">int</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">The tab index for this object.
  980. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  981. Specifies the tab ordering of objects in a SWF file. The <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph>
  982. property is -1 by default, meaning no tab index is set for the object.
  983. <p class="- topic/p ">If any currently displayed object in the SWF file contains a <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> property, automatic
  984. tab ordering is disabled, and the tab ordering is calculated from the <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> properties of
  985. objects in the SWF file. The custom tab ordering includes only objects that have <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph>
  986. properties.</p>
  987. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> property can be a non-negative integer. The objects are ordered according to
  988. their <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> properties, in ascending order. An object with a <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph>
  989. value of 1 precedes an object with a <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> value of 2. Do not use the same <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph>
  990. value for multiple objects.</p>
  991. <p class="- topic/p ">The custom tab ordering that the <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> property defines is <i class="+ topic/ph hi-d/i ">flat</i>.
  992. This means that no attention is paid to the hierarchical relationships of objects in the SWF file.
  993. All objects in the SWF file with <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> properties are placed in the tab order, and the
  994. tab order is determined by the order of the <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> values. </p>
  995. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> To set the tab order for TLFTextField instances, cast the display object child
  996. of the TLFTextField as an InteractiveObject, then set the <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph> property. For example:
  997. <pre xml:space="preserve" class="- topic/pre ">
  998. InteractiveObject(tlfInstance.getChildAt(1)).tabIndex = 3;
  999. </pre>
  1000. To reverse the tab order from the default setting for three instances of a TLFTextField object
  1001. (<codeph class="+ topic/ph pr-d/codeph ">tlfInstance1</codeph>, <codeph class="+ topic/ph pr-d/codeph ">tlfInstance2</codeph> and <codeph class="+ topic/ph pr-d/codeph ">tlfInstance3</codeph>), use:
  1002. <pre xml:space="preserve" class="- topic/pre ">
  1003. InteractiveObject(tlfInstance1.getChildAt(1)).tabIndex = 3;
  1004. InteractiveObject(tlfInstance2.getChildAt(1)).tabIndex = 2;
  1005. InteractiveObject(tlfInstance3.getChildAt(1)).tabIndex = 1;
  1006. </pre>
  1007. </p>
  1008. </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:GraphicsTrianglePath" 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 ">GraphicsTrianglePath</apiName><shortdesc class="- topic/shortdesc ">
  1009. Defines an ordered set of triangles that can be rendered using
  1010. either (u,v) fill coordinates or a normal fill.</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 "/><apiBaseInterface>flash.display:IGraphicsPath</apiBaseInterface><apiBaseInterface>flash.display:IGraphicsData</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1011. Defines an ordered set of triangles that can be rendered using
  1012. either (u,v) fill coordinates or a normal fill.
  1013. Each triangle in the path is represented by three sets of (x, y)
  1014. coordinates, each of which is one point of the triangle.
  1015. <p class="- topic/p ">
  1016. The triangle vertices do not contain z coordinates and do not necessarily
  1017. represent 3D faces. However a triangle path can be used to support the rendering
  1018. of 3D geometry in a 2D space.
  1019. </p>
  1020. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/drawTriangles()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.drawTriangles()</linktext></link></related-links><apiConstructor id="flash.display:GraphicsTrianglePath:GraphicsTrianglePath" 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 ">GraphicsTrianglePath</apiName><shortdesc class="- topic/shortdesc ">
  1021. Creates a new GraphicsTrianglePath 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="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><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 ">vertices</apiItemName><apiType value="Vector$Number" name="type" class="- topic/state reference/state apiRef/apiType "/><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Vector of Numbers where each pair of numbers is treated as a point (an x, y pair). Required.
  1022. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">indices</apiItemName><apiType value="Vector$int" name="type" class="- topic/state reference/state apiRef/apiType "/><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Vector of integers or indexes, where every three indexes define a triangle.
  1023. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">uvtData</apiItemName><apiType value="Vector$Number" name="type" class="- topic/state reference/state apiRef/apiType "/><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Vector of normalized coordinates used to apply texture mapping.
  1024. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">culling</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 to render triangles that face in a given direction. Used to
  1025. prevent the rendering of triangles that cannot be seen in the current view.
  1026. Can be set to any value defined by the TriangleCulling class.
  1027. </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1028. Creates a new GraphicsTrianglePath object.
  1029. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#GraphicsTrianglePath/culling" class="- topic/link "><linktext class="- topic/linktext ">culling</linktext></link><link href="flash.display.xml#TriangleCulling" class="- topic/link "><linktext class="- topic/linktext ">flash.display.TriangleCulling</linktext></link></related-links></apiConstructor><apiValue id="flash.display:GraphicsTrianglePath:indices" 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 ">indices</apiName><shortdesc class="- topic/shortdesc ">
  1030. A Vector of integers or indexes, where every three indexes define a triangle.</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 "><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 "/><apiType value="Vector$int" name="type" class="- topic/state reference/state apiRef/apiType "/></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1031. A Vector of integers or indexes, where every three indexes define a triangle. If the indexes parameter
  1032. is null then every three vertices (six x,y pairs in the vertices Vector) defines a triangle.
  1033. Otherwise each index refers to a vertex, which is a pair of numbers in the vertices Vector.
  1034. For example <codeph class="+ topic/ph pr-d/codeph ">indexes[1]</codeph> refers to (<codeph class="+ topic/ph pr-d/codeph ">vertices[2]</codeph>, <codeph class="+ topic/ph pr-d/codeph ">vertices[3]</codeph>).
  1035. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsTrianglePath:uvtData" 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 ">uvtData</apiName><shortdesc class="- topic/shortdesc ">
  1036. A Vector of normalized coordinates used to apply texture mapping.</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 "><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 "/><apiType value="Vector$Number" name="type" class="- topic/state reference/state apiRef/apiType "/></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1037. A Vector of normalized coordinates used to apply texture mapping.
  1038. Each coordinate refers to a point on the bitmap used for the fill.
  1039. There must be one UV or one UVT coordinate per vertex.
  1040. <p class="- topic/p ">
  1041. In UV coordinates, (0,0) is the upper left of the bitmap, and (1,1) is the lower right of the bitmap.
  1042. </p>
  1043. <p class="- topic/p ">
  1044. If the length of this vector is twice the length of the <codeph class="+ topic/ph pr-d/codeph ">vertices</codeph> vector then normalized
  1045. coordinates are used without perspective correction.
  1046. </p>
  1047. <p class="- topic/p ">
  1048. If the length of this vector is three times the length of the <codeph class="+ topic/ph pr-d/codeph ">vertices</codeph> vector then the
  1049. third coordinate is interpreted as 't', the distance from the eye to the texture in eye space.
  1050. This helps the rendering engine correctly apply perspective when mapping textures in 3D.
  1051. </p>
  1052. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsTrianglePath:vertices" 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 ">vertices</apiName><shortdesc class="- topic/shortdesc ">
  1053. A Vector of Numbers where each pair of numbers is treated as a point (an x, y pair).</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 "><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 "/><apiType value="Vector$Number" name="type" class="- topic/state reference/state apiRef/apiType "/></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1054. A Vector of Numbers where each pair of numbers is treated as a point (an x, y pair).
  1055. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsTrianglePath:culling: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 ">culling</apiName><shortdesc class="- topic/shortdesc ">
  1056. Specifies whether to render triangles that face in a given direction.</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 "><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 ">
  1057. Specifies whether to render triangles that face in a given direction. Used to
  1058. prevent the rendering of triangles that cannot be seen in the current view.
  1059. <p class="- topic/p ">
  1060. Can be set to any value defined by the TriangleCulling class.
  1061. </p>
  1062. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#TriangleCulling" class="- topic/link "><linktext class="- topic/linktext ">flash.display.TriangleCulling</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:DisplayObject" 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 ">DisplayObject</apiName><shortdesc class="- topic/shortdesc ">
  1063. The DisplayObject class is the base class for all objects that can be placed on
  1064. the display list.</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 "/><apiBaseInterface>flash.display:IBitmapDrawable</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1065. The DisplayObject class is the base class for all objects that can be placed on
  1066. the display list. The display list manages all objects displayed in the Flash runtimes.
  1067. Use the DisplayObjectContainer class to arrange the display objects in the display list.
  1068. DisplayObjectContainer objects can have child display objects, while other display objects, such as
  1069. Shape and TextField objects, are "leaf" nodes that have only parents and siblings, no children.
  1070. <p class="- topic/p ">The DisplayObject class supports basic functionality like the <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> position of
  1071. an object, as well as more advanced properties of the object such as its transformation matrix.
  1072. </p>
  1073. <p class="- topic/p ">DisplayObject is an abstract base class; therefore, you cannot call DisplayObject directly. Invoking
  1074. <codeph class="+ topic/ph pr-d/codeph ">new DisplayObject()</codeph> throws an <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception. </p>
  1075. <p class="- topic/p ">All display objects inherit from the DisplayObject class.</p>
  1076. <p class="- topic/p ">The DisplayObject class itself does not include any APIs for rendering content onscreen.
  1077. For that reason, if you want create a custom subclass of the DisplayObject class, you will want
  1078. to extend one of its subclasses that do have APIs for rendering content onscreen,
  1079. such as the Shape, Sprite, Bitmap, SimpleButton, TextField, or MovieClip class.</p>
  1080. <p class="- topic/p ">The DisplayObject class contains several broadcast events. Normally, the target
  1081. of any particular event is a specific DisplayObject instance. For example,
  1082. the target of an <codeph class="+ topic/ph pr-d/codeph ">added</codeph> event is the specific DisplayObject instance
  1083. that was added to the display list. Having a single target restricts the placement of
  1084. event listeners to that target and in some cases the target's ancestors on the display list.
  1085. With broadcast events, however, the target is not a specific DisplayObject instance,
  1086. but rather all DisplayObject instances, including those that are not on the display list.
  1087. This means that you can add a listener to any DisplayObject instance to listen for broadcast events.
  1088. In addition to the broadcast events listed in the DisplayObject class's Events table,
  1089. the DisplayObject class also inherits two broadcast events from the EventDispatcher
  1090. class: <codeph class="+ topic/ph pr-d/codeph ">activate</codeph> and <codeph class="+ topic/ph pr-d/codeph ">deactivate</codeph>.</p>
  1091. <p class="- topic/p ">Some properties previously used in the ActionScript 1.0 and 2.0 MovieClip, TextField, and Button
  1092. classes (such as <codeph class="+ topic/ph pr-d/codeph ">_alpha</codeph>, <codeph class="+ topic/ph pr-d/codeph ">_height</codeph>, <codeph class="+ topic/ph pr-d/codeph ">_name</codeph>, <codeph class="+ topic/ph pr-d/codeph ">_width</codeph>,
  1093. <codeph class="+ topic/ph pr-d/codeph ">_x</codeph>, <codeph class="+ topic/ph pr-d/codeph ">_y</codeph>, and others) have equivalents in the ActionScript 3.0
  1094. DisplayObject class that are renamed so that they no longer begin with the underscore (_) character.</p>
  1095. <p class="- topic/p ">For more information, see the "Display Programming" chapter of the <i class="+ topic/ph hi-d/i ">ActionScript 3.0 Developer's Guide</i>.</p>
  1096. </apiDesc><example conref="examples\DisplayObjectExample.as" class="- topic/example "> The following example uses the <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectExample</codeph> class to
  1097. draw an orange square in the corner of the Stage and then respond to events by displaying text
  1098. information for each event. This task is accomplished by performing the following steps:
  1099. <ol class="- topic/ol "><li class="- topic/li ">Class properties are declared for the color and size of the square.</li><li class="- topic/li ">The constructor calls the <codeph class="+ topic/ph pr-d/codeph ">draw()</codeph> method, which draws an orange square on
  1100. the Stage at the default coordinates of <i class="+ topic/ph hi-d/i ">x = 0, y = 0</i>.</li><li class="- topic/li ">The following event listener methods are attached to the square:
  1101. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">addedHandler()</codeph> listens for <codeph class="+ topic/ph pr-d/codeph ">added</codeph> events, dispatched when the
  1102. square is added to the display list.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">enterFrameHandler()</codeph> listens for <codeph class="+ topic/ph pr-d/codeph ">enterFrame</codeph> events, which have no
  1103. real meaning in this example.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">removedHandler()</codeph> listens for <codeph class="+ topic/ph pr-d/codeph ">removed</codeph> events, dispatched when
  1104. the square is removed from the display list, which happens when the square is clicked.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">clickHandler()</codeph> listens for <codeph class="+ topic/ph pr-d/codeph ">click</codeph> events, dispatched when the
  1105. orange square is clicked.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">renderHandler()</codeph> listens for <codeph class="+ topic/ph pr-d/codeph ">render</codeph> events after the display
  1106. list is updated.</li></ul></li></ol>
  1107. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1108. package {
  1109. import flash.display.Sprite;
  1110. public class DisplayObjectExample extends Sprite {
  1111. public function DisplayObjectExample() {
  1112. var child:CustomDisplayObject = new CustomDisplayObject();
  1113. addChild(child);
  1114. }
  1115. }
  1116. }
  1117. import flash.display.DisplayObject;
  1118. import flash.display.Sprite;
  1119. import flash.display.Stage;
  1120. import flash.display.StageAlign;
  1121. import flash.display.StageScaleMode;
  1122. import flash.events.*;
  1123. class CustomDisplayObject extends Sprite {
  1124. private var bgColor:uint = 0xFFCC00;
  1125. private var size:uint = 80;
  1126. public function CustomDisplayObject() {
  1127. draw();
  1128. addEventListener(Event.ADDED, addedHandler);
  1129. addEventListener(Event.ENTER_FRAME, enterFrameHandler);
  1130. addEventListener(Event.REMOVED, removedHandler);
  1131. addEventListener(MouseEvent.CLICK, clickHandler);
  1132. addEventListener(Event.RENDER, renderHandler);
  1133. }
  1134. private function draw():void {
  1135. graphics.beginFill(bgColor);
  1136. graphics.drawRect(0, 0, size, size);
  1137. graphics.endFill();
  1138. }
  1139. private function clickHandler(event:MouseEvent):void {
  1140. trace("clickHandler: " + event);
  1141. parent.removeChild(this);
  1142. }
  1143. private function addedHandler(event:Event):void {
  1144. trace("addedHandler: " + event);
  1145. stage.scaleMode = StageScaleMode.NO_SCALE;
  1146. stage.align = StageAlign.TOP_LEFT;
  1147. stage.addEventListener("resize", resizeHandler);
  1148. }
  1149. private function enterFrameHandler(event:Event):void {
  1150. trace("enterFrameHandler: " + event);
  1151. removeEventListener("enterFrame", enterFrameHandler);
  1152. }
  1153. private function removedHandler(event:Event):void {
  1154. trace("removedHandler: " + event);
  1155. stage.removeEventListener("resize", resizeHandler);
  1156. }
  1157. private function renderHandler(event:Event):void {
  1158. trace("renderHandler: " + event);
  1159. }
  1160. private function resizeHandler(event:Event):void {
  1161. trace("resizeHandler: " + event);
  1162. }
  1163. }
  1164. </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer</linktext></link></related-links><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.RENDER_render" 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 ">render</apiName><shortdesc class="- topic/shortdesc ">
  1165. [broadcast event] Dispatched when the display list is about to be updated and rendered.</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.RENDER</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 ">
  1166. [broadcast event] Dispatched when the display list is about to be updated and rendered. This event provides the last opportunity
  1167. for objects listening for this event to make changes before the display list is rendered.
  1168. You must call the <codeph class="+ topic/ph pr-d/codeph ">invalidate()</codeph> method
  1169. of the Stage object
  1170. each time you want a <codeph class="+ topic/ph pr-d/codeph ">render</codeph> event to be dispatched. <codeph class="+ topic/ph pr-d/codeph ">Render</codeph> events
  1171. are dispatched to an object only if there is mutual trust between it and the object that called
  1172. <codeph class="+ topic/ph pr-d/codeph ">Stage.invalidate()</codeph>.
  1173. This event is a broadcast event, which means that it is dispatched
  1174. by all display objects with a listener registered for this event.
  1175. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note: </b>This event is not dispatched if the display is
  1176. not rendering. This is the case when the content is either minimized or obscured. </p>
  1177. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.REMOVED_FROM_STAGE_removedFromStage" 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 ">removedFromStage</apiName><shortdesc class="- topic/shortdesc ">
  1178. Dispatched when a display object is about to be removed from the display list,
  1179. either directly or through the removal of a sub tree in which the display object is contained.</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.0.28.0" 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.REMOVED_FROM_STAGE</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 ">
  1180. Dispatched when a display object is about to be removed from the display list,
  1181. either directly or through the removal of a sub tree in which the display object is contained.
  1182. Two methods of the DisplayObjectContainer class generate this event:
  1183. <codeph class="+ topic/ph pr-d/codeph ">removeChild()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">removeChildAt()</codeph>.
  1184. <p class="- topic/p ">The following methods of a DisplayObjectContainer object also generate this event if an object must be removed
  1185. to make room for the new object: <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">addChildAt()</codeph>, and
  1186. <codeph class="+ topic/ph pr-d/codeph ">setChildIndex()</codeph>. </p>
  1187. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.REMOVED_removed" 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 ">removed</apiName><shortdesc class="- topic/shortdesc ">
  1188. Dispatched when a display object is about to be removed from the display list.</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.REMOVED</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 ">
  1189. Dispatched when a display object is about to be removed from the display list.
  1190. Two methods of the DisplayObjectContainer class generate this event:
  1191. <codeph class="+ topic/ph pr-d/codeph ">removeChild()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">removeChildAt()</codeph>.
  1192. <p class="- topic/p ">The following methods of a DisplayObjectContainer object also generate this event if an object must be removed
  1193. to make room for the new object: <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">addChildAt()</codeph>, and
  1194. <codeph class="+ topic/ph pr-d/codeph ">setChildIndex()</codeph>. </p>
  1195. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.EXIT_FRAME_exitFrame" 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 ">exitFrame</apiName><shortdesc class="- topic/shortdesc ">
  1196. [broadcast event] Dispatched when the playhead is exiting the current 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="10" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" 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.EXIT_FRAME</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 ">
  1197. [broadcast event] Dispatched when the playhead is exiting the current frame.
  1198. All frame scripts have been run. If the playhead is not moving, or if there is only one frame, this event
  1199. is dispatched continuously in conjunction with the frame rate.
  1200. This event is a broadcast event, which means that it is dispatched
  1201. by all display objects with a listener registered for this event.
  1202. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.FRAME_CONSTRUCTED_frameConstructed" 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 ">frameConstructed</apiName><shortdesc class="- topic/shortdesc ">
  1203. [broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run.</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="2" 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.FRAME_CONSTRUCTED</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 ">
  1204. [broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run.
  1205. If the playhead is not moving, or if there is only one frame, this event
  1206. is dispatched continuously in conjunction with the frame rate.
  1207. This event is a broadcast event, which means that it is dispatched
  1208. by all display objects with a listener registered for this event.
  1209. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.ENTER_FRAME_enterFrame" 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 ">enterFrame</apiName><shortdesc class="- topic/shortdesc ">
  1210. [broadcast event] Dispatched when the playhead is entering a new
  1211. 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 "/><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.ENTER_FRAME</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 ">
  1212. [broadcast event] Dispatched when the playhead is entering a new
  1213. frame. If the playhead is not moving, or if there is only one frame, this event
  1214. is dispatched continuously in conjunction with the frame rate.
  1215. This event is a broadcast event, which means that it is dispatched
  1216. by all display objects with a listener registered for this event.
  1217. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.ADDED_TO_STAGE_addedToStage" 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 ">addedToStage</apiName><shortdesc class="- topic/shortdesc ">
  1218. Dispatched when a display object is added to the on stage display list,
  1219. either directly or through the addition of a sub tree in which the display object is contained.</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.0.28.0" 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.ADDED_TO_STAGE</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 ">
  1220. Dispatched when a display object is added to the on stage display list,
  1221. either directly or through the addition of a sub tree in which the display object is contained. The
  1222. following methods trigger this event: <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.addChild()</codeph>,
  1223. <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.addChildAt()</codeph>.
  1224. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/addChild()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer.addChild()</linktext></link><link href="flash.display.xml#DisplayObjectContainer/addChildAt()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer.addChildAt()</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.display:DisplayObject_flash.events.Event.ADDED_added" 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 ">added</apiName><shortdesc class="- topic/shortdesc ">
  1225. Dispatched when a display object is added to the display list.</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.ADDED</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 ">
  1226. Dispatched when a display object is added to the display list. The
  1227. following methods trigger this event: <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.addChild()</codeph>,
  1228. <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.addChildAt()</codeph>.
  1229. </apiDesc></adobeApiEventDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/addChild()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer.addChild()</linktext></link><link href="flash.display.xml#DisplayObjectContainer/addChildAt()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObjectContainer.addChildAt()</linktext></link></related-links></adobeApiEvent><apiOperation id="flash.display:DisplayObject:getBounds" 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 ">getBounds</apiName><shortdesc class="- topic/shortdesc ">
  1230. Returns a rectangle that defines the area of the display object relative to the coordinate system
  1231. of the targetCoordinateSpace 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><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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The rectangle that defines the area of the display object relative to
  1232. the <codeph class="+ topic/ph pr-d/codeph ">targetCoordinateSpace</codeph> object's coordinate system.
  1233. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Rectangle</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">targetCoordinateSpace</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The display object that defines the coordinate system to use.
  1234. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1235. Returns a rectangle that defines the area of the display object relative to the coordinate system
  1236. of the <codeph class="+ topic/ph pr-d/codeph ">targetCoordinateSpace</codeph> object.
  1237. Consider the following code, which shows how the rectangle returned can vary depending on the
  1238. <codeph class="+ topic/ph pr-d/codeph ">targetCoordinateSpace</codeph> parameter that you pass to the method:
  1239. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1240. var container:Sprite = new Sprite();
  1241. container.x = 100;
  1242. container.y = 100;
  1243. this.addChild(container);
  1244. var contents:Shape = new Shape();
  1245. contents.graphics.drawCircle(0,0,100);
  1246. container.addChild(contents);
  1247. trace(contents.getBounds(container));
  1248. // (x=-100, y=-100, w=200, h=200)
  1249. trace(contents.getBounds(this));
  1250. // (x=0, y=0, w=200, h=200)
  1251. </codeblock>
  1252. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Use the <codeph class="+ topic/ph pr-d/codeph ">localToGlobal()</codeph> and
  1253. <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> methods to convert the display object's local coordinates
  1254. to display coordinates, or display coordinates to local coordinates, respectively.</p>
  1255. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">getBounds()</codeph> method is similar to the <codeph class="+ topic/ph pr-d/codeph ">getRect()</codeph> method;
  1256. however, the Rectangle returned by the <codeph class="+ topic/ph pr-d/codeph ">getBounds()</codeph> method includes any strokes
  1257. on shapes, whereas the Rectangle returned by the <codeph class="+ topic/ph pr-d/codeph ">getRect()</codeph> method does not.
  1258. For an example, see the description of the <codeph class="+ topic/ph pr-d/codeph ">getRect()</codeph> method.</p>
  1259. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/getRect()" class="- topic/link "><linktext class="- topic/linktext ">getRect()</linktext></link><link href="flash.display.xml#DisplayObject/globalToLocal()" class="- topic/link "><linktext class="- topic/linktext ">globalToLocal()</linktext></link><link href="flash.display.xml#DisplayObject/localToGlobal()" class="- topic/link "><linktext class="- topic/linktext ">localToGlobal()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObject:getRect" 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 ">getRect</apiName><shortdesc class="- topic/shortdesc ">
  1260. Returns a rectangle that defines the boundary of the display object,
  1261. based on the coordinate system defined by the targetCoordinateSpace
  1262. parameter, excluding any strokes on shapes.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The rectangle that defines the area of the display object relative to
  1263. the <codeph class="+ topic/ph pr-d/codeph ">targetCoordinateSpace</codeph> object's coordinate system.
  1264. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Rectangle</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">targetCoordinateSpace</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The display object that defines the coordinate system to use.
  1265. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1266. Returns a rectangle that defines the boundary of the display object,
  1267. based on the coordinate system defined by the <codeph class="+ topic/ph pr-d/codeph ">targetCoordinateSpace</codeph>
  1268. parameter, excluding any strokes on shapes. The values that the <codeph class="+ topic/ph pr-d/codeph ">getRect()</codeph> method
  1269. returns are the same or smaller than those returned by the <codeph class="+ topic/ph pr-d/codeph ">getBounds()</codeph> method.
  1270. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Use <codeph class="+ topic/ph pr-d/codeph ">localToGlobal()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> methods
  1271. to convert the display object's local coordinates to Stage coordinates, or Stage coordinates to
  1272. local coordinates, respectively.</p>
  1273. </apiDesc><example conref="examples\DisplayObject.getRect.1.as" class="- topic/example "> The following example shows how the <codeph class="+ topic/ph pr-d/codeph ">getBounds()</codeph> method can return a larger
  1274. rectangle than the <codeph class="+ topic/ph pr-d/codeph ">getRect()</codeph> method does, because of the additional area taken up by
  1275. strokes. In this case, the <codeph class="+ topic/ph pr-d/codeph ">triangle</codeph> sprite includes extra strokes because of the
  1276. <codeph class="+ topic/ph pr-d/codeph ">width</codeph> and <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph> parameters of the <codeph class="+ topic/ph pr-d/codeph ">lineStyle()</codeph>
  1277. method. The <codeph class="+ topic/ph pr-d/codeph ">trace()</codeph> output (in the last two lines) shows the differences between
  1278. the <codeph class="+ topic/ph pr-d/codeph ">getRect()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">getBounds()</codeph> rectangles:
  1279. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1280. import flash.display.CapsStyle;
  1281. import flash.display.JointStyle;
  1282. import flash.display.LineScaleMode;
  1283. import flash.display.Sprite;
  1284. import flash.geom.Rectangle;
  1285. var triangle:Sprite = new Sprite();
  1286. var color:uint = 0xFF0044;
  1287. var width:Number = 20;
  1288. var alpha:Number = 1.0;
  1289. var pixelHinting:Boolean = true;
  1290. var scaleMode:String = LineScaleMode.NORMAL;
  1291. var caps:String = CapsStyle.SQUARE;
  1292. var joints:String = JointStyle.MITER;
  1293. triangle.graphics.lineStyle(width, color, alpha, pixelHinting, scaleMode, caps, joints);
  1294. var triangleSide:Number = 100;
  1295. triangle.graphics.moveTo(0, 0);
  1296. triangle.graphics.lineTo(0, triangleSide);
  1297. triangle.graphics.lineTo(triangleSide, triangleSide);
  1298. triangle.graphics.lineTo(0, 0);
  1299. addChild(triangle);
  1300. trace(triangle.getBounds(this)); // (x=-10, y=-24.1, w=134.10000000000002, h=134.1)
  1301. trace(triangle.getRect(this)); // (x=0, y=0, w=100, h=100)
  1302. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/getBounds()" class="- topic/link "><linktext class="- topic/linktext ">getBounds()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObject:globalToLocal3D" 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 ">globalToLocal3D</apiName><shortdesc class="- topic/shortdesc ">
  1303. Converts a two-dimensional point from the Stage (global) coordinates to a
  1304. three-dimensional display object's (local) coordinates.</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 "/><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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Vector3D object with coordinates relative to the three-dimensional
  1305. display object.
  1306. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Vector3D</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">point</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A two dimensional Point object representing global x and y coordinates.
  1307. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1308. Converts a two-dimensional point from the Stage (global) coordinates to a
  1309. three-dimensional display object's (local) coordinates.
  1310. <p class="- topic/p ">To use this method, first create an instance of the Point class.
  1311. The x and y values that you assign to the Point object represent global
  1312. coordinates because they are relative to the origin (0,0) of the main display area.
  1313. Then pass the Point object to the <codeph class="+ topic/ph pr-d/codeph ">globalToLocal3D()</codeph>
  1314. method as the <codeph class="+ topic/ph pr-d/codeph ">point</codeph> parameter. The method returns three-dimensional
  1315. coordinates as a Vector3D object containing <codeph class="+ topic/ph pr-d/codeph ">x</codeph>, <codeph class="+ topic/ph pr-d/codeph ">y</codeph>, and
  1316. <codeph class="+ topic/ph pr-d/codeph ">z</codeph> values that are relative to the origin
  1317. of the three-dimensional display object.</p>
  1318. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObject:globalToLocal" 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 ">globalToLocal</apiName><shortdesc class="- topic/shortdesc ">
  1319. Converts the point object from the Stage (global) coordinates
  1320. to the display object's (local) coordinates.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Point object with coordinates relative to the display object.
  1321. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">point</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An object created with the Point class. The Point object
  1322. specifies the <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> coordinates as properties.
  1323. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Converts the <codeph class="+ topic/ph pr-d/codeph ">point</codeph> object from Stage (global) coordinates to the display
  1324. object's (local) coordinates.
  1325. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1326. Converts the <codeph class="+ topic/ph pr-d/codeph ">point</codeph> object from the Stage (global) coordinates
  1327. to the display object's (local) coordinates.
  1328. <p class="- topic/p ">To use this method, first create an instance of the Point class. The
  1329. <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> values that you assign represent global coordinates because they
  1330. relate to the origin (0,0) of the main display area. Then pass the Point instance
  1331. as the parameter to the <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> method. The method returns a new Point object with
  1332. <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> values that relate to the origin of the display object
  1333. instead of the origin of the Stage.</p>
  1334. </apiDesc><example conref="examples\DisplayObject.hitTestPoint.1.as" class="- topic/example "> The following code creates a Shape object and shows the
  1335. result of calling the <codeph class="+ topic/ph pr-d/codeph ">hitTestPoint()</codeph> method, using different
  1336. points as parameters. The <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> method converts the
  1337. point from Stage coordinates to the coordinate space of the shape:
  1338. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1339. import flash.display.Shape;
  1340. import flash.geom.Point;
  1341. var circle:Shape = new Shape();
  1342. circle.graphics.beginFill(0x0000FF);
  1343. circle.graphics.drawCircle(40, 40, 40);
  1344. circle.x = 10;
  1345. addChild(circle);
  1346. var point1:Point = new Point(0, 0);
  1347. trace(circle.hitTestPoint(point1.x, point1.y, true)); // false
  1348. trace(circle.hitTestPoint(point1.x, point1.y, false)); // false
  1349. trace(circle.globalToLocal(point1)); // [x=-10, y=0]
  1350. var point2:Point = new Point(10, 1);
  1351. trace(circle.hitTestPoint(point2.x, point2.y, true)); // false
  1352. trace(circle.hitTestPoint(point2.x, point2.y, false)); // true
  1353. trace(circle.globalToLocal(point2)); // [x=0, y=1]
  1354. var point3:Point = new Point(30, 20);
  1355. trace(circle.hitTestPoint(point3.x, point3.y, true)); // true
  1356. trace(circle.hitTestPoint(point3.x, point3.y, false)); // true
  1357. trace(circle.globalToLocal(point3)); // [x=20, y=20]
  1358. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/localToGlobal()" class="- topic/link "><linktext class="- topic/linktext ">localToGlobal()</linktext></link><link href="flash.geom.xml#Point" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Point class</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObject:hitTestObject" 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 ">hitTestObject</apiName><shortdesc class="- topic/shortdesc ">
  1359. Evaluates the bounding box of the display object to see if it overlaps or intersects with the
  1360. bounding box of the obj display 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><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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc "><codeph class="+ topic/ph pr-d/codeph ">true</codeph> if the bounding boxes of the display objects intersect; <codeph class="+ topic/ph pr-d/codeph ">false</codeph> if not.
  1361. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">obj</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The display object to test against.
  1362. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Evaluates the bounding box of the display object to see if it overlaps or intersects with the
  1363. bounding box of the display object passed as a parameter.
  1364. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1365. Evaluates the bounding box of the display object to see if it overlaps or intersects with the
  1366. bounding box of the <codeph class="+ topic/ph pr-d/codeph ">obj</codeph> display object.
  1367. </apiDesc><example conref="examples\DisplayObject.hitTestObject.1.as" class="- topic/example "> The following code creates three Shape objects and shows the
  1368. result of calling the <codeph class="+ topic/ph pr-d/codeph ">hitTestObject()</codeph> method. Note that although
  1369. circle2 and circle3 do not overlap, their bounding boxes do. Thus, the hit test
  1370. of circle2 and circle3 returns <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  1371. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1372. import flash.display.Shape;
  1373. var circle1:Shape = new Shape();
  1374. circle1.graphics.beginFill(0x0000FF);
  1375. circle1.graphics.drawCircle(40, 40, 40);
  1376. addChild(circle1);
  1377. var circle2:Shape = new Shape();
  1378. circle2.graphics.beginFill(0x00FF00);
  1379. circle2.graphics.drawCircle(40, 40, 40);
  1380. circle2.x = 50;
  1381. addChild(circle2);
  1382. var circle3:Shape = new Shape();
  1383. circle3.graphics.beginFill(0xFF0000);
  1384. circle3.graphics.drawCircle(40, 40, 40);
  1385. circle3.x = 100;
  1386. circle3.y = 67;
  1387. addChild(circle3);
  1388. trace(circle1.hitTestObject(circle2)); // true
  1389. trace(circle1.hitTestObject(circle3)); // false
  1390. trace(circle2.hitTestObject(circle3)); // true
  1391. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObject:hitTestPoint" 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 ">hitTestPoint</apiName><shortdesc class="- topic/shortdesc ">
  1392. Evaluates the display object to see if it overlaps or intersects with the
  1393. point specified by the x and y parameters.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc "><codeph class="+ topic/ph pr-d/codeph ">true</codeph> if the display object overlaps or intersects with the specified point;
  1394. <codeph class="+ topic/ph pr-d/codeph ">false</codeph> otherwise.
  1395. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">x</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The <i class="+ topic/ph hi-d/i ">x</i> coordinate to test against this object.
  1396. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">y</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The <i class="+ topic/ph hi-d/i ">y</i> coordinate to test against this object.
  1397. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">shapeFlag</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 ">Whether to check against the actual pixels of the object (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>)
  1398. or the bounding box (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>).
  1399. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Evaluates the display object to see if it overlaps or intersects with a point specified
  1400. by x and y.
  1401. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1402. Evaluates the display object to see if it overlaps or intersects with the
  1403. point specified by the <codeph class="+ topic/ph pr-d/codeph ">x</codeph> and <codeph class="+ topic/ph pr-d/codeph ">y</codeph> parameters.
  1404. The <codeph class="+ topic/ph pr-d/codeph ">x</codeph> and <codeph class="+ topic/ph pr-d/codeph ">y</codeph> parameters specify a point in the
  1405. coordinate space of the Stage, not the display object container that contains the
  1406. display object (unless that display object container is the Stage).
  1407. </apiDesc><example conref="examples\DisplayObject.hitTestPoint.1.as" class="- topic/example "> The following code creates a Shape object and shows the
  1408. result of calling the <codeph class="+ topic/ph pr-d/codeph ">hitTestPoint()</codeph> method, using different
  1409. points as parameters. The <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> method converts the
  1410. point from Stage coordinates to the coordinate space of the shape:
  1411. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1412. import flash.display.Shape;
  1413. import flash.geom.Point;
  1414. var circle:Shape = new Shape();
  1415. circle.graphics.beginFill(0x0000FF);
  1416. circle.graphics.drawCircle(40, 40, 40);
  1417. circle.x = 10;
  1418. addChild(circle);
  1419. var point1:Point = new Point(0, 0);
  1420. trace(circle.hitTestPoint(point1.x, point1.y, true)); // false
  1421. trace(circle.hitTestPoint(point1.x, point1.y, false)); // false
  1422. trace(circle.globalToLocal(point1)); // [x=-10, y=0]
  1423. var point2:Point = new Point(10, 1);
  1424. trace(circle.hitTestPoint(point2.x, point2.y, true)); // false
  1425. trace(circle.hitTestPoint(point2.x, point2.y, false)); // true
  1426. trace(circle.globalToLocal(point2)); // [x=0, y=1]
  1427. var point3:Point = new Point(30, 20);
  1428. trace(circle.hitTestPoint(point3.x, point3.y, true)); // true
  1429. trace(circle.hitTestPoint(point3.x, point3.y, false)); // true
  1430. trace(circle.globalToLocal(point3)); // [x=20, y=20]
  1431. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/opaqueBackground" class="- topic/link "><linktext class="- topic/linktext ">opaqueBackground</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObject:local3DToGlobal" 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 ">local3DToGlobal</apiName><shortdesc class="- topic/shortdesc ">
  1432. Converts a three-dimensional point of the three-dimensional display
  1433. object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.</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 "/><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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A two-dimensional point representing a three-dimensional point
  1434. in two-dimensional space.
  1435. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">point3d</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Vector3D</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Vector3D object containing either a three-dimensional point or
  1436. the coordinates of the three-dimensional display object.
  1437. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1438. Converts a three-dimensional point of the three-dimensional display
  1439. object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.
  1440. <p class="- topic/p ">For example, you can only use two-dimensional coordinates (x,y) to
  1441. draw with the <codeph class="+ topic/ph pr-d/codeph ">display.Graphics</codeph> methods. To draw a three-dimensional
  1442. object, you need to map the three-dimensional coordinates of a
  1443. display object to two-dimensional coordinates. First, create an instance of
  1444. the Vector3D class that holds the x-, y-, and z- coordinates of the three-dimensional
  1445. display object. Then pass the Vector3D object to the <codeph class="+ topic/ph pr-d/codeph ">local3DToGlobal()</codeph>
  1446. method as the <codeph class="+ topic/ph pr-d/codeph ">point3d</codeph> parameter. The method returns a two-dimensional Point
  1447. object that can be used
  1448. with the Graphics API to draw the three-dimensional object.</p>
  1449. </apiDesc><example conref="examples\Local3DToGlobalExample.as" class="- topic/example "> This example draws a simple three-dimensional cube in a two dimensional space
  1450. using <codeph class="+ topic/ph pr-d/codeph ">display.Graphics</codeph> methods. The location of <codeph class="+ topic/ph pr-d/codeph ">this</codeph> display
  1451. object is offset, so the cube's registration point is in its center. A vector
  1452. of Vector3D objects holds the cube's three dimensional coordinates. The top
  1453. of the cube is draw first, the bottom is drawn second, and then the top and bottom
  1454. four corners are connected. You need to add the cube to the display object
  1455. container before drawing the cube in order to use the <codeph class="+ topic/ph pr-d/codeph ">local3DToGlobal()</codeph> method.
  1456. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1457. package {
  1458. import flash.display.MovieClip;
  1459. import flash.display.Sprite;
  1460. import flash.display.Graphics;
  1461. import flash.geom.*;
  1462. public class Local3DToGlobalExample extends MovieClip {
  1463. private var myCube:Sprite = new Sprite();
  1464. private var v8:Vector.&lt;Vector3D&gt; = new Vector.&lt;Vector3D&gt;(8);
  1465. public function Local3DToGlobalExample():void {
  1466. this.x = -(this.stage.stageWidth / 2);
  1467. this.y = -(this.stage.stageWidth / 2);
  1468. v8[0] = new Vector3D(-40,-40,-40);
  1469. v8[1] = new Vector3D(40,-40,-40);
  1470. v8[2] = new Vector3D(40,-40,40);
  1471. v8[3] = new Vector3D(-40,-40,40);
  1472. v8[4] = new Vector3D(-40,100,-40);
  1473. v8[5] = new Vector3D(40,100,-40);
  1474. v8[6] = new Vector3D(40,100,40);
  1475. v8[7] = new Vector3D(-40,100,40);
  1476. myCube.x = (this.stage.stageWidth / 2);
  1477. myCube.y = (this.stage.stageWidth / 2);
  1478. myCube.z = 1;
  1479. addChild(myCube);
  1480. Cube();
  1481. }
  1482. private function Cube():void {
  1483. var ps:Point = new Point(0,0);
  1484. myCube.graphics.lineStyle(2,0xFF0000);
  1485. ps = myCube.local3DToGlobal(v8[0]);
  1486. myCube.graphics.moveTo(ps.x, ps.y);
  1487. ps = myCube.local3DToGlobal(v8[1]);
  1488. myCube.graphics.lineTo(ps.x, ps.y);
  1489. ps = myCube.local3DToGlobal(v8[2]);
  1490. myCube.graphics.lineTo(ps.x, ps.y);
  1491. ps = myCube.local3DToGlobal(v8[3]);
  1492. myCube.graphics.lineTo(ps.x, ps.y);
  1493. ps = myCube.local3DToGlobal(v8[0]);
  1494. myCube.graphics.lineTo(ps.x, ps.y);
  1495. ps = myCube.local3DToGlobal(v8[4]);
  1496. myCube.graphics.moveTo(ps.x, ps.y);
  1497. ps = myCube.local3DToGlobal(v8[5]);
  1498. myCube.graphics.lineTo(ps.x, ps.y);
  1499. ps = myCube.local3DToGlobal(v8[6]);
  1500. myCube.graphics.lineTo(ps.x, ps.y);
  1501. ps = myCube.local3DToGlobal(v8[7]);
  1502. myCube.graphics.lineTo(ps.x, ps.y);
  1503. ps = myCube.local3DToGlobal(v8[4]);
  1504. myCube.graphics.lineTo(ps.x, ps.y);
  1505. ps = myCube.local3DToGlobal(v8[0]);
  1506. myCube.graphics.moveTo(ps.x, ps.y);
  1507. ps = myCube.local3DToGlobal(v8[4]);
  1508. myCube.graphics.lineTo(ps.x, ps.y);
  1509. ps = myCube.local3DToGlobal(v8[1]);
  1510. myCube.graphics.moveTo(ps.x, ps.y);
  1511. ps = myCube.local3DToGlobal(v8[5]);
  1512. myCube.graphics.lineTo(ps.x, ps.y);
  1513. ps = myCube.local3DToGlobal(v8[2]);
  1514. myCube.graphics.moveTo(ps.x, ps.y);
  1515. ps = myCube.local3DToGlobal(v8[6]);
  1516. myCube.graphics.lineTo(ps.x, ps.y);
  1517. ps = myCube.local3DToGlobal(v8[3]);
  1518. myCube.graphics.moveTo(ps.x, ps.y);
  1519. ps = myCube.local3DToGlobal(v8[7]);
  1520. myCube.graphics.lineTo(ps.x, ps.y);
  1521. }
  1522. }
  1523. }
  1524. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObject:localToGlobal" 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 ">localToGlobal</apiName><shortdesc class="- topic/shortdesc ">
  1525. Converts the point object from the display object's (local) coordinates to the
  1526. Stage (global) coordinates.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A Point object with coordinates relative to the Stage.
  1527. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">point</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The name or identifier of a point created with the Point class, specifying the
  1528. <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> coordinates as properties.
  1529. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1530. Converts the <codeph class="+ topic/ph pr-d/codeph ">point</codeph> object from the display object's (local) coordinates to the
  1531. Stage (global) coordinates.
  1532. <p class="- topic/p ">This method allows you to convert any given <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> coordinates from
  1533. values that are relative to the origin (0,0) of a specific display object (local coordinates)
  1534. to values that are relative to the origin of the Stage (global coordinates).</p>
  1535. <p class="- topic/p ">To use this method, first create an instance of the Point class. The
  1536. <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> values that you assign represent local coordinates because they
  1537. relate to the origin of the display object.</p>
  1538. <p class="- topic/p ">You then pass the Point instance that you created as the parameter to
  1539. the <codeph class="+ topic/ph pr-d/codeph ">localToGlobal()</codeph> method. The method returns a new Point object with
  1540. <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> values that relate to the origin of the Stage
  1541. instead of the origin of the display object.</p>
  1542. </apiDesc><example conref="examples\DisplayObject.localToGlobal.1.as" class="- topic/example "> The following code creates a Sprite object. The <codeph class="+ topic/ph pr-d/codeph ">mouseX</codeph> and
  1543. <codeph class="+ topic/ph pr-d/codeph ">mouseY</codeph> properties of the sprite are in the coordinate space of the display
  1544. object. This code uses the <codeph class="+ topic/ph pr-d/codeph ">localToGlobal()</codeph> method to translate these
  1545. properties to the global (Stage) coordinates:
  1546. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1547. import flash.display.Sprite;
  1548. import flash.events.MouseEvent;
  1549. import flash.geom.Point;
  1550. var square:Sprite = new Sprite();
  1551. square.graphics.beginFill(0xFFCC00);
  1552. square.graphics.drawRect(0, 0, 100, 100);
  1553. square.x = 100;
  1554. square.y = 200;
  1555. addChild(square);
  1556. square.addEventListener(MouseEvent.CLICK, traceCoordinates)
  1557. function traceCoordinates(event:MouseEvent):void {
  1558. var clickPoint:Point = new Point(square.mouseX, square.mouseY);
  1559. trace("display object coordinates:", clickPoint);
  1560. trace("stage coordinates:", square.localToGlobal(clickPoint));
  1561. }
  1562. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/globalToLocal()" class="- topic/link "><linktext class="- topic/linktext ">globalToLocal()</linktext></link><link href="flash.geom.xml#Point" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Point class</linktext></link></related-links></apiOperation><apiValue id="flash.display:DisplayObject:accessibilityProperties: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 ">accessibilityProperties</apiName><shortdesc class="- topic/shortdesc ">
  1563. The current accessibility options for this display 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></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.accessibility:AccessibilityProperties</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1564. The current accessibility options for this display object. If you modify the <codeph class="+ topic/ph pr-d/codeph ">accessibilityProperties</codeph>
  1565. property or any of the fields within <codeph class="+ topic/ph pr-d/codeph ">accessibilityProperties</codeph>, you must call
  1566. the <codeph class="+ topic/ph pr-d/codeph ">Accessibility.updateProperties()</codeph> method to make your changes take effect.
  1567. <p class="flashonly"><b class="+ topic/ph hi-d/b ">Note</b>: For an object created in the Flash authoring environment, the value of <codeph class="+ topic/ph pr-d/codeph ">accessibilityProperties</codeph>
  1568. is prepopulated with any information you entered in the Accessibility panel for
  1569. that object.</p>
  1570. </apiDesc><example conref="examples\DisplayObject.accessibilityProperties.1.as" class="- topic/example "> The following example shows how the to attach a simple AccessibilityProperties
  1571. object to a TextField instance:
  1572. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1573. import flash.text.TextField;
  1574. import flash.accessibility.AccessibilityProperties;
  1575. import flash.accessibility.Accessibility;
  1576. import flash.system.Capabilities;
  1577. var tf:TextField = new TextField();
  1578. tf.text = "hello";
  1579. var accessProps:AccessibilityProperties = new AccessibilityProperties();
  1580. accessProps.name = "Greeting";
  1581. tf.accessibilityProperties = accessProps;
  1582. if (Capabilities.hasAccessibility) {
  1583. Accessibility.updateProperties();
  1584. }
  1585. trace(tf.accessibilityProperties.name); // Greeting
  1586. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.accessibility.xml#Accessibility/updateProperties()" class="- topic/link "><linktext class="- topic/linktext ">flash.accessibility.Accessibility.updateProperties()</linktext></link><link href="flash.accessibility.xml#AccessibilityProperties" class="- topic/link "><linktext class="- topic/linktext ">flash.accessibility.AccessibilityProperties</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:alpha: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 ">alpha</apiName><shortdesc class="- topic/shortdesc ">
  1587. Indicates the alpha transparency value of the object specified.</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="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 ">
  1588. Indicates the alpha transparency value of the object specified.
  1589. Valid values are 0 (fully transparent) to 1 (fully opaque).
  1590. The default value is 1. Display objects with <codeph class="+ topic/ph pr-d/codeph ">alpha</codeph>
  1591. set to 0 <i class="+ topic/ph hi-d/i ">are</i> active, even though they are invisible.
  1592. </apiDesc><example conref="examples\DisplayObject.alpha.1.as" class="- topic/example "> The following code sets the <codeph class="+ topic/ph pr-d/codeph ">alpha</codeph> property of a sprite
  1593. to 50% when the mouse rolls over the sprite:
  1594. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1595. import flash.display.Sprite;
  1596. import flash.events.MouseEvent;
  1597. var circle:Sprite = new Sprite();
  1598. circle.graphics.beginFill(0xFF0000);
  1599. circle.graphics.drawCircle(40, 40, 40);
  1600. addChild(circle);
  1601. circle.addEventListener(MouseEvent.MOUSE_OVER, dimObject);
  1602. circle.addEventListener(MouseEvent.MOUSE_OUT, restoreObject);
  1603. function dimObject(event:MouseEvent):void {
  1604. event.target.alpha = 0.5;
  1605. }
  1606. function restoreObject(event:MouseEvent):void {
  1607. event.target.alpha = 1.0;
  1608. }
  1609. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:blendMode: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 ">blendMode</apiName><shortdesc class="- topic/shortdesc ">
  1610. A value from the BlendMode class that specifies which blend mode to use.</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="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 ">
  1611. A value from the BlendMode class that specifies which blend mode to use.
  1612. A bitmap can be drawn internally in two ways. If you have a blend mode enabled or an
  1613. external clipping mask, the bitmap is drawn by adding a bitmap-filled square shape to the vector
  1614. render. If you attempt to set this property to an invalid value, Flash runtimes set the value
  1615. to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.NORMAL</codeph>.
  1616. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property affects each pixel of the display object.
  1617. Each pixel is composed of three constituent
  1618. colors (red, green, and blue), and each constituent color has a value between 0x00 and 0xFF.
  1619. Flash Player or Adobe AIR compares each constituent color of one pixel in the movie clip with
  1620. the corresponding color of the pixel in the background. For example, if <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph>
  1621. is set to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.LIGHTEN</codeph>, Flash Player or Adobe AIR compares the red value of the display object with
  1622. the red value of the background, and uses the lighter of the two as the
  1623. value for the red component of the displayed color.</p>
  1624. <p class="- topic/p ">The following table describes the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> settings.
  1625. The BlendMode class defines string values you can use.
  1626. The illustrations in the table show <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> values applied to a circular
  1627. display object (2) superimposed on another display object (1).</p>
  1628. <p class="- topic/p ">
  1629. <adobeimage alt="Square Number 1" href="../../images/blendMode-0a.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/>
  1630. <adobeimage alt="Circle Number 2" href="../../images/blendMode-0b.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/>
  1631. </p>
  1632. <adobetable class="innertable"><tgroup cols="3" class="- topic/tgroup "><thead class="- topic/thead "><row class="- topic/row "><entry class="- topic/entry ">BlendMode Constant</entry><entry class="- topic/entry ">Illustration</entry><entry class="- topic/entry ">Description</entry></row></thead><tbody class="- topic/tbody "><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.NORMAL</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode NORMAL" href="../../images/blendMode-1.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">The display object appears in front of the background. Pixel values of the display object
  1633. override those of the background. Where the display object is transparent, the background is
  1634. visible.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.LAYER</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode LAYER" href="../../images/blendMode-2.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Forces the creation of a transparency group for the display object. This means that the display
  1635. object is pre-composed in a temporary buffer before it is processed further. This is done
  1636. automatically if the display object is pre-cached using bitmap caching or if the display object is
  1637. a display object container with at least one child object with a <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph>
  1638. setting other than <codeph class="+ topic/ph pr-d/codeph ">BlendMode.NORMAL</codeph>. Not supported under GPU rendering.
  1639. </entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.MULTIPLY</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode MULTIPLY" href="../../images/blendMode-3.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Multiplies the values of the display object constituent colors by the colors of the background color,
  1640. and then normalizes by dividing by 0xFF,
  1641. resulting in darker colors. This setting is commonly used for shadows and depth effects.
  1642. <p class="- topic/p ">For example, if a constituent color (such as red) of one pixel in the display object and the
  1643. corresponding color of the pixel in the background both have the value 0x88, the multiplied
  1644. result is 0x4840. Dividing by 0xFF yields a value of 0x48 for that constituent color,
  1645. which is a darker shade than the color of the display object or the color of the background.</p></entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.SCREEN</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode SCREEN" href="../../images/blendMode-4.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Multiplies the complement (inverse) of the display object color by the complement of the background
  1646. color, resulting in a bleaching effect. This setting is commonly used for highlights or to remove black
  1647. areas of the display object.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.LIGHTEN</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode LIGHTEN" href="../../images/blendMode-5.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Selects the lighter of the constituent colors of the display object and the color of the background (the
  1648. colors with the larger values). This setting is commonly used for superimposing type.
  1649. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background
  1650. pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
  1651. 0xFFF833 (because 0xFF &gt; 0xDD, 0xCC &lt; 0xF8, and 0x33 &gt; 0x00 = 33). Not supported under GPU rendering.</p></entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.DARKEN</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode DARKEN" href="../../images/blendMode-6.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Selects the darker of the constituent colors of the display object and the colors of the
  1652. background (the colors with the smaller values). This setting is commonly used for superimposing type.
  1653. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background
  1654. pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
  1655. 0xDDCC00 (because 0xFF &gt; 0xDD, 0xCC &lt; 0xF8, and 0x33 &gt; 0x00 = 33). Not supported under GPU rendering.</p></entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.DIFFERENCE</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode DIFFERENCE" href="../../images/blendMode-7.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Compares the constituent colors of the display object with the colors of its background, and subtracts
  1656. the darker of the values of the two constituent colors from the lighter value. This setting is commonly
  1657. used for more vibrant colors.
  1658. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background
  1659. pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
  1660. 0x222C33 (because 0xFF - 0xDD = 0x22, 0xF8 - 0xCC = 0x2C, and 0x33 - 0x00 = 0x33).</p></entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.ADD</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode ADD" href="../../images/blendMode-8.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Adds the values of the constituent colors of the display object to the colors of its background, applying a
  1661. ceiling of 0xFF. This setting is commonly used for animating a lightening dissolve between
  1662. two objects.
  1663. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xAAA633, and the background
  1664. pixel has an RGB value of 0xDD2200, the resulting RGB value for the displayed pixel is
  1665. 0xFFC833 (because 0xAA + 0xDD &gt; 0xFF, 0xA6 + 0x22 = 0xC8, and 0x33 + 0x00 = 0x33).</p></entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.SUBTRACT</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode SUBTRACT" href="../../images/blendMode-9.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Subtracts the values of the constituent colors in the display object from the values of the
  1666. background color, applying a floor of 0. This setting is commonly used for animating a
  1667. darkening dissolve between two objects.
  1668. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xAA2233, and the background
  1669. pixel has an RGB value of 0xDDA600, the resulting RGB value for the displayed pixel is
  1670. 0x338400 (because 0xDD - 0xAA = 0x33, 0xA6 - 0x22 = 0x84, and 0x00 - 0x33 &lt; 0x00).</p></entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.INVERT</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode INVERT" href="../../images/blendMode-10.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Inverts the background.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.ALPHA</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode ALPHA" href="../../images/blendMode-11.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Applies the alpha value of each pixel of the display object to the background.
  1671. This requires the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> setting of the parent display object to be set to
  1672. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.LAYER</codeph>.
  1673. For example, in the illustration, the parent display object, which is a white background,
  1674. has <codeph class="+ topic/ph pr-d/codeph ">blendMode = BlendMode.LAYER</codeph>. Not supported under GPU rendering.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.ERASE</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode ERASE" href="../../images/blendMode-12.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Erases the background based on the alpha value of the display object. This requires the
  1675. <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> of the parent display object to be set to
  1676. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.LAYER</codeph>. For example, in the
  1677. illustration, the parent display object, which is a white background, has
  1678. <codeph class="+ topic/ph pr-d/codeph ">blendMode = BlendMode.LAYER</codeph>. Not supported under GPU rendering.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.OVERLAY</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode OVERLAY" href="../../images/blendMode-13.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Adjusts the color of each pixel based on the darkness of the background.
  1679. If the background is lighter than 50% gray, the display object and background colors are
  1680. screened, which results in a lighter color. If the background is darker than 50% gray,
  1681. the colors are multiplied, which results in a darker color.
  1682. This setting is commonly used for shading effects. Not supported under GPU rendering.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.HARDLIGHT</codeph></entry><entry class="- topic/entry "><adobeimage alt="blend mode HARDLIGHT" href="../../images/blendMode-14.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry><entry class="- topic/entry ">Adjusts the color of each pixel based on the darkness of the display object.
  1683. If the display object is lighter than 50% gray, the display object and background colors are
  1684. screened, which results in a lighter color. If the display object is darker than 50% gray,
  1685. the colors are multiplied, which results in a darker color.
  1686. This setting is commonly used for shading effects. Not supported under GPU rendering.</entry></row><row valign="top" class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph></entry><entry align="center" valign="middle" class="- topic/entry ">N/A</entry><entry class="- topic/entry ">Adjusts the color using a custom shader routine. The shader that is used is specified
  1687. as the Shader instance assigned to the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property. Setting the
  1688. <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property of a display object to a Shader instance
  1689. automatically sets the display object's <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to
  1690. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>. If the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is set to
  1691. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph> without first setting the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property,
  1692. the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.NORMAL</codeph>. Not supported under GPU rendering.</entry></row></tbody></tgroup></adobetable>
  1693. </apiDesc><example conref="examples\DisplayObject.blendMode.1.as" class="- topic/example "> The following code creates two sprite objects, a square and a circle,
  1694. and sets the blend mode of the circle (in the foreground) to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SUBTRACT</codeph>
  1695. when the pointer rolls over the circle:
  1696. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1697. import flash.display.Sprite;
  1698. import flash.display.BlendMode;
  1699. import flash.events.MouseEvent;
  1700. var square:Sprite = new Sprite();
  1701. square.graphics.beginFill(0xFF88CC);
  1702. square.graphics.drawRect(0, 0, 80, 80);
  1703. addChild(square);
  1704. var circle:Sprite = new Sprite();
  1705. circle.graphics.beginFill(0xAA0022);
  1706. circle.graphics.drawCircle(40, 40, 40);
  1707. addChild(circle);
  1708. circle.addEventListener(MouseEvent.MOUSE_OVER, dimObject);
  1709. circle.addEventListener(MouseEvent.MOUSE_OUT, restoreObject);
  1710. function dimObject(event:MouseEvent):void {
  1711. event.target.blendMode = BlendMode.SUBTRACT;
  1712. }
  1713. function restoreObject(event:MouseEvent):void {
  1714. event.target.blendMode = BlendMode.NORMAL;
  1715. }
  1716. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#BlendMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.BlendMode</linktext></link><link href="flash.display.xml#DisplayObject/blendShader" class="- topic/link "><linktext class="- topic/linktext ">blendShader</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:cacheAsBitmapMatrix: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 ">cacheAsBitmapMatrix</apiName><shortdesc class="- topic/shortdesc ">
  1717. If non-null, this Matrix object defines how a display object is rendered when
  1718. cacheAsBitmap is set to true.</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.0" 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:Matrix</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">The transformation matrix used when rendering a cached version of
  1719. this display object's bitmap.
  1720. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1721. If non-null, this Matrix object defines how a display object is rendered when
  1722. <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>. The application uses
  1723. this matrix as a transformation matrix that is applied when rendering the bitmap version of
  1724. the display object.
  1725. <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
  1726. on mobile devices, but it is not supported on desktop operating systems. It also has
  1727. limited support on AIR for TV devices.
  1728. Specifically, on AIR for TV devices, supported transformations include scaling and translation,
  1729. but not rotation and skewing. See
  1730. <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
  1731. AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
  1732. <p class="- topic/p ">With <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> set, the application retains a cached
  1733. bitmap image across various 2D transformations, including translation, rotation,
  1734. and scaling. If the application uses hardware acceleration, the object will
  1735. be stored in video memory as a texture. This allows the GPU to apply
  1736. the supported transformations to the object. The GPU
  1737. can perform these transformations faster than the CPU.</p>
  1738. <p class="- topic/p ">To use the hardware acceleration, set Rendering to GPU in
  1739. the General tab of the iPhone Settings dialog box in Flash Professional CS5.
  1740. Or set the <codeph class="+ topic/ph pr-d/codeph ">renderMode</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">gpu</codeph> in the
  1741. application descriptor file. Note that AIR for TV devices automatically
  1742. use hardware acceleration if it is available.</p>
  1743. <p class="- topic/p ">For example, the following code sends an untransformed bitmap representation
  1744. of the display object to the GPU:</p>
  1745. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">matrix:Matrix = new Matrix(); // creates an identity matrix
  1746. mySprite.cacheAsBitmapMatrix = matrix;
  1747. mySprite.cacheAsBitmap = true;</codeblock>
  1748. <p class="- topic/p ">Usually, the identity matrix (<codeph class="+ topic/ph pr-d/codeph ">new Matrix()</codeph>) suffices. However,
  1749. you can use another matrix, such as a scaled-down matrix, to upload
  1750. a different bitmap to the GPU. For example, the following example applies
  1751. a <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> matrix that is scaled by 0.5 on the x and y axes.
  1752. The bitmap object that the GPU uses is smaller, however the GPU adjusts
  1753. its size to match the transform.matrix property of the display object:</p>
  1754. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">matrix:Matrix = new Matrix(); // creates an identity matrix
  1755. matrix.scale(0.5, 0.5); // scales the matrix
  1756. mySprite.cacheAsBitmapMatrix = matrix;
  1757. mySprite.cacheAsBitmap = true;</codeblock>
  1758. <p class="- topic/p ">Generally, you should choose to use a matrix that transforms the display object
  1759. to the size that it will appear in the application. For example, if
  1760. your application displays the bitmap version of the sprite scaled down by a half,
  1761. use a matrix that scales down by a half. If you application will display
  1762. the sprite larger than its current dimensions, use a matrix that
  1763. scales up by that factor.</p>
  1764. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> property
  1765. is suitable for 2D transformations. If you need to apply transformations in 3D,
  1766. you may do so by setting a 3D property of the object and manipulating its
  1767. <codeph class="+ topic/ph pr-d/codeph ">transform.matrix3D</codeph> property. If the application is packaged
  1768. using GPU mode, this allows the 3D transforms to be applied to
  1769. the object by the GPU. The <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> is ignored
  1770. for 3D objects.</p>
  1771. </apiDesc><example conref="examples\DisplayObject.cacheAsBitmapMatrix.as" class="- topic/example "> The following example applies uses the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> property to apply transformations
  1772. to a bitmap version of the movie clip <codeph class="+ topic/ph pr-d/codeph ">my_shape</codeph>.
  1773. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1774. import flash.geom.Matrix;
  1775. import flash.display.*;
  1776. import flash.utils.Timer;
  1777. var my_shape:MovieClip = new MovieClip();
  1778. my_shape.graphics.beginFill(0xCCFF00);
  1779. my_shape.graphics.drawRect(200, 0, 100, 100);
  1780. addChild(my_shape);
  1781. var my_timer:Timer = new Timer(250);
  1782. my_timer.start();
  1783. my_timer.addEventListener(TimerEvent.TIMER, timerHandler);
  1784. // make sure this Display Object remains cached for all 2D transforms
  1785. my_shape.cacheAsBitmap = true;
  1786. my_shape.cacheAsBitmapMatrix = new Matrix();
  1787. // rotation variables
  1788. const initAngle:Number = 0;
  1789. const pi:Number = 3.142;
  1790. const incrAngle:Number = pi/10;
  1791. // scaling variables
  1792. const initScale:Number = 0.25;
  1793. const incrScale: Number = 1.1;
  1794. var initHeight : Number = my_shape.height;
  1795. var initWidth : Number = my_shape.width;
  1796. // translation variables
  1797. var incrX : Number = root.width / 20;
  1798. var incrY : Number = root.height / 10;
  1799. // do some initial transforms
  1800. var tempMat : Matrix = my_shape.transform.matrix;
  1801. tempMat.rotate(initAngle);
  1802. tempMat.scale(initScale, initScale);
  1803. my_shape.transform.matrix = tempMat;
  1804. function timerHandler(evt:TimerEvent):void {
  1805. tempMat = my_shape.transform.matrix;
  1806. tempMat.rotate(incrAngle);
  1807. tempMat.translate(incrX, incrY);
  1808. tempMat.scale(incrScale, incrScale);
  1809. my_shape.transform.matrix = tempMat;
  1810. // ensure we are still in a reasonable state or reset
  1811. if(my_shape.height &gt; stage.stageHeight/2)
  1812. {
  1813. my_shape.height = initHeight;
  1814. }
  1815. if(my_shape.width &gt; stage.stageWidth/2)
  1816. {
  1817. my_shape.width = initWidth;
  1818. }
  1819. if(my_shape.x &gt; stage.stageWidth)
  1820. {
  1821. my_shape.x = 0;
  1822. }
  1823. else if (my_shape.x &lt; 0)
  1824. {
  1825. my_shape.x = stage.stageWidth;
  1826. }
  1827. if(my_shape.y &gt; stage.stageHeight)
  1828. {
  1829. my_shape.y = 0;
  1830. }
  1831. else if (my_shape.y &lt; 0)
  1832. {
  1833. my_shape.y = stage.stageHeight;
  1834. }
  1835. }
  1836. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/cacheAsBitmap" class="- topic/link "><linktext class="- topic/linktext ">cacheAsBitmap</linktext></link><link href="flash.geom.xml#Matrix3D" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Matrix3D</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:cacheAsBitmap: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 ">cacheAsBitmap</apiName><shortdesc class="- topic/shortdesc ">
  1837. If set to true, Flash runtimes cache an internal bitmap representation of the
  1838. display 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><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><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Whether to cache this DisplayObject as a bitmap.
  1839. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1840. If set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, Flash runtimes cache an internal bitmap representation of the
  1841. display object. This caching can increase performance for display objects that contain complex
  1842. vector content.
  1843. <p class="- topic/p ">All vector data for a display object that has a cached bitmap is drawn to the bitmap
  1844. instead of the main display. If <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> is null or unsupported,
  1845. the bitmap is then copied to the main display as unstretched, unrotated pixels snapped to
  1846. the nearest pixel boundaries. Pixels are mapped 1 to 1 with
  1847. the parent object. If the bounds of the bitmap change, the bitmap is recreated instead
  1848. of being stretched.</p>
  1849. <p class="- topic/p ">If <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> is non-null and supported, the object is drawn to the off-screen bitmap
  1850. using that matrix and the stretched and/or rotated results of that rendering are used
  1851. to draw the object to the main display.</p>
  1852. <p class="- topic/p ">No internal bitmap is created unless the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property is set to
  1853. <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</p>
  1854. <p class="- topic/p ">After you set the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>,
  1855. the rendering does not change, however the display object performs pixel snapping
  1856. automatically. The animation speed can be significantly faster depending
  1857. on the complexity of the vector content.
  1858. </p>
  1859. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property is automatically set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>
  1860. whenever you apply a filter to a display object (when its <codeph class="+ topic/ph pr-d/codeph ">filter</codeph> array is not empty),
  1861. and if a display object has a filter applied to it, <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> is reported as
  1862. <codeph class="+ topic/ph pr-d/codeph ">true</codeph> for that display object, even if you set the property to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.
  1863. If you clear all filters for a display object, the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> setting changes to
  1864. what it was last set to.</p>
  1865. <p class="- topic/p ">A display object does not use a bitmap even if the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph>
  1866. property is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> and instead renders from vector data in the following cases:</p>
  1867. <ul class="- topic/ul "><li class="- topic/li ">The bitmap is too large.
  1868. In AIR 1.5 and Flash Player 10, the maximum size for a bitmap image is 8,191 pixels in width or height,
  1869. and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a bitmap image is 8,191 pixels
  1870. wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier, the limitation is
  1871. is 2880 pixels in height and 2,880 pixels in width.</li><li class="- topic/li ">The bitmap fails to allocate (out of memory error). </li></ul>
  1872. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property is best used with movie clips that have
  1873. mostly static content and that do not scale and rotate frequently. With such movie
  1874. clips, <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> can lead to performance increases when the
  1875. movie clip is translated (when its <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> position is changed).</p>
  1876. </apiDesc><example conref="examples\DisplayObject.cacheAsBitmap.1.as" class="- topic/example "> The following example applies a drop shadow to a Shape instance.
  1877. It then traces the value of the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property, which is set to
  1878. <codeph class="+ topic/ph pr-d/codeph ">true</codeph> when the filter is applied:
  1879. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1880. import flash.display.Sprite;
  1881. import flash.filters.DropShadowFilter
  1882. var circle:Sprite = new Sprite();
  1883. circle.graphics.beginFill(0xAA0022);
  1884. circle.graphics.drawCircle(40, 40, 40);
  1885. addChild(circle);
  1886. trace(circle.cacheAsBitmap); // false
  1887. var filter:DropShadowFilter = new DropShadowFilter();
  1888. circle.filters = [filter];
  1889. trace(circle.cacheAsBitmap); // true
  1890. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/cacheAsBitmapMatrix" class="- topic/link "><linktext class="- topic/linktext ">cacheAsBitmapMatrix</linktext></link><link href="flash.display.xml#DisplayObject/opaqueBackground" class="- topic/link "><linktext class="- topic/linktext ">opaqueBackground</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:filters: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 ">filters</apiName><shortdesc class="- topic/shortdesc ">
  1891. An indexed array that contains each filter object currently associated with the display 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></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 ">Array</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">When <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> includes a ShaderFilter and the shader
  1892. output type is not compatible with this operation
  1893. (the shader must specify a <codeph class="+ topic/ph pr-d/codeph ">pixel4</codeph>
  1894. output).
  1895. </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 ">When <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> includes a ShaderFilter and the shader
  1896. doesn't specify any image input or the first
  1897. input is not an <codeph class="+ topic/ph pr-d/codeph ">image4</codeph> input.
  1898. </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 ">When <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> includes a ShaderFilter and the shader
  1899. specifies an image input that isn't provided.
  1900. </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 ">When <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> includes a ShaderFilter, a
  1901. ByteArray or Vector.&lt;Number&gt; instance as
  1902. a shader input, and the <codeph class="+ topic/ph pr-d/codeph ">width</codeph>
  1903. and <codeph class="+ topic/ph pr-d/codeph ">height</codeph> properties aren't specified for the
  1904. ShaderInput object, or the specified values don't match the amount of
  1905. data in the input data. See the <codeph class="+ topic/ph pr-d/codeph ">ShaderInput.input</codeph>
  1906. property for more information.
  1907. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  1908. An indexed array that contains each filter object currently associated with the display object.
  1909. The flash.filters package contains several classes that define specific filters you can
  1910. use.
  1911. <p class="- topic/p ">Filters can be applied in Flash Professional at design time, or at run time by using
  1912. ActionScript code. To apply a filter by using ActionScript, you must make a temporary copy of the
  1913. entire <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array, modify the temporary array, then assign the value
  1914. of the temporary array back to the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array. You cannot directly
  1915. add a new filter object to the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array.</p>
  1916. <p class="- topic/p ">To add a filter by using ActionScript, perform the following steps (assume that the
  1917. target display object is named <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject</codeph>):</p>
  1918. <ol class="- topic/ol "><li class="- topic/li ">Create a new filter object by using the constructor method of your chosen filter
  1919. class.</li><li class="- topic/li ">Assign the value of the <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject.filters</codeph> array to a temporary array, such
  1920. as one named <codeph class="+ topic/ph pr-d/codeph ">myFilters</codeph>.</li><li class="- topic/li ">Add the new filter object to the <codeph class="+ topic/ph pr-d/codeph ">myFilters</codeph> temporary array.</li><li class="- topic/li ">Assign the value of the temporary array to the <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject.filters</codeph> array.</li></ol>
  1921. <p class="- topic/p ">If the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array is undefined, you do not need to use a temporary array.
  1922. Instead, you can directly assign an array literal that contains one or more filter objects that
  1923. you create. The first example in the Examples section adds a drop shadow filter by using
  1924. code that handles both defined and undefined <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> arrays.</p>
  1925. <p class="- topic/p ">To modify an existing filter object,
  1926. you must use the technique of modifying a copy of the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array:</p>
  1927. <ol class="- topic/ol "><li class="- topic/li ">Assign the value of the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array to a temporary array, such as one
  1928. named <codeph class="+ topic/ph pr-d/codeph ">myFilters</codeph>.</li><li class="- topic/li ">Modify the property by using the temporary array, <codeph class="+ topic/ph pr-d/codeph ">myFilters</codeph>. For example,
  1929. to set the quality property of the first filter in the array, you could use the
  1930. following code: <codeph class="+ topic/ph pr-d/codeph ">myFilters[0].quality = 1;</codeph></li><li class="- topic/li ">Assign the value of the temporary array to the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array.</li></ol>
  1931. <p class="- topic/p ">At load time, if a display object has an associated filter, it is marked to cache itself as a
  1932. transparent bitmap. From this point forward, as long as the display object has a valid filter list,
  1933. the player caches the display object as a bitmap. This source bitmap is used as a source
  1934. image for the filter effects. Each display object usually has two bitmaps: one with the
  1935. original unfiltered source display object and another for the final image after filtering.
  1936. The final image is used when rendering. As long as the display object does not
  1937. change, the final image does not need updating.</p>
  1938. <p class="- topic/p ">The flash.filters package includes classes for filters. For example, to create a DropShadow
  1939. filter, you would write:</p>
  1940. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1941. import flash.filters.DropShadowFilter
  1942. var myFilter:DropShadowFilter = new DropShadowFilter (distance, angle, color, alpha, blurX, blurY, quality, inner, knockout)
  1943. </codeblock>
  1944. <p class="- topic/p ">You can use the <codeph class="+ topic/ph pr-d/codeph ">is</codeph> operator to determine the type of filter assigned to
  1945. each index position in the <codeph class="+ topic/ph pr-d/codeph ">filter</codeph> array. For example, the following code shows
  1946. how to determine the position of the first filter in the <codeph class="+ topic/ph pr-d/codeph ">filters</codeph> array that
  1947. is a DropShadowFilter:
  1948. </p>
  1949. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1950. import flash.text.TextField;
  1951. import flash.filters.~~;
  1952. var tf:TextField = new TextField();
  1953. var filter1:DropShadowFilter = new DropShadowFilter();
  1954. var filter2:GradientGlowFilter = new GradientGlowFilter();
  1955. tf.filters = [filter1, filter2];
  1956. tf.text = "DropShadow index: " + filterPosition(tf, DropShadowFilter).toString(); // 0
  1957. addChild(tf)
  1958. function filterPosition(displayObject:DisplayObject, filterClass:Class):int {
  1959. for (var i:uint = 0; i &lt; displayObject.filters.length; i++) {
  1960. if (displayObject.filters[i] is filterClass) {
  1961. return i;
  1962. }
  1963. }
  1964. return -1;
  1965. }
  1966. </codeblock>
  1967. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Since you cannot directly add a new filter object to the
  1968. <codeph class="+ topic/ph pr-d/codeph ">DisplayObject.filters</codeph> array, the following code has no
  1969. effect on the target display object, named <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject</codeph>:</p>
  1970. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1971. myDisplayObject.filters.push(myDropShadow);
  1972. </codeblock>
  1973. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="../../flash/filters/package-detail.html" class="- topic/link "><linktext class="- topic/linktext ">flash.filters package</linktext></link><link href="flash.display.xml#ShaderInput/input" class="- topic/link "><linktext class="- topic/linktext ">flash.display.ShaderInput.input</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject: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 ">
  1974. Indicates the height of the display object, 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 "/><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="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 ">
  1975. Indicates the height of the display object, in pixels. The height is calculated based on the bounds of the content of the display object.
  1976. When you set the <codeph class="+ topic/ph pr-d/codeph ">height</codeph> property, the <codeph class="+ topic/ph pr-d/codeph ">scaleY</codeph> property is adjusted accordingly, as shown in the
  1977. following code:
  1978. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1979. var rect:Shape = new Shape();
  1980. rect.graphics.beginFill(0xFF0000);
  1981. rect.graphics.drawRect(0, 0, 100, 100);
  1982. trace(rect.scaleY) // 1;
  1983. rect.height = 200;
  1984. trace(rect.scaleY) // 2;</codeblock>
  1985. <p class="- topic/p ">Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a height
  1986. of 0, even if you try to set <codeph class="+ topic/ph pr-d/codeph ">height</codeph> to a different value.</p>
  1987. </apiDesc><example conref="examples\DisplayObject.height.1.as" class="- topic/example "> The following code creates two TextField objects and adjusts the
  1988. <codeph class="+ topic/ph pr-d/codeph ">height</codeph> property of each based on the <codeph class="+ topic/ph pr-d/codeph ">textHeight</codeph> property of
  1989. each; it also positions the second text field by setting its <codeph class="+ topic/ph pr-d/codeph ">y</codeph> property:
  1990. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  1991. import flash.text.TextField;
  1992. var tf1:TextField = new TextField();
  1993. tf1.text = "Text Field 1";
  1994. tf1.border = true;
  1995. tf1.wordWrap = true;
  1996. tf1.width = 40;
  1997. tf1.height = tf1.textHeight + 5;
  1998. addChild(tf1);
  1999. var tf2:TextField = new TextField();
  2000. tf2.text = "Text Field 2";
  2001. tf2.border = true;
  2002. tf2.wordWrap = true;
  2003. tf2.width = 40;
  2004. tf2.height = tf2.textHeight + 5;
  2005. tf2.y = tf1.y + tf1.height + 5;
  2006. addChild(tf2);
  2007. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:loaderInfo: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 ">loaderInfo</apiName><shortdesc class="- topic/shortdesc ">
  2008. Returns a LoaderInfo object containing information about loading the file
  2009. to which this display object belongs.</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 ">flash.display:LoaderInfo</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2010. Returns a LoaderInfo object containing information about loading the file
  2011. to which this display object belongs. The <codeph class="+ topic/ph pr-d/codeph ">loaderInfo</codeph> property is defined only
  2012. for the root display object of a SWF file or for a loaded Bitmap (not for a Bitmap that is drawn
  2013. with ActionScript). To find the <codeph class="+ topic/ph pr-d/codeph ">loaderInfo</codeph> object associated with the SWF file that contains
  2014. a display object named <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject</codeph>, use <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject.root.loaderInfo</codeph>.
  2015. <p class="- topic/p ">A large SWF file can monitor its download by calling
  2016. <codeph class="+ topic/ph pr-d/codeph ">this.root.loaderInfo.addEventListener(Event.COMPLETE, func)</codeph>.</p>
  2017. </apiDesc><example conref="examples\DisplayObject.loaderInfo.1.as" class="- topic/example "> The following code assumes that <codeph class="+ topic/ph pr-d/codeph ">this</codeph> refers to
  2018. a display object. The code outputs the URL of the root SWF file for the
  2019. display object:
  2020. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2021. trace (this.loaderInfo.url);
  2022. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#LoaderInfo" class="- topic/link "><linktext class="- topic/linktext ">LoaderInfo class</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:mask: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 ">mask</apiName><shortdesc class="- topic/shortdesc ">
  2023. The calling display object is masked by the specified mask 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><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:DisplayObject</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Sets a mask for the display object.
  2024. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2025. The calling display object is masked by the specified <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> object.
  2026. To ensure that masking works when the Stage is scaled, the <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> display object
  2027. must be in an active part of the display list. The <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> object itself is not drawn.
  2028. Set <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> to <codeph class="+ topic/ph pr-d/codeph ">null</codeph> to remove the mask.
  2029. <p class="- topic/p ">To be able to scale a mask object, it must be on the display list. To be able to drag a mask Sprite object
  2030. (by calling its <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method), it must be on the display list. To call the
  2031. <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method for a mask sprite based on a <codeph class="+ topic/ph pr-d/codeph ">mouseDown</codeph> event
  2032. being dispatched by the sprite, set the sprite's <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</p>
  2033. <p class="- topic/p ">When display objects are cached by setting the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property to
  2034. <codeph class="+ topic/ph pr-d/codeph ">true</codeph> an the <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmapMatrix</codeph> property to a Matrix object,
  2035. both the mask and the display object being masked must be part of the same cached
  2036. bitmap. Thus, if the display object is cached, then the mask must be a child of the display object.
  2037. If an ancestor of the display object on the display list is cached, then the mask must be a child of
  2038. that ancestor or one of its descendents. If more than one ancestor of the masked object is cached,
  2039. then the mask must be a descendent of the cached container closest to the masked object in the display list.</p>
  2040. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> A single <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> object cannot be used to mask more than one calling display object.
  2041. When the <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> is assigned to a second display object, it is removed as the mask of the first
  2042. object, and that object's <codeph class="+ topic/ph pr-d/codeph ">mask</codeph> property becomes <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
  2043. </apiDesc><example conref="examples\DisplayObject.mask.1.as" class="- topic/example "> The following code creates a TextField object as well as a Sprite object
  2044. that is set as a mask for the TextField object. When the user clicks the text
  2045. field, the <codeph class="+ topic/ph pr-d/codeph ">drag()</codeph> event listener function calls the <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph>
  2046. method of the mask Sprite object:
  2047. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2048. import flash.text.TextField;
  2049. import flash.display.Sprite;
  2050. import flash.events.MouseEvent;
  2051. var tf:TextField = new TextField();
  2052. tf.text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, "
  2053. + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
  2054. tf.selectable = false;
  2055. tf.wordWrap = true;
  2056. tf.width = 150;
  2057. addChild(tf);
  2058. var square:Sprite = new Sprite();
  2059. square.graphics.beginFill(0xFF0000);
  2060. square.graphics.drawRect(0, 0, 40, 40);
  2061. addChild(square);
  2062. tf.mask = square;
  2063. tf.addEventListener(MouseEvent.MOUSE_DOWN, drag);
  2064. tf.addEventListener(MouseEvent.MOUSE_UP, noDrag);
  2065. function drag(event:MouseEvent):void {
  2066. square.startDrag();
  2067. }
  2068. function noDrag(event:MouseEvent):void {
  2069. square.stopDrag();
  2070. }
  2071. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:mouseX: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 ">mouseX</apiName><shortdesc class="- topic/shortdesc ">
  2072. Indicates the x coordinate of the mouse or user input device position, 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 "/><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 ">
  2073. Indicates the x coordinate of the mouse or user input device position, in pixels.
  2074. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note</b>: For a DisplayObject that has been rotated, the returned x coordinate will reflect the
  2075. non-rotated object.</p>
  2076. </apiDesc><example conref="examples\DisplayObject.mouseX.1.as" class="- topic/example "> The following code creates a Sprite object and traces the <codeph class="+ topic/ph pr-d/codeph ">mouseX</codeph>
  2077. and <codeph class="+ topic/ph pr-d/codeph ">mouseY</codeph> positions when the user clicks the sprite:
  2078. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2079. import flash.display.Sprite;
  2080. import flash.events.MouseEvent;
  2081. var square:Sprite = new Sprite();
  2082. square.graphics.beginFill(0xFF0000);
  2083. square.graphics.drawRect(0, 0, 200, 200);
  2084. addChild(square);
  2085. square.addEventListener(MouseEvent.CLICK, traceCoordinates);
  2086. function traceCoordinates(event:MouseEvent):void {
  2087. trace(square.mouseX, square.mouseY);
  2088. }
  2089. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:mouseY: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 ">mouseY</apiName><shortdesc class="- topic/shortdesc ">
  2090. Indicates the y coordinate of the mouse or user input device position, 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 "/><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 ">
  2091. Indicates the y coordinate of the mouse or user input device position, in pixels.
  2092. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note</b>: For a DisplayObject that has been rotated, the returned y coordinate will reflect the
  2093. non-rotated object.</p>
  2094. </apiDesc><example conref="examples\DisplayObject.mouseX.1.as" class="- topic/example "> The following code creates a Sprite object and traces the <codeph class="+ topic/ph pr-d/codeph ">mouseX</codeph>
  2095. and <codeph class="+ topic/ph pr-d/codeph ">mouseY</codeph> positions when the user clicks the sprite:
  2096. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2097. import flash.display.Sprite;
  2098. import flash.events.MouseEvent;
  2099. var square:Sprite = new Sprite();
  2100. square.graphics.beginFill(0xFF0000);
  2101. square.graphics.drawRect(0, 0, 200, 200);
  2102. addChild(square);
  2103. square.addEventListener(MouseEvent.CLICK, traceCoordinates);
  2104. function traceCoordinates(event:MouseEvent):void {
  2105. trace(square.mouseX, square.mouseY);
  2106. }
  2107. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject: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 ">
  2108. Indicates the instance name of the DisplayObject.</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="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If you are attempting to set this property on an object that was
  2109. placed on the timeline in the Flash authoring tool.
  2110. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">The name of this DisplayObject.
  2111. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2112. Indicates the instance name of the DisplayObject. The object can be identified in
  2113. the child list of its parent display object container by calling the
  2114. <codeph class="+ topic/ph pr-d/codeph ">getChildByName()</codeph> method of the display object container.
  2115. </apiDesc><example conref="examples\DisplayObject.name.1.as" class="- topic/example "> The following code creates two Sprite object and traces the
  2116. associated <codeph class="+ topic/ph pr-d/codeph ">name</codeph> property when the user clicks either of the objects:
  2117. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2118. import flash.display.Sprite;
  2119. import flash.events.MouseEvent;
  2120. var circle1:Sprite = new Sprite();
  2121. circle1.graphics.beginFill(0xFF0000);
  2122. circle1.graphics.drawCircle(40, 40, 40);
  2123. circle1.name = "circle1";
  2124. addChild(circle1);
  2125. circle1.addEventListener(MouseEvent.CLICK, traceName);
  2126. var circle2:Sprite = new Sprite();
  2127. circle2.graphics.beginFill(0x0000FF);
  2128. circle2.graphics.drawCircle(140, 40, 40);
  2129. circle2.name = "circle2";
  2130. addChild(circle2);
  2131. circle2.addEventListener(MouseEvent.CLICK, traceName);
  2132. function traceName(event:MouseEvent):void {
  2133. trace(event.target.name);
  2134. }
  2135. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:opaqueBackground: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 ">opaqueBackground</apiName><shortdesc class="- topic/shortdesc ">
  2136. Specifies whether the display object is opaque with a certain background color.</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="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Object</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2137. Specifies whether the display object is opaque with a certain background color.
  2138. A transparent bitmap contains alpha
  2139. channel data and is drawn transparently. An opaque bitmap has no alpha channel (and renders faster
  2140. than a transparent bitmap). If the bitmap is opaque, you specify its own background color to use.
  2141. <p class="- topic/p ">If set to a number value, the surface is opaque (not transparent) with the RGB background
  2142. color that the number specifies. If set to <codeph class="+ topic/ph pr-d/codeph ">null</codeph> (the default value), the display
  2143. object has a transparent background.</p>
  2144. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">opaqueBackground</codeph> property is intended mainly for use with the
  2145. <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property, for rendering optimization. For display objects in which the
  2146. <codeph class="+ topic/ph pr-d/codeph ">cacheAsBitmap</codeph> property is set to true, setting <codeph class="+ topic/ph pr-d/codeph ">opaqueBackground</codeph> can
  2147. improve rendering performance.</p>
  2148. <p class="- topic/p ">The opaque background region is <i class="+ topic/ph hi-d/i ">not</i> matched when calling the <codeph class="+ topic/ph pr-d/codeph ">hitTestPoint()</codeph>
  2149. method with the <codeph class="+ topic/ph pr-d/codeph ">shapeFlag</codeph> parameter set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</p>
  2150. <p class="- topic/p ">The opaque background region does not respond to mouse events.</p>
  2151. </apiDesc><example conref="examples\DisplayObject.opaqueBackground.1.as" class="- topic/example "> The following code creates a Shape object with a blue circle
  2152. and sets its <codeph class="+ topic/ph pr-d/codeph ">opaqueBackground</codeph> property to red (0xFF0000):
  2153. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2154. import flash.display.Shape;
  2155. var circle:Shape = new Shape();
  2156. circle.graphics.beginFill(0x0000FF);
  2157. circle.graphics.drawCircle(40, 40, 40);
  2158. circle.opaqueBackground = 0xFF0000;
  2159. addChild(circle);
  2160. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/cacheAsBitmap" class="- topic/link "><linktext class="- topic/linktext ">cacheAsBitmap</linktext></link><link href="flash.display.xml#DisplayObject/hitTestPoint()" class="- topic/link "><linktext class="- topic/linktext ">hitTestPoint()</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:parent: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 ">parent</apiName><shortdesc class="- topic/shortdesc ">
  2161. Indicates the DisplayObjectContainer object that contains this display 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><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.display:DisplayObjectContainer</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The parent display object belongs to a security sandbox
  2162. to which you do not have access. You can avoid this situation by having
  2163. the parent movie call the <codeph class="+ topic/ph pr-d/codeph ">Security.allowDomain()</codeph> method.
  2164. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2165. Indicates the DisplayObjectContainer object that contains this display object. Use the <codeph class="+ topic/ph pr-d/codeph ">parent</codeph>
  2166. property to specify a relative path to display objects that are above the
  2167. current display object in the display list hierarchy.
  2168. <p class="- topic/p ">You can use <codeph class="+ topic/ph pr-d/codeph ">parent</codeph> to move up multiple levels in the display list as in the following:</p>
  2169. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2170. this.parent.parent.alpha = 20;
  2171. </codeblock>
  2172. </apiDesc><example conref="examples\DisplayObject.parent.1.as" class="- topic/example "> The following code creates three Sprite objects and shows how
  2173. the <codeph class="+ topic/ph pr-d/codeph ">parent</codeph> property reflects the display list hierarchy:
  2174. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2175. import flash.display.Sprite;
  2176. var sprite1:Sprite = new Sprite();
  2177. sprite1.name = "sprite1";
  2178. var sprite2:Sprite = new Sprite();
  2179. sprite2.name = "sprite2";
  2180. var sprite3:Sprite = new Sprite();
  2181. sprite3.name = "sprite3";
  2182. sprite1.addChild(sprite2);
  2183. sprite2.addChild(sprite3);
  2184. trace(sprite2.parent.name); // sprite1
  2185. trace(sprite3.parent.name); // sprite2
  2186. trace(sprite3.parent.parent.name); // sprite1
  2187. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:root: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 ">root</apiName><shortdesc class="- topic/shortdesc ">
  2188. For a display object in a loaded SWF file, the root property is the
  2189. top-most display object in the portion of the display list's tree structure represented by that SWF 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 ">flash.display:DisplayObject</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Return the root display object for this object.
  2190. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2191. For a display object in a loaded SWF file, the <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property is the
  2192. top-most display object in the portion of the display list's tree structure represented by that SWF file.
  2193. For a Bitmap object representing a loaded image file, the <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property is the Bitmap object
  2194. itself. For the instance of the main class of the first SWF file loaded, the <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property is the
  2195. display object itself. The <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property of the Stage object is the Stage object itself. The <codeph class="+ topic/ph pr-d/codeph ">root</codeph>
  2196. property is set to <codeph class="+ topic/ph pr-d/codeph ">null</codeph> for any display object that has not been added to the display list, unless
  2197. it has been added to a display object container that is off the display list but that is a child of the
  2198. top-most display object in a loaded SWF file.
  2199. <p class="- topic/p ">For example, if you create a new Sprite object by calling the <codeph class="+ topic/ph pr-d/codeph ">Sprite()</codeph> constructor method,
  2200. its <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">null</codeph> until you add it to the display list (or to a display
  2201. object container that is off the display list but that is a child of the top-most display object in a SWF file).</p>
  2202. <p class="- topic/p ">For a loaded SWF file, even though the Loader object used to load the file may not be on the display list,
  2203. the top-most display object in the SWF file has its <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property set to itself. The Loader object
  2204. does not have its <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property set until it is added as a child of a display object for which the
  2205. <codeph class="+ topic/ph pr-d/codeph ">root</codeph> property is set.</p>
  2206. </apiDesc><example conref="examples\DisplayObject.root.1.as" class="- topic/example "> The following code shows the difference between the <codeph class="+ topic/ph pr-d/codeph ">root</codeph>
  2207. property for the Stage object, for a display object (a Loader object) that is not loaded (both before
  2208. and after it has been added to the display list), and for a loaded object (a loaded Bitmap object):
  2209. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2210. import flash.display.Loader;
  2211. import flash.net.URLRequest;
  2212. import flash.events.Event;
  2213. trace(stage.root); // [object Stage]
  2214. var ldr:Loader = new Loader();
  2215. trace (ldr.root); // null
  2216. addChild(ldr);
  2217. trace (ldr.root); // [object ...]
  2218. var urlReq:URLRequest = new URLRequest("example.jpg");
  2219. ldr.load(urlReq);
  2220. ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
  2221. function loaded(event:Event):void {
  2222. trace(ldr.content.root); // [object Bitmap]
  2223. }
  2224. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:rotationX: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 ">rotationX</apiName><shortdesc class="- topic/shortdesc ">
  2225. Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.</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 "/><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="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 ">
  2226. Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent
  2227. clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or
  2228. subtracted from 360 to obtain a value within the range.
  2229. </apiDesc><example conref="examples\RotationExample1.as" class="- topic/example "> In this example, two ellipses rotate using their <codeph class="+ topic/ph pr-d/codeph ">rotationX</codeph> and
  2230. <codeph class="+ topic/ph pr-d/codeph ">rotationY</codeph> properties. The first ellipse's registration point is set
  2231. to its center. It rotates around itself. The second ellipse rotates around
  2232. an external point.
  2233. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2234. package {
  2235. import flash.display.MovieClip;
  2236. import flash.display.Shape;
  2237. import flash.geom.*;
  2238. import flash.display.Graphics;
  2239. import flash.events.TimerEvent;
  2240. import flash.utils.Timer;
  2241. public class RotationExample1 extends MovieClip {
  2242. private var ellipse:Shape = new Shape();
  2243. private var speed:int = 10;
  2244. private var ellipse1:Shape;
  2245. private var ellipse2:Shape;
  2246. public function RotationExample1():void {
  2247. ellipse1 = drawEllipse(-50, -40, (this.stage.stageWidth / 2),
  2248. (this.stage.stageHeight / 2));
  2249. ellipse2 = drawEllipse(30, 40, (this.stage.stageWidth / 2),
  2250. (this.stage.stageHeight / 2));
  2251. this.addChild(ellipse1);
  2252. this.addChild(ellipse2);
  2253. var t:Timer = new Timer(50);
  2254. t.addEventListener(TimerEvent.TIMER, timerHandler);
  2255. t.start();
  2256. }
  2257. private function drawEllipse(x1, y1, x2, y2):Shape {
  2258. var e:Shape = new Shape();
  2259. e.graphics.beginFill(0xFF0000);
  2260. e.graphics.lineStyle(2);
  2261. e.graphics.drawEllipse(x1, y1, 100, 80);
  2262. e.graphics.endFill();
  2263. e.x = x2;
  2264. e.y = y2;
  2265. e.z = 1;
  2266. return e;
  2267. }
  2268. private function timerHandler(event:TimerEvent):void {
  2269. ellipse1.rotationY += speed;
  2270. ellipse1.rotationX -= speed;
  2271. ellipse2.rotationY += speed;
  2272. ellipse2.rotationX -= speed;
  2273. }
  2274. }
  2275. }
  2276. </codeblock></example><example conref="examples\Slider_rotationX.as" class="- topic/example "> The following example shows how you can 3D rotate a Sprite object around its x-axis with Flash Professional, ActionScript 3.0, and Flash Player 10 by setting the object's rotationX property.
  2277. Example provided by
  2278. <xref href="http://actionscriptexamples.com/2009/02/26/rotating-a-sprite-object-around-its-x-axis-in-flash-using-actionscript-30-and-flash-player-10/" scope="_mmexternal" class="- topic/xref ">ActionScriptExamples.com</xref>.
  2279. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2280. //Requires:
  2281. // - Slider control UI component in Flash library.
  2282. // - Publish for Flash Player 10.
  2283. //
  2284. [SWF(width="400", height="300")]
  2285. import fl.controls.Slider;
  2286. import fl.controls.SliderDirection;
  2287. import fl.events.SliderEvent;
  2288. var slider:Slider = new Slider();
  2289. slider.direction = SliderDirection.HORIZONTAL;
  2290. slider.minimum = 0;
  2291. slider.maximum = 360;
  2292. slider.value = 45;
  2293. slider.tickInterval = 45;
  2294. slider.snapInterval = 1;
  2295. slider.liveDragging = true;
  2296. slider.addEventListener(SliderEvent.CHANGE, slider_change);
  2297. slider.move(10, 10);
  2298. addChild(slider);
  2299. var spr:Sprite = new Sprite();
  2300. spr.graphics.lineStyle(2, 0xFF0000);
  2301. spr.graphics.drawRect(0, 0, 100, 80);
  2302. spr.x = Math.round((stage.stageWidth - spr.width)/2);
  2303. spr.y = Math.round((stage.stageHeight - spr.height)/2);
  2304. spr.rotationX = 45;
  2305. addChild(spr);
  2306. function slider_change(evt:SliderEvent):void {
  2307. spr.rotationX = evt.value;
  2308. }
  2309. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:rotationY: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 ">rotationY</apiName><shortdesc class="- topic/shortdesc ">
  2310. Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.</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 "/><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="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 ">
  2311. Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent
  2312. clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or
  2313. subtracted from 360 to obtain a value within the range.
  2314. </apiDesc><example conref="examples\RotationExample1.as" class="- topic/example "> In this example, two ellipses rotate using their <codeph class="+ topic/ph pr-d/codeph ">rotationX</codeph> and
  2315. <codeph class="+ topic/ph pr-d/codeph ">rotationY</codeph> properties. The first ellipse's registration point is set
  2316. to its center. It rotates around itself. The second ellipse rotates around
  2317. an external point.
  2318. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2319. package {
  2320. import flash.display.MovieClip;
  2321. import flash.display.Shape;
  2322. import flash.geom.*;
  2323. import flash.display.Graphics;
  2324. import flash.events.TimerEvent;
  2325. import flash.utils.Timer;
  2326. public class RotationExample1 extends MovieClip {
  2327. private var ellipse:Shape = new Shape();
  2328. private var speed:int = 10;
  2329. private var ellipse1:Shape;
  2330. private var ellipse2:Shape;
  2331. public function RotationExample1():void {
  2332. ellipse1 = drawEllipse(-50, -40, (this.stage.stageWidth / 2),
  2333. (this.stage.stageHeight / 2));
  2334. ellipse2 = drawEllipse(30, 40, (this.stage.stageWidth / 2),
  2335. (this.stage.stageHeight / 2));
  2336. this.addChild(ellipse1);
  2337. this.addChild(ellipse2);
  2338. var t:Timer = new Timer(50);
  2339. t.addEventListener(TimerEvent.TIMER, timerHandler);
  2340. t.start();
  2341. }
  2342. private function drawEllipse(x1, y1, x2, y2):Shape {
  2343. var e:Shape = new Shape();
  2344. e.graphics.beginFill(0xFF0000);
  2345. e.graphics.lineStyle(2);
  2346. e.graphics.drawEllipse(x1, y1, 100, 80);
  2347. e.graphics.endFill();
  2348. e.x = x2;
  2349. e.y = y2;
  2350. e.z = 1;
  2351. return e;
  2352. }
  2353. private function timerHandler(event:TimerEvent):void {
  2354. ellipse1.rotationY += speed;
  2355. ellipse1.rotationX -= speed;
  2356. ellipse2.rotationY += speed;
  2357. ellipse2.rotationX -= speed;
  2358. }
  2359. }
  2360. }
  2361. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:rotationZ: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 ">rotationZ</apiName><shortdesc class="- topic/shortdesc ">
  2362. Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.</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 "/><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="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 ">
  2363. Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent
  2364. clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or
  2365. subtracted from 360 to obtain a value within the range.
  2366. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:rotation: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 ">rotation</apiName><shortdesc class="- topic/shortdesc ">
  2367. Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.</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="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 ">
  2368. Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. Values from 0 to 180 represent
  2369. clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or
  2370. subtracted from 360 to obtain a value within the range. For example, the statement <codeph class="+ topic/ph pr-d/codeph ">my_video.rotation = 450</codeph> is the
  2371. same as <codeph class="+ topic/ph pr-d/codeph "> my_video.rotation = 90</codeph>.
  2372. </apiDesc><example conref="examples\DisplayObject.rotation.1.as" class="- topic/example "> The following code creates a Sprite object and rotates
  2373. the object when the user clicks it:
  2374. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2375. import flash.display.Sprite;
  2376. import flash.events.MouseEvent;
  2377. var square:Sprite = new Sprite();
  2378. square.graphics.beginFill(0xFFCC00);
  2379. square.graphics.drawRect(-50, -50, 100, 100);
  2380. square.x = 150;
  2381. square.y = 150;
  2382. addChild(square);
  2383. square.addEventListener(MouseEvent.CLICK, rotate);
  2384. function rotate(event:MouseEvent):void {
  2385. square.rotation += 15;
  2386. }
  2387. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:scale9Grid: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 ">scale9Grid</apiName><shortdesc class="- topic/shortdesc ">
  2388. The current scaling grid that is in effect.</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 "><maelexample>The following creates a movie clip that contains a 20-pixel line (which forms a border)
  2389. and a gradient fill. The movie clip scales based on the mouse position, and because of the
  2390. <code>scale9Grid</code> set for the movie clip, the thickness of the 20-pixel line does not
  2391. vary when the clip scales (although the gradient in the movie clip <em>does</em> scale):
  2392. <listing version="2.0">
  2393. import flash.geom.Rectangle;
  2394. import flash.geom.Matrix;
  2395. this.createEmptyMovieClip("my_mc", this.getNextHighestDepth());
  2396. var grid:Rectangle = new Rectangle(20, 20, 260, 260);
  2397. my_mc.scale9Grid = grid ;
  2398. my_mc._x = 50;
  2399. my_mc._y = 50;
  2400. function onMouseMove()
  2401. {
  2402. my_mc._width = _xmouse;
  2403. my_mc._height = _ymouse;
  2404. }
  2405. my_mc.lineStyle(20, 0xff3333, 100);
  2406. var gradient_matrix:Matrix = new Matrix();
  2407. gradient_matrix.createGradientBox(15, 15, Math.PI, 10, 10);
  2408. my_mc.beginGradientFill("radial", [0xffff00, 0x0000ff],
  2409. [100, 100], [0, 0xFF], gradient_matrix,
  2410. "reflect", "RGB", 0.9);
  2411. my_mc.moveTo(0, 0);
  2412. my_mc.lineTo(0, 300);
  2413. my_mc.lineTo(300, 300);
  2414. my_mc.lineTo(300, 0);
  2415. my_mc.lineTo(0, 0);
  2416. my_mc.endFill();
  2417. </listing>
  2418. </maelexample></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.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 ">If you pass an invalid argument to the method.
  2419. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2420. The current scaling grid that is in effect. If set to <codeph class="+ topic/ph pr-d/codeph ">null</codeph>,
  2421. the entire display object is scaled normally when any scale transformation is
  2422. applied.
  2423. <p class="- topic/p ">When you define the <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> property, the display object is divided into a
  2424. grid with nine regions based on the <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> rectangle, which defines the
  2425. center region of the grid. The eight other regions of the grid are the following areas: </p>
  2426. <ul class="- topic/ul "><li class="- topic/li ">The upper-left corner outside of the rectangle</li><li class="- topic/li ">The area above the rectangle </li><li class="- topic/li ">The upper-right corner outside of the rectangle</li><li class="- topic/li ">The area to the left of the rectangle</li><li class="- topic/li ">The area to the right of the rectangle</li><li class="- topic/li ">The lower-left corner outside of the rectangle</li><li class="- topic/li ">The area below the rectangle</li><li class="- topic/li ">The lower-right corner outside of the rectangle</li></ul>
  2427. <p class="- topic/p ">You can think of the eight regions outside of the center (defined by the rectangle)
  2428. as being like a picture frame that has special rules applied to it when scaled.</p>
  2429. <p class="- topic/p ">When the <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> property is set and a display object is scaled, all text and
  2430. gradients are scaled normally; however, for other types of objects the following rules apply:</p>
  2431. <ul class="- topic/ul "><li class="- topic/li ">Content in the center region is scaled normally. </li><li class="- topic/li ">Content in the corners is not scaled. </li><li class="- topic/li ">Content in the top and bottom regions is scaled horizontally only. Content in the
  2432. left and right regions is scaled vertically only.</li><li class="- topic/li ">All fills (including bitmaps, video, and gradients) are stretched to fit their shapes.</li></ul>
  2433. <p class="- topic/p ">If a display object is rotated, all subsequent scaling is normal (and the
  2434. <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> property is ignored).</p>
  2435. <p class="- topic/p ">For example, consider the following display object and a rectangle that is applied as the display
  2436. object's <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph>:</p>
  2437. <adobetable class="+ topic/table adobe-d/adobetable "><tgroup cols="2" class="- topic/tgroup "><tbody class="- topic/tbody "><row class="- topic/row "><entry align="center" class="- topic/entry "><adobeimage alt="display object image" href="../../images/scale9Grid-a.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/>
  2438. <p class="- topic/p ">The display object.</p></entry><entry align="center" class="- topic/entry "><adobeimage alt="display object scale 9 region" href="../../images/scale9Grid-b.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/>
  2439. <p class="- topic/p ">The red rectangle shows the <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph>.</p></entry></row></tbody></tgroup></adobetable>
  2440. <p class="- topic/p ">When the display object is scaled or stretched, the objects within the rectangle scale
  2441. normally, but the objects outside of the rectangle scale according to the
  2442. <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> rules:</p>
  2443. <adobetable class="+ topic/table adobe-d/adobetable "><tgroup cols="2" class="- topic/tgroup "><tbody class="- topic/tbody "><row class="- topic/row "><entry class="- topic/entry ">Scaled to 75%:</entry><entry class="- topic/entry "><adobeimage alt="display object at 75%" href="../../images/scale9Grid-c.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row><row class="- topic/row "><entry class="- topic/entry ">Scaled to 50%:</entry><entry class="- topic/entry "><adobeimage alt="display object at 50%" href="../../images/scale9Grid-d.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row><row class="- topic/row "><entry class="- topic/entry ">Scaled to 25%:</entry><entry class="- topic/entry "><adobeimage alt="display object at 25%" href="../../images/scale9Grid-e.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row><row class="- topic/row "><entry class="- topic/entry ">Stretched horizontally 150%: </entry><entry class="- topic/entry "><adobeimage alt="display stretched 150%" href="../../images/scale9Grid-f.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row></tbody></tgroup></adobetable>
  2444. <p class="- topic/p ">A common use for setting <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> is to set up a display object to be used
  2445. as a component, in which edge regions retain the same width when the component is scaled.</p>
  2446. </apiDesc><example conref="examples\DisplayObject.scale9Grid.1.as" class="- topic/example "> The following code creates a Shape object with a rectangle drawn in its
  2447. <codeph class="+ topic/ph pr-d/codeph ">graphics</codeph> property. The rectangle has a 20-pixel-thick line as the border and
  2448. it is filled with a gradient. The timer event calls the <codeph class="+ topic/ph pr-d/codeph ">scale()</codeph> function, which
  2449. scales the Shape object by adjusting the <codeph class="+ topic/ph pr-d/codeph ">scaleX</codeph> and <codeph class="+ topic/ph pr-d/codeph ">scaleY</codeph> properties.
  2450. The <codeph class="+ topic/ph pr-d/codeph ">scale9Grid</codeph> applied to the Shape object prevents the rectangle's border line
  2451. from scaling &#151; only the gradient fill scales:
  2452. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2453. import flash.display.Shape;
  2454. import flash.display.GradientType;
  2455. import flash.display.SpreadMethod;
  2456. import flash.display.InterpolationMethod;
  2457. import flash.geom.Matrix;
  2458. import flash.geom.Rectangle;
  2459. import flash.utils.Timer;
  2460. import flash.events.TimerEvent;
  2461. var square:Shape = new Shape();
  2462. square.graphics.lineStyle(20, 0xFFCC00);
  2463. var gradientMatrix:Matrix = new Matrix();
  2464. gradientMatrix.createGradientBox(15, 15, Math.PI, 10, 10);
  2465. square.graphics.beginGradientFill(GradientType.RADIAL,
  2466. [0xffff00, 0x0000ff],
  2467. [100, 100],
  2468. [0, 0xFF],
  2469. gradientMatrix,
  2470. SpreadMethod.REFLECT,
  2471. InterpolationMethod.RGB,
  2472. 0.9);
  2473. square.graphics.drawRect(0, 0, 100, 100);
  2474. var grid:Rectangle = new Rectangle(20, 20, 60, 60);
  2475. square.scale9Grid = grid ;
  2476. addChild(square);
  2477. var tim:Timer = new Timer(100);
  2478. tim.start();
  2479. tim.addEventListener(TimerEvent.TIMER, scale);
  2480. var scaleFactor:Number = 1.01;
  2481. function scale(event:TimerEvent):void {
  2482. square.scaleX *= scaleFactor;
  2483. square.scaleY *= scaleFactor;
  2484. if (square.scaleX &gt; 2.0) {
  2485. scaleFactor = 0.99;
  2486. }
  2487. if (square.scaleX &lt; 1.0) {
  2488. scaleFactor = 1.01;
  2489. }
  2490. }
  2491. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.geom.xml#Rectangle" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Rectangle</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:scaleX: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 ">scaleX</apiName><shortdesc class="- topic/shortdesc ">
  2492. Indicates the horizontal scale (percentage) of the object as applied from the registration point.</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="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 ">
  2493. Indicates the horizontal scale (percentage) of the object as applied from the registration point. The default
  2494. registration point is (0,0). 1.0 equals 100% scale.
  2495. <p class="- topic/p ">Scaling the local coordinate system changes the <codeph class="+ topic/ph pr-d/codeph ">x</codeph> and <codeph class="+ topic/ph pr-d/codeph ">y</codeph> property values, which are defined in
  2496. whole pixels. </p>
  2497. </apiDesc><example conref="examples\DisplayObject.scaleX.1.as" class="- topic/example "> The following code creates a Sprite object with a rectangle drawn in its
  2498. <codeph class="+ topic/ph pr-d/codeph ">graphics</codeph> property. When the user clicks the sprite, it scales by 10%:
  2499. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2500. import flash.display.Sprite;
  2501. import flash.events.MouseEvent;
  2502. var square:Sprite = new Sprite();
  2503. square.graphics.beginFill(0xFFCC00);
  2504. square.graphics.drawRect(0, 0, 100, 100);
  2505. addChild(square);
  2506. square.addEventListener(MouseEvent.CLICK, scale);
  2507. function scale(event:MouseEvent):void {
  2508. square.scaleX *= 1.10;
  2509. square.scaleY *= 1.10;
  2510. }
  2511. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:scaleY: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 ">scaleY</apiName><shortdesc class="- topic/shortdesc ">
  2512. Indicates the vertical scale (percentage) of an object as applied from the registration point of the 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><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 ">
  2513. Indicates the vertical scale (percentage) of an object as applied from the registration point of the object. The
  2514. default registration point is (0,0). 1.0 is 100% scale.
  2515. <p class="- topic/p ">Scaling the local coordinate system changes the <codeph class="+ topic/ph pr-d/codeph ">x</codeph> and <codeph class="+ topic/ph pr-d/codeph ">y</codeph> property values, which are defined in
  2516. whole pixels. </p>
  2517. </apiDesc><example conref="examples\DisplayObject.scaleX.1.as" class="- topic/example "> The following code creates a Sprite object with a rectangle drawn in its
  2518. <codeph class="+ topic/ph pr-d/codeph ">graphics</codeph> property. When the user clicks the sprite, it scales by 10%:
  2519. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2520. import flash.display.Sprite;
  2521. import flash.events.MouseEvent;
  2522. var square:Sprite = new Sprite();
  2523. square.graphics.beginFill(0xFFCC00);
  2524. square.graphics.drawRect(0, 0, 100, 100);
  2525. addChild(square);
  2526. square.addEventListener(MouseEvent.CLICK, scale);
  2527. function scale(event:MouseEvent):void {
  2528. square.scaleX *= 1.10;
  2529. square.scaleY *= 1.10;
  2530. }
  2531. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:scaleZ: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 ">scaleZ</apiName><shortdesc class="- topic/shortdesc ">
  2532. Indicates the depth scale (percentage) of an object as applied from the registration point of the 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="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 "><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 ">
  2533. Indicates the depth scale (percentage) of an object as applied from the registration point of the object. The
  2534. default registration point is (0,0). 1.0 is 100% scale.
  2535. <p class="- topic/p ">Scaling the local coordinate system changes the <codeph class="+ topic/ph pr-d/codeph ">x</codeph>, <codeph class="+ topic/ph pr-d/codeph ">y</codeph> and <codeph class="+ topic/ph pr-d/codeph ">z</codeph> property values, which are defined in
  2536. whole pixels. </p>
  2537. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/z" class="- topic/link "><linktext class="- topic/linktext ">z</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:scrollRect: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 ">scrollRect</apiName><shortdesc class="- topic/shortdesc ">
  2538. The scroll rectangle bounds of the display 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></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></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2539. The scroll rectangle bounds of the display object. The display object is cropped to the size
  2540. defined by the rectangle, and it scrolls within the rectangle when you change the
  2541. <codeph class="+ topic/ph pr-d/codeph ">x</codeph> and <codeph class="+ topic/ph pr-d/codeph ">y</codeph> properties of the <codeph class="+ topic/ph pr-d/codeph ">scrollRect</codeph> object.
  2542. <p class="- topic/p ">The properties of the <codeph class="+ topic/ph pr-d/codeph ">scrollRect</codeph> Rectangle object use the display object's coordinate space
  2543. and are scaled just like the overall display object. The corner bounds of the cropped window on the scrolling
  2544. display object are the origin of the display object (0,0) and the point defined by the
  2545. width and height of the rectangle. They are not centered around the origin, but
  2546. use the origin to define the upper-left corner of the area. A scrolled display object always
  2547. scrolls in whole pixel increments. </p>
  2548. <p class="- topic/p ">You can scroll an object left and right by setting the <codeph class="+ topic/ph pr-d/codeph ">x</codeph> property of the
  2549. <codeph class="+ topic/ph pr-d/codeph ">scrollRect</codeph> Rectangle object. You can scroll an object up and down by setting
  2550. the <codeph class="+ topic/ph pr-d/codeph ">y</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">scrollRect</codeph> Rectangle object. If the display object
  2551. is rotated 90° and you scroll it left and right, the display object actually scrolls up and down.</p>
  2552. </apiDesc><example conref="examples\DisplayObject.scrollRect.1.as" class="- topic/example "> The following example shows how the <codeph class="+ topic/ph pr-d/codeph ">scrollRect</codeph> property defines the
  2553. scrolling area for a display object, <codeph class="+ topic/ph pr-d/codeph ">circle</codeph>. When you click the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> object,
  2554. the <codeph class="+ topic/ph pr-d/codeph ">clicked()</codeph> event handler method adjusts the <codeph class="+ topic/ph pr-d/codeph ">y</codeph> property of the
  2555. <codeph class="+ topic/ph pr-d/codeph ">scrollRect</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> object, causing the object to scroll down:
  2556. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2557. import flash.display.Sprite;
  2558. import flash.geom.Rectangle;
  2559. import flash.events.MouseEvent;
  2560. var circle:Sprite = new Sprite();
  2561. circle.graphics.beginFill(0xFFCC00);
  2562. circle.graphics.drawCircle(200, 200, 200);
  2563. circle.scrollRect = new Rectangle(0, 0, 200, 200);
  2564. addChild(circle);
  2565. circle.addEventListener(MouseEvent.CLICK, clicked);
  2566. function clicked(event:MouseEvent):void {
  2567. var rect:Rectangle = event.target.scrollRect;
  2568. rect.y -= 5;
  2569. event.target.scrollRect = rect;
  2570. }
  2571. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.geom.xml#Rectangle" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Rectangle</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject: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 ">
  2572. The Stage of the display 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><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.display:Stage</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2573. The Stage of the display object. A Flash runtime application has only one Stage object.
  2574. For example, you can create and load multiple display objects into the display list, and the
  2575. <codeph class="+ topic/ph pr-d/codeph ">stage</codeph> property of each display object refers to the same Stage object (even if the
  2576. display object belongs to a loaded SWF file).
  2577. <p class="- topic/p ">If a display object is not added to the display list, its <codeph class="+ topic/ph pr-d/codeph ">stage</codeph> property is set to
  2578. <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
  2579. </apiDesc><example conref="examples\DisplayObject.stage.1.as" class="- topic/example "> The following code creates two TextField objects and uses the
  2580. <codeph class="+ topic/ph pr-d/codeph ">width</codeph> property of the Stage object to position the text fields:
  2581. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2582. import flash.text.TextField;
  2583. var tf1:TextField = new TextField();
  2584. tf1.text = "Text Field 1";
  2585. tf1.border = true;
  2586. tf1.x = 10;
  2587. addChild(tf1);
  2588. tf1.width = tf1.stage.stageWidth / 2 - 10;
  2589. var tf2:TextField = new TextField();
  2590. tf2.text = "Text Field 2";
  2591. tf2.border = true;
  2592. tf2.x = tf1.x + tf1.width + 5;
  2593. addChild(tf2);
  2594. tf2.width = tf2.stage.stageWidth / 2 - 10;
  2595. trace(stage.stageWidth);
  2596. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:transform: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 ">transform</apiName><shortdesc class="- topic/shortdesc ">
  2597. An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.</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="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.geom:Transform</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2598. An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.
  2599. The specific properties matrix, colorTransform, and three read-only properties
  2600. (<codeph class="+ topic/ph pr-d/codeph ">concatenatedMatrix</codeph>, <codeph class="+ topic/ph pr-d/codeph ">concatenatedColorTransform</codeph>,
  2601. and <codeph class="+ topic/ph pr-d/codeph ">pixelBounds</codeph>) are described in the entry for the Transform class.
  2602. <p class="- topic/p ">Each of the transform object's properties is itself an object. This concept is important because the only
  2603. way to set new values for the matrix or colorTransform objects is to create a new object and copy that
  2604. object into the transform.matrix or transform.colorTransform property.</p>
  2605. <p class="- topic/p ">For example, to increase the <codeph class="+ topic/ph pr-d/codeph ">tx</codeph> value of a display object's matrix, you must make a
  2606. copy of the entire matrix object, then copy the new object into the matrix property of the transform
  2607. object:</p>
  2608. <pre xml:space="preserve" class="- topic/pre "><codeph class="+ topic/ph pr-d/codeph ">
  2609. var myMatrix:Matrix = myDisplayObject.transform.matrix;
  2610. myMatrix.tx += 10;
  2611. myDisplayObject.transform.matrix = myMatrix;
  2612. </codeph></pre>
  2613. <p class="- topic/p ">You cannot directly set the <codeph class="+ topic/ph pr-d/codeph ">tx</codeph> property. The following code has
  2614. no effect on <codeph class="+ topic/ph pr-d/codeph ">myDisplayObject</codeph>: </p>
  2615. <pre xml:space="preserve" class="- topic/pre "><codeph class="+ topic/ph pr-d/codeph ">
  2616. myDisplayObject.transform.matrix.tx += 10;
  2617. </codeph></pre>
  2618. <p class="- topic/p ">You can also copy an entire transform object and assign it to another
  2619. display object's transform property. For example, the following code
  2620. copies the entire transform object from <codeph class="+ topic/ph pr-d/codeph ">myOldDisplayObj</codeph> to
  2621. <codeph class="+ topic/ph pr-d/codeph ">myNewDisplayObj</codeph>:</p>
  2622. <codeph class="+ topic/ph pr-d/codeph ">myNewDisplayObj.transform = myOldDisplayObj.transform;</codeph>
  2623. <p class="- topic/p ">The resulting display object, <codeph class="+ topic/ph pr-d/codeph ">myNewDisplayObj</codeph>, now has the same values for its
  2624. matrix, color transform, and pixel bounds as the old display object, <codeph class="+ topic/ph pr-d/codeph ">myOldDisplayObj</codeph>.</p>
  2625. <p class="- topic/p ">Note that AIR for TV devices use hardware acceleration, if it is available, for color transforms.</p>
  2626. </apiDesc><example conref="examples\DisplayObject.transform.1.as" class="- topic/example "> The following code sets up a <codeph class="+ topic/ph pr-d/codeph ">square</codeph> Sprite object.
  2627. When the user clicks the sprite, the <codeph class="+ topic/ph pr-d/codeph ">transformer()</codeph> method adjusts
  2628. the <codeph class="+ topic/ph pr-d/codeph ">colorTransform</codeph> and <codeph class="+ topic/ph pr-d/codeph ">matrix</codeph> properties of the
  2629. <codeph class="+ topic/ph pr-d/codeph ">transform</codeph> property of the sprite:
  2630. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2631. import flash.display.Sprite;
  2632. import flash.geom.ColorTransform;
  2633. import flash.geom.Matrix;
  2634. import flash.geom.Transform;
  2635. import flash.events.MouseEvent;
  2636. var square:Sprite = new Sprite();
  2637. square.graphics.lineStyle(20, 0xFF2200);
  2638. square.graphics.beginFill(0x0000DD);
  2639. square.graphics.drawRect(0, 0, 100, 100);
  2640. addChild(square);
  2641. var resultColorTransform:ColorTransform = new ColorTransform();
  2642. resultColorTransform.alphaMultiplier = 0.5;
  2643. resultColorTransform.redOffset = 155;
  2644. resultColorTransform.greenMultiplier = 0.5;
  2645. var skewMatrix:Matrix = new Matrix(1, 1, 0, 1);
  2646. square.addEventListener(MouseEvent.CLICK, transformer);
  2647. function transformer(event:MouseEvent):void {
  2648. var transformation:Transform = square.transform;
  2649. var tempMatrix:Matrix = square.transform.matrix;
  2650. tempMatrix.concat(skewMatrix);
  2651. square.transform.colorTransform = resultColorTransform;
  2652. square.transform.matrix = tempMatrix;
  2653. }
  2654. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.geom.xml#Transform" class="- topic/link "><linktext class="- topic/linktext ">Transform class</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:visible: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 ">visible</apiName><shortdesc class="- topic/shortdesc ">
  2655. Whether or not the display object is visible.</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="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 ">
  2656. Whether or not the display object is visible. Display objects that are not visible
  2657. are disabled. For example, if <codeph class="+ topic/ph pr-d/codeph ">visible=false</codeph> for an InteractiveObject instance,
  2658. it cannot be clicked.
  2659. </apiDesc><example conref="examples\DisplayObject.visible.1.as" class="- topic/example "> The following code uses a Timer object to call a function that
  2660. periodically changes the <codeph class="+ topic/ph pr-d/codeph ">visible</codeph> property of a display object,
  2661. resulting in a blinking effect:
  2662. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2663. import flash.text.TextField;
  2664. import flash.utils.Timer;
  2665. import flash.events.TimerEvent;
  2666. var tf:TextField = new TextField();
  2667. tf.text = "Hello.";
  2668. addChild(tf);
  2669. var tim:Timer = new Timer(250);
  2670. tim.start();
  2671. tim.addEventListener(TimerEvent.TIMER, blinker);
  2672. function blinker(event:TimerEvent):void {
  2673. tf.visible = !tf.visible;
  2674. }
  2675. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject: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 ">
  2676. Indicates the width of the display object, 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 "/><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="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 ">
  2677. Indicates the width of the display object, in pixels. The width is calculated based on the bounds of the content of the display object.
  2678. When you set the <codeph class="+ topic/ph pr-d/codeph ">width</codeph> property, the <codeph class="+ topic/ph pr-d/codeph ">scaleX</codeph> property is adjusted accordingly, as shown in the
  2679. following code:
  2680. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2681. var rect:Shape = new Shape();
  2682. rect.graphics.beginFill(0xFF0000);
  2683. rect.graphics.drawRect(0, 0, 100, 100);
  2684. trace(rect.scaleX) // 1;
  2685. rect.width = 200;
  2686. trace(rect.scaleX) // 2;</codeblock>
  2687. <p class="- topic/p ">Except for TextField and Video objects, a display object with no content (such as an empty sprite) has a width
  2688. of 0, even if you try to set <codeph class="+ topic/ph pr-d/codeph ">width</codeph> to a different value.</p>
  2689. </apiDesc><example conref="examples\DisplayObject.width.1.as" class="- topic/example "> The following code sets up a <codeph class="+ topic/ph pr-d/codeph ">square</codeph> Sprite object.
  2690. When the user clicks the sprite, the <codeph class="+ topic/ph pr-d/codeph ">widen()</codeph> method increases
  2691. the <codeph class="+ topic/ph pr-d/codeph ">width</codeph> property of the sprite:
  2692. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2693. import flash.display.Sprite;
  2694. import flash.events.MouseEvent;
  2695. var square:Sprite = new Sprite();
  2696. square.graphics.beginFill(0xFF0000);
  2697. square.graphics.drawRect(0, 0, 100, 100);
  2698. addChild(square);
  2699. square.addEventListener(MouseEvent.CLICK, widen);
  2700. function widen(event:MouseEvent):void {
  2701. square.width += 10;
  2702. }
  2703. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:x: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 ">x</apiName><shortdesc class="- topic/shortdesc ">
  2704. Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of
  2705. the parent DisplayObjectContainer.</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="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 ">
  2706. Indicates the <i class="+ topic/ph hi-d/i ">x</i> coordinate of the DisplayObject instance relative to the local coordinates of
  2707. the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has
  2708. transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer.
  2709. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's
  2710. children inherit a coordinate system that is rotated 90° counterclockwise.
  2711. The object's coordinates refer to the registration point position.
  2712. </apiDesc><example conref="examples\DisplayObject.x.1.as" class="- topic/example "> The following code sets up a <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> Sprite object.
  2713. A Timer object is used to change the <codeph class="+ topic/ph pr-d/codeph ">x</codeph> property of the sprite
  2714. every 50 milliseconds:
  2715. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2716. import flash.display.Sprite;
  2717. import flash.utils.Timer;
  2718. import flash.events.TimerEvent;
  2719. var circle:Sprite = new Sprite();
  2720. circle.graphics.beginFill(0xFF0000);
  2721. circle.graphics.drawCircle(100, 100, 100);
  2722. addChild(circle);
  2723. var tim:Timer = new Timer(50);
  2724. tim.start();
  2725. tim.addEventListener(TimerEvent.TIMER, bounce);
  2726. var xInc:Number = 2;
  2727. function bounce(event:TimerEvent):void {
  2728. circle.x += xInc;
  2729. if (circle.x &gt; circle.width) {
  2730. xInc = -2;
  2731. }
  2732. if (circle.x &lt; 0) {
  2733. xInc = 2;
  2734. }
  2735. }
  2736. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:y: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 ">y</apiName><shortdesc class="- topic/shortdesc ">
  2737. Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of
  2738. the parent DisplayObjectContainer.</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="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 ">
  2739. Indicates the <i class="+ topic/ph hi-d/i ">y</i> coordinate of the DisplayObject instance relative to the local coordinates of
  2740. the parent DisplayObjectContainer. If the object is inside a DisplayObjectContainer that has
  2741. transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer.
  2742. Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's
  2743. children inherit a coordinate system that is rotated 90° counterclockwise.
  2744. The object's coordinates refer to the registration point position.
  2745. </apiDesc><example conref="examples\DisplayObject.height.1.as" class="- topic/example "> The following code creates two TextField objects and adjusts the
  2746. <codeph class="+ topic/ph pr-d/codeph ">height</codeph> property of each based on the <codeph class="+ topic/ph pr-d/codeph ">textHeight</codeph> property of
  2747. each; it also positions the second text field by setting its <codeph class="+ topic/ph pr-d/codeph ">y</codeph> property:
  2748. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2749. import flash.text.TextField;
  2750. var tf1:TextField = new TextField();
  2751. tf1.text = "Text Field 1";
  2752. tf1.border = true;
  2753. tf1.wordWrap = true;
  2754. tf1.width = 40;
  2755. tf1.height = tf1.textHeight + 5;
  2756. addChild(tf1);
  2757. var tf2:TextField = new TextField();
  2758. tf2.text = "Text Field 2";
  2759. tf2.border = true;
  2760. tf2.wordWrap = true;
  2761. tf2.width = 40;
  2762. tf2.height = tf2.textHeight + 5;
  2763. tf2.y = tf1.y + tf1.height + 5;
  2764. addChild(tf2);
  2765. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObject:z: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 ">z</apiName><shortdesc class="- topic/shortdesc ">
  2766. Indicates the z coordinate position along the z-axis of the DisplayObject
  2767. instance relative to the 3D parent container.</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 "><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 ">
  2768. Indicates the z coordinate position along the z-axis of the DisplayObject
  2769. instance relative to the 3D parent container. The z property is used for
  2770. 3D coordinates, not screen or pixel coordinates.
  2771. <p class="- topic/p ">When you set a <codeph class="+ topic/ph pr-d/codeph ">z</codeph> property for a display object to something other than the default
  2772. value of <codeph class="+ topic/ph pr-d/codeph ">0</codeph>, a corresponding Matrix3D object is automatically created. for adjusting a
  2773. display object's position and orientation
  2774. in three dimensions. When working with the z-axis,
  2775. the existing behavior of x and y properties changes from screen or pixel coordinates to
  2776. positions relative to the 3D parent container.</p>
  2777. <p class="- topic/p ">For example, a child of the <codeph class="+ topic/ph pr-d/codeph ">_root</codeph> at position x = 100, y = 100, z = 200
  2778. is not drawn at pixel location (100,100). The child is drawn wherever the 3D projection
  2779. calculation puts it. The calculation is:</p>
  2780. <p class="- topic/p "><codeph class="+ topic/ph pr-d/codeph "> (x~~cameraFocalLength/cameraRelativeZPosition, y~~cameraFocalLength/cameraRelativeZPosition)</codeph></p>
  2781. </apiDesc><example conref="examples\ZAxisExample1.as" class="- topic/example "> This example draws two ellipses and has them go back and forth (down and up the
  2782. <codeph class="+ topic/ph pr-d/codeph ">z</codeph> axis) toward the vanishing point. One ellipse is set to move faster
  2783. than the other.
  2784. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2785. package {
  2786. import flash.display.MovieClip;
  2787. import flash.display.Shape;
  2788. import flash.display.Graphics;
  2789. import flash.events.Event;
  2790. import flash.geom.*;
  2791. public class ZAxisExample1 extends MovieClip {
  2792. private var ellipse1Back:int = 1;
  2793. private var ellipse2Back:int = 1;
  2794. private var depth:int = 1000;
  2795. public function ZAxisExample1():void {
  2796. var ellipse1 = drawEllipse((this.stage.stageWidth / 2) - 100,
  2797. (this.stage.stageHeight / 2), 100, 80, 10);
  2798. var ellipse2 = drawEllipse((this.stage.stageWidth / 2) + 100,
  2799. (this.stage.stageHeight / 2), 100, 80, 300);
  2800. this.addChild(ellipse1);
  2801. this.addChild(ellipse2);
  2802. ellipse1.addEventListener(Event.ENTER_FRAME, ellipse1FrameHandler);
  2803. ellipse2.addEventListener(Event.ENTER_FRAME, ellipse2FrameHandler);
  2804. }
  2805. private function drawEllipse(x:Number, y:Number, w:Number, h:Number, z:Number):Shape {
  2806. var s:Shape = new Shape();
  2807. s.z = z;
  2808. s.graphics.beginFill(0xFF0000);
  2809. s.graphics.lineStyle(2);
  2810. s.graphics.drawEllipse(x, y, w, h);
  2811. s.graphics.endFill();
  2812. return s;
  2813. }
  2814. private function ellipse1FrameHandler(e:Event):void {
  2815. ellipse1Back = setDepth(e, ellipse1Back);
  2816. e.currentTarget.z += ellipse1Back * 10;
  2817. }
  2818. private function ellipse2FrameHandler(e:Event):void {
  2819. ellipse2Back = setDepth(e, ellipse2Back);
  2820. e.currentTarget.z += ellipse2Back * 20;
  2821. }
  2822. private function setDepth(e:Event, d:int):int {
  2823. if(e.currentTarget.z &gt; depth) {
  2824. e.currentTarget.z = depth;
  2825. d = -1;
  2826. }else if (e.currentTarget.z &lt; 0) {
  2827. e.currentTarget.z = 0;
  2828. d = 1;
  2829. }
  2830. return d;
  2831. }
  2832. }
  2833. }
  2834. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.geom.xml#PerspectiveProjection" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.PerspectiveProjection</linktext></link><link href="flash.geom.xml#Matrix3D" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Matrix3D</linktext></link><link href="flash.display.xml#DisplayObject/transform" class="- topic/link "><linktext class="- topic/linktext ">transform</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObject:blendShader:set" 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 ">blendShader</apiName><shortdesc class="- topic/shortdesc ">
  2835. Sets a shader that is used for blending the foreground and background.</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 "><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="write" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.display:Shader</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">When the shader output type is not compatible with this operation
  2836. (the shader must specify a <codeph class="+ topic/ph pr-d/codeph ">pixel4</codeph>
  2837. output).
  2838. </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 ">When the shader specifies fewer than two image inputs or the first
  2839. two inputs are not <codeph class="+ topic/ph pr-d/codeph ">image4</codeph> inputs.
  2840. </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 ">When the shader specifies an image input that isn't provided.
  2841. </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 ">When a ByteArray or Vector.&lt;Number&gt; instance is used as
  2842. an input and the <codeph class="+ topic/ph pr-d/codeph ">width</codeph>
  2843. and <codeph class="+ topic/ph pr-d/codeph ">height</codeph> properties aren't specified for the
  2844. ShaderInput, or the specified values don't match the amount of
  2845. data in the input object. See the <codeph class="+ topic/ph pr-d/codeph ">ShaderInput.input</codeph>
  2846. property for more information.
  2847. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2848. Sets a shader that is used for blending the foreground and background. When the
  2849. <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>, the specified
  2850. Shader is used to create the blend mode output for the display object.
  2851. <p class="- topic/p ">Setting the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property of a display object to a Shader instance
  2852. automatically sets the display object's <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to
  2853. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>. If the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property is set (which sets the
  2854. <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>), then the value of the
  2855. <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is changed, the blend mode can be reset to use the blend
  2856. shader simply by setting the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>.
  2857. The <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property does not need to be set again except to change the
  2858. shader that's used for the blend mode.</p>
  2859. <p class="- topic/p ">The Shader assigned to the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property must specify at least two
  2860. <codeph class="+ topic/ph pr-d/codeph ">image4</codeph> inputs. The inputs <b class="+ topic/ph hi-d/b ">do not</b> need to be specified in code using the
  2861. associated ShaderInput objects' <codeph class="+ topic/ph pr-d/codeph ">input</codeph> properties. The background display object
  2862. is automatically
  2863. used as the first input (the input with <codeph class="+ topic/ph pr-d/codeph ">index</codeph> 0). The foreground display object
  2864. is used as the second input (the input with <codeph class="+ topic/ph pr-d/codeph ">index</codeph> 1). A shader used as a blend
  2865. shader can specify more than two inputs. In that case, any additional input must be specified
  2866. by setting its ShaderInput instance's <codeph class="+ topic/ph pr-d/codeph ">input</codeph> property.</p>
  2867. <p class="- topic/p ">When you assign a Shader instance to this property the shader is copied internally. The
  2868. blend operation uses that internal copy, not a reference to the original shader. Any changes
  2869. made to the shader, such as changing a parameter value, input, or bytecode, are not applied
  2870. to the copied shader that's used for the blend mode.</p>
  2871. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#BlendMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.BlendMode</linktext></link><link href="flash.display.xml#Shader" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Shader</linktext></link><link href="flash.display.xml#ShaderInput" class="- topic/link "><linktext class="- topic/linktext ">flash.display.ShaderInput</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:Loader" 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 ">Loader</apiName><shortdesc class="- topic/shortdesc ">
  2872. The Loader class is used to load SWF files or image (JPG, PNG, or GIF) files.</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 ">flash.display:DisplayObjectContainer</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2873. The Loader class is used to load SWF files or image (JPG, PNG, or GIF) files. Use the
  2874. <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method to initiate loading. The loaded display object is added as a child
  2875. of the Loader object.
  2876. <p class="- topic/p ">Use the URLLoader class to load text or binary data.</p>
  2877. <p class="- topic/p ">The Loader class overrides the following methods that it inherits, because a Loader object can only
  2878. have one child display objectthe display object that it loads. Calling the following methods throws an
  2879. exception: <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">addChildAt()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">removeChild()</codeph>,
  2880. <codeph class="+ topic/ph pr-d/codeph ">removeChildAt()</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">setChildIndex()</codeph>. To remove a loaded display object,
  2881. you must remove the <i class="+ topic/ph hi-d/i ">Loader</i> object from its parent DisplayObjectContainer child array. </p>
  2882. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The ActionScript 2.0 MovieClipLoader and LoadVars classes are not used
  2883. in ActionScript 3.0. The Loader and URLLoader classes replace them.</p>
  2884. <p class="- topic/p ">When you use the Loader class, consider the Flash Player and Adobe AIR security model: </p>
  2885. <ul class="- topic/ul "><li class="- topic/li ">You can load content from any accessible source. </li><li class="- topic/li ">Loading is not allowed if the calling SWF file is in a network sandbox and the file
  2886. to be loaded is local. </li><li class="- topic/li ">If the loaded content is a SWF file written with ActionScript 3.0, it cannot be
  2887. cross-scripted by a SWF file in another security sandbox unless that cross-scripting
  2888. arrangement was approved through a call to the <codeph class="+ topic/ph pr-d/codeph ">System.allowDomain()</codeph> or
  2889. the <codeph class="+ topic/ph pr-d/codeph ">System.allowInsecureDomain()</codeph> method in the loaded content file.</li><li class="- topic/li ">If the loaded content is an AVM1 SWF file (written using ActionScript 1.0 or 2.0),
  2890. it cannot be cross-scripted by an AVM2 SWF file (written using ActionScript 3.0). However,
  2891. you can communicate between the two SWF files by using the LocalConnection class.</li><li class="- topic/li ">If the loaded content is an image, its data cannot be accessed by a SWF file
  2892. outside of the security sandbox, unless the domain of that SWF file was included in a
  2893. URL policy file at the origin domain of the image.</li><li class="- topic/li ">Movie clips in the local-with-file-system sandbox cannot script movie clips in the
  2894. local-with-networking sandbox, and the reverse is also prevented. </li><li class="- topic/li ">You cannot connect to commonly reserved ports. For a complete list of blocked ports,
  2895. see "Restricting Networking APIs" in the <i class="+ topic/ph hi-d/i ">ActionScript 3.0 Developer's Guide</i>. </li></ul>
  2896. <p class="- topic/p ">However, in AIR, content in the <codeph class="+ topic/ph pr-d/codeph ">application</codeph> security sandbox (content
  2897. installed with the AIR application) are not restricted by these security limitations.</p>
  2898. <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
  2899. <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
  2900. <p class="- topic/p ">When loading a SWF file from an untrusted source (such as a domain other than that of
  2901. the Loader object's root SWF file), you may want to define a mask for the Loader object,
  2902. to prevent the loaded content (which is a child of the Loader object) from drawing to
  2903. portions of the Stage outside of that mask, as shown in the following code:</p>
  2904. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">import flash.display.~~;
  2905. import flash.net.URLRequest;
  2906. var rect:Shape = new Shape();
  2907. rect.graphics.beginFill(0xFFFFFF);
  2908. rect.graphics.drawRect(0, 0, 100, 100);
  2909. rect.graphics.endFill();
  2910. addChild(rect);
  2911. var ldr:Loader = new Loader();
  2912. ldr.mask = rect;
  2913. var url:String = "http://www.unknown.example.com/content.swf";
  2914. var urlReq:URLRequest = new URLRequest(url);
  2915. ldr.load(urlReq);
  2916. addChild(ldr);
  2917. </codeblock>
  2918. </apiDesc><example conref="examples\LoaderExample.as" class="- topic/example "> The following example uses the LoaderExample class to illustrate how various
  2919. event listeners are used. This task is accomplished by performing the following steps:
  2920. <ol class="- topic/ol "><li class="- topic/li ">A <codeph class="+ topic/ph pr-d/codeph ">url</codeph> property is created, which is the location and name of the image file</li><li class="- topic/li ">In the <codeph class="+ topic/ph pr-d/codeph ">LoaderExample</codeph> constructor, a new Loader object named <codeph class="+ topic/ph pr-d/codeph ">loader</codeph> is
  2921. created, which is then passed to the <codeph class="+ topic/ph pr-d/codeph ">configureListeners()</codeph> method, described in step 3.</li><li class="- topic/li ">The constructor creates a new instance of a URLRequest object,
  2922. <codeph class="+ topic/ph pr-d/codeph ">request</codeph>, with <codeph class="+ topic/ph pr-d/codeph ">url</codeph> passed so that the file name and location are known.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">request</codeph> object is passed to the <codeph class="+ topic/ph pr-d/codeph ">loader</codeph> object's
  2923. <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method, which loads the image onto the display list.</li><li class="- topic/li ">A <codeph class="+ topic/ph pr-d/codeph ">clickHandler</codeph> event listener is registered for the <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event on the loader.
  2924. After a mouse click, the loaded image is unloaded.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">configureListeners()</codeph> method adds seven event listeners by using the following methods:
  2925. <ul class="- topic/ul "><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">completeHandler()</codeph> method executes when the image finishes loading.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">httpStatusHandler()</codeph> method executes if the image is not loaded
  2926. locally and only if the network request is made available and the Flash Player can detect it.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">initHandler()</codeph> method executes before the <codeph class="+ topic/ph pr-d/codeph ">completeHandler()</codeph>
  2927. method and after the <codeph class="+ topic/ph pr-d/codeph ">progressHandler()</codeph> method. Generally, the <codeph class="+ topic/ph pr-d/codeph ">init</codeph>
  2928. event is more useful when loading SWF files.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">ioErrorHandler()</codeph> method executes if the image file is not available or not
  2929. accessible.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">openHandler()</codeph> method executes when the image file is first opened.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">progressHandler()</codeph> method executes when the image file starts to load and
  2930. again when the image is finished loading.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">unLoadHandler()</codeph> method executes when the image is unloaded by using the
  2931. <codeph class="+ topic/ph pr-d/codeph ">unload()</codeph> method when the user clicks the image.</li></ul>
  2932. </li></ol>
  2933. <p class="- topic/p "> Keep in mind the following requirements:</p>
  2934. <ul class="- topic/ul "><li class="- topic/li ">This example requires that you place a file named Image.gif in the same directory as the compiled SWF file.
  2935. Use an image that has an area that fits within the dimensions of the main SWF file.</li><li class="- topic/li ">Although this example makes use of all events available to the LoaderInfo object, most situations
  2936. require only a subset. In particular, when loading only an image file, the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event
  2937. (and perhaps the <codeph class="+ topic/ph pr-d/codeph ">ioError</codeph> event) are sufficient when loading a local image.</li></ul>
  2938. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  2939. package {
  2940. import flash.display.Loader;
  2941. import flash.display.Sprite;
  2942. import flash.events.*;
  2943. import flash.net.URLRequest;
  2944. public class LoaderExample extends Sprite {
  2945. private var url:String = "Image.gif";
  2946. public function LoaderExample() {
  2947. var loader:Loader = new Loader();
  2948. configureListeners(loader.contentLoaderInfo);
  2949. loader.addEventListener(MouseEvent.CLICK, clickHandler);
  2950. var request:URLRequest = new URLRequest(url);
  2951. loader.load(request);
  2952. addChild(loader);
  2953. }
  2954. private function configureListeners(dispatcher:IEventDispatcher):void {
  2955. dispatcher.addEventListener(Event.COMPLETE, completeHandler);
  2956. dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
  2957. dispatcher.addEventListener(Event.INIT, initHandler);
  2958. dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
  2959. dispatcher.addEventListener(Event.OPEN, openHandler);
  2960. dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
  2961. dispatcher.addEventListener(Event.UNLOAD, unLoadHandler);
  2962. }
  2963. private function completeHandler(event:Event):void {
  2964. trace("completeHandler: " + event);
  2965. }
  2966. private function httpStatusHandler(event:HTTPStatusEvent):void {
  2967. trace("httpStatusHandler: " + event);
  2968. }
  2969. private function initHandler(event:Event):void {
  2970. trace("initHandler: " + event);
  2971. }
  2972. private function ioErrorHandler(event:IOErrorEvent):void {
  2973. trace("ioErrorHandler: " + event);
  2974. }
  2975. private function openHandler(event:Event):void {
  2976. trace("openHandler: " + event);
  2977. }
  2978. private function progressHandler(event:ProgressEvent):void {
  2979. trace("progressHandler: bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
  2980. }
  2981. private function unLoadHandler(event:Event):void {
  2982. trace("unLoadHandler: " + event);
  2983. }
  2984. private function clickHandler(event:MouseEvent):void {
  2985. trace("clickHandler: " + event);
  2986. var loader:Loader = Loader(event.target);
  2987. loader.unload();
  2988. }
  2989. }
  2990. }
  2991. </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#LoaderInfo" class="- topic/link "><linktext class="- topic/linktext ">flash.display.LoaderInfo</linktext></link><link href="flash.net.xml#URLLoader" class="- topic/link "><linktext class="- topic/linktext ">flash.net.URLLoader</linktext></link><link href="flash.display.xml#DisplayObject" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject</linktext></link></related-links><apiConstructor id="flash.display:Loader:Loader" 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 ">Loader</apiName><shortdesc class="- topic/shortdesc ">
  2992. Creates a Loader object that you can use to load files, such as SWF, JPEG, GIF, or PNG files.</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>Need wording on parent/child relationships, root DisplayObjects, and so on.
  2993. </internal></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 "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  2994. Creates a Loader object that you can use to load files, such as SWF, JPEG, GIF, or PNG files.
  2995. Call the <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method to load the asset as a child of the Loader instance.
  2996. You can then add the Loader object to the display list (for instance, by using the
  2997. <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> method of a DisplayObjectContainer instance).
  2998. The asset appears on the Stage as it loads.
  2999. <p class="- topic/p ">You can also use a Loader instance "offlist," that is without adding it to a display object
  3000. container on the display list. In this mode, the Loader instance might be used to load a SWF file
  3001. that contains additional modules of an application. </p>
  3002. <p class="- topic/p ">To detect when the SWF file is finished loading, you can use the events of the LoaderInfo
  3003. object associated with the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> property of the Loader object.
  3004. At that point, the code in the module SWF file can be executed to initialize and start the module.
  3005. In the offlist mode, a Loader instance might also be used to load a SWF file that contains components or
  3006. media assets. Again, you can use the LoaderInfo object event notifications to detect when the
  3007. components are finished loading. At that point, the application can start using the components
  3008. and media assets in the library of the SWF file by instantiating the ActionScript 3.0 classes that represent
  3009. those components and assets.</p>
  3010. <p class="- topic/p ">To determine the status of a Loader object, monitor the following events that the LoaderInfo
  3011. object associated with the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> property of the Loader object:</p>
  3012. <ul class="- topic/ul "><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">open</codeph> event is dispatched when loading begins.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">ioError</codeph> or <codeph class="+ topic/ph pr-d/codeph ">securityError</codeph> event is dispatched if the file
  3013. cannot be loaded or if an error occured during the load process. </li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">progress</codeph> event fires continuously while the file is being loaded.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event is dispatched when a file completes downloading, but before
  3014. the loaded movie clip's methods and properties are available. </li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event is dispatched after the properties and methods of the loaded SWF file
  3015. are accessible, so you can begin manipulating the loaded SWF file.
  3016. This event is dispatched before the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> handler. In streaming SWF files,
  3017. the <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event can occur significantly earlier than the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event.
  3018. For most purposes, use the <codeph class="+ topic/ph pr-d/codeph ">init</codeph> handler.</li></ul>
  3019. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Loader/load()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Loader.load()</linktext></link><link href="flash.display.xml#LoaderInfo" class="- topic/link "><linktext class="- topic/linktext ">flash.display.LoaderInfo</linktext></link></related-links></apiConstructor><apiOperation id="flash.display:Loader: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 ">
  3020. Cancels a load() method operation that is currently in progress for the Loader instance.</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 "/><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 ">
  3021. Cancels a <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method operation that is currently in progress for the Loader instance.
  3022. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Loader/load()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Loader.load()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:Loader:loadBytes" 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 ">loadBytes</apiName><shortdesc class="- topic/shortdesc ">
  3023. Loads from binary data stored in a 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 "/><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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">length</codeph> property of the ByteArray object is not
  3024. greater than 0.
  3025. </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 ">If the <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> or <codeph class="+ topic/ph pr-d/codeph ">securityDomain</codeph>
  3026. property of the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter are non-null.
  3027. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">requestedContentParent</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter
  3028. is a <codeph class="+ topic/ph pr-d/codeph ">Loader</codeph>.
  3029. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.parameters</codeph> parameter is
  3030. set to non-null and has some values which are not Strings.
  3031. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the provided <codeph class="+ topic/ph pr-d/codeph ">applicationDomain</codeph> property of the
  3032. <codeph class="+ topic/ph pr-d/codeph ">context</codeph> property is from a disallowed domain.
  3033. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">You cannot connect to commonly reserved ports.
  3034. For a complete list of blocked ports, see "Restricting Networking APIs" in the
  3035. <i class="+ topic/ph hi-d/i ">ActionScript 3.0 Developer's Guide</i>.
  3036. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</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 ">bytes</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. The contents of the ByteArray can be
  3037. any of the file formats supported by the Loader class: SWF, GIF, JPEG, or PNG.
  3038. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">context</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.system:LoaderContext</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A LoaderContext object. Only the <codeph class="+ topic/ph pr-d/codeph ">applicationDomain</codeph> property
  3039. of the LoaderContext object applies; the <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> and <codeph class="+ topic/ph pr-d/codeph ">securityDomain</codeph>
  3040. properties of the LoaderContext object do not apply.
  3041. <p class="- topic/p ">If the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter is not
  3042. specified or refers to a null object, the content is loaded into the current security domain a
  3043. process referred to as "import loading" in Flash Player security documentation. Specifically,
  3044. if the loading SWF file trusts the remote SWF by incorporating the remote SWF into its code,
  3045. then the loading SWF can import it directly into its own security domain.</p>
  3046. <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
  3047. <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
  3048. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3049. Loads from binary data stored in a ByteArray object.
  3050. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">loadBytes()</codeph> method is asynchronous. You must wait for the "init" event before
  3051. accessing the properties of a loaded object.</p>
  3052. <p class="- topic/p ">When you use this method, consider the Flash Player security model,
  3053. which is described in the Loader class description. </p>
  3054. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.utils.xml#ByteArray" class="- topic/link "><linktext class="- topic/linktext ">flash.utils.ByteArray</linktext></link><link href="flash.system.xml#LoaderContext/applicationDomain" class="- topic/link "><linktext class="- topic/linktext ">flash.system.LoaderContext.applicationDomain</linktext></link></related-links><adobeApiEvent id="flash.display:Loader:loadBytes_asyncError" 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 ">asyncError</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:AsyncErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if the
  3055. <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> property has been specified and it is not possible to add the
  3056. loaded content as a child to the specified DisplayObjectContainer. This could happen if the loaded content is a
  3057. <codeph class="+ topic/ph pr-d/codeph ">flash.display.AVM1Movie</codeph> or if the <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> call to the requestedContentParent throws
  3058. an error.
  3059. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if the
  3060. LoaderContext.requestedContentParent property has been specified and it is not possible to add the
  3061. loaded content as a child to the specified DisplayObjectContainer.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_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:Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the operation is
  3062. complete. The <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event is always dispatched after the <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event.
  3063. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the operation is
  3064. complete.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_init" 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 ">init</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the properties and methods
  3065. of the loaded data are accessible. The <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event always precedes the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph>
  3066. event.
  3067. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the properties and methods
  3068. of the loaded data are accessible.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_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><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:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the runtime cannot parse
  3069. the data in the byte array.
  3070. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the runtime cannot parse
  3071. the data in the byte array.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_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 adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">open</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the operation starts.
  3072. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the operation starts.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_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><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:ProgressEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object as data is transfered in memory.
  3073. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object as data is transfered in memory.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_securityError" 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 ">securityError</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:SecurityErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if the
  3074. <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> property has been specified and the security sandbox
  3075. of the <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> does not have access to the loaded SWF.
  3076. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if the
  3077. LoaderContext.requestedContentParent property has been specified and the security sandbox
  3078. of the LoaderContext.requestedContentParent does not have access to the loaded SWF.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadBytes_unload" 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 ">unload</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when a loaded object is removed.
  3079. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when a loaded object is removed.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.display:Loader:loadFilePromise" 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 ">loadFilePromise</apiName><shortdesc class="- topic/shortdesc ">
  3080. Loads an IFilePromise instance.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">requestedContentParent</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter
  3081. is a <codeph class="+ topic/ph pr-d/codeph ">Loader</codeph>.
  3082. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.parameters</codeph> parameter is
  3083. set to non-null and has some values which are not Strings.
  3084. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">IFilePromise</codeph> object passed as parameter is null
  3085. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</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 ">promise</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.desktop:IFilePromise</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A IFilePromise object. The data source of the object can be
  3086. any of the file formats supported by the Loader class: SWF, GIF, JPEG, or PNG.
  3087. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">context</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.system:LoaderContext</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A LoaderContext object. Only the <codeph class="+ topic/ph pr-d/codeph ">applicationDomain</codeph> property
  3088. of the LoaderContext object applies; the <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> and <codeph class="+ topic/ph pr-d/codeph ">securityDomain</codeph>
  3089. properties of the LoaderContext object do not apply.
  3090. <p class="- topic/p ">If the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter is not
  3091. specified or refers to a null object, the content is loaded into the current security domain a
  3092. process referred to as "import loading" in Flash Player security documentation. Specifically,
  3093. if the loading SWF file trusts the remote SWF by incorporating the remote SWF into its code,
  3094. then the loading SWF can import it directly into its own security domain.</p>
  3095. <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
  3096. <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
  3097. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3098. Loads an IFilePromise instance.
  3099. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">loadFilePromise</codeph> method takes an <codeph class="+ topic/ph pr-d/codeph ">IFilePromise</codeph> object and
  3100. loads the binary data. If the data is a progressive stream, such as a video wait for the "init"
  3101. or progress events before accessing the properties of the loaded object. Otherwise, wait for
  3102. the complete event to make sure that the data is fully loaded.</p>
  3103. <p class="- topic/p ">When you use this method, consider the Flash Player security model,
  3104. which is described in the Loader class description. </p>
  3105. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.media.xml#MediaPromise" class="- topic/link "><linktext class="- topic/linktext ">MediaPromise</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.display:Loader:loadFilePromise_asyncError" 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 ">asyncError</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:AsyncErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if the
  3106. <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> property has been specified and it is not possible to add the
  3107. loaded content as a child to the specified DisplayObjectContainer. This could happen if the loaded content is a
  3108. <codeph class="+ topic/ph pr-d/codeph ">flash.display.AVM1Movie</codeph> or if the <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> call to the requestedContentParent throws
  3109. an error.
  3110. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if the
  3111. LoaderContext.requestedContentParent property has been specified and it is not possible to add the
  3112. loaded content as a child to the specified DisplayObjectContainer.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_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:Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the operation is
  3113. complete. The <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event is always dispatched after the <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event.
  3114. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the operation is
  3115. complete.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_init" 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 ">init</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the properties and methods
  3116. of the loaded data are accessible. The <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event always precedes the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph>
  3117. event.
  3118. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the properties and methods
  3119. of the loaded data are accessible.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_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><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:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the runtime cannot parse
  3120. the data in the data source or if the data source stream is not readable.
  3121. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the runtime cannot parse
  3122. the data in the data source or if the data source stream is not readable.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_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 adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">open</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the operation starts.
  3123. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the operation starts.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_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><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:ProgressEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object as data is transfered in memory.
  3124. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object as data is transfered in memory.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_securityError" 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 ">securityError</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:SecurityErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if the
  3125. <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> property has been specified and the security sandbox
  3126. of the <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> does not have access to the loaded SWF.
  3127. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if the
  3128. LoaderContext.requestedContentParent property has been specified and the security sandbox
  3129. of the LoaderContext.requestedContentParent does not have access to the loaded SWF.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:loadFilePromise_unload" 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 ">unload</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when a loaded object is removed.
  3130. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when a loaded object is removed.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.display:Loader:load" 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 ">load</apiName><shortdesc class="- topic/shortdesc ">
  3131. Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into an object that is a child of
  3132. this Loader 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 "><oldexample>The following example shows how to use the <code>MovieClipLoader.loadClip()</code>
  3133. method by creating a handler for the <code>onLoadInit</code> event and then making the request.
  3134. <p class="- topic/p ">You should either place the following code directly into a frame action on a Timeline, or
  3135. paste it into a class that extends MovieClip. This code also expects an image named YourImage.jpg
  3136. to exist in the same directory as the compiled SWF file.</p>
  3137. <listing version="2.0">
  3138. var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());
  3139. var mcLoader:MovieClipLoader = new MovieClipLoader();
  3140. mcLoader.addListener(this);
  3141. mcLoader.loadClip("YourImage.jpg", container);
  3142. function onLoadInit(mc:MovieClip) {
  3143. trace("onLoadInit: " + mc);
  3144. }
  3145. </listing>
  3146. </oldexample></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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The <codeph class="+ topic/ph pr-d/codeph ">digest</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">request</codeph> object is not
  3147. <codeph class="+ topic/ph pr-d/codeph ">null</codeph>. You should only set the <codeph class="+ topic/ph pr-d/codeph ">digest</codeph> property of a URLRequest object
  3148. when calling the <codeph class="+ topic/ph pr-d/codeph ">URLLoader.load()</codeph> method when loading a SWZ file (an Adobe
  3149. platform component).
  3150. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IOError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IOError</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 value of <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.securityDomain</codeph> must be either <codeph class="+ topic/ph pr-d/codeph ">null</codeph>
  3151. or <codeph class="+ topic/ph pr-d/codeph ">SecurityDomain.currentDomain</codeph>. This reflects the fact that you can only
  3152. place the loaded media in its natural security sandbox or your own (the latter requires a
  3153. policy file).
  3154. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Local SWF files may not set LoaderContext.securityDomain to anything
  3155. other than <codeph class="+ topic/ph pr-d/codeph ">null</codeph>. It is not permitted to import non-local media into a local
  3156. sandbox, or to place other local media in anything other than its natural sandbox.
  3157. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc "> You cannot connect to commonly reserved ports.
  3158. For a complete list of blocked ports, see "Restricting Networking APIs" in the
  3159. <i class="+ topic/ph hi-d/i ">ActionScript 3.0 Developer's Guide</i>.
  3160. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">applicationDomain</codeph> or <codeph class="+ topic/ph pr-d/codeph ">securityDomain</codeph>
  3161. properties of the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter are from a disallowed domain.
  3162. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If a local SWF file is attempting to use the <codeph class="+ topic/ph pr-d/codeph ">securityDomain</codeph> property
  3163. of the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter.
  3164. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">requestedContentParent</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter
  3165. is a <codeph class="+ topic/ph pr-d/codeph ">Loader</codeph>.
  3166. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.parameters</codeph> parameter is
  3167. set to non-null and has some values which are not Strings.
  3168. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</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 ">request</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.net:URLRequest</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc "> The absolute or relative URL of the SWF, JPEG, GIF, or PNG file to be loaded. A
  3169. relative path must be relative to the main SWF file. Absolute URLs must include the
  3170. protocol reference, such as http:// or file:///. Filenames cannot include disk drive
  3171. specifications.
  3172. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">context</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.system:LoaderContext</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A LoaderContext object, which has properties that define the following:
  3173. <ul class="- topic/ul "><li class="- topic/li ">Whether or not to check for the existence of a policy file
  3174. upon loading the object</li><li class="- topic/li ">The ApplicationDomain for the loaded object</li><li class="- topic/li ">The SecurityDomain for the loaded object</li><li class="- topic/li ">The ImageDecodingPolicy for the loaded image object</li></ul>
  3175. <p class="- topic/p ">If the <codeph class="+ topic/ph pr-d/codeph ">context</codeph> parameter is not specified or refers to a null object,
  3176. the loaded content remains in its own security domain.</p>
  3177. <p class="- topic/p ">For complete details, see the description of the properties in the
  3178. <xref href="../system/LoaderContext.html" class="- topic/xref ">LoaderContext</xref> class.</p>
  3179. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Loads a SWF file or image file into a DisplayObject that is a child of this Loader instance.
  3180. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3181. Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into an object that is a child of
  3182. this Loader object. If you load an animated GIF file, only the first frame is displayed.
  3183. As the Loader object can contain only a single child, issuing a subsequent <codeph class="+ topic/ph pr-d/codeph ">load()</codeph>
  3184. request terminates the previous request, if still pending, and commences a new load.
  3185. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note</b>:
  3186. In AIR 1.5 and Flash Player 10, the maximum size for a loaded image is 8,191 pixels in width or height,
  3187. and the total number of pixels cannot exceed 16,777,215 pixels. (So, if an loaded image is 8,191 pixels
  3188. wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier and AIR 1.1 and earlier, the limitation
  3189. is 2,880 pixels in height and 2,880 pixels in width.</p>
  3190. <p class="- topic/p ">A SWF file or image loaded into a Loader object inherits the position, rotation, and scale
  3191. properties of the parent display objects of the Loader object. </p>
  3192. <p class="- topic/p ">Use the <codeph class="+ topic/ph pr-d/codeph ">unload()</codeph> method to remove movies or images loaded with this
  3193. method, or to cancel a load operation that is in progress.</p>
  3194. <p class="- topic/p ">You can prevent a SWF file from using this method by setting the <codeph class="+ topic/ph pr-d/codeph ">allowNetworking</codeph>
  3195. parameter of the the <codeph class="+ topic/ph pr-d/codeph ">object</codeph> and <codeph class="+ topic/ph pr-d/codeph ">embed</codeph> tags in the HTML
  3196. page that contains the SWF content.</p>
  3197. <p class="- topic/p ">When you use this method, consider the Flash Player security model,
  3198. which is described in the Loader class description. </p>
  3199. <p class="- topic/p "> In Flash Player 10 and later, if you use a multipart Content-Type (for example "multipart/form-data")
  3200. that contains an upload (indicated by a "filename" parameter in a "content-disposition" header within the POST body),
  3201. the POST operation is subject to the security rules applied to uploads:</p>
  3202. <ul class="- topic/ul "><li class="- topic/li ">The POST operation must be performed in response to a user-initiated action, such as a mouse click or key press.</li><li class="- topic/li ">If the POST operation is cross-domain (the POST target is not on the same server as the SWF file
  3203. that is sending the POST request),
  3204. the target server must provide a URL policy file that permits cross-domain access.</li></ul>
  3205. <p class="- topic/p ">Also, for any multipart Content-Type, the syntax must be valid (according to the RFC2046 standard).
  3206. If the syntax appears to be invalid, the POST operation is subject to the security rules applied to uploads.</p>
  3207. <p class="- topic/p ">For more information related to security, see the Flash Player Developer Center Topic:
  3208. <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.</p>
  3209. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Loader/contentLoaderInfo" class="- topic/link "><linktext class="- topic/linktext ">contentLoaderInfo</linktext></link><link href="flash.net.xml#URLRequest" class="- topic/link "><linktext class="- topic/linktext ">flash.net.URLRequest</linktext></link><link href="flash.display.xml#DisplayObject" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject</linktext></link><link href="flash.display.xml#Loader/unload()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Loader.unload()</linktext></link><link href="flash.display.xml#LoaderInfo" class="- topic/link "><linktext class="- topic/linktext ">flash.display.LoaderInfo</linktext></link><link href="flash.system.xml#LoaderContext" class="- topic/link "><linktext class="- topic/linktext ">flash.system.LoaderContext</linktext></link></related-links><adobeApiEvent id="flash.display:Loader:load_asyncError" 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 ">asyncError</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:AsyncErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if the
  3210. <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> property has been specified and it is not possible to add the
  3211. loaded content as a child to the specified DisplayObjectContainer. This could happen if the loaded content is a
  3212. <codeph class="+ topic/ph pr-d/codeph ">flash.display.AVM1Movie</codeph> or if the <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> call to the requestedContentParent throws
  3213. an error.
  3214. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if the
  3215. LoaderContext.requestedContentParent property has been specified and it is not possible to add the
  3216. loaded content as a child to the specified DisplayObjectContainer.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_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:Event</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the file has
  3217. completed loading. The <codeph class="+ topic/ph pr-d/codeph ">complete</codeph> event is always dispatched after the <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event.
  3218. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the file has
  3219. completed loading.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_httpStatus" 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 ">httpStatus</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:HTTPStatusEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when a network
  3220. request is made over HTTP and Flash Player can detect the HTTP status code.
  3221. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when a network
  3222. request is made over HTTP and Flash Player can detect the HTTP status code.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_init" 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 ">init</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the properties and methods
  3223. of the loaded SWF file are accessible. The <codeph class="+ topic/ph pr-d/codeph ">init</codeph> event always precedes the <codeph class="+ topic/ph pr-d/codeph ">complete</codeph>
  3224. event.
  3225. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the properties and methods
  3226. of the loaded SWF file are accessible.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_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><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:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when an input or output
  3227. error occurs that causes a load operation to fail.
  3228. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when an input or output
  3229. error occurs that causes a load operation to fail.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_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 adobeApiEvent/adobeApiEvent "><apiName class="- topic/title reference/title apiRef/apiName ">open</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when the loading operation starts.
  3230. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when the loading operation starts.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_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><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:ProgressEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object as data is received
  3231. while load operation progresses.
  3232. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object as data is received
  3233. while load operation progresses.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_securityError" 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 ">securityError</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:SecurityErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if a SWF file
  3234. in the local-with-filesystem sandbox attempts to load content in the local-with-networking sandbox, or vice versa.
  3235. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if a SWF file
  3236. in the local-with-filesystem sandbox attempts to load content in the local-with-networking sandbox, or vice versa.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_securityError" 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 ">securityError</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:SecurityErrorEvent</adobeApiEventClassifier><apiGeneratedEvent class="- topic/state reference/state apiRef/apiQualifier adobeApiEvent/apiGeneratedEvent "/></adobeApiEventDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Dispatched by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object if the
  3237. <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> property has been specified and the security sandbox
  3238. of the <codeph class="+ topic/ph pr-d/codeph ">LoaderContext.requestedContentParent</codeph> does not have access to the loaded SWF.
  3239. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object if the
  3240. LoaderContext.requestedContentParent property has been specified and the security sandbox
  3241. of the LoaderContext.requestedContentParent does not have access to the loaded SWF.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.display:Loader:load_unload" 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 ">unload</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 by the <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> object when a loaded object is removed.
  3242. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched by the contentLoaderInfo object when a loaded object is removed.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.display:Loader:unloadAndStop" 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 ">unloadAndStop</apiName><shortdesc class="- topic/shortdesc ">
  3243. Attempts to unload child SWF file contents and stops the execution of commands from loaded SWF files.</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 "/><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 "/><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 ">gc</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 ">Provides a hint to the garbage collector to run on the child SWF objects (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>) or not (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>).
  3244. If you are unloading many objects asynchronously, setting the <codeph class="+ topic/ph pr-d/codeph ">gc</codeph> paramter to <codeph class="+ topic/ph pr-d/codeph ">false</codeph> might improve
  3245. application performance. However, if the parameter is set to
  3246. <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, media and display objects of the child SWF file might persist in memory after running the
  3247. <codeph class="+ topic/ph pr-d/codeph ">unloadAndStop()</codeph> command.
  3248. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3249. Attempts to unload child SWF file contents and stops the execution of commands from loaded SWF files.
  3250. This method attempts to unload SWF files
  3251. that were loaded using <codeph class="+ topic/ph pr-d/codeph ">Loader.load()</codeph> or <codeph class="+ topic/ph pr-d/codeph ">Loader.loadBytes()</codeph> by removing references to EventDispatcher,
  3252. NetConnection, Timer, Sound, or Video objects of the child SWF file. As a result, the following occurs for the child SWF file
  3253. and the child SWF file's display list:
  3254. <ul class="- topic/ul "><li class="- topic/li ">Sounds are stopped.</li><li class="- topic/li ">Stage event listeners are removed.</li><li class="- topic/li ">Event listeners for <codeph class="+ topic/ph pr-d/codeph ">enterFrame</codeph>, <codeph class="+ topic/ph pr-d/codeph ">frameConstructed</codeph>, <codeph class="+ topic/ph pr-d/codeph ">exitFrame</codeph>,
  3255. <codeph class="+ topic/ph pr-d/codeph ">activate</codeph> and <codeph class="+ topic/ph pr-d/codeph ">deactivate</codeph> are removed.</li><li class="- topic/li ">Timers are stopped.</li><li class="- topic/li ">Camera and Microphone instances are detached</li><li class="- topic/li ">Movie clips are stopped.</li></ul>
  3256. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject</linktext></link><link href="flash.display.xml#Loader/load()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Loader.load()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:Loader:unload" 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 ">unload</apiName><shortdesc class="- topic/shortdesc ">
  3257. Removes a child of this Loader object that was loaded by using the load() method.</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>The funky-looking code formatting above is intentional to work around a bug!
  3258. </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></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3259. Removes a child of this Loader object that was loaded by using the <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method.
  3260. The <codeph class="+ topic/ph pr-d/codeph ">property</codeph> of the associated LoaderInfo object is reset to <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
  3261. The child is not necessarily destroyed because other objects might have references to it; however,
  3262. it is no longer a child of the Loader object.
  3263. <p class="- topic/p ">As a best practice, before you unload a child SWF file, you should explicitly
  3264. close any streams in the child SWF file's objects, such as LocalConnection, NetConnection,
  3265. NetStream, and Sound objects. Otherwise, audio in the child SWF file might continue to play, even
  3266. though the child SWF file was unloaded. To close streams in the child SWF file, add an event listener
  3267. to the child that listens for the <codeph class="+ topic/ph pr-d/codeph ">unload</codeph> event. When the parent calls
  3268. <codeph class="+ topic/ph pr-d/codeph ">Loader.unload()</codeph>, the <codeph class="+ topic/ph pr-d/codeph ">unload</codeph> event is dispatched to the child.
  3269. The following code shows how you might do this:</p>
  3270. <pre xml:space="preserve" class="- topic/pre ">
  3271. function closeAllStreams(evt:Event) {
  3272. myNetStream.close();
  3273. mySound.close();
  3274. myNetConnection.close();
  3275. myLocalConnection.close();
  3276. }
  3277. myMovieClip.loaderInfo.addEventListener(Event.UNLOAD, closeAllStreams);</pre>
  3278. </apiDesc></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Loader/load()" class="- topic/link "><linktext class="- topic/linktext ">Loader.load()</linktext></link><link href="flash.media.xml#Sound/close()" class="- topic/link "><linktext class="- topic/linktext ">flash.media.Sound.close()</linktext></link><link href="flash.net.xml#LocalConnection/close()" class="- topic/link "><linktext class="- topic/linktext ">flash.net.LocalConnection.close()</linktext></link><link href="flash.net.xml#NetConnection/close()" class="- topic/link "><linktext class="- topic/linktext ">flash.net.NetConnection.close()</linktext></link><link href="flash.net.xml#NetStream/close()" class="- topic/link "><linktext class="- topic/linktext ">flash.net.NetStream.close()</linktext></link><link href="../../operators.html#delete" class="- topic/link "><linktext class="- topic/linktext ">delete operator</linktext></link></related-links></apiOperation><apiValue id="flash.display:Loader:contentLoaderInfo: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 ">contentLoaderInfo</apiName><shortdesc class="- topic/shortdesc ">
  3279. Returns a LoaderInfo object corresponding to the object being loaded.</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 ">flash.display:LoaderInfo</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3280. Returns a LoaderInfo object corresponding to the object being loaded. LoaderInfo objects
  3281. are shared between the Loader object and the loaded content object. The LoaderInfo object
  3282. supplies loading progress information and statistics about the loaded file.
  3283. <p class="- topic/p ">Events related to the load are dispatched by the LoaderInfo object referenced by the
  3284. <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph> property of the Loader object. The <codeph class="+ topic/ph pr-d/codeph ">contentLoaderInfo</codeph>
  3285. property is set to a valid LoaderInfo object, even before the content is loaded, so that you can add
  3286. event listeners to the object prior to the load.</p>
  3287. <p class="- topic/p ">To detect uncaught errors that happen in a loaded SWF, use the
  3288. <codeph class="+ topic/ph pr-d/codeph ">Loader.uncaughtErrorEvents</codeph> property, not the
  3289. <codeph class="+ topic/ph pr-d/codeph ">Loader.contentLoaderInfo.uncaughtErrorEvents</codeph> property.</p>
  3290. </apiDesc><example conref="examples\Loader_contentLoaderInfo.as" class="- topic/example "> The following example shows how you can load and position an image in ActionScript 3.0 using the Loader class and the complete event on the Loader object's contentLoaderInfo property.
  3291. Example provided by
  3292. <xref href="http://actionscriptexamples.com/2008/03/03/positioning-a-dynamically-loaded-image-in-actionscript-20-and-actionscript-30-using-the-moviecliploader-class-and-loader-class/" scope="_mmexternal" class="- topic/xref ">ActionScriptExamples.com</xref>.
  3293. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3294. var url:String = "http://www.helpexamples.com/flash/images/image2.jpg";
  3295. var urlRequest:URLRequest = new URLRequest(url);
  3296. var loader:Loader = new Loader();
  3297. loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_complete);
  3298. loader.load(urlRequest);
  3299. addChild(loader);
  3300. function loader_complete(evt:Event):void {
  3301. var target_mc:Loader = evt.currentTarget.loader as Loader;
  3302. target_mc.x = (stage.stageWidth - target_mc.width) / 2;
  3303. target_mc.y = (stage.stageHeight - target_mc.height) / 2;
  3304. }
  3305. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#LoaderInfo" class="- topic/link "><linktext class="- topic/linktext ">flash.display.LoaderInfo</linktext></link></related-links></apiValue><apiValue id="flash.display:Loader:content: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 ">content</apiName><shortdesc class="- topic/shortdesc ">
  3306. Contains the root display object of the SWF file or image (JPG, PNG, or GIF)
  3307. file that was loaded by using the load() or loadBytes() methods.</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 ">flash.display:DisplayObject</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The loaded SWF file or image file belongs to a security
  3308. sandbox to which you do not have access. For a loaded SWF file, you can avoid this situation by having
  3309. the file call the <codeph class="+ topic/ph pr-d/codeph ">Security.allowDomain()</codeph> method or by having the loading file specify a
  3310. <codeph class="+ topic/ph pr-d/codeph ">loaderContext</codeph> parameter with its <codeph class="+ topic/ph pr-d/codeph ">securityDomain</codeph> property set to
  3311. <codeph class="+ topic/ph pr-d/codeph ">SecurityDomain.currentDomain</codeph> when you call the <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> or
  3312. <codeph class="+ topic/ph pr-d/codeph ">loadBytes()</codeph> method.
  3313. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3314. Contains the root display object of the SWF file or image (JPG, PNG, or GIF)
  3315. file that was loaded by using the <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> or <codeph class="+ topic/ph pr-d/codeph ">loadBytes()</codeph> methods.
  3316. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject</linktext></link><link href="flash.display.xml#Loader/load()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Loader.load()</linktext></link></related-links></apiValue><apiValue id="flash.display:Loader:uncaughtErrorEvents: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 ">uncaughtErrorEvents</apiName><shortdesc class="- topic/shortdesc ">
  3317. An object that dispatches an uncaughtError event when an unhandled error
  3318. occurs in the SWF that's loaded by this Loader 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="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 "/><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.events:UncaughtErrorEvents</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3319. An object that dispatches an <codeph class="+ topic/ph pr-d/codeph ">uncaughtError</codeph> event when an unhandled error
  3320. occurs in the SWF that's loaded by this Loader object.
  3321. An uncaught error happens when an error is
  3322. thrown outside of any <codeph class="+ topic/ph pr-d/codeph ">try..catch</codeph> blocks or when an ErrorEvent
  3323. object is dispatched with no registered listeners.
  3324. <p class="- topic/p ">Note that a Loader object's <codeph class="+ topic/ph pr-d/codeph ">uncaughtErrorEvents</codeph> property
  3325. dispatches events that bubble through it, not events that it dispatches directly.
  3326. It never dispatches an <codeph class="+ topic/ph pr-d/codeph ">uncaughtErrorEvent</codeph> in the target phase. It only
  3327. dispatches the event in the capture and bubbling phases. To detect an uncaught error
  3328. in the current SWF (the SWF in which the Loader object
  3329. is defined) use the <codeph class="+ topic/ph pr-d/codeph ">LoaderInfo.uncaughtErrorEvents</codeph> property instead.</p>
  3330. <p class="- topic/p ">If the content loaded by the Loader object is an AVM1 (ActionScript 2) SWF file,
  3331. uncaught errors in the AVM1 SWF file do not result in an <codeph class="+ topic/ph pr-d/codeph ">uncaughtError</codeph>
  3332. event.</p>
  3333. </apiDesc><example conref="examples\Loader.uncaughtErrorEvents.1.as" class="- topic/example "> The following example demonstrates the use of an uncaught error event
  3334. handler to detect uncaught errors in a loaded SWF. The example defines
  3335. an <codeph class="+ topic/ph pr-d/codeph ">uncaughtError</codeph> event handler to detect uncaught errors.
  3336. <p class="- topic/p ">In the constructor, the code creates a Loader object and registers a listener for
  3337. the <codeph class="+ topic/ph pr-d/codeph ">uncaughtError</codeph> event dispatched by the Loader object's
  3338. <codeph class="+ topic/ph pr-d/codeph ">uncaughtErrorEvents</codeph> property.</p>
  3339. <p class="- topic/p ">In the <codeph class="+ topic/ph pr-d/codeph ">uncaughtErrorHandler()</codeph> method, the code checks the data type of
  3340. the <codeph class="+ topic/ph pr-d/codeph ">error</codeph> property and responds accordingly.</p>
  3341. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3342. package
  3343. {
  3344. import flash.display.Loader;
  3345. import flash.display.Sprite;
  3346. import flash.events.ErrorEvent;
  3347. import flash.events.UncaughtErrorEvent;
  3348. import flash.net.URLRequest;
  3349. public class LoaderUncaughtErrorEventExample extends Sprite
  3350. {
  3351. private var ldr:Loader;
  3352. public function LoaderUncaughtErrorEventExample()
  3353. {
  3354. ldr = new Loader();
  3355. ldr.load(new URLRequest("child.swf"));
  3356. ldr.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);
  3357. }
  3358. private function uncaughtErrorHandler(event:UncaughtErrorEvent):void
  3359. {
  3360. if (event.error is Error)
  3361. {
  3362. var error:Error = event.error as Error;
  3363. // do something with the error
  3364. }
  3365. else if (event.error is ErrorEvent)
  3366. {
  3367. var errorEvent:ErrorEvent = event.error as ErrorEvent;
  3368. // do something with the error
  3369. }
  3370. else
  3371. {
  3372. // a non-Error, non-ErrorEvent type was thrown and uncaught
  3373. }
  3374. }
  3375. }
  3376. }
  3377. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.events.xml#UncaughtErrorEvent" class="- topic/link "><linktext class="- topic/linktext ">UncaughtErrorEvent</linktext></link><link href="flash.display.xml#LoaderInfo/uncaughtErrorEvents" class="- topic/link "><linktext class="- topic/linktext ">LoaderInfo.uncaughtErrorEvents</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:NativeMenuItem" 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 ">NativeMenuItem</apiName><shortdesc class="- topic/shortdesc ">
  3378. The NativeMenuItem class represents a single item in a menu.</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="1.0" 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 ">
  3379. The NativeMenuItem class represents a single item in a menu.
  3380. <p class="- topic/p ">A menu item can be a command, a submenu, or a separator line:</p>
  3381. <ul class="- topic/ul "><li class="- topic/li ">To create a command item, call the NativeMenuItem constructor, passing in a
  3382. string for the label and <codeph class="+ topic/ph pr-d/codeph ">false</codeph> for the <codeph class="+ topic/ph pr-d/codeph ">isSeparator</codeph>
  3383. parameter.</li><li class="- topic/li ">To create a submenu, create a command item for the parent menu and
  3384. assign the NativeMenu object of the submenu to the item's <codeph class="+ topic/ph pr-d/codeph ">submenu</codeph>
  3385. property. You can also call the <codeph class="+ topic/ph pr-d/codeph ">addSubmenu()</codeph> method of the
  3386. parent NativeMenu object to create the item and set the <codeph class="+ topic/ph pr-d/codeph ">submenu</codeph>
  3387. property at the same time.</li><li class="- topic/li ">To create a separator, call the NativeMenuItem constructor, passing in an empty
  3388. string for the label and <codeph class="+ topic/ph pr-d/codeph ">true</codeph> for the <codeph class="+ topic/ph pr-d/codeph ">isSeparator</codeph>
  3389. parameter.</li></ul>
  3390. <p class="- topic/p ">Listen for <codeph class="+ topic/ph pr-d/codeph ">select</codeph> events on an item or a parent menu to detect when a
  3391. menu command is selected. Neither submenus nor separators dispatch
  3392. select events. Listen for <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> events to determine when
  3393. a menu item is about to be displayed or activated through a key equivalent.</p>
  3394. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#NativeMenu" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeMenu</linktext></link><link href="flash.display.xml#NativeMenu/addSubmenu()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeMenu.addSubmenu()</linktext></link></related-links><adobeApiEvent id="flash.display:NativeMenuItem_flash.events.Event.PREPARING_preparing" 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 ">preparing</apiName><shortdesc class="- topic/shortdesc ">
  3395. Dispatched by this NativeMenuItem object when its key equivalent is pressed and immediately before the containing menu 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.6" 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.PREPARING</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 ">
  3396. Dispatched by this NativeMenuItem object when its key equivalent is pressed and immediately before the containing menu is displayed.
  3397. <p class="- topic/p ">Listen to this event to update the item either before the containing menu is displayed, or when its key
  3398. equivalent is pressed by the user. The <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event is dispatched before the key equivalent
  3399. is fully evaluated. You can enable, disable, or remove the item from the menu in the <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event handler
  3400. and those changes will be in effect when the key equivalent is processed. For example, if you remove or disable this
  3401. menu item, then the sequence of events is effectively canceled
  3402. and no <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event is dispatched.
  3403. A <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event is also dispatched by the other items in a menu. </p>
  3404. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event supersedes the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event and provides additional functionality. Listen for the
  3405. <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event or the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event, but not both. </p>
  3406. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:NativeMenuItem_flash.events.Event.DISPLAYING_displaying" 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 ">displaying</apiName><shortdesc class="- topic/shortdesc ">
  3407. Dispatched by this NativeMenuItem object immediately before the
  3408. menu containing the item 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="1.0" 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.DISPLAYING</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 ">
  3409. Dispatched by this NativeMenuItem object immediately before the
  3410. menu containing the item is displayed.
  3411. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event supersedes the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event and provides additional functionality. Listen for the
  3412. <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event or the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event, but not both. </p>
  3413. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:NativeMenuItem_flash.events.Event.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 ">
  3414. Dispatched whenever a menu item is selected by the user.</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="1.0" 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.SELECT</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 ">
  3415. Dispatched whenever a menu item is selected by the user.
  3416. <p class="- topic/p ">A <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event <i class="+ topic/ph hi-d/i ">bubbles</i> from this item to its containing menu and on up
  3417. through the parent menu chain to the root menu object. The <codeph class="+ topic/ph pr-d/codeph ">target</codeph>
  3418. property of the event object references this NativeMenuItem object;
  3419. the <codeph class="+ topic/ph pr-d/codeph ">currentTarget</codeph> property references the dispatching
  3420. object (either this NativeMenuItem or an ancestral NativeMenu object).</p>
  3421. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> If the window containing the menu is in fullscreen mode
  3422. (<codeph class="+ topic/ph pr-d/codeph ">stage.displayState == StageDisplayState.FULL_SCREEN</codeph>),
  3423. the NativeMenuItem object does <i class="+ topic/ph hi-d/i ">not</i> dispatch a <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event
  3424. when the user enters a keyboard equivalent for a menu item.</p>
  3425. </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.display:NativeMenuItem:NativeMenuItem" 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 ">NativeMenuItem</apiName><shortdesc class="- topic/shortdesc ">
  3426. Creates a new NativeMenuItem 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="1.0" 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 ">label</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData "/><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The display label for the item, or an empty string for separators.
  3427. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">isSeparator</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 ">Set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> to create a separator; set to
  3428. <codeph class="+ topic/ph pr-d/codeph ">false</codeph> otherwise.
  3429. </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3430. Creates a new NativeMenuItem object.
  3431. <p class="- topic/p ">To create a menu command, set the <codeph class="+ topic/ph pr-d/codeph ">label</codeph> parameter to a
  3432. string containing the display label and set <codeph class="+ topic/ph pr-d/codeph ">isSeparator</codeph>
  3433. to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.</p>
  3434. <p class="- topic/p ">To create a submenu command, create a command item and then assign the
  3435. NativeMenu object for the submenu to the item's <codeph class="+ topic/ph pr-d/codeph ">submenu</codeph>
  3436. property. Add the item to the parent menu.</p>
  3437. <p class="- topic/p ">To create a separator, set the <codeph class="+ topic/ph pr-d/codeph ">label</codeph> parameter to an empty
  3438. string and set <codeph class="+ topic/ph pr-d/codeph ">isSeparator</codeph> to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</p>
  3439. <p class="- topic/p ">Add and remove items from a menu using the NativeMenu <codeph class="+ topic/ph pr-d/codeph ">addItem()</codeph>
  3440. and <codeph class="+ topic/ph pr-d/codeph ">removeItem()</codeph> methods.</p>
  3441. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#NativeMenu/addSubmenu()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeMenu.addSubmenu()</linktext></link></related-links></apiConstructor><apiOperation id="flash.display:NativeMenuItem:clone" 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 ">clone</apiName><shortdesc class="- topic/shortdesc ">
  3442. Creates a copy of the NativeMenuItem 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="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 "><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3443. Creates a copy of the NativeMenuItem object.
  3444. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenuItem:toString" 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 ">toString</apiName><shortdesc class="- topic/shortdesc ">
  3445. Returns a string containing all the properties of the NativeMenuItem 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="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 "/><apiIsOverride class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiIsOverride "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A string containing all the properties of the Event object.
  3446. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3447. Returns a string containing all the properties of the NativeMenuItem object.
  3448. </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.display:NativeMenuItem:checked: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 ">checked</apiName><shortdesc class="- topic/shortdesc ">
  3449. Controls whether this menu item displays a checkmark.</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="1.0" 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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3450. Controls whether this menu item displays a checkmark.
  3451. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:data: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 ">data</apiName><shortdesc class="- topic/shortdesc ">
  3452. An arbitrary data object associated with this menu item.</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="1.0" 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 ">Object</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3453. An arbitrary data object associated with this menu item.
  3454. <p class="- topic/p ">You can assign any object to this property. The assigned object is
  3455. not used by the menu system, but is available to event handling code
  3456. (through the target property of the event object).
  3457. By default, the value of this property is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
  3458. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:enabled: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 ">enabled</apiName><shortdesc class="- topic/shortdesc ">
  3459. Controls whether this menu item is enabled.</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="1.0" 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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3460. Controls whether this menu item is enabled.
  3461. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:isSeparator: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 ">isSeparator</apiName><shortdesc class="- topic/shortdesc ">
  3462. Reports whether this item is a menu separator line.</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="1.0" 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 ">
  3463. Reports whether this item is a menu separator line.
  3464. <p class="- topic/p ">Create a separator line by setting the <codeph class="+ topic/ph pr-d/codeph ">isSeparator</codeph>
  3465. parameter in the NativeMenuItem constructor to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.</p>
  3466. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:keyEquivalentModifiers: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 ">keyEquivalentModifiers</apiName><shortdesc class="- topic/shortdesc ">
  3467. The array of key codes for the key equivalent modifiers.</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="1.0" 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 ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3468. The array of key codes for the key equivalent modifiers.
  3469. <p class="- topic/p ">Use the constants defined in the Keyboard class to specify the
  3470. modifier key codes. Valid modifier keys include:</p>
  3471. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Keyboard.ALTERNATE</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Keyboard.COMMAND</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">Keyboard.CONTROL</codeph></li></ul>
  3472. <p class="- topic/p ">If you do not assign any modifiers, then by default the <codeph class="+ topic/ph pr-d/codeph ">Keyboard.CONTROL</codeph> key is
  3473. assigned on Windows or Linux and the <codeph class="+ topic/ph pr-d/codeph ">Keyboard.COMMAND</codeph> key is assigned on Mac OS X. If you
  3474. do not want the key equivalent to include these modifiers, set this property to an empty array.</p>
  3475. <p class="- topic/p ">If you assign an uppercase letter to the <codeph class="+ topic/ph pr-d/codeph ">keyEquivalent</codeph> property, the Shift key is
  3476. used as a modifier automatically. Setting <codeph class="+ topic/ph pr-d/codeph ">keyEquivalentModifier</codeph> to an empty array
  3477. does not remove the Shift key as a modifier.</p>
  3478. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.ui.xml#Keyboard" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Keyboard</linktext></link></related-links></apiValue><apiValue id="flash.display:NativeMenuItem:keyEquivalent: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 ">keyEquivalent</apiName><shortdesc class="- topic/shortdesc ">
  3479. The key equivalent for this menu item.</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="1.0" 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 ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3480. The key equivalent for this menu item.
  3481. <p class="- topic/p ">Set the <codeph class="+ topic/ph pr-d/codeph ">keyEquivalent</codeph> with a lowercase letter to assign
  3482. a shortcut without a Shift-key modifier. Set with an uppercase letter
  3483. to assign a shortcut with the Shift-key modifier.</p>
  3484. <p class="- topic/p ">By default, a key equivalent modifier (Ctrl on Windows or Linux and
  3485. Command on Mac OS X) is included as part of the key equivalent.
  3486. If you want the key equivalent to be a key with no modifier,
  3487. set the <codeph class="+ topic/ph pr-d/codeph ">keyEquivalentModifiers</codeph> property to an
  3488. empty array.</p>
  3489. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:label: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 ">label</apiName><shortdesc class="- topic/shortdesc ">
  3490. The display string of this menu item.</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="1.0" 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 ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3491. The display string of this menu item.
  3492. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:menu: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 ">menu</apiName><shortdesc class="- topic/shortdesc ">
  3493. The menu that contains this item.</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="1.0" 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.display:NativeMenu</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3494. The menu that contains this item.
  3495. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:mnemonicIndex: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 ">mnemonicIndex</apiName><shortdesc class="- topic/shortdesc ">
  3496. The position of the mnemonic character in the menu item label.</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="1.0" 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 ">int</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3497. The position of the mnemonic character in the menu item label.
  3498. <p class="- topic/p ">The character at the specified position is the mnemonic
  3499. character for the menu item. The index is zero-based, so the first
  3500. character has an index of 0.</p>
  3501. <p class="- topic/p ">This property is ignored on operating systems that do not use
  3502. menu mnemonics.</p>
  3503. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem: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 ">
  3504. The name of this menu item.</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="1.0" 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 ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3505. The name of this menu item.
  3506. <p class="- topic/p ">The name value is not displayed and can be used as a
  3507. locale-independent identifier. A name is not assigned automatically.</p>
  3508. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenuItem:submenu: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 ">submenu</apiName><shortdesc class="- topic/shortdesc ">
  3509. The submenu associated with this menu item.</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="1.0" 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:NativeMenu</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3510. The submenu associated with this menu item.
  3511. <p class="- topic/p ">Assigning a NativeMenu object to this property changes the
  3512. appearance and behavior of the menu item. A submenu item displays
  3513. the submenu icon and no longer dispatches select events.</p>
  3514. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Adding a menu as a submenu of itself (in a circular reference)
  3515. can cause an application to hang.</p>
  3516. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#NativeMenu/addSubmenu()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeMenu.addSubmenu()</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:NativeMenu" 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 ">NativeMenu</apiName><shortdesc class="- topic/shortdesc ">
  3517. The NativeMenu class contains methods and properties for defining native menus.</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="1.0" 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 ">
  3518. The NativeMenu class contains methods and properties for defining native menus.
  3519. <p class="- topic/p "><i class="+ topic/ph hi-d/i ">AIR profile support:</i> This feature is supported
  3520. on all desktop operating systems, but is not supported on mobile devices or AIR for TV devices. You can test
  3521. for support at run time using the <codeph class="+ topic/ph pr-d/codeph ">NativeMenu.isSupported</codeph> property. See
  3522. <xref href="http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb46b82f-8000.html" class="- topic/xref ">
  3523. AIR Profile Support</xref> for more information regarding API support across multiple profiles.</p>
  3524. <p class="- topic/p ">A native menu is a menu that is controlled and drawn by the operating system rather than by your application.
  3525. AIR supports the following types of native menus:</p>
  3526. <ul class="- topic/ul "><li class="- topic/li "><b class="+ topic/ph hi-d/b ">Application menus</b> are supported on OS X. Use the <codeph class="+ topic/ph pr-d/codeph ">NativeApplication.supportsMenu</codeph> property to test whether
  3527. application menus are supported on the host operating system. An application menu is displayed on the Menu bar at the top of the
  3528. Mac desktop. OS X provides a default menu for every application, but many of the menu commands are not functional. You can add
  3529. event listeners to the default items, replace individual menus and items, or even replace the default menu entirely.
  3530. Access the application menu object using the NativeApplication <codeph class="+ topic/ph pr-d/codeph ">menu</codeph> property.</li><li class="- topic/li "><b class="+ topic/ph hi-d/b ">Window menus</b> are supported on Windows and Linux. Use the <codeph class="+ topic/ph pr-d/codeph ">NativeWindow.supportsMenu</codeph> property to
  3531. test whether window menus are supported on the host operating system. A window menu is displayed below the window title bar. The area
  3532. occupied by the menu is not part of the window stage. Applications cannot draw into this area. Assign a menu to a window using the
  3533. NativeWindow <codeph class="+ topic/ph pr-d/codeph ">menu</codeph> property.</li><li class="- topic/li "><b class="+ topic/ph hi-d/b ">Dock icon menus</b> are supported on OS X. Use the <codeph class="+ topic/ph pr-d/codeph ">NativeApplication.supportsDockIcon</codeph> property to test whether
  3534. dock icons are supported on the host operating system. Items in a dock icon menu are displayed above the default items provided by
  3535. the operating system. The default items cannot be accessed by application code. Assign a menu to the <codeph class="+ topic/ph pr-d/codeph ">menu</codeph> property of
  3536. the application's DockIcon object.</li><li class="- topic/li "><b class="+ topic/ph hi-d/b ">System tray icon menus</b> are supported on Windows and most Linux operating systems. Use the
  3537. <codeph class="+ topic/ph pr-d/codeph ">NativeApplication.supportsSystemTrayIcon</codeph> property to test whether system tray icons are supported on the host
  3538. operating system. A system tray icon menu is displayed in response to a right-click on the icon, in much the same fashion as
  3539. a context menu. Assign a menu to the <codeph class="+ topic/ph pr-d/codeph ">menu</codeph> property of the application's SystemTrayIcon object.</li><li class="- topic/li "><b class="+ topic/ph hi-d/b ">Context menus</b> are supported on all operating systems. Context menus are displayed in response to a user interface event,
  3540. such as a right-click or a command-click on an InteractiveObject displayed in the application. The UI mechanism for showing the menu
  3541. varies by host operating system and hardware. Assign a menu to the <codeph class="+ topic/ph pr-d/codeph ">contextMenu</codeph> property of an
  3542. InteractiveObject. In AIR, a context menu can be created with either the NativeMenu class or the ContextMenu class. In
  3543. Flash Player, only the ContextMenu class can be used. ContextMenus in AIR do not have built-in items; a default context menu is
  3544. not displayed.</li><li class="- topic/li "><b class="+ topic/ph hi-d/b ">Pop-up menus</b> are supported on all operating systems. Pop-up menus are functionally the same as context menus, but
  3545. are displayed using the menu <codeph class="+ topic/ph pr-d/codeph ">display()</codeph> method rather than as a response to a user interface event. A pop-up
  3546. menu is not attached to any other object. Simply create the native menu and call the <codeph class="+ topic/ph pr-d/codeph ">display()</codeph> method.</li></ul>
  3547. <p class="- topic/p ">A menu object contains menu items. A menu item can represent a command, a submenu, or a separator line.
  3548. Add menu items to a menu using the <codeph class="+ topic/ph pr-d/codeph ">addItem()</codeph> or <codeph class="+ topic/ph pr-d/codeph ">addItemAt()</codeph> method. The display order of the menu items
  3549. matches the order of the items in the menu's <codeph class="+ topic/ph pr-d/codeph ">items</codeph> array.</p>
  3550. <p class="- topic/p ">To create a submenu, add a menu item to the parent menu object. Assign the menu object representing
  3551. the submenu to the <codeph class="+ topic/ph pr-d/codeph ">submenu</codeph> property of the matching menu item in the parent menu.</p>
  3552. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The root menu of window and application menus must contain only submenu items; items
  3553. that do not represent submenus may not be displayed and are contrary to user expectation for
  3554. these types of menus.</p>
  3555. <p class="- topic/p ">Menus dispatch <codeph class="+ topic/ph pr-d/codeph ">select</codeph> events when a command item in the menu or one of its
  3556. submenus is selected. (Submenu and separator items are not selectable.) The
  3557. <codeph class="+ topic/ph pr-d/codeph ">target</codeph> property of the event object references the
  3558. selected item.</p>
  3559. <p class="- topic/p ">Menus dispatch <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> events just before the menu is displayed and when a key equivalent attached
  3560. to one of the items in the menu is pressed. You
  3561. can use this event to update the contents of the menu based on the current
  3562. state of the application.</p>
  3563. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> If you are using the Flex Framework, consider using the FlexNativeMenu class.
  3564. It is typically easier to define menus declaratively in MXML than it is to write ActionScript code to create the menu
  3565. structure item-by-item.</p>
  3566. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InteractiveObject/contextMenu" class="- topic/link "><linktext class="- topic/linktext ">flash.display.InteractiveObject.contextMenu</linktext></link><link href="flash.display.xml#NativeMenuItem" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeMenuItem</linktext></link><link href="flash.display.xml#NativeWindow/menu" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeWindow.menu</linktext></link><link href="flash.desktop.xml#DockIcon" class="- topic/link "><linktext class="- topic/linktext ">flash.desktop.DockIcon</linktext></link><link href="flash.desktop.xml#SystemTrayIcon" class="- topic/link "><linktext class="- topic/linktext ">flash.desktop.SystemTrayIcon</linktext></link><link href="flash.desktop.xml#NativeApplication/menu" class="- topic/link "><linktext class="- topic/linktext ">flash.desktop.NativeApplication.menu</linktext></link><link href="flash.desktop.xml#NativeApplication/icon" class="- topic/link "><linktext class="- topic/linktext ">flash.desktop.NativeApplication.icon</linktext></link><link href="" invalidHref="mx.controls.FlexNativeMenu.xml" class="- topic/link "><linktext class="- topic/linktext ">mx.controls.FlexNativeMenu</linktext></link></related-links><adobeApiEvent id="flash.display:NativeMenu_flash.events.Event.PREPARING_preparing" 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 ">preparing</apiName><shortdesc class="- topic/shortdesc ">
  3567. Dispatched by the NativeMenu object when a key equivalent is pressed and immediately before the menu 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.6" 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.PREPARING</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 ">
  3568. Dispatched by the NativeMenu object when a key equivalent is pressed and immediately before the menu is displayed.
  3569. <p class="- topic/p ">Listen to this event to update the menu either before it is displayed, or when a key
  3570. equivalent is pressed by the user. The <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event is dispatched before the key equivalent
  3571. is fully evaluated. You can enable, disable, add, or remove items from the menu in the <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event handler
  3572. and those changes will be in effect when the key equivalent is processed. For example, if you remove or disable the
  3573. menu item assigned to the triggering key equivalent, then the sequence of events is effectively canceled
  3574. and no <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event is dispatched.
  3575. A <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event is also dispatched by the items in a menu. </p>
  3576. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event supersedes the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event and provides additional functionality. Listen for the
  3577. <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event or the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event, but not both. </p>
  3578. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:NativeMenu_flash.events.Event.DISPLAYING_displaying" 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 ">displaying</apiName><shortdesc class="- topic/shortdesc ">
  3579. Dispatched by this NativeMenu object immediately before the
  3580. menu 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="1.0" 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.DISPLAYING</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 ">
  3581. Dispatched by this NativeMenu object immediately before the
  3582. menu is displayed.
  3583. <p class="- topic/p ">Listen to this event to update the menu before it is displayed.
  3584. A <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event is also dispatched by the items in a menu.</p>
  3585. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event supersedes the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event and provides additional functionality. Listen for the
  3586. <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event or the <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event, but not both. </p>
  3587. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> On Mac OS X, prior to AIR 2.6, menus and menu items dispatched a <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph> event when the user pressed a key
  3588. equivalent. (This event was not dispatched for key equivalent interaction on other operating systems.) As of AIR 2.6, <codeph class="+ topic/ph pr-d/codeph ">displaying</codeph>
  3589. events are no longer dispatched when the user presses a key equivalent. Use the <codeph class="+ topic/ph pr-d/codeph ">preparing</codeph> event instead.</p>
  3590. </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.display:NativeMenu_flash.events.Event.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 ">
  3591. Dispatched by this NativeMenu object when one of its menu items or an item
  3592. in one of its descendant submenus is selected.</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="1.0" 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.SELECT</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 ">
  3593. Dispatched by this NativeMenu object when one of its menu items or an item
  3594. in one of its descendant submenus is selected.
  3595. <p class="- topic/p ">A <codeph class="+ topic/ph pr-d/codeph ">select</codeph> event <i class="+ topic/ph hi-d/i ">bubbles</i> from a menu item to its containing menu and on up
  3596. through the parent menu chain to the root menu object. The <codeph class="+ topic/ph pr-d/codeph ">target</codeph>
  3597. property of the event object references the selected NativeMenuItem object;
  3598. the <codeph class="+ topic/ph pr-d/codeph ">currentTarget</codeph> property references this NativeMenu object.</p>
  3599. </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.display:NativeMenu:NativeMenu" 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 ">NativeMenu</apiName><shortdesc class="- topic/shortdesc ">
  3600. Creates a new NativeMenu 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="1.0" 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 ">
  3601. Creates a new NativeMenu object.
  3602. </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.display:NativeMenu:addItemAt" 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 ">addItemAt</apiName><shortdesc class="- topic/shortdesc ">
  3603. Inserts a menu item at the specified position.</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="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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If <codeph class="+ topic/ph pr-d/codeph ">item</codeph> is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
  3604. </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 ">If <codeph class="+ topic/ph pr-d/codeph ">item</codeph> is a member of another menu.
  3605. </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 ">If the index is outside the bounds of the menu's
  3606. <codeph class="+ topic/ph pr-d/codeph ">items</codeph> array.
  3607. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">item</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object to insert.
  3608. </apiDesc></apiParam><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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The (zero-based) position in menu
  3609. at which to insert the menu item.
  3610. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Adding an item to a menu can cause an application to hang if the item's
  3611. submenu is set to the menu itself (causing a circular reference).</p>
  3612. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3613. Inserts a menu item at the specified position. The position is indexed from the top.
  3614. Set the <codeph class="+ topic/ph pr-d/codeph ">index</codeph> parameter to zero to insert the item at the top of the menu.
  3615. All types of menus: window, application, system tray icon, dock icon, context, and pop-up,
  3616. index the menu position from the top.
  3617. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:addItem" 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 ">addItem</apiName><shortdesc class="- topic/shortdesc ">
  3618. Adds a menu item at the bottom of the menu.</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="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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If <codeph class="+ topic/ph pr-d/codeph ">item</codeph> is <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.
  3619. </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 ">If <codeph class="+ topic/ph pr-d/codeph ">item</codeph> is a member of another menu.
  3620. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">item</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object to add at the bottom of the menu.
  3621. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3622. Adds a menu item at the bottom of the menu.
  3623. <p class="- topic/p ">When creating a context menu, you can add either NativeMenuItem or
  3624. ContextMenuItem objects. However, it is advisable to use only one type of object in a context
  3625. menu so that all items in the menu have the same properties.</p>
  3626. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Adding an item to a menu can cause an application to hang if the item's
  3627. submenu is set to the menu itself (causing a circular reference).</p>
  3628. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:addSubmenuAt" 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 ">addSubmenuAt</apiName><shortdesc class="- topic/shortdesc ">
  3629. Adds a submenu to the menu by inserting a new menu item at the
  3630. specified position.</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="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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object created for the submenu.
  3631. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">submenu</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenu</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenu object that defines the submenu to be added.
  3632. </apiDesc></apiParam><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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The position in the <codeph class="+ topic/ph pr-d/codeph ">items</codeph> array of this
  3633. menu at which to insert the menu item to be added.
  3634. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">label</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The display label for the menu item to be added.
  3635. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3636. Adds a submenu to the menu by inserting a new menu item at the
  3637. specified position.
  3638. <p class="- topic/p ">Calling the <codeph class="+ topic/ph pr-d/codeph ">addSubMenuAt()</codeph> method is equivalent to creating a new menu
  3639. item, inserting it at the desired position in the menu, and assigning
  3640. a NativeMenu object to the item's <codeph class="+ topic/ph pr-d/codeph ">submenu</codeph> property.</p>
  3641. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Adding a menu as a submenu of itself (in a circular reference)
  3642. can cause an application to hang.</p>
  3643. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:addSubmenu" 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 ">addSubmenu</apiName><shortdesc class="- topic/shortdesc ">
  3644. Adds a submenu to the menu by inserting a new menu item.</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="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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object created for the submenu.
  3645. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">submenu</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenu</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenu object that defines the submenu to be added.
  3646. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">label</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The display label for the menu item to be added.
  3647. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3648. Adds a submenu to the menu by inserting a new menu item.
  3649. <p class="- topic/p ">Calling the <codeph class="+ topic/ph pr-d/codeph ">addSubMenu()</codeph> method is equivalent to creating a new menu
  3650. item, adding it to the menu, and assigning a NativeMenu object to the
  3651. item's <codeph class="+ topic/ph pr-d/codeph ">submenu</codeph> property.</p>
  3652. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Adding a menu as a submenu of itself (in a circular reference)
  3653. can cause an application to hang.</p>
  3654. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:clone" 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 ">clone</apiName><shortdesc class="- topic/shortdesc ">
  3655. Creates a copy of the menu and all items.</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="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 "><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenu</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3656. Creates a copy of the menu and all items.
  3657. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:containsItem" 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 ">containsItem</apiName><shortdesc class="- topic/shortdesc ">
  3658. Reports whether this menu contains the specified menu item.</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="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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc "><codeph class="+ topic/ph pr-d/codeph ">true</codeph> if <codeph class="+ topic/ph pr-d/codeph ">item</codeph> is in this menu.
  3659. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">item</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object to look up.
  3660. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3661. Reports whether this menu contains the specified menu item.
  3662. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:display" 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 ">display</apiName><shortdesc class="- topic/shortdesc ">
  3663. Pops up this menu at the specified 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="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><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">stage</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:Stage</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The Stage object on which to display this menu.
  3664. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">stageX</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The number of horizontal pixels, relative to the origin
  3665. of stage, at which to display this menu.
  3666. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">stageY</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The number of vertical pixels, relative to the origin
  3667. of stage, at which to display this menu.
  3668. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3669. Pops up this menu at the specified location.
  3670. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:getItemAt" 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 ">getItemAt</apiName><shortdesc class="- topic/shortdesc ">
  3671. Gets the menu item at the specified index.</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="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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If <codeph class="+ topic/ph pr-d/codeph ">index</codeph> is outside the bounds of the menu's
  3672. <codeph class="+ topic/ph pr-d/codeph ">items</codeph> array.
  3673. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object at the specified position in the menu.
  3674. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The (zero-based) position of the item to return.
  3675. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3676. Gets the menu item at the specified index.
  3677. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:getItemByName" 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 ">getItemByName</apiName><shortdesc class="- topic/shortdesc ">
  3678. Gets the menu item with the specified name.</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="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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object with the specified name or
  3679. <codeph class="+ topic/ph pr-d/codeph ">null</codeph>, if no such item exists in the menu.
  3680. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The string to look up.
  3681. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3682. Gets the menu item with the specified name.
  3683. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The <codeph class="+ topic/ph pr-d/codeph ">name</codeph> property of menu items is not assigned by
  3684. default.</p>
  3685. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:getItemIndex" 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 ">getItemIndex</apiName><shortdesc class="- topic/shortdesc ">
  3686. Gets the position of the specified item.</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="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 "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The (zero-based) position of the specified item in this menu
  3687. or <codeph class="+ topic/ph pr-d/codeph ">-1</codeph>, if the item is not in this menu.
  3688. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">item</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object to look up.
  3689. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3690. Gets the position of the specified item.
  3691. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:removeAllItems" 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 ">removeAllItems</apiName><shortdesc class="- topic/shortdesc ">
  3692. Removes all items from the menu.</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="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 ">
  3693. Removes all items from the menu.
  3694. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:removeItemAt" 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 ">removeItemAt</apiName><shortdesc class="- topic/shortdesc ">
  3695. Removes and returns the menu item at the specified index.</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="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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If <codeph class="+ topic/ph pr-d/codeph ">index</codeph> is outside the bounds of
  3696. this menu's <codeph class="+ topic/ph pr-d/codeph ">items</codeph> array.
  3697. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object removed.
  3698. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The (zero-based) position of the item to remove.
  3699. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3700. Removes and returns the menu item at the specified index.
  3701. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:removeItem" 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 ">removeItem</apiName><shortdesc class="- topic/shortdesc ">
  3702. Removes the specified menu item.</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="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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If the <codeph class="+ topic/ph pr-d/codeph ">item</codeph> is not in this menu
  3703. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">item</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object to remove from this menu.
  3704. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3705. Removes the specified menu item.
  3706. </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.display:NativeMenu:setItemIndex" 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 ">setItemIndex</apiName><shortdesc class="- topic/shortdesc ">
  3707. Moves a menu item to the specified position.</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="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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If <codeph class="+ topic/ph pr-d/codeph ">index</codeph> is outside the bounds of the
  3708. menu's <codeph class="+ topic/ph pr-d/codeph ">items</codeph> array.
  3709. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</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 ">item</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:NativeMenuItem</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The NativeMenuItem object to move.
  3710. </apiDesc></apiParam><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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The (zero-based) position in the menu to which to move the
  3711. <codeph class="+ topic/ph pr-d/codeph ">item</codeph>.
  3712. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3713. Moves a menu item to the specified position. If the item is not already in the menu,
  3714. calling this method adds the item to the menu.
  3715. </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.display:NativeMenu: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 ">
  3716. Indicates whether any form of native menu is supported on the client 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="AIR" version="2.0" class="+ topic/ph adobe-api-d/apiPlatform "/></apiVersion></asMetadata><asCustoms class="+ topic/metadata adobe-api-d/asCustoms "><supportsMenu>
  3717. </supportsMenu></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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3718. Indicates whether any form of native menu is supported on the client system.
  3719. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#NativeWindow/supportsMenu" class="- topic/link "><linktext class="- topic/linktext ">flash.display.NativeWindow.supportsMenu</linktext></link><link href="flash.desktop.xml#NativeApplication" class="- topic/link "><linktext class="- topic/linktext ">flash.desktop.NativeApplication</linktext></link></related-links></apiValue><apiValue id="flash.display:NativeMenu:items: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 ">items</apiName><shortdesc class="- topic/shortdesc ">
  3720. The array of NativeMenuItem objects in this menu.</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="1.0" 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 ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3721. The array of NativeMenuItem objects in this menu.
  3722. <p class="- topic/p ">The array is sorted in display order.</p>
  3723. <p class="- topic/p "><i class="+ topic/ph hi-d/i ">Note:</i> This property is read-only in AIR 1.0. It became read/write in AIR 1.1.</p>
  3724. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenu:numItems: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 ">numItems</apiName><shortdesc class="- topic/shortdesc ">
  3725. The number of NativeMenuItem objects in this menu.</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="1.0" 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 ">
  3726. The number of NativeMenuItem objects in this menu.
  3727. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:NativeMenu:parent: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 ">parent</apiName><shortdesc class="- topic/shortdesc ">
  3728. The parent menu.</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="1.0" 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.display:NativeMenu</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3729. The parent menu.
  3730. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">parent</codeph> of the root (top-level) menu object is
  3731. <codeph class="+ topic/ph pr-d/codeph ">null</codeph>.</p>
  3732. </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:StageOrientation" 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 ">StageOrientation</apiName><shortdesc class="- topic/shortdesc ">
  3733. The StageOrientation class defines constants enumerating the possible orientations of the stage and 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" 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 ">The StageOrientation class provides values for the orientation property of the Stage
  3734. class and for other properties and methods where Stage orientation is referenced.
  3735. </apiTipText></apiTipTexts><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3736. The StageOrientation class defines constants enumerating the possible orientations of the stage and the device.
  3737. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Stage/orientation" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Stage.orientation</linktext></link><link href="flash.display.xml#Stage/setOrientation()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Stage.setOrientation()</linktext></link><link href="flash.display.xml#Stage/deviceOrientation" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Stage.deviceOrientation</linktext></link><link href="flash.events.xml#StageOrientationEvent/afterOrientation" class="- topic/link "><linktext class="- topic/linktext ">flash.events.StageOrientationEvent.afterOrientation</linktext></link><link href="flash.events.xml#StageOrientationEvent/beforeOrientation" class="- topic/link "><linktext class="- topic/linktext ">flash.events.StageOrientationEvent.beforeOrientation</linktext></link></related-links><apiValue id="flash.display:StageOrientation:DEFAULT" 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 ">DEFAULT</apiName><shortdesc class="- topic/shortdesc ">
  3738. Specifies that the stage is currently in the default orientation of the device (right-side up).</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 "><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 ">default</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3739. Specifies that the stage is currently in the default orientation of the device (right-side up).
  3740. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:StageOrientation:ROTATED_LEFT" 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 ">ROTATED_LEFT</apiName><shortdesc class="- topic/shortdesc ">
  3741. Specifies that the stage is currently rotated left relative to the default orientation.</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 "><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 ">rotatedLeft</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3742. Specifies that the stage is currently rotated left relative to the default orientation.
  3743. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> When the orientation of the device is rotated left, the orientation of the
  3744. stage must be rotated right in order to remain upright.</p>
  3745. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:StageOrientation:ROTATED_RIGHT" 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 ">ROTATED_RIGHT</apiName><shortdesc class="- topic/shortdesc ">
  3746. Specifies that the stage is currently rotated right relative to the default orientation.</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 "><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 ">rotatedRight</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3747. Specifies that the stage is currently rotated right relative to the default orientation.
  3748. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> When the orientation of the device is rotated right, the orientation of the
  3749. stage must be rotated left in order to remain upright.</p>
  3750. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:StageOrientation:UNKNOWN" 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 ">UNKNOWN</apiName><shortdesc class="- topic/shortdesc ">
  3751. Specifies that the device has not determined an orientation.</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 "><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 ">unknown</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3752. Specifies that the device has not determined an orientation. This state can occur when
  3753. the device is lying flat on a table and also while the application is initializing.
  3754. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:StageOrientation:UPSIDE_DOWN" 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 ">UPSIDE_DOWN</apiName><shortdesc class="- topic/shortdesc ">
  3755. Specifies that the stage is currently upside down relative to the default orientation.</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 "><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 ">upsideDown</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3756. Specifies that the stage is currently upside down relative to the default orientation.
  3757. </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:DisplayObjectContainer" 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 ">DisplayObjectContainer</apiName><shortdesc class="- topic/shortdesc ">
  3758. The DisplayObjectContainer class is the base class for all objects that can serve as display object containers on
  3759. the display list.</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 "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">The abstract base class for all display objects that can contain child objects.
  3760. </apiTipText></apiTipTexts><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.display:InteractiveObject</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3761. The DisplayObjectContainer class is the base class for all objects that can serve as display object containers on
  3762. the display list. The display list manages all objects displayed in the Flash runtimes.
  3763. Use the DisplayObjectContainer class to arrange the display objects in the display list.
  3764. Each DisplayObjectContainer object has its own child list for organizing the z-order of the objects.
  3765. The z-order is the front-to-back order that determines which object is drawn in front, which is behind,
  3766. and so on.
  3767. <p class="- topic/p ">DisplayObject is an abstract base class; therefore, you cannot call DisplayObject directly. Invoking
  3768. <codeph class="+ topic/ph pr-d/codeph ">new DisplayObject()</codeph> throws an <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception.</p>
  3769. The DisplayObjectContainer class is an abstract base class for all objects that can contain child objects.
  3770. It cannot be instantiated directly; calling the <codeph class="+ topic/ph pr-d/codeph ">new DisplayObjectContainer()</codeph> constructor
  3771. throws an <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception.
  3772. <p class="- topic/p ">For more information, see the "Display Programming" chapter of the <i class="+ topic/ph hi-d/i ">ActionScript 3.0 Developer's Guide</i>.</p>
  3773. </apiDesc><example conref="examples\DisplayObjectContainerExample.as" class="- topic/example "> The following example uses the class <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainerExample</codeph> to
  3774. create five orange squares in succession. This task is accomplished by performing the following steps:
  3775. <ol class="- topic/ol "><li class="- topic/li ">The constructor calls the <codeph class="+ topic/ph pr-d/codeph ">configureAssets()</codeph> method.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">configureAssets()</codeph> method creates <codeph class="+ topic/ph pr-d/codeph ">child</codeph> and
  3776. <codeph class="+ topic/ph pr-d/codeph ">lastChild</codeph> Sprite objects.</li><li class="- topic/li ">A <codeph class="+ topic/ph pr-d/codeph ">for</codeph> loop creates the five orange squares and positions
  3777. them one after another.</li><li class="- topic/li ">Each time a CustomSprite object is created, its constructor calls the <codeph class="+ topic/ph pr-d/codeph ">draw()</codeph>
  3778. method of the <codeph class="+ topic/ph pr-d/codeph ">CustomSprite</codeph> object, which creates a 50-by-50-pixel square
  3779. by calling the <codeph class="+ topic/ph pr-d/codeph ">beginFill()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">drawRect()</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">endFill()</codeph>
  3780. methods of the Graphics class. The <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> method adds each square to the
  3781. display list.</li></ol>
  3782. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3783. package {
  3784. import flash.display.DisplayObject;
  3785. import flash.display.Sprite;
  3786. public class DisplayObjectContainerExample extends Sprite {
  3787. private var gutter:uint = 5;
  3788. private var childCount:uint = 5;
  3789. public function DisplayObjectContainerExample() {
  3790. configureAssets();
  3791. }
  3792. private function configureAssets():void {
  3793. var child:Sprite = new CustomSprite();
  3794. var lastChild:Sprite = child;
  3795. for (var i:uint = 1; i &lt;= childCount; i++) {
  3796. child = new CustomSprite();
  3797. child.x = lastChild.x + lastChild.width + gutter;
  3798. addChild(child);
  3799. lastChild = child;
  3800. }
  3801. }
  3802. }
  3803. }
  3804. import flash.display.Sprite;
  3805. class CustomSprite extends Sprite {
  3806. private var size:uint = 50;
  3807. private var bgColor:uint = 0xFFCC00;
  3808. public function CustomSprite() {
  3809. draw(size, size);
  3810. }
  3811. private function draw(w:uint, h:uint):void {
  3812. graphics.beginFill(bgColor);
  3813. graphics.drawRect(0, 0, w, h);
  3814. graphics.endFill();
  3815. }
  3816. }
  3817. </codeblock></example></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject</linktext></link></related-links><apiConstructor id="flash.display:DisplayObjectContainer:DisplayObjectContainer" 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 ">DisplayObjectContainer</apiName><shortdesc class="- topic/shortdesc ">
  3818. Calling the new DisplayObjectContainer() constructor throws an
  3819. ArgumentError exception.</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 "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3820. Calling the <codeph class="+ topic/ph pr-d/codeph ">new DisplayObjectContainer()</codeph> constructor throws an
  3821. <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception. You <i class="+ topic/ph hi-d/i ">can</i>, however, call constructors for
  3822. the following subclasses of DisplayObjectContainer:
  3823. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new Loader()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new Sprite()</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">new MovieClip()</codeph></li></ul>
  3824. </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.display:DisplayObjectContainer:addChildAt" 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 ">addChildAt</apiName><shortdesc class="- topic/shortdesc ">
  3825. Adds a child DisplayObject instance to this DisplayObjectContainer
  3826. instance.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the index position does not exist in the child list.
  3827. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the child is the same as the parent. Also throws if
  3828. the caller is a child (or grandchild etc.) of the child being added.
  3829. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance that you pass in the
  3830. <codeph class="+ topic/ph pr-d/codeph ">child</codeph> parameter.
  3831. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">child</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance to add as a child of this
  3832. DisplayObjectContainer instance.
  3833. </apiDesc></apiParam><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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index position to which the child is added. If you specify a
  3834. currently occupied index position, the child object that exists at that position and all
  3835. higher positions are moved up one position in the child list.
  3836. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Adds a child object to this DisplayObjectContainer instance.
  3837. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3838. Adds a child DisplayObject instance to this DisplayObjectContainer
  3839. instance. The child is added
  3840. at the index position specified. An index of 0 represents the back (bottom)
  3841. of the display list for this DisplayObjectContainer object.
  3842. <p class="- topic/p ">For example, the following example shows three display objects, labeled a, b, and c, at
  3843. index positions 0, 2, and 1, respectively:</p>
  3844. <p class="- topic/p "><adobeimage alt="b over c over a" href="../../images/DisplayObjectContainer_layers.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  3845. <p class="- topic/p ">If you add a child object that already has a different display object container as
  3846. a parent, the object is removed from the child list of the other display object container. </p>
  3847. </apiDesc><example conref="examples\DisplayObjectContainer.addChildAt.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">container</codeph> display object container and
  3848. adds a display objects <codeph class="+ topic/ph pr-d/codeph ">circle1</codeph> to its display list. Then, by calling
  3849. <codeph class="+ topic/ph pr-d/codeph ">container.addChildAt(circle2, 0)</codeph>, it adds the <codeph class="+ topic/ph pr-d/codeph ">circle2</codeph> object to index position
  3850. zero (the back), and moves the <codeph class="+ topic/ph pr-d/codeph ">circle1</codeph> object to index position 1:
  3851. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3852. import flash.display.Sprite;
  3853. var container:Sprite = new Sprite();
  3854. var circle1:Sprite = new Sprite();
  3855. var circle2:Sprite = new Sprite();
  3856. container.addChild(circle1);
  3857. container.addChildAt(circle2, 0);
  3858. trace(container.getChildAt(0) == circle2); // true
  3859. trace(container.getChildAt(1) == circle1); // true
  3860. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/addChild()" class="- topic/link "><linktext class="- topic/linktext ">addChild()</linktext></link></related-links><adobeApiEvent id="flash.display:DisplayObjectContainer:addChildAt_added" 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 ">added</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 display object is added to the display list.
  3861. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when a display object is added to the display list.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:addChild" 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 ">addChild</apiName><shortdesc class="- topic/shortdesc ">
  3862. Adds a child DisplayObject instance to this DisplayObjectContainer instance.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the child is the same as the parent. Also throws if
  3863. the caller is a child (or grandchild etc.) of the child being added.
  3864. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance that you pass in the
  3865. <codeph class="+ topic/ph pr-d/codeph ">child</codeph> parameter.
  3866. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">child</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance to add as a child of this DisplayObjectContainer instance.
  3867. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Adds a child object to this DisplayObjectContainer instance.
  3868. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3869. Adds a child DisplayObject instance to this DisplayObjectContainer instance. The child is added
  3870. to the front (top) of all other children in this DisplayObjectContainer instance. (To add a child to a
  3871. specific index position, use the <codeph class="+ topic/ph pr-d/codeph ">addChildAt()</codeph> method.)
  3872. <p class="- topic/p ">If you add a child object that already has a different display object container as
  3873. a parent, the object is removed from the child list of the other display object container. </p>
  3874. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> The command <codeph class="+ topic/ph pr-d/codeph ">stage.addChild()</codeph> can cause problems with a published SWF file,
  3875. including security problems and conflicts with other loaded SWF files. There is only one Stage within a Flash runtime instance,
  3876. no matter how many SWF files you load into the runtime. So, generally, objects
  3877. should not be added to the Stage, directly, at all. The only object the Stage should
  3878. contain is the root object. Create a DisplayObjectContainer to contain all of the items on the
  3879. display list. Then, if necessary, add that DisplayObjectContainer instance to the Stage.</p>
  3880. </apiDesc><example conref="examples\DisplayObjectContainer.numChildren.1.as" class="- topic/example "> The following example sets up two Sprite objects named <codeph class="+ topic/ph pr-d/codeph ">container1</codeph> and
  3881. <codeph class="+ topic/ph pr-d/codeph ">container2</codeph>. A Sprite is a type of display object container. The example calls the
  3882. <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> method to set up the display hierarchy: <codeph class="+ topic/ph pr-d/codeph ">container1</codeph> is a child of
  3883. <codeph class="+ topic/ph pr-d/codeph ">container2</codeph>, and two other display objects, <codeph class="+ topic/ph pr-d/codeph ">circle1</codeph> and <codeph class="+ topic/ph pr-d/codeph ">circle2</codeph>,
  3884. are children of <codeph class="+ topic/ph pr-d/codeph ">container1</codeph>. The calls to the <codeph class="+ topic/ph pr-d/codeph ">trace()</codeph> method show the number
  3885. of children of each object. Note that grandchildren are not included in the <codeph class="+ topic/ph pr-d/codeph ">numChildren</codeph> count:
  3886. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3887. import flash.display.Sprite;
  3888. var container1:Sprite = new Sprite();
  3889. var container2:Sprite = new Sprite();
  3890. var circle1:Sprite = new Sprite();
  3891. circle1.graphics.beginFill(0xFFCC00);
  3892. circle1.graphics.drawCircle(40, 40, 40);
  3893. var circle2:Sprite = new Sprite();
  3894. circle2.graphics.beginFill(0x00CCFF);
  3895. circle2.graphics.drawCircle(80, 40, 40);
  3896. container2.addChild(container1);
  3897. container1.addChild(circle1);
  3898. container1.addChild(circle2);
  3899. trace(container1.numChildren); // 2
  3900. trace(container2.numChildren); // 1
  3901. trace(circle1.numChildren); // 0
  3902. trace(circle2.numChildren); // 0
  3903. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/addChildAt()" class="- topic/link "><linktext class="- topic/linktext ">addChildAt()</linktext></link></related-links><adobeApiEvent id="flash.display:DisplayObjectContainer:addChild_added" 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 ">added</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 display object is added to the display list.
  3904. </apiDesc></adobeApiEventDetail><shortdesc class="- topic/shortdesc ">Dispatched when a display object is added to the display list.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:areInaccessibleObjectsUnderPoint" 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 ">areInaccessibleObjectsUnderPoint</apiName><shortdesc class="- topic/shortdesc ">
  3905. Indicates whether the security restrictions
  3906. would cause any display objects to be omitted from the list returned by calling
  3907. the DisplayObjectContainer.getObjectsUnderPoint() method
  3908. with the specified point point.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc "><codeph class="+ topic/ph pr-d/codeph ">true</codeph> if the point contains child display objects with security restrictions.
  3909. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">point</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The point under which to look.
  3910. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3911. Indicates whether the security restrictions
  3912. would cause any display objects to be omitted from the list returned by calling
  3913. the <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.getObjectsUnderPoint()</codeph> method
  3914. with the specified <codeph class="+ topic/ph pr-d/codeph ">point</codeph> point. By default, content from one domain cannot
  3915. access objects from another domain unless they are permitted to do so with a call to the
  3916. <codeph class="+ topic/ph pr-d/codeph ">Security.allowDomain()</codeph> method. For more information, related to security,
  3917. see the Flash Player Developer Center Topic:
  3918. <xref href="http://www.adobe.com/go/devnet_security_en" scope="external" class="- topic/xref ">Security</xref>.
  3919. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">point</codeph> parameter is in the coordinate space of the Stage,
  3920. which may differ from the coordinate space of the display object container (unless the
  3921. display object container is the Stage). You can use the <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> and
  3922. the <codeph class="+ topic/ph pr-d/codeph ">localToGlobal()</codeph> methods to convert points between these coordinate
  3923. spaces.</p>
  3924. </apiDesc><example conref="examples\DisplayObjectContainer.areInaccessibleObjectsUnderPoint.as" class="- topic/example "> The following code creates a display object container named <codeph class="+ topic/ph pr-d/codeph ">container</codeph>.
  3925. The next block of code uses a Loader object to load a JPEG file named "test.jpg" from a remote file server.
  3926. Note that the <codeph class="+ topic/ph pr-d/codeph ">checkPolicyFile</codeph> property of the LoaderContext object used as a parameter in the
  3927. <codeph class="+ topic/ph pr-d/codeph ">load()</codeph> method is set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>. Once the file is loaded, the code calls
  3928. the <codeph class="+ topic/ph pr-d/codeph ">loaded()</codeph> method, which in turn calls <codeph class="+ topic/ph pr-d/codeph ">container.areInaccessibleObjectsUnderPoint()</codeph>,
  3929. which returns a value of <codeph class="+ topic/ph pr-d/codeph ">true</codeph> because the loaded content is assumed to be from an
  3930. inaccessible domain:
  3931. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3932. import flash.display.Sprite;
  3933. import flash.display.Loader;
  3934. import flash.system.LoaderContext;
  3935. import flash.net.URLRequest;
  3936. import flash.events.Event;
  3937. import flash.geom.Point;
  3938. var container:Sprite = new Sprite();
  3939. var urlReq:URLRequest = new URLRequest("http://localhost/RemoteFile.swf");
  3940. var ldr:Loader = new Loader();
  3941. var context:LoaderContext = new LoaderContext();
  3942. context.checkPolicyFile = false;
  3943. ldr.load(urlReq, context);
  3944. ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
  3945. ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, urlNotFound);
  3946. function loaded(event:Event):void {
  3947. var pt:Point = new Point(1, 1);
  3948. trace(container.areInaccessibleObjectsUnderPoint(pt)); // true
  3949. }
  3950. function urlNotFound(event:Event):void {
  3951. trace("The URL was not found.");
  3952. }
  3953. </codeblock> This example assumes that the SWF file produced by this code is loaded from a different domain
  3954. than that of the JPEG file, and that the loaded JPEG file occupies the point (1, 1).
  3955. </example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.system.xml#Security/allowDomain()" class="- topic/link "><linktext class="- topic/linktext ">flash.system.Security.allowDomain()</linktext></link><link href="flash.display.xml#DisplayObjectContainer/getObjectsUnderPoint()" class="- topic/link "><linktext class="- topic/linktext ">getObjectsUnderPoint()</linktext></link><link href="flash.display.xml#DisplayObject/globalToLocal()" class="- topic/link "><linktext class="- topic/linktext ">DisplayObject.globalToLocal()</linktext></link><link href="flash.display.xml#DisplayObject/localToGlobal()" class="- topic/link "><linktext class="- topic/linktext ">DisplayObject.localToGlobal()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:contains" 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 ">contains</apiName><shortdesc class="- topic/shortdesc ">
  3956. Determines whether the specified display object is a child of the DisplayObjectContainer instance or
  3957. the instance itself.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc "><codeph class="+ topic/ph pr-d/codeph ">true</codeph> if the <codeph class="+ topic/ph pr-d/codeph ">child</codeph> object is a child of the DisplayObjectContainer
  3958. or the container itself; otherwise <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.
  3959. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Boolean</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">child</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The child object to test.
  3960. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3961. Determines whether the specified display object is a child of the DisplayObjectContainer instance or
  3962. the instance itself.
  3963. The search includes the entire display list including this DisplayObjectContainer instance. Grandchildren,
  3964. great-grandchildren, and so on each return <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  3965. </apiDesc><example conref="examples\DisplayObjectContainer.contains.1.as" class="- topic/example "> The following example sets up a number of Sprite objects and adds some to the child list
  3966. of others. (A Sprite object is a type of display object container.) The relationship between various objects is
  3967. shown by calling the <codeph class="+ topic/ph pr-d/codeph ">contains()</codeph> method:
  3968. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3969. import flash.display.Sprite;
  3970. var sprite1:Sprite = new Sprite();
  3971. var sprite2:Sprite = new Sprite();
  3972. var sprite3:Sprite = new Sprite();
  3973. var sprite4:Sprite = new Sprite();
  3974. sprite1.addChild(sprite2);
  3975. sprite2.addChild(sprite3);
  3976. trace(sprite1.contains(sprite1)); // true
  3977. trace(sprite1.contains(sprite2)); // true
  3978. trace(sprite1.contains(sprite3)); // true
  3979. trace(sprite1.contains(sprite4)); // false
  3980. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:getChildAt" 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 ">getChildAt</apiName><shortdesc class="- topic/shortdesc ">
  3981. Returns the child display object instance that exists at the specified index.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the index does not exist in the child list.
  3982. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">This child display object belongs to a sandbox
  3983. to which you do not have access. You can avoid this situation by having
  3984. the child movie call <codeph class="+ topic/ph pr-d/codeph ">Security.allowDomain()</codeph>.
  3985. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The child display object at the specified index position.
  3986. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index position of the child object.
  3987. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  3988. Returns the child display object instance that exists at the specified index.
  3989. </apiDesc><example conref="examples\DisplayObjectContainer.getChildAt.1.as" class="- topic/example "> The following example creates a display object container named <codeph class="+ topic/ph pr-d/codeph ">container</codeph>
  3990. and then adds a three display objects to the child list of the <codeph class="+ topic/ph pr-d/codeph ">container</codeph> object. The calls to the
  3991. <codeph class="+ topic/ph pr-d/codeph ">getChildAt()</codeph> method then reveal the positions of the child objects:
  3992. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  3993. import flash.display.Sprite;
  3994. var container:Sprite = new Sprite();
  3995. var sprite1:Sprite = new Sprite();
  3996. var sprite2:Sprite = new Sprite();
  3997. var sprite3:Sprite = new Sprite();
  3998. container.addChild(sprite1);
  3999. container.addChild(sprite2);
  4000. container.addChildAt(sprite3, 0);
  4001. trace(container.getChildAt(0) == sprite3); // true
  4002. trace(container.getChildAt(1) == sprite1); // true
  4003. trace(container.getChildAt(2) == sprite2); // true
  4004. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/getChildByName()" class="- topic/link "><linktext class="- topic/linktext ">getChildByName()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:getChildByName" 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 ">getChildByName</apiName><shortdesc class="- topic/shortdesc ">
  4005. Returns the child display object that exists with the specified name.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">This child display object belongs to a sandbox
  4006. to which you do not have access. You can avoid this situation by having
  4007. the child movie call the <codeph class="+ topic/ph pr-d/codeph ">Security.allowDomain()</codeph> method.
  4008. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The child display object with the specified name.
  4009. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The name of the child to return.
  4010. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4011. Returns the child display object that exists with the specified name.
  4012. If more that one child display object has the specified name,
  4013. the method returns the first object in the child list.
  4014. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">getChildAt()</codeph> method is faster than the
  4015. <codeph class="+ topic/ph pr-d/codeph ">getChildByName()</codeph> method. The <codeph class="+ topic/ph pr-d/codeph ">getChildAt()</codeph> method accesses
  4016. a child from a cached array, whereas the <codeph class="+ topic/ph pr-d/codeph ">getChildByName()</codeph> method
  4017. has to traverse a linked list to access a child.</p>
  4018. </apiDesc><example conref="examples\DisplayObjectContainer.getChildByName.1.as" class="- topic/example "> The following example creates a display object container named
  4019. <codeph class="+ topic/ph pr-d/codeph ">container</codeph> and then adds two child display objects to the container.
  4020. Then, the code calls the <codeph class="+ topic/ph pr-d/codeph ">getChildByName()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">getChildIndex()</codeph>
  4021. methods to return the index position of the child of the <codeph class="+ topic/ph pr-d/codeph ">container</codeph> object that
  4022. has the <codeph class="+ topic/ph pr-d/codeph ">name "sprite1"</codeph>.
  4023. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4024. import flash.display.Sprite;
  4025. import flash.display.DisplayObject;
  4026. var container:Sprite = new Sprite();
  4027. var sprite1:Sprite = new Sprite();
  4028. sprite1.name = "sprite1";
  4029. var sprite2:Sprite = new Sprite();
  4030. sprite2.name = "sprite2";
  4031. container.addChild(sprite1);
  4032. container.addChild(sprite2);
  4033. var target:DisplayObject = container.getChildByName("sprite1");
  4034. trace(container.getChildIndex(target)); // 0
  4035. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/getChildAt()" class="- topic/link "><linktext class="- topic/linktext ">getChildAt()</linktext></link><link href="flash.display.xml#DisplayObject/name" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject.name</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:getChildIndex" 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 ">getChildIndex</apiName><shortdesc class="- topic/shortdesc ">
  4036. Returns the index position of a child DisplayObject instance.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the child parameter is not a child of this object.
  4037. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index position of the child display object to identify.
  4038. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">child</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance to identify.
  4039. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Returns the index number of a child DisplayObject instance.
  4040. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4041. Returns the index position of a <codeph class="+ topic/ph pr-d/codeph ">child</codeph> DisplayObject instance.
  4042. </apiDesc><example conref="examples\DisplayObjectContainer.getChildByName.1.as" class="- topic/example "> The following example creates a display object container named
  4043. <codeph class="+ topic/ph pr-d/codeph ">container</codeph> and then adds two child display objects to the container.
  4044. Then, the code calls the <codeph class="+ topic/ph pr-d/codeph ">getChildByName()</codeph> and <codeph class="+ topic/ph pr-d/codeph ">getChildIndex()</codeph>
  4045. methods to return the index position of the child of the <codeph class="+ topic/ph pr-d/codeph ">container</codeph> object that
  4046. has the <codeph class="+ topic/ph pr-d/codeph ">name "sprite1"</codeph>.
  4047. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4048. import flash.display.Sprite;
  4049. import flash.display.DisplayObject;
  4050. var container:Sprite = new Sprite();
  4051. var sprite1:Sprite = new Sprite();
  4052. sprite1.name = "sprite1";
  4053. var sprite2:Sprite = new Sprite();
  4054. sprite2.name = "sprite2";
  4055. container.addChild(sprite1);
  4056. container.addChild(sprite2);
  4057. var target:DisplayObject = container.getChildByName("sprite1");
  4058. trace(container.getChildIndex(target)); // 0
  4059. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:getObjectsUnderPoint" 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 ">getObjectsUnderPoint</apiName><shortdesc class="- topic/shortdesc ">
  4060. Returns an array of objects that lie under the specified point and are children
  4061. (or grandchildren, and so on) of this DisplayObjectContainer instance.</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 "/><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An array of objects that lie under the specified point and are children
  4062. (or grandchildren, and so on) of this DisplayObjectContainer instance.
  4063. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Array</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">point</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Point</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The point under which to look.
  4064. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4065. Returns an array of objects that lie under the specified point and are children
  4066. (or grandchildren, and so on) of this DisplayObjectContainer instance. Any child objects that
  4067. are inaccessible for security reasons are omitted from the returned array. To determine whether
  4068. this security restriction affects the returned array, call the
  4069. <codeph class="+ topic/ph pr-d/codeph ">areInaccessibleObjectsUnderPoint()</codeph> method.
  4070. <p class="- topic/p ">The <codeph class="+ topic/ph pr-d/codeph ">point</codeph> parameter is in the coordinate space of the Stage,
  4071. which may differ from the coordinate space of the display object container (unless the
  4072. display object container is the Stage). You can use the <codeph class="+ topic/ph pr-d/codeph ">globalToLocal()</codeph> and
  4073. the <codeph class="+ topic/ph pr-d/codeph ">localToGlobal()</codeph> methods to convert points between these coordinate
  4074. spaces.</p>
  4075. </apiDesc><example conref="examples\DisplayObjectContainer.getObjectsUnderPoint.1.as" class="- topic/example "> The following example creates a display object container named <codeph class="+ topic/ph pr-d/codeph ">container</codeph>
  4076. and then adds two overlapping child display objects to the container. Then the code calls the
  4077. <codeph class="+ topic/ph pr-d/codeph ">getObjectsUnderPoint()</codeph> twice &#151; first using a point that touches only one object,
  4078. then using a point where the objects overlap &#151; and the <codeph class="+ topic/ph pr-d/codeph ">length</codeph> of the return
  4079. Array shows the number of objects at each point in the container:
  4080. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4081. import flash.display.Sprite;
  4082. import flash.geom.Point;
  4083. var container:Sprite = new Sprite();
  4084. var square1:Sprite = new Sprite();
  4085. square1.graphics.beginFill(0xFFCC00);
  4086. square1.graphics.drawRect(0, 0, 40, 40);
  4087. var square2:Sprite = new Sprite();
  4088. square2.graphics.beginFill(0x00CCFF);
  4089. square2.graphics.drawRect(20, 0, 30, 40);
  4090. container.addChild(square1);
  4091. container.addChild(square2);
  4092. var pt:Point = new Point(10, 20);
  4093. var objects:Array = container.getObjectsUnderPoint(pt);
  4094. trace(objects.length); // 1
  4095. pt = new Point(35, 20);
  4096. objects = container.getObjectsUnderPoint(pt);
  4097. trace(objects.length); // 2
  4098. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/areInaccessibleObjectsUnderPoint()" class="- topic/link "><linktext class="- topic/linktext ">areInaccessibleObjectsUnderPoint()</linktext></link><link href="flash.display.xml#DisplayObject/globalToLocal()" class="- topic/link "><linktext class="- topic/linktext ">DisplayObject.globalToLocal()</linktext></link><link href="flash.display.xml#DisplayObject/localToGlobal()" class="- topic/link "><linktext class="- topic/linktext ">DisplayObject.localToGlobal()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:removeChildAt" 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 ">removeChildAt</apiName><shortdesc class="- topic/shortdesc ">
  4099. Removes a child DisplayObject from the specified index position in the child list of
  4100. the DisplayObjectContainer.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">This child display object belongs to a sandbox
  4101. to which the calling object does not have access. You can avoid this situation by having
  4102. the child movie call the <codeph class="+ topic/ph pr-d/codeph ">Security.allowDomain()</codeph> method.
  4103. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">SecurityError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">SecurityError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the index does not exist in the child list.
  4104. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance that was removed.
  4105. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The child index of the DisplayObject to remove.
  4106. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Removes a child display object, at the specified <codeph class="+ topic/ph pr-d/codeph ">index</codeph> position, from the
  4107. DisplayObjectContainer instance.
  4108. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4109. Removes a child DisplayObject from the specified <codeph class="+ topic/ph pr-d/codeph ">index</codeph> position in the child list of
  4110. the DisplayObjectContainer. The <codeph class="+ topic/ph pr-d/codeph ">parent</codeph> property of the removed child is set to
  4111. <codeph class="+ topic/ph pr-d/codeph ">null</codeph>, and the object is garbage collected if no other references to the child exist. The index
  4112. positions of any display objects above the child in the DisplayObjectContainer are decreased by 1.
  4113. <p class="- topic/p ">The garbage collector reallocates unused memory space. When a variable or
  4114. object is no longer actively referenced or stored somewhere, the garbage collector sweeps
  4115. through and wipes out the memory space it used to occupy if no other references to it exist.</p>
  4116. </apiDesc><example conref="examples\DisplayObjectContainer.removeChildAt.1.as" class="- topic/example "> The following example creates a display object container named
  4117. <codeph class="+ topic/ph pr-d/codeph ">container</codeph> and then adds two child display objects to the container.
  4118. The code then shows that when you call the <codeph class="+ topic/ph pr-d/codeph ">removeChildAt()</codeph> method
  4119. to remove the child at the lowest index position (0), any other child object in the list
  4120. moves down one position:
  4121. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4122. import flash.display.Sprite;
  4123. var container:Sprite = new Sprite();
  4124. var sprite1:Sprite = new Sprite();
  4125. sprite1.name = "sprite1";
  4126. var sprite2:Sprite = new Sprite();
  4127. sprite2.name = "sprite2";
  4128. container.addChild(sprite1);
  4129. container.addChild(sprite2);
  4130. trace(container.numChildren) // 2
  4131. container.removeChildAt(0);
  4132. trace(container.numChildren) // 1
  4133. trace(container.getChildAt(0).name); // sprite2
  4134. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:removeChild" 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 ">removeChild</apiName><shortdesc class="- topic/shortdesc ">
  4135. Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the child parameter is not a child of this object.
  4136. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</apiOperationClassifier></apiException><apiReturn class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiReturn "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance that you pass in the
  4137. <codeph class="+ topic/ph pr-d/codeph ">child</codeph> parameter.
  4138. </apiDesc><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier></apiReturn><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">child</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The DisplayObject instance to remove.
  4139. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Removes a child display object from the DisplayObjectContainer
  4140. instance.
  4141. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4142. Removes the specified <codeph class="+ topic/ph pr-d/codeph ">child</codeph> DisplayObject instance from the child list of the DisplayObjectContainer instance.
  4143. The <codeph class="+ topic/ph pr-d/codeph ">parent</codeph> property of the removed child is set to <codeph class="+ topic/ph pr-d/codeph ">null</codeph>
  4144. , and the object is garbage collected if no other
  4145. references to the child exist. The index positions of any display objects above the child in the
  4146. DisplayObjectContainer are decreased by 1.
  4147. <p class="- topic/p ">The garbage collector reallocates unused memory space. When a variable
  4148. or object is no longer actively referenced or stored somewhere, the garbage collector sweeps
  4149. through and wipes out the memory space it used to occupy if no other references to it exist.</p>
  4150. </apiDesc><example conref="examples\DisplayObjectContainer.removeChild.1.as" class="- topic/example "> The following example creates a display object container named
  4151. <codeph class="+ topic/ph pr-d/codeph ">container</codeph> and then adds two child display objects to the container.
  4152. An event listener is added to the <codeph class="+ topic/ph pr-d/codeph ">container</codeph> object, so that when the
  4153. user clicks a child object of the container, the <codeph class="+ topic/ph pr-d/codeph ">removeChild()</codeph> method
  4154. removes the child clicked from the child list of the container:
  4155. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4156. import flash.display.DisplayObject;
  4157. import flash.display.Sprite;
  4158. import flash.events.MouseEvent;
  4159. var container:Sprite = new Sprite();
  4160. addChild(container);
  4161. var circle1:Sprite = new Sprite();
  4162. circle1.graphics.beginFill(0xFFCC00);
  4163. circle1.graphics.drawCircle(40, 40, 40);
  4164. var circle2:Sprite = new Sprite();
  4165. circle2.graphics.beginFill(0x00CCFF);
  4166. circle2.graphics.drawCircle(120, 40, 40);
  4167. container.addChild(circle1);
  4168. container.addChild(circle2);
  4169. container.addEventListener(MouseEvent.CLICK, clicked);
  4170. function clicked(event:MouseEvent):void {
  4171. container.removeChild(DisplayObject(event.target));
  4172. }
  4173. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:setChildIndex" 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 ">setChildIndex</apiName><shortdesc class="- topic/shortdesc ">
  4174. Changes the position of an existing child in the display object container.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the index does not exist in the child list.
  4175. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</apiOperationClassifier></apiException><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if the child parameter is not a child of this object.
  4176. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</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 ">child</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The child DisplayObject instance for which you want to change
  4177. the index number.
  4178. </apiDesc></apiParam><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><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The resulting index number for the <codeph class="+ topic/ph pr-d/codeph ">child</codeph> display object.
  4179. </apiDesc></apiParam><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Changes the index number of an existing child.
  4180. </apiTipText></apiTipTexts></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4181. Changes the position of an existing child in the display object container.
  4182. This affects the layering of child objects. For example, the following example shows three
  4183. display objects, labeled a, b, and c, at index positions 0, 1, and 2, respectively:
  4184. <p class="- topic/p "><adobeimage alt="c over b over a" href="../../images/DisplayObjectContainerSetChildIndex1.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4185. <p class="- topic/p ">When you use the <codeph class="+ topic/ph pr-d/codeph ">setChildIndex()</codeph> method and specify an index position
  4186. that is already occupied, the only positions that change are those in between the display object's former and new position.
  4187. All others will stay the same.
  4188. If a child is moved to an index LOWER than its current index, all children in between will INCREASE by 1 for their index reference.
  4189. If a child is moved to an index HIGHER than its current index, all children in between will DECREASE by 1 for their index reference.
  4190. For example, if the display object container
  4191. in the previous example is named <codeph class="+ topic/ph pr-d/codeph ">container</codeph>, you can swap the position
  4192. of the display objects labeled a and b by calling the following code:</p>
  4193. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">container.setChildIndex(container.getChildAt(1), 0);</codeblock>
  4194. <p class="- topic/p ">This code results in the following arrangement of objects:</p>
  4195. <p class="- topic/p "><adobeimage alt="c over a over b" href="../../images/DisplayObjectContainerSetChildIndex2.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4196. </apiDesc><example conref="examples\DisplayObjectContainer.setChildIndex.1.as" class="- topic/example "> The following example creates a display object container named
  4197. <codeph class="+ topic/ph pr-d/codeph ">container</codeph> and then adds three slightly overlapping child display
  4198. objects to the container. When the user clicks any of these objects, the
  4199. <codeph class="+ topic/ph pr-d/codeph ">clicked()</codeph> method calls the <codeph class="+ topic/ph pr-d/codeph ">setChildIndex()</codeph>
  4200. method to move the clicked object to the top-most position in the child list of
  4201. the <codeph class="+ topic/ph pr-d/codeph ">container</codeph> object:
  4202. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4203. import flash.display.Sprite;
  4204. import flash.events.MouseEvent;
  4205. var container:Sprite = new Sprite();
  4206. addChild(container);
  4207. var circle1:Sprite = new Sprite();
  4208. circle1.graphics.beginFill(0xFF0000);
  4209. circle1.graphics.drawCircle(40, 40, 40);
  4210. circle1.addEventListener(MouseEvent.CLICK, clicked);
  4211. var circle2:Sprite = new Sprite();
  4212. circle2.graphics.beginFill(0x00FF00);
  4213. circle2.graphics.drawCircle(100, 40, 40);
  4214. circle2.addEventListener(MouseEvent.CLICK, clicked);
  4215. var circle3:Sprite = new Sprite();
  4216. circle3.graphics.beginFill(0x0000FF);
  4217. circle3.graphics.drawCircle(70, 80, 40);
  4218. circle3.addEventListener(MouseEvent.CLICK, clicked);
  4219. container.addChild(circle1);
  4220. container.addChild(circle2);
  4221. container.addChild(circle3);
  4222. addChild(container);
  4223. function clicked(event:MouseEvent):void {
  4224. var circle:Sprite = Sprite(event.target);
  4225. var topPosition:uint = container.numChildren - 1;
  4226. container.setChildIndex(circle, topPosition);
  4227. }
  4228. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObjectContainer/addChildAt()" class="- topic/link "><linktext class="- topic/linktext ">addChildAt()</linktext></link><link href="flash.display.xml#DisplayObjectContainer/getChildIndex()" class="- topic/link "><linktext class="- topic/linktext ">getChildIndex()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:swapChildrenAt" 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 ">swapChildrenAt</apiName><shortdesc class="- topic/shortdesc ">
  4229. Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the
  4230. child list.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">If either index does not exist in the child list.
  4231. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">RangeError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">RangeError</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 ">index1</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index position of the first child object.
  4232. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">index2</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The index position of the second child object.
  4233. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4234. Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the
  4235. child list. All other child objects in the display object container remain in the same index positions.
  4236. </apiDesc><example conref="examples\DisplayObjectContainer.swapChildrenAt.1.as" class="- topic/example "> The following example creates a display object container named
  4237. <codeph class="+ topic/ph pr-d/codeph ">container</codeph>, then adds three child display objects to the container,
  4238. and then shows how a call to the <codeph class="+ topic/ph pr-d/codeph ">swapChildrenAt()</codeph> method rearranges
  4239. the child list of the display object container:
  4240. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4241. import flash.display.Sprite;
  4242. var container:Sprite = new Sprite();
  4243. var sprite1:Sprite = new Sprite();
  4244. sprite1.name = "sprite1";
  4245. var sprite2:Sprite = new Sprite();
  4246. sprite2.name = "sprite2";
  4247. var sprite3:Sprite = new Sprite();
  4248. sprite3.name = "sprite3";
  4249. container.addChild(sprite1);
  4250. container.addChild(sprite2);
  4251. container.addChild(sprite3);
  4252. trace(container.getChildAt(0).name); // sprite1
  4253. trace(container.getChildAt(1).name); // sprite2
  4254. trace(container.getChildAt(2).name); // sprite3
  4255. container.swapChildrenAt(0, 2);
  4256. trace(container.getChildAt(0).name); // sprite3
  4257. trace(container.getChildAt(1).name); // sprite2
  4258. trace(container.getChildAt(2).name); // sprite1
  4259. </codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.display:DisplayObjectContainer:swapChildren" 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 ">swapChildren</apiName><shortdesc class="- topic/shortdesc ">
  4260. Swaps the z-order (front-to-back order) of the two specified child objects.</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 "/><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Throws if either child parameter is not a child of this object.
  4261. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ArgumentError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">ArgumentError</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 ">child1</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The first child object.
  4262. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">child2</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:DisplayObject</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The second child object.
  4263. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4264. Swaps the z-order (front-to-back order) of the two specified child objects. All other child
  4265. objects in the display object container remain in the same index positions.
  4266. </apiDesc><example conref="examples\DisplayObjectContainer.swapChildren.1.as" class="- topic/example "> The following example creates a display object container named
  4267. <codeph class="+ topic/ph pr-d/codeph ">container</codeph>, then adds two child display objects to the container,
  4268. and then shows the effect of a call to the <codeph class="+ topic/ph pr-d/codeph ">swapChildren()</codeph> method:
  4269. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4270. import flash.display.Sprite;
  4271. var container:Sprite = new Sprite();
  4272. var sprite1:Sprite = new Sprite();
  4273. sprite1.name = "sprite1";
  4274. var sprite2:Sprite = new Sprite();
  4275. sprite2.name = "sprite2";
  4276. container.addChild(sprite1);
  4277. container.addChild(sprite2);
  4278. trace(container.getChildAt(0).name); // sprite1
  4279. trace(container.getChildAt(1).name); // sprite2
  4280. container.swapChildren(sprite1, sprite2);
  4281. trace(container.getChildAt(0).name); // sprite2
  4282. trace(container.getChildAt(1).name); // sprite1
  4283. </codeblock></example></apiOperationDetail></apiOperation><apiValue id="flash.display:DisplayObjectContainer:mouseChildren: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 ">mouseChildren</apiName><shortdesc class="- topic/shortdesc ">
  4284. Determines whether or not the children of the object are mouse, or user input device, enabled.</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="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 ">
  4285. Determines whether or not the children of the object are mouse, or user input device, enabled.
  4286. If an object is enabled, a user can interact with it by using a mouse or user input device. The default is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  4287. <p class="- topic/p ">This property is useful when you create a button with an instance of the Sprite class
  4288. (instead of using the SimpleButton class). When you use a Sprite instance to create a button,
  4289. you can choose to decorate the button by using the <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> method to add additional
  4290. Sprite instances. This process can cause unexpected behavior with mouse events because
  4291. the Sprite instances you add as children can become the target object of a mouse event
  4292. when you expect the parent instance to be the target object. To ensure that the parent
  4293. instance serves as the target objects for mouse events, you can set the
  4294. <codeph class="+ topic/ph pr-d/codeph ">mouseChildren</codeph> property of the parent instance to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.</p>
  4295. <p class="- topic/p "> No event is dispatched by setting this property. You must use the
  4296. <codeph class="+ topic/ph pr-d/codeph ">addEventListener()</codeph> method to create interactive functionality.</p>
  4297. </apiDesc><example conref="examples\DisplayObjectContainer.mouseChildren.1.as" class="- topic/example "> The following example sets up a Sprite object (a type of display object container) named
  4298. <codeph class="+ topic/ph pr-d/codeph ">container</codeph> and shows that when you set its <codeph class="+ topic/ph pr-d/codeph ">mouseChildren</codeph> property to
  4299. <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, the target of a <codeph class="+ topic/ph pr-d/codeph ">mouseClick</codeph> event is the <codeph class="+ topic/ph pr-d/codeph ">container</codeph>
  4300. object, not any one of its child objects:
  4301. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4302. import flash.display.Sprite;
  4303. import flash.events.MouseEvent;
  4304. var container:Sprite = new Sprite();
  4305. container.name = "container";
  4306. addChild(container);
  4307. var circle:Sprite = new Sprite();
  4308. circle.name = "circle";
  4309. circle.graphics.beginFill(0xFFCC00);
  4310. circle.graphics.drawCircle(40, 40, 40);
  4311. container.addChild(circle);
  4312. container.mouseChildren = false;
  4313. container.addEventListener(MouseEvent.CLICK, clicked);
  4314. function clicked(event:MouseEvent):void {
  4315. trace(event.target.name); // container
  4316. }
  4317. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/buttonMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Sprite.buttonMode</linktext></link><link href="flash.events.xml#EventDispatcher/addEventListener()" class="- topic/link "><linktext class="- topic/linktext ">flash.events.EventDispatcher.addEventListener()</linktext></link></related-links></apiValue><apiValue id="flash.display:DisplayObjectContainer:numChildren: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 ">numChildren</apiName><shortdesc class="- topic/shortdesc ">
  4318. Returns the number of children of this 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><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 ">
  4319. Returns the number of children of this object.
  4320. </apiDesc><example conref="examples\DisplayObjectContainer.numChildren.1.as" class="- topic/example "> The following example sets up two Sprite objects named <codeph class="+ topic/ph pr-d/codeph ">container1</codeph> and
  4321. <codeph class="+ topic/ph pr-d/codeph ">container2</codeph>. A Sprite is a type of display object container. The example calls the
  4322. <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph> method to set up the display hierarchy: <codeph class="+ topic/ph pr-d/codeph ">container1</codeph> is a child of
  4323. <codeph class="+ topic/ph pr-d/codeph ">container2</codeph>, and two other display objects, <codeph class="+ topic/ph pr-d/codeph ">circle1</codeph> and <codeph class="+ topic/ph pr-d/codeph ">circle2</codeph>,
  4324. are children of <codeph class="+ topic/ph pr-d/codeph ">container1</codeph>. The calls to the <codeph class="+ topic/ph pr-d/codeph ">trace()</codeph> method show the number
  4325. of children of each object. Note that grandchildren are not included in the <codeph class="+ topic/ph pr-d/codeph ">numChildren</codeph> count:
  4326. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4327. import flash.display.Sprite;
  4328. var container1:Sprite = new Sprite();
  4329. var container2:Sprite = new Sprite();
  4330. var circle1:Sprite = new Sprite();
  4331. circle1.graphics.beginFill(0xFFCC00);
  4332. circle1.graphics.drawCircle(40, 40, 40);
  4333. var circle2:Sprite = new Sprite();
  4334. circle2.graphics.beginFill(0x00CCFF);
  4335. circle2.graphics.drawCircle(80, 40, 40);
  4336. container2.addChild(container1);
  4337. container1.addChild(circle1);
  4338. container1.addChild(circle2);
  4339. trace(container1.numChildren); // 2
  4340. trace(container2.numChildren); // 1
  4341. trace(circle1.numChildren); // 0
  4342. trace(circle2.numChildren); // 0
  4343. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObjectContainer:tabChildren: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 ">tabChildren</apiName><shortdesc class="- topic/shortdesc ">
  4344. Determines whether the children of the object are tab enabled.</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="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">Boolean</apiValueClassifier><apiException class="+ topic/ph reference/ph apiRef/apiDefItem apiOperation/apiEvent adobe-api-d/apiException "><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Calling this property of the Stage object
  4345. throws an exception. The Stage object does not implement this property.
  4346. </apiDesc><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">IllegalOperationError</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.errors:IllegalOperationError</apiOperationClassifier></apiException></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4347. Determines whether the children of the object are tab enabled. Enables or disables tabbing for the
  4348. children of the object. The default is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  4349. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> Do not use the <codeph class="+ topic/ph pr-d/codeph ">tabChildren</codeph> property with Flex.
  4350. Instead, use the <codeph class="+ topic/ph pr-d/codeph ">mx.core.UIComponent.hasFocusableChildren</codeph> property.</p>
  4351. </apiDesc><example conref="examples\DisplayObjectContainer.tabChildren.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">container1</codeph> display object container and
  4352. adds two display objects, <codeph class="+ topic/ph pr-d/codeph ">circle1</codeph> and <codeph class="+ topic/ph pr-d/codeph ">circle2</codeph>,
  4353. to its child list. The example sets tabChildren to <codeph class="+ topic/ph pr-d/codeph ">false</codeph> for the children so it can
  4354. manage its own tab order using <codeph class="+ topic/ph pr-d/codeph ">tabIndex</codeph>:
  4355. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4356. import flash.display.Sprite;
  4357. var container:Sprite = new Sprite();
  4358. container.tabChildren = false;
  4359. var circle1:Sprite = new Sprite();
  4360. circle1.graphics.beginFill(0xFFCC00);
  4361. circle1.graphics.drawCircle(40, 40, 40);
  4362. circle1.tabIndex = 1;
  4363. var circle2:Sprite = new Sprite();
  4364. circle2.graphics.beginFill(0x00CCFF);
  4365. circle2.graphics.drawCircle(120, 40, 40);
  4366. circle2.tabIndex = 0;
  4367. container.addChild(circle1);
  4368. container.addChild(circle2);
  4369. </codeblock> To see the results of this example, compile and run the file. When you select one of the circles,
  4370. you can press the TAB key to switch the display object that has focus (indicated by a yellow highlight rectangle).
  4371. </example></apiValueDetail></apiValue><apiValue id="flash.display:DisplayObjectContainer:textSnapshot: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 ">textSnapshot</apiName><shortdesc class="- topic/shortdesc ">
  4372. Returns a TextSnapshot object for this DisplayObjectContainer instance.</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 ">flash.text:TextSnapshot</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4373. Returns a TextSnapshot object for this DisplayObjectContainer instance.
  4374. </apiDesc><example conref="examples\DisplayObjectContainer.textSnapshot.1.as" class="- topic/example "> The following example works only in the Flash authoring environment. Flex does not include any
  4375. ways of adding static text to a file. To prepare the Flash file for this example, add one or more static text fields
  4376. in the first frame of a movie. Then insert the following script into the first frame and run the file. The output
  4377. will be the static text that you added:
  4378. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4379. trace(this.textSnapshot.getText(0, this.textSnapshot.charCount));
  4380. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.text.xml#TextSnapshot" class="- topic/link "><linktext class="- topic/linktext ">flash.text.TextSnapshot</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:GraphicsGradientFill" 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 ">GraphicsGradientFill</apiName><shortdesc class="- topic/shortdesc ">
  4381. Defines a gradient fill.</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 "/><apiBaseInterface>flash.display:IGraphicsFill</apiBaseInterface><apiBaseInterface>flash.display:IGraphicsData</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4382. Defines a gradient fill.
  4383. <p class="- topic/p ">
  4384. Use a GraphicsGradientFill object with the <codeph class="+ topic/ph pr-d/codeph ">Graphics.drawGraphicsData()</codeph> method.
  4385. Drawing a GraphicsGradientFill object is the equivalent of calling the <codeph class="+ topic/ph pr-d/codeph ">Graphics.beginGradientFill()</codeph> method.
  4386. </p>
  4387. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/beginGradientFill()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.beginGradientFill()</linktext></link><link href="flash.display.xml#Graphics/drawGraphicsData()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.drawGraphicsData()</linktext></link></related-links><apiConstructor id="flash.display:GraphicsGradientFill:GraphicsGradientFill" 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 ">GraphicsGradientFill</apiName><shortdesc class="- topic/shortdesc ">
  4388. Creates a new GraphicsGradientFill 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="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><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 ">type</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">linear</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value from the GradientType class that
  4389. specifies which gradient type to use: <codeph class="+ topic/ph pr-d/codeph ">GradientType.LINEAR</codeph> or
  4390. <codeph class="+ topic/ph pr-d/codeph ">GradientType.RADIAL</codeph>.
  4391. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">colors</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Array</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An array of RGB hexadecimal color values used in the gradient; for example,
  4392. red is 0xFF0000, blue is 0x0000FF, and so on. You can specify up to 15 colors.
  4393. For each color, specify a corresponding value in the alphas and ratios parameters.
  4394. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">alphas</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Array</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An array of alpha values for the corresponding colors in the colors array;
  4395. valid values are 0 to 1. If the value is less than 0, 0 is used. If the value is
  4396. greater than 1, 1 is used.
  4397. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">ratios</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Array</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An array of color distribution ratios; valid values are 0-255. This value
  4398. defines the percentage of the width where the color is sampled at 100%. The value 0 represents
  4399. the left position in the gradient box, and 255 represents the right position in the
  4400. gradient box.
  4401. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">matrix</apiItemName><apiType value="any" name="type" class="- topic/state reference/state apiRef/apiType "/><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A transformation matrix as defined by the
  4402. flash.geom.Matrix class. The flash.geom.Matrix class includes a
  4403. <codeph class="+ topic/ph pr-d/codeph ">createGradientBox()</codeph> method, which lets you conveniently set up
  4404. the matrix for use with the <codeph class="+ topic/ph pr-d/codeph ">beginGradientFill()</codeph> method.
  4405. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">spreadMethod</apiItemName><apiType value="any" name="type" class="- topic/state reference/state apiRef/apiType "/><apiData class="- topic/ph reference/ph apiRef/apiData ">pad</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value from the SpreadMethod class that
  4406. specifies which spread method to use, either: <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.PAD</codeph>,
  4407. <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REFLECT</codeph>, or <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REPEAT</codeph>.
  4408. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">interpolationMethod</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">rgb</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value from the InterpolationMethod class that
  4409. specifies which value to use: <codeph class="+ topic/ph pr-d/codeph ">InterpolationMethod.LINEAR_RGB</codeph> or
  4410. <codeph class="+ topic/ph pr-d/codeph ">InterpolationMethod.RGB</codeph>
  4411. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">focalPointRatio</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">0.0</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A number that controls the
  4412. location of the focal point of the gradient. A value of 0 sets the focal point in the center. A value of 1
  4413. sets the focal point at one border of the gradient circle. A value of -1 sets the focal point
  4414. at the other border of the gradient circle. A value less than -1 or greater than
  4415. 1 is rounded to -1 or 1, respectively.
  4416. </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4417. Creates a new GraphicsGradientFill object.
  4418. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/beginGradientFill()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.beginGradientFill()</linktext></link><link href="flash.display.xml#GradientType" class="- topic/link "><linktext class="- topic/linktext ">flash.display.GradientType</linktext></link><link href="flash.geom.xml#Matrix" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Matrix</linktext></link><link href="flash.display.xml#SpreadMethod" class="- topic/link "><linktext class="- topic/linktext ">flash.display.SpreadMethod</linktext></link><link href="flash.display.xml#InterpolationMethod" class="- topic/link "><linktext class="- topic/linktext ">flash.display.InterpolationMethod</linktext></link></related-links></apiConstructor><apiValue id="flash.display:GraphicsGradientFill:alphas" 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 ">alphas</apiName><shortdesc class="- topic/shortdesc ">
  4419. An array of alpha values for the corresponding colors in the colors array.</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 "><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 ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4420. An array of alpha values for the corresponding colors in the colors array.
  4421. Valid values are between 0 and 1. If the value is less than 0, 0 is used. If the value is
  4422. greater than 1, 1 is used.
  4423. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsGradientFill:colors" 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 ">colors</apiName><shortdesc class="- topic/shortdesc ">
  4424. An array of RGB hexadecimal color values to use in the gradient.</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 "><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 ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4425. An array of RGB hexadecimal color values to use in the gradient. For example,
  4426. red is 0xFF0000, blue is 0x0000FF, and so on. You can specify up to 15 colors.
  4427. For each color, specify a corresponding value in the alphas and ratios properties.
  4428. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsGradientFill:focalPointRatio" 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 ">focalPointRatio</apiName><shortdesc class="- topic/shortdesc ">
  4429. A number that controls the
  4430. location of the focal point of the gradient.</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 "><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 ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4431. A number that controls the
  4432. location of the focal point of the gradient. A value of 0 sets the focal point in the center. A value of 1
  4433. means that the focal point is at one border of the gradient circle.A value of -1 sets the focal point
  4434. at the other border of the gradient circle. A value of less than -1 or greater than
  4435. 1 is rounded to -1 or 1, respectively. For example, the following
  4436. shows a <codeph class="+ topic/ph pr-d/codeph ">focalPointRatio</codeph> set to 0.75:
  4437. <p class="- topic/p "><adobeimage alt="radial gradient with focalPointRatio set to 0.75" href="../../images/radial_sketch.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/> </p>
  4438. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsGradientFill:matrix" 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 ">matrix</apiName><shortdesc class="- topic/shortdesc ">
  4439. A transformation matrix as defined by the
  4440. Matrix 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><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 ">flash.geom:Matrix</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4441. A transformation matrix as defined by the
  4442. Matrix class. The flash.geom.Matrix class includes a
  4443. <codeph class="+ topic/ph pr-d/codeph ">createGradientBox()</codeph> method to set up
  4444. the matrix for use with the <codeph class="+ topic/ph pr-d/codeph ">beginGradientFill()</codeph> method.
  4445. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.geom.xml#Matrix/createGradientBox()" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Matrix.createGradientBox()</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsGradientFill:ratios" 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 ">ratios</apiName><shortdesc class="- topic/shortdesc ">
  4446. An array of color distribution ratios.</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 "><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 ">Array</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4447. An array of color distribution ratios. Valid values are between 0 and 255. This value
  4448. defines the percentage of the width where the color is sampled at 100%. The value 0 represents
  4449. the left position in the gradient box, and the value 255 represents the right position in the
  4450. gradient box.
  4451. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> This value represents positions in the gradient box, not the
  4452. coordinate space of the final gradient which can be wider or thinner than the gradient box.
  4453. Specify a value for corresponding to each value in the <codeph class="+ topic/ph pr-d/codeph ">colors</codeph> property. </p>
  4454. <p class="- topic/p ">For example, for a linear gradient that includes two colors (blue and green) the
  4455. following example illustrates the placement of the colors in the gradient based on different values
  4456. in the <codeph class="+ topic/ph pr-d/codeph ">ratios</codeph> array:</p>
  4457. <adobetable class="innertable"><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 ">ratios</codeph></entry><entry class="- topic/entry ">Gradient</entry></row></thead><tbody class="- topic/tbody "><row class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">[0, 127]</codeph></entry><entry class="- topic/entry "><adobeimage alt="linear gradient blue to green with ratios 0 and 127" href="../../images/gradient-ratios-1.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row><row class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">[0, 255]</codeph></entry><entry class="- topic/entry "><adobeimage alt="linear gradient blue to green with ratios 0 and 255" href="../../images/gradient-ratios-2.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row><row class="- topic/row "><entry class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">[127, 255]</codeph></entry><entry class="- topic/entry "><adobeimage alt="linear gradient blue to green with ratios 127 and 255" href="../../images/gradient-ratios-3.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></entry></row></tbody></tgroup></adobetable>
  4458. <p class="- topic/p ">The values in the array must increase sequentially; for example,
  4459. <codeph class="+ topic/ph pr-d/codeph ">[0, 63, 127, 190, 255]</codeph>. </p>
  4460. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsGradientFill:interpolationMethod: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 ">interpolationMethod</apiName><shortdesc class="- topic/shortdesc ">
  4461. A value from the InterpolationMethod class that
  4462. specifies which value to use.</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 "><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 ">
  4463. A value from the InterpolationMethod class that
  4464. specifies which value to use. Valid values are: <codeph class="+ topic/ph pr-d/codeph ">InterpolationMethod.LINEAR_RGB</codeph> or
  4465. <codeph class="+ topic/ph pr-d/codeph ">InterpolationMethod.RGB</codeph>
  4466. <p class="- topic/p ">For example, the following shows a simple linear gradient between two colors (with the <codeph class="+ topic/ph pr-d/codeph ">spreadMethod</codeph>
  4467. parameter set to <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REFLECT</codeph>). The different interpolation methods change
  4468. the appearance as follows: </p>
  4469. <adobetable class="+ topic/table adobe-d/adobetable "><tgroup cols="2" class="- topic/tgroup "><tbody class="- topic/tbody "><row class="- topic/row "><entry align="center" class="- topic/entry "> <adobeimage alt="linear gradient with InterpolationMethod.LINEAR_RGB" href="../../images/beginGradientFill_interp_linearrgb.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/> </entry><entry align="center" class="- topic/entry "> <adobeimage alt="linear gradient with InterpolationMethod.RGB" href="../../images/beginGradientFill_interp_rgb.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/> </entry></row><row class="- topic/row "><entry align="center" class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">InterpolationMethod.LINEAR_RGB</codeph></entry><entry align="center" class="- topic/entry "><codeph class="+ topic/ph pr-d/codeph ">InterpolationMethod.RGB</codeph></entry></row></tbody></tgroup></adobetable>
  4470. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#InterpolationMethod" class="- topic/link "><linktext class="- topic/linktext ">flash.display.InterpolationMethod</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsGradientFill:spreadMethod: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 ">spreadMethod</apiName><shortdesc class="- topic/shortdesc ">
  4471. A value from the SpreadMethod class that
  4472. specifies which spread method to use.</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 "><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 ">
  4473. A value from the SpreadMethod class that
  4474. specifies which spread method to use. Valid values are: <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.PAD</codeph>,
  4475. <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REFLECT</codeph>, or <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REPEAT</codeph>.
  4476. <p class="- topic/p ">For example, the following shows a simple linear gradient between two colors:</p>
  4477. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4478. import flash.geom.*
  4479. import flash.display.*
  4480. var fillType:String = GradientType.LINEAR;
  4481. var colors:Array = [0xFF0000, 0x0000FF];
  4482. var alphas:Array = [1, 1];
  4483. var ratios:Array = [0x00, 0xFF];
  4484. var matr:Matrix = new Matrix();
  4485. matr.createGradientBox(20, 20, 0, 0, 0);
  4486. var spreadMethod:String = SpreadMethod.PAD;
  4487. this.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);
  4488. this.graphics.drawRect(0,0,100,100);
  4489. </codeblock>
  4490. <p class="- topic/p ">This example uses <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.PAD</codeph> for the spread method, and
  4491. the gradient fill looks like the following:</p>
  4492. <p class="- topic/p "><adobeimage alt="linear gradient with SpreadMethod.PAD" href="../../images/beginGradientFill_spread_pad.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4493. <p class="- topic/p ">If you use <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REFLECT</codeph> for the spread method, the gradient fill
  4494. looks like the following:</p>
  4495. <p class="- topic/p "><adobeimage alt="linear gradient with SpreadMethod.REFLECT" href="../../images/beginGradientFill_spread_reflect.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4496. <p class="- topic/p ">If you use <codeph class="+ topic/ph pr-d/codeph ">SpreadMethod.REPEAT</codeph> for the spread method, the gradient fill
  4497. looks like the following:</p>
  4498. <p class="- topic/p "><adobeimage alt="linear gradient with SpreadMethod.REPEAT" href="../../images/beginGradientFill_spread_repeat.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4499. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#SpreadMethod" class="- topic/link "><linktext class="- topic/linktext ">flash.display.SpreadMethod</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsGradientFill:type: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 ">type</apiName><shortdesc class="- topic/shortdesc ">
  4500. A value from the GradientType class that
  4501. specifies which gradient type to use.</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 "><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 ">
  4502. A value from the GradientType class that
  4503. specifies which gradient type to use. Values are <codeph class="+ topic/ph pr-d/codeph ">GradientType.LINEAR</codeph> or
  4504. <codeph class="+ topic/ph pr-d/codeph ">GradientType.RADIAL</codeph>.
  4505. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#GradientType" class="- topic/link "><linktext class="- topic/linktext ">flash.display.GradientType</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:Sprite" 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 ">Sprite</apiName><shortdesc class="- topic/shortdesc ">
  4506. The Sprite class is a basic display list building block: a display list node that can display
  4507. graphics and can also contain children.</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="AIR" version="1.0" 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 "/><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">The basic display object for ActionScript created objects.
  4508. </apiTipText></apiTipTexts><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">flash.display:DisplayObjectContainer</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4509. The Sprite class is a basic display list building block: a display list node that can display
  4510. graphics and can also contain children.
  4511. <p class="- topic/p ">A Sprite object is similar to a movie clip, but does not have a timeline. Sprite is an
  4512. appropriate base class for objects that do not require timelines. For example, Sprite would be a
  4513. logical base class for user interface (UI) components that typically do not use the timeline.</p>
  4514. <p class="- topic/p ">The Sprite class is new in ActionScript 3.0. It provides an alternative to the functionality of
  4515. the MovieClip class, which retains all the functionality of previous ActionScript releases to
  4516. provide backward compatibility.</p>
  4517. </apiDesc><example conref="examples\SpriteExample.as" class="- topic/example "> The following example uses the SpriteExample class to draw an
  4518. orange square on the stage, and then dispatches events whenever the user clicks or drags the
  4519. square. This task is accomplished by performing the following steps:
  4520. <ol class="- topic/ol "><li class="- topic/li ">Declare the <codeph class="+ topic/ph pr-d/codeph ">size</codeph> property (100 x 100 pixels) and the background color
  4521. (orange) for later use in drawing the square.</li><li class="- topic/li ">The constructor then creates a new <codeph class="+ topic/ph pr-d/codeph ">child</codeph> Sprite object and uses it to add
  4522. two event listeners and their associated methods: <codeph class="+ topic/ph pr-d/codeph ">mouseDownHandler()</codeph> and
  4523. <codeph class="+ topic/ph pr-d/codeph ">mouseUpHandler()</codeph>.</li><li class="- topic/li ">The <codeph class="+ topic/ph pr-d/codeph ">child</codeph> Sprite object is then passed to the
  4524. <codeph class="+ topic/ph pr-d/codeph ">draw()</codeph> method, which draws the orange square.</li><li class="- topic/li ">The child is then placed on the display list by a call to the <codeph class="+ topic/ph pr-d/codeph ">addChild()</codeph>
  4525. method. </li><li class="- topic/li ">The event listeners work as follows:
  4526. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseDownHandler()</codeph>: when the user clicks the Sprite object,
  4527. this method adds a mouseMove event listener, the <codeph class="+ topic/ph pr-d/codeph ">mouseMoveHandler()</codeph> method,
  4528. which processes the mouse moves. Then the <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method is called, which
  4529. allows the Sprite object to be dragged.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseUpHandler()</codeph>: when the mouse button is released, the mouseMove event listener
  4530. is removed and the <codeph class="+ topic/ph pr-d/codeph ">stopDrag()</codeph> method is called, which freezes the orange square in
  4531. place.</li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">mouseMoveHandler</codeph>: as long as the left mouse button is being held down, this
  4532. method instructs the player to continuously redraw the orange square.</li></ul>
  4533. </li></ol>
  4534. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note: </b>Each of the event listener methods declares a local <codeph class="+ topic/ph pr-d/codeph ">sprite</codeph>
  4535. variable, which is assigned the <codeph class="+ topic/ph pr-d/codeph ">target</codeph> property of the event.</p>
  4536. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4537. package {
  4538. import flash.display.Sprite;
  4539. import flash.events.*;
  4540. public class SpriteExample extends Sprite {
  4541. private var size:uint = 100;
  4542. private var bgColor:uint = 0xFFCC00;
  4543. public function SpriteExample() {
  4544. var child:Sprite = new Sprite();
  4545. child.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
  4546. child.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
  4547. draw(child);
  4548. addChild(child);
  4549. }
  4550. private function mouseDownHandler(event:MouseEvent):void {
  4551. trace("mouseDownHandler");
  4552. var sprite:Sprite = Sprite(event.target);
  4553. sprite.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
  4554. sprite.startDrag();
  4555. }
  4556. private function mouseUpHandler(event:MouseEvent):void {
  4557. trace("mouseUpHandler");
  4558. var sprite:Sprite = Sprite(event.target);
  4559. sprite.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
  4560. sprite.stopDrag();
  4561. }
  4562. private function mouseMoveHandler(event:MouseEvent):void {
  4563. trace("mouseMoveHandler");
  4564. event.updateAfterEvent();
  4565. }
  4566. private function draw(sprite:Sprite):void {
  4567. sprite.graphics.beginFill(bgColor);
  4568. sprite.graphics.drawRect(0, 0, size, size);
  4569. sprite.graphics.endFill();
  4570. }
  4571. }
  4572. }
  4573. </codeblock></example></apiClassifierDetail><apiConstructor id="flash.display:Sprite:Sprite" 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 ">Sprite</apiName><shortdesc class="- topic/shortdesc ">
  4574. Creates a new Sprite instance.</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="AIR" version="1.0" 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 "/></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4575. Creates a new Sprite instance. After you create the Sprite instance, call the
  4576. <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.addChild()</codeph> or <codeph class="+ topic/ph pr-d/codeph ">DisplayObjectContainer.addChildAt()</codeph>
  4577. method to add the Sprite to a parent DisplayObjectContainer.
  4578. </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="flash.display:Sprite:startDrag" 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 ">startDrag</apiName><shortdesc class="- topic/shortdesc ">
  4579. Lets the user drag the specified sprite.</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="AIR" version="1.0" 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 "><keyword class="- topic/keyword ">movieclip, movieclip.startDrag, startDrag
  4580. </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 ">lockCenter</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 draggable sprite is locked to the center of
  4581. the pointer position (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>), or locked to the point where the user first clicked the
  4582. sprite (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>).
  4583. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">bounds</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Rectangle</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Value relative to the coordinates of the Sprite's parent that specify a constraint
  4584. rectangle for the Sprite.
  4585. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4586. Lets the user drag the specified sprite. The sprite remains draggable until explicitly
  4587. stopped through a call to the <codeph class="+ topic/ph pr-d/codeph ">Sprite.stopDrag()</codeph> method, or until
  4588. another sprite is made draggable. Only one sprite is draggable at a time.
  4589. <p class="- topic/p ">Three-dimensional display objects follow the pointer and
  4590. <codeph class="+ topic/ph pr-d/codeph ">Sprite.startDrag()</codeph> moves the object within
  4591. the three-dimensional plane defined by the display object. Or, if the display object is a two-dimensional object
  4592. and the child of a three-dimensional object, the two-dimensional object
  4593. moves within the three dimensional plane defined by the three-dimensional parent object.</p>
  4594. </apiDesc><example conref="examples\Sprite.dropTarget.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite and two <codeph class="+ topic/ph pr-d/codeph ">target</codeph>
  4595. sprites. The <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method is called on the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite when the user
  4596. positions the cursor over the sprite and presses the mouse button, and the <codeph class="+ topic/ph pr-d/codeph ">stopDrag()</codeph> method
  4597. is called when the user releases the mouse button. This lets the user drag the sprite. On release of the mouse
  4598. button, the <codeph class="+ topic/ph pr-d/codeph ">mouseRelease()</codeph> method is called, which in turn traces the <codeph class="+ topic/ph pr-d/codeph ">name</codeph>
  4599. of the <codeph class="+ topic/ph pr-d/codeph ">dropTarget</codeph> object &#151; the one to which the user dragged the
  4600. <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite:
  4601. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4602. import flash.display.Sprite;
  4603. import flash.events.MouseEvent;
  4604. var circle:Sprite = new Sprite();
  4605. circle.graphics.beginFill(0xFFCC00);
  4606. circle.graphics.drawCircle(0, 0, 40);
  4607. var target1:Sprite = new Sprite();
  4608. target1.graphics.beginFill(0xCCFF00);
  4609. target1.graphics.drawRect(0, 0, 100, 100);
  4610. target1.name = "target1";
  4611. var target2:Sprite = new Sprite();
  4612. target2.graphics.beginFill(0xCCFF00);
  4613. target2.graphics.drawRect(0, 200, 100, 100);
  4614. target2.name = "target2";
  4615. addChild(target1);
  4616. addChild(target2);
  4617. addChild(circle);
  4618. circle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown)
  4619. function mouseDown(event:MouseEvent):void {
  4620. circle.startDrag();
  4621. }
  4622. circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
  4623. function mouseReleased(event:MouseEvent):void {
  4624. circle.stopDrag();
  4625. trace(circle.dropTarget.name);
  4626. }
  4627. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/dropTarget" class="- topic/link "><linktext class="- topic/linktext ">dropTarget</linktext></link><link href="flash.display.xml#Sprite/stopDrag()" class="- topic/link "><linktext class="- topic/linktext ">stopDrag()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:Sprite:startTouchDrag" 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 ">startTouchDrag</apiName><shortdesc class="- topic/shortdesc ">
  4628. Lets the user drag the specified sprite on a touch-enabled 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="Flash" version="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" 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 "/><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 ">touchPointID</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An integer to assign to the touch point.
  4629. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">lockCenter</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 draggable sprite is locked to the center of
  4630. the pointer position (<codeph class="+ topic/ph pr-d/codeph ">true</codeph>), or locked to the point where the user first clicked the
  4631. sprite (<codeph class="+ topic/ph pr-d/codeph ">false</codeph>).
  4632. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">bounds</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Rectangle</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">Value relative to the coordinates of the Sprite's parent that specify a constraint
  4633. rectangle for the Sprite.
  4634. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4635. Lets the user drag the specified sprite on a touch-enabled device. The sprite remains draggable until explicitly
  4636. stopped through a call to the <codeph class="+ topic/ph pr-d/codeph ">Sprite.stopTouchDrag()</codeph> method, or until
  4637. another sprite is made draggable. Only one sprite is draggable at a time.
  4638. <p class="- topic/p ">Three-dimensional display objects follow the pointer and
  4639. <codeph class="+ topic/ph pr-d/codeph ">Sprite.startTouchDrag()</codeph> moves the object within
  4640. the three-dimensional plane defined by the display object. Or, if the display object is a two-dimensional object
  4641. and the child of a three-dimensional object, the two-dimensional object
  4642. moves within the three dimensional plane defined by the three-dimensional parent object.</p>
  4643. </apiDesc><example conref="examples\Sprite.startTouchDrag.as" class="- topic/example "> The following example shows functions using startTouchDrag and stopTouchDrag to handle the touchBegin and touchEnd events.
  4644. The value for touchPointID is the value assigned to the event object. The bounds parameter is the rectangle defining the boundaries of
  4645. the parent display object (bg is a display object containing MySprite).
  4646. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4647. MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
  4648. MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
  4649. function onTouchBegin(e:TouchEvent) {
  4650. e.target.startTouchDrag(e.touchPointID, false, bg.getRect(this));
  4651. trace("touch begin");
  4652. }
  4653. function onTouchEnd(e:TouchEvent) {
  4654. e.target.stopTouchDrag(e.touchPointID);
  4655. trace("touch end");
  4656. }
  4657. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/dropTarget" class="- topic/link "><linktext class="- topic/linktext ">dropTarget</linktext></link><link href="flash.display.xml#Sprite/stopTouchDrag()" class="- topic/link "><linktext class="- topic/linktext ">stopTouchDrag()</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link><link href="flash.events.xml#TouchEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.TouchEvent</linktext></link></related-links></apiOperation><apiOperation id="flash.display:Sprite:stopDrag" 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 ">stopDrag</apiName><shortdesc class="- topic/shortdesc ">
  4658. Ends the startDrag() method.</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="AIR" version="1.0" 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 "><keyword class="- topic/keyword ">sprite, movieclip.stopDrag, stopDrag
  4659. </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></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4660. Ends the <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method. A sprite that was made draggable with the
  4661. <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method remains draggable until a
  4662. <codeph class="+ topic/ph pr-d/codeph ">stopDrag()</codeph> method is added, or until another
  4663. sprite becomes draggable. Only one sprite is draggable at a time.
  4664. </apiDesc><example conref="examples\Sprite.dropTarget.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite and two <codeph class="+ topic/ph pr-d/codeph ">target</codeph>
  4665. sprites. The <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method is called on the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite when the user
  4666. positions the cursor over the sprite and presses the mouse button, and the <codeph class="+ topic/ph pr-d/codeph ">stopDrag()</codeph> method
  4667. is called when the user releases the mouse button. This lets the user drag the sprite. On release of the mouse
  4668. button, the <codeph class="+ topic/ph pr-d/codeph ">mouseRelease()</codeph> method is called, which in turn traces the <codeph class="+ topic/ph pr-d/codeph ">name</codeph>
  4669. of the <codeph class="+ topic/ph pr-d/codeph ">dropTarget</codeph> object &#151; the one to which the user dragged the
  4670. <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite:
  4671. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4672. import flash.display.Sprite;
  4673. import flash.events.MouseEvent;
  4674. var circle:Sprite = new Sprite();
  4675. circle.graphics.beginFill(0xFFCC00);
  4676. circle.graphics.drawCircle(0, 0, 40);
  4677. var target1:Sprite = new Sprite();
  4678. target1.graphics.beginFill(0xCCFF00);
  4679. target1.graphics.drawRect(0, 0, 100, 100);
  4680. target1.name = "target1";
  4681. var target2:Sprite = new Sprite();
  4682. target2.graphics.beginFill(0xCCFF00);
  4683. target2.graphics.drawRect(0, 200, 100, 100);
  4684. target2.name = "target2";
  4685. addChild(target1);
  4686. addChild(target2);
  4687. addChild(circle);
  4688. circle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown)
  4689. function mouseDown(event:MouseEvent):void {
  4690. circle.startDrag();
  4691. }
  4692. circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
  4693. function mouseReleased(event:MouseEvent):void {
  4694. circle.stopDrag();
  4695. trace(circle.dropTarget.name);
  4696. }
  4697. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/dropTarget" class="- topic/link "><linktext class="- topic/linktext ">dropTarget</linktext></link><link href="flash.display.xml#Sprite/startDrag()" class="- topic/link "><linktext class="- topic/linktext ">startDrag()</linktext></link></related-links></apiOperation><apiOperation id="flash.display:Sprite:stopTouchDrag" 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 ">stopTouchDrag</apiName><shortdesc class="- topic/shortdesc ">
  4698. Ends the startTouchDrag() method, for use with touch-enabled 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="10.1" class="+ topic/ph adobe-api-d/apiPlatform "/><apiPlatform description="" name="AIR" version="2" 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 "/><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 ">touchPointID</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">int</apiOperationClassifier><apiDesc class="- topic/section reference/section apiRef/apiDesc ">The integer assigned to the touch point in the <codeph class="+ topic/ph pr-d/codeph ">startTouchDrag</codeph> method.
  4699. </apiDesc></apiParam></apiOperationDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4700. Ends the <codeph class="+ topic/ph pr-d/codeph ">startTouchDrag()</codeph> method, for use with touch-enabled devices. A sprite that was made draggable with the
  4701. <codeph class="+ topic/ph pr-d/codeph ">startTouchDrag()</codeph> method remains draggable until a
  4702. <codeph class="+ topic/ph pr-d/codeph ">stopTouchDrag()</codeph> method is added, or until another
  4703. sprite becomes draggable. Only one sprite is draggable at a time.
  4704. </apiDesc><example conref="examples\Sprite.startTouchDrag.as" class="- topic/example "> The following example shows functions using startTouchDrag and stopTouchDrag to handle the touchBegin and touchEnd events.
  4705. The value for touchPointID is the value assigned to the event object. The bounds parameter is the rectangle defining the boundaries of
  4706. the parent display object (bg is a display object containing MySprite).
  4707. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4708. MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
  4709. MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
  4710. function onTouchBegin(e:TouchEvent) {
  4711. e.target.startTouchDrag(e.touchPointID, false, bg.getRect(this));
  4712. trace("touch begin");
  4713. }
  4714. function onTouchEnd(e:TouchEvent) {
  4715. e.target.stopTouchDrag(e.touchPointID);
  4716. trace("touch end");
  4717. }
  4718. </codeblock></example></apiOperationDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/dropTarget" class="- topic/link "><linktext class="- topic/linktext ">dropTarget</linktext></link><link href="flash.display.xml#Sprite/startTouchDrag()" class="- topic/link "><linktext class="- topic/linktext ">startTouchDrag()</linktext></link><link href="flash.ui.xml#Multitouch" class="- topic/link "><linktext class="- topic/linktext ">flash.ui.Multitouch</linktext></link><link href="flash.events.xml#TouchEvent" class="- topic/link "><linktext class="- topic/linktext ">flash.events.TouchEvent</linktext></link></related-links></apiOperation><apiValue id="flash.display:Sprite:buttonMode: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 ">buttonMode</apiName><shortdesc class="- topic/shortdesc ">
  4719. Specifies the button mode of this sprite.</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="AIR" version="1.0" 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="readwrite" 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 ">Specifies the button mode of this sprite.
  4720. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4721. Specifies the button mode of this sprite. If <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, this
  4722. sprite behaves as a button, which means that it triggers the display
  4723. of the hand cursor when the pointer passes over the sprite and can
  4724. receive a <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event if the enter or space keys are pressed
  4725. when the sprite has focus. You can suppress the display of the hand cursor
  4726. by setting the <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>,
  4727. in which case the pointer is displayed.
  4728. <p class="- topic/p ">Although it is better to use the SimpleButton class to create buttons,
  4729. you can use the <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph> property to give a sprite
  4730. some button-like functionality. To include a sprite in the tab order,
  4731. set the <codeph class="+ topic/ph pr-d/codeph ">tabEnabled</codeph> property (inherited from the
  4732. InteractiveObject class and <codeph class="+ topic/ph pr-d/codeph ">false</codeph> by default) to
  4733. <codeph class="+ topic/ph pr-d/codeph ">true</codeph>. Additionally, consider whether you want
  4734. the children of your sprite to be user input enabled. Most buttons
  4735. do not enable user input interactivity for their child objects because
  4736. it confuses the event flow. To disable user input interactivity for all child
  4737. objects, you must set the <codeph class="+ topic/ph pr-d/codeph ">mouseChildren</codeph> property (inherited
  4738. from the DisplayObjectContainer class) to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.</p>
  4739. <p class="- topic/p ">If you use the <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph> property with the MovieClip class (which is a
  4740. subclass of the Sprite class), your button might have some added
  4741. functionality. If you include frames labeled _up, _over, and _down,
  4742. Flash Player provides automatic state changes (functionality
  4743. similar to that provided in previous versions of ActionScript for movie
  4744. clips used as buttons). These automatic state changes are
  4745. not available for sprites, which have no timeline, and thus no frames
  4746. to label. </p>
  4747. </apiDesc><example conref="examples\Sprite.buttonMode.1.as" class="- topic/example "> The following example creates two sprites and sets the <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph>
  4748. property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> for one and <codeph class="+ topic/ph pr-d/codeph ">false</codeph> for the other. When you compile
  4749. and run the application, both sprites respond to mouse events, but only the one in which
  4750. <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> uses the hand cursor and is included
  4751. in the tab order:
  4752. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4753. import flash.display.Sprite;
  4754. import flash.events.MouseEvent;
  4755. var circle1:Sprite = new Sprite();
  4756. circle1.graphics.beginFill(0xFFCC00);
  4757. circle1.graphics.drawCircle(40, 40, 40);
  4758. circle1.buttonMode = true;
  4759. circle1.addEventListener(MouseEvent.CLICK, clicked);
  4760. var circle2:Sprite = new Sprite();
  4761. circle2.graphics.beginFill(0xFFCC00);
  4762. circle2.graphics.drawCircle(120, 40, 40);
  4763. circle2.buttonMode = false;
  4764. circle2.addEventListener(MouseEvent.CLICK, clicked);
  4765. function clicked(event:MouseEvent):void {
  4766. trace ("Click!");
  4767. }
  4768. addChild(circle1);
  4769. addChild(circle2);
  4770. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#SimpleButton" class="- topic/link "><linktext class="- topic/linktext ">SimpleButton</linktext></link><link href="flash.display.xml#Sprite/useHandCursor" class="- topic/link "><linktext class="- topic/linktext ">Sprite.useHandCursor</linktext></link><link href="flash.display.xml#InteractiveObject/tabEnabled" class="- topic/link "><linktext class="- topic/linktext ">InteractiveObject.tabEnabled</linktext></link><link href="flash.display.xml#DisplayObjectContainer/mouseChildren" class="- topic/link "><linktext class="- topic/linktext ">DisplayObjectContainer.mouseChildren</linktext></link></related-links></apiValue><apiValue id="flash.display:Sprite:dropTarget: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 ">dropTarget</apiName><shortdesc class="- topic/shortdesc ">
  4771. Specifies the display object over which the sprite is being dragged, or on
  4772. which the sprite was dropped.</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="AIR" version="1.0" 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 "><keyword class="- topic/keyword ">Sprite, Sprite.dropTarget, dropTarget
  4773. </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 ">flash.display:DisplayObject</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Specifies the DisplayObject over which the sprite is being dragged, or on which the
  4774. sprite was dropped.
  4775. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4776. Specifies the display object over which the sprite is being dragged, or on
  4777. which the sprite was dropped.
  4778. </apiDesc><example conref="examples\Sprite.dropTarget.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite and two <codeph class="+ topic/ph pr-d/codeph ">target</codeph>
  4779. sprites. The <codeph class="+ topic/ph pr-d/codeph ">startDrag()</codeph> method is called on the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite when the user
  4780. positions the cursor over the sprite and presses the mouse button, and the <codeph class="+ topic/ph pr-d/codeph ">stopDrag()</codeph> method
  4781. is called when the user releases the mouse button. This lets the user drag the sprite. On release of the mouse
  4782. button, the <codeph class="+ topic/ph pr-d/codeph ">mouseRelease()</codeph> method is called, which in turn traces the <codeph class="+ topic/ph pr-d/codeph ">name</codeph>
  4783. of the <codeph class="+ topic/ph pr-d/codeph ">dropTarget</codeph> object &#151; the one to which the user dragged the
  4784. <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite:
  4785. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4786. import flash.display.Sprite;
  4787. import flash.events.MouseEvent;
  4788. var circle:Sprite = new Sprite();
  4789. circle.graphics.beginFill(0xFFCC00);
  4790. circle.graphics.drawCircle(0, 0, 40);
  4791. var target1:Sprite = new Sprite();
  4792. target1.graphics.beginFill(0xCCFF00);
  4793. target1.graphics.drawRect(0, 0, 100, 100);
  4794. target1.name = "target1";
  4795. var target2:Sprite = new Sprite();
  4796. target2.graphics.beginFill(0xCCFF00);
  4797. target2.graphics.drawRect(0, 200, 100, 100);
  4798. target2.name = "target2";
  4799. addChild(target1);
  4800. addChild(target2);
  4801. addChild(circle);
  4802. circle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown)
  4803. function mouseDown(event:MouseEvent):void {
  4804. circle.startDrag();
  4805. }
  4806. circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
  4807. function mouseReleased(event:MouseEvent):void {
  4808. circle.stopDrag();
  4809. trace(circle.dropTarget.name);
  4810. }
  4811. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/startDrag()" class="- topic/link "><linktext class="- topic/linktext ">startDrag()</linktext></link><link href="flash.display.xml#Sprite/stopDrag()" class="- topic/link "><linktext class="- topic/linktext ">stopDrag()</linktext></link></related-links></apiValue><apiValue id="flash.display:Sprite:graphics: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 ">graphics</apiName><shortdesc class="- topic/shortdesc ">
  4812. Specifies the Graphics object that belongs to this sprite where vector
  4813. drawing commands can occur.</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="AIR" version="1.0" 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 ">flash.display:Graphics</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">Specifies a Graphics object.
  4814. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4815. Specifies the Graphics object that belongs to this sprite where vector
  4816. drawing commands can occur.
  4817. </apiDesc><example conref="examples\Sprite.graphics.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite and uses its
  4818. <codeph class="+ topic/ph pr-d/codeph ">graphics</codeph> property to draw a circle with a yellow (0xFFCC00) fill:
  4819. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4820. import flash.display.Sprite;
  4821. var circle:Sprite = new Sprite();
  4822. circle.graphics.beginFill(0xFFCC00);
  4823. circle.graphics.drawCircle(40, 40, 40);
  4824. addChild(circle);
  4825. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:Sprite:hitArea: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 ">hitArea</apiName><shortdesc class="- topic/shortdesc ">
  4826. Designates another sprite to serve as the hit area for a sprite.</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="AIR" version="1.0" 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="readwrite" class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiValueAccess "/><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">flash.display:Sprite</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4827. Designates another sprite to serve as the hit area for a sprite. If the <codeph class="+ topic/ph pr-d/codeph ">hitArea</codeph>
  4828. property does not exist or the value is <codeph class="+ topic/ph pr-d/codeph ">null</codeph> or <codeph class="+ topic/ph pr-d/codeph ">undefined</codeph>, the
  4829. sprite itself is used as the hit area. The value of the <codeph class="+ topic/ph pr-d/codeph ">hitArea</codeph> property can
  4830. be a reference to a Sprite object.
  4831. <p class="- topic/p ">You can change the <codeph class="+ topic/ph pr-d/codeph ">hitArea</codeph> property at any time; the modified sprite immediately
  4832. uses the new hit area behavior. The sprite designated as the hit area does not need to be
  4833. visible; its graphical shape, although not visible, is still detected as the hit area.</p>
  4834. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> You must set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph> the <codeph class="+ topic/ph pr-d/codeph ">mouseEnabled</codeph>
  4835. property of the sprite designated as the hit area. Otherwise, your sprite button might
  4836. not work because the sprite designated as the hit area receives the user input events instead
  4837. of your sprite button.</p>
  4838. </apiDesc><example conref="examples\Sprite.hitArea.1.as" class="- topic/example "> The following example creates a <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite and a <codeph class="+ topic/ph pr-d/codeph ">square</codeph>
  4839. sprite. The <codeph class="+ topic/ph pr-d/codeph ">square</codeph> sprite is the <codeph class="+ topic/ph pr-d/codeph ">hitArea</codeph> for the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite.
  4840. So when the user clicks the <codeph class="+ topic/ph pr-d/codeph ">square</codeph> sprite, the <codeph class="+ topic/ph pr-d/codeph ">circle</codeph> sprite dispatches
  4841. a <codeph class="+ topic/ph pr-d/codeph ">click</codeph> event:
  4842. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4843. import flash.display.Sprite;
  4844. import flash.events.MouseEvent;
  4845. var circle:Sprite = new Sprite();
  4846. circle.graphics.beginFill(0xFFCC00);
  4847. circle.graphics.drawCircle(0, 0, 40);
  4848. var square:Sprite = new Sprite();
  4849. square.graphics.beginFill(0xCCFF00);
  4850. square.graphics.drawRect(200, 0, 100, 100);
  4851. circle.hitArea = square;
  4852. square.mouseEnabled = false;
  4853. circle.addEventListener(MouseEvent.CLICK, clicked);
  4854. function clicked(event:MouseEvent):void{
  4855. trace(event.target == circle); // true
  4856. trace(event.target == square); // false
  4857. }
  4858. addChild(circle);
  4859. addChild(square);
  4860. </codeblock></example></apiValueDetail></apiValue><apiValue id="flash.display:Sprite: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 ">
  4861. Controls sound within this sprite.</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="AIR" version="1.0" 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="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 ">
  4862. Controls sound within this sprite.
  4863. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> This property does not affect HTML content in an HTMLControl object (in Adobe AIR).</p>
  4864. </apiDesc><example conref="examples\Sprite.soundTransform.1.as" class="- topic/example "> The following example creates a sprite named <codeph class="+ topic/ph pr-d/codeph ">container</codeph>
  4865. and adds a Loader object to its child list. The Loader object loads a SWF file.
  4866. When the user clicks the link in the <codeph class="+ topic/ph pr-d/codeph ">tf</codeph> text field <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, the
  4867. <codeph class="+ topic/ph pr-d/codeph ">mute()</codeph> method sets the <codeph class="+ topic/ph pr-d/codeph ">volume</codeph> property of the
  4868. <codeph class="+ topic/ph pr-d/codeph ">soundTransform</codeph> property of the <codeph class="+ topic/ph pr-d/codeph ">container</codeph> sprite:
  4869. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4870. import flash.display.Sprite;
  4871. import flash.display.Loader;
  4872. import flash.events.IOErrorEvent;
  4873. import flash.events.MouseEvent;
  4874. import flash.net.URLRequest;
  4875. import flash.text.TextField;
  4876. import flash.media.SoundTransform;
  4877. var container:Sprite = new Sprite();
  4878. addChild(container);
  4879. var ldr:Loader = new Loader;
  4880. var urlReq:URLRequest = new URLRequest("SoundPlayer.swf");
  4881. ldr.load(urlReq);
  4882. container.addChild(ldr);
  4883. ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, urlNotFound);
  4884. var tf:TextField = new TextField();
  4885. tf.htmlText = "&lt;a href = 'event:Mute'&gt;Mute / Unmute&lt;/a&gt;";
  4886. addChild(tf);
  4887. var mySoundTransform:SoundTransform = new SoundTransform();
  4888. mySoundTransform.volume = 1;
  4889. tf.addEventListener(MouseEvent.CLICK, mute);
  4890. function mute(event:MouseEvent):void {
  4891. if (mySoundTransform.volume == 0) {
  4892. mySoundTransform.volume = 1;
  4893. } else {
  4894. mySoundTransform.volume = 0;
  4895. }
  4896. container.soundTransform = mySoundTransform;
  4897. }
  4898. function urlNotFound(event:IOErrorEvent):void {
  4899. trace("The URL was not found.");
  4900. }
  4901. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.media.xml#SoundTransform" class="- topic/link "><linktext class="- topic/linktext ">flash.media.SoundTransform</linktext></link></related-links></apiValue><apiValue id="flash.display:Sprite:useHandCursor: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 ">useHandCursor</apiName><shortdesc class="- topic/shortdesc ">
  4902. A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls
  4903. over a sprite in which the buttonMode property is set to true.</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="AIR" version="1.0" 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 ">Boolean</apiValueClassifier><apiTipTexts><apiTipText class="+ topic/state reference/state apiRef/apiQualifier adobe-api-d/apiTipText ">A Boolean value that indicates whether the pointing hand (hand cursor) appears when the
  4904. pointer rolls over a sprite in which the buttonMode property is set to true.
  4905. </apiTipText></apiTipTexts></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4906. A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls
  4907. over a sprite in which the <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  4908. The default value of the <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> property is <codeph class="+ topic/ph pr-d/codeph ">true</codeph>.
  4909. If <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, the pointing hand used for buttons
  4910. appears when the pointer rolls over a button sprite. If <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> is
  4911. <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, the arrow pointer is used instead.
  4912. <p class="- topic/p ">You can change the <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> property at any time; the modified sprite
  4913. immediately takes on the new cursor appearance. </p>
  4914. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> In Flex or Flash Builder, if your sprite has child sprites, you might want to
  4915. set the <codeph class="+ topic/ph pr-d/codeph ">mouseChildren</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>. For example, if you want a hand
  4916. cursor to appear over a Flex &lt;mx:Label&gt; control, set the <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> and
  4917. <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph> properties to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, and the <codeph class="+ topic/ph pr-d/codeph ">mouseChildren</codeph> property
  4918. to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>.</p>
  4919. </apiDesc><example conref="examples\Sprite.useHandCursor.1.as" class="- topic/example "> The following example creates two sprites and sets the <codeph class="+ topic/ph pr-d/codeph ">buttonMode</codeph>
  4920. property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> for both, yet it sets the <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph>
  4921. property to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> for one and <codeph class="+ topic/ph pr-d/codeph ">false</codeph> for the other. When you compile
  4922. and run the application, both sprites respond as buttons (and are included in the tab order), but
  4923. only the one in which <codeph class="+ topic/ph pr-d/codeph ">useHandCursor</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> uses the hand cursor:
  4924. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4925. import flash.display.Sprite;
  4926. import flash.events.MouseEvent;
  4927. var circle1:Sprite = new Sprite();
  4928. circle1.graphics.beginFill(0xFFCC00);
  4929. circle1.graphics.drawCircle(40, 40, 40);
  4930. circle1.buttonMode = true;
  4931. circle1.useHandCursor = true;
  4932. circle1.addEventListener(MouseEvent.CLICK, clicked);
  4933. var circle2:Sprite = new Sprite();
  4934. circle2.graphics.beginFill(0xFFCC00);
  4935. circle2.graphics.drawCircle(120, 40, 40);
  4936. circle2.buttonMode = true;
  4937. circle2.useHandCursor = false;
  4938. circle2.addEventListener(MouseEvent.CLICK, clicked);
  4939. function clicked(event:MouseEvent):void {
  4940. trace ("Click!");
  4941. }
  4942. addChild(circle1);
  4943. addChild(circle2);
  4944. </codeblock></example></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Sprite/buttonMode" class="- topic/link "><linktext class="- topic/linktext ">buttonMode</linktext></link><link href="flash.display.xml#DisplayObjectContainer/mouseChildren" class="- topic/link "><linktext class="- topic/linktext ">DisplayObjectContainer.mouseChildren</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:GraphicsBitmapFill" 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 ">GraphicsBitmapFill</apiName><shortdesc class="- topic/shortdesc ">
  4945. Defines a bitmap fill.</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 "/><apiBaseInterface>flash.display:IGraphicsFill</apiBaseInterface><apiBaseInterface>flash.display:IGraphicsData</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4946. Defines a bitmap fill. The bitmap can be smoothed, repeated or tiled to fill
  4947. the area; or manipulated using a transformation matrix.
  4948. <p class="- topic/p ">
  4949. Use a GraphicsBitmapFill object with the <codeph class="+ topic/ph pr-d/codeph ">Graphics.drawGraphicsData()</codeph> method.
  4950. Drawing a GraphicsBitmapFill object is the equivalent of calling the <codeph class="+ topic/ph pr-d/codeph ">Graphics.beginBitmapFill()</codeph> method.
  4951. </p>
  4952. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/drawGraphicsData()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.drawGraphicsData()</linktext></link><link href="flash.display.xml#Graphics/beginBitmapFill()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.beginBitmapFill()</linktext></link></related-links><apiConstructor id="flash.display:GraphicsBitmapFill:GraphicsBitmapFill" 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 ">GraphicsBitmapFill</apiName><shortdesc class="- topic/shortdesc ">
  4953. Creates a new GraphicsBitmapFill 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="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><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 ">bitmapData</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:BitmapData</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A transparent or opaque bitmap image that contains the bits to display.
  4954. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">matrix</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.geom:Matrix</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A matrix object (of the flash.geom.Matrix class), which you use to
  4955. define transformations on the bitmap.
  4956. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">repeat</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 ">If <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, the bitmap image repeats in a tiled pattern. If
  4957. <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, the bitmap image does not repeat, and the edges of the bitmap are
  4958. used for any fill area that extends beyond the bitmap.
  4959. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">smooth</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 ">If <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, upscaled bitmap images are rendered using a
  4960. nearest-neighbor algorithm and appear pixelated. If <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, upscaled
  4961. bitmap images are rendered using a bilinear algorithm. Rendering that uses the nearest-neighbor
  4962. algorithm is usually faster.
  4963. </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4964. Creates a new GraphicsBitmapFill object.
  4965. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/beginBitmapFill()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.beginBitmapFill()</linktext></link></related-links></apiConstructor><apiValue id="flash.display:GraphicsBitmapFill:bitmapData" 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 ">bitmapData</apiName><shortdesc class="- topic/shortdesc ">
  4966. A transparent or opaque bitmap 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="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 "><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 ">flash.display:BitmapData</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4967. A transparent or opaque bitmap image.
  4968. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#BitmapData" class="- topic/link "><linktext class="- topic/linktext ">flash.display.BitmapData</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsBitmapFill:matrix" 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 ">matrix</apiName><shortdesc class="- topic/shortdesc ">
  4969. A matrix object (of the flash.geom.Matrix class) that
  4970. defines transformations on the 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="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 "><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 ">flash.geom:Matrix</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4971. A matrix object (of the flash.geom.Matrix class) that
  4972. defines transformations on the bitmap. For example, the following matrix
  4973. rotates a bitmap by 45 degrees (pi/4 radians):
  4974. <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
  4975. matrix = new flash.geom.Matrix();
  4976. matrix.rotate(Math.PI / 4);
  4977. </codeblock>
  4978. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.geom.xml#Matrix" class="- topic/link "><linktext class="- topic/linktext ">flash.geom.Matrix</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsBitmapFill:repeat" 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 ">repeat</apiName><shortdesc class="- topic/shortdesc ">
  4979. Specifies whether to repeat the bitmap image in a tiled pattern.</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 "><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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4980. Specifies whether to repeat the bitmap image in a tiled pattern.
  4981. <p class="- topic/p ">
  4982. If <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, the bitmap image repeats in a tiled pattern. If
  4983. <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, the bitmap image does not repeat, and the outermost pixels along
  4984. the edges of the bitmap are used for any fill area that extends beyond the bounds of the bitmap.</p>
  4985. <p class="- topic/p ">For example, consider the following bitmap (a 20 x 20-pixel checkerboard pattern):</p>
  4986. <p class="- topic/p "><adobeimage alt="20 by 20 pixel checkerboard" href="../../images/movieClip_beginBitmapFill_repeat_1.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4987. <p class="- topic/p ">When <codeph class="+ topic/ph pr-d/codeph ">repeat</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph> (as in the following example), the bitmap fill
  4988. repeats the bitmap:</p>
  4989. <p class="- topic/p "><adobeimage alt="60 by 60 pixel checkerboard" href="../../images/movieClip_beginBitmapFill_repeat_2.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4990. <p class="- topic/p ">When <codeph class="+ topic/ph pr-d/codeph ">repeat</codeph> is set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, the bitmap fill uses the edge
  4991. pixels for the fill area outside the bitmap:</p>
  4992. <p class="- topic/p "><adobeimage alt="60 by 60 pixel image with no repeating" href="../../images/movieClip_beginBitmapFill_repeat_3.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  4993. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsBitmapFill:smooth" 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 ">smooth</apiName><shortdesc class="- topic/shortdesc ">
  4994. Specifies whether to apply a smoothing algorithm to the bitmap 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="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 "><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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  4995. Specifies whether to apply a smoothing algorithm to the bitmap image.
  4996. <p class="- topic/p ">
  4997. If <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, upscaled bitmap images are rendered by using a
  4998. nearest-neighbor algorithm and look pixelated. If <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, upscaled
  4999. bitmap images are rendered by using a bilinear algorithm. Rendering by using the nearest
  5000. neighbor algorithm is usually faster.
  5001. </p>
  5002. </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:GraphicsStroke" 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 ">GraphicsStroke</apiName><shortdesc class="- topic/shortdesc ">
  5003. Defines a line style or stroke.</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 "/><apiBaseInterface>flash.display:IGraphicsStroke</apiBaseInterface><apiBaseInterface>flash.display:IGraphicsData</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5004. Defines a line style or stroke.
  5005. <p class="- topic/p ">
  5006. Use a GraphicsStroke object with the <codeph class="+ topic/ph pr-d/codeph ">Graphics.drawGraphicsData()</codeph> method.
  5007. Drawing a GraphicsStroke object is the equivalent of calling one of the methods of the Graphics
  5008. class that sets the line style, such as the <codeph class="+ topic/ph pr-d/codeph ">Graphics.lineStyle()</codeph> method, the
  5009. <codeph class="+ topic/ph pr-d/codeph ">Graphics.lineBitmapStyle()</codeph> method, or the <codeph class="+ topic/ph pr-d/codeph ">Graphics.lineGradientStyle()</codeph>
  5010. method.
  5011. </p>
  5012. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/lineStyle()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.lineStyle()</linktext></link><link href="flash.display.xml#Graphics/lineBitmapStyle()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.lineBitmapStyle()</linktext></link><link href="flash.display.xml#Graphics/lineGradientStyle()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.lineGradientStyle()</linktext></link><link href="flash.display.xml#Graphics/drawGraphicsData()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.drawGraphicsData()</linktext></link></related-links><apiConstructor id="flash.display:GraphicsStroke:GraphicsStroke" 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 ">GraphicsStroke</apiName><shortdesc class="- topic/shortdesc ">
  5013. Creates a new GraphicsStroke 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="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><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 ">thickness</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">unknown</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An integer that indicates the thickness of the line in
  5014. points; valid values are 0-255. If a number is not specified, or if the
  5015. parameter is undefined, a line is not drawn. If a value of less than 0 is passed,
  5016. the default is 0. The value 0 indicates hairline thickness; the maximum thickness
  5017. is 255. If a value greater than 255 is passed, the default is 255.
  5018. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">pixelHinting</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 that specifies whether to hint strokes
  5019. to full pixels. This affects both the position of anchors of a curve and the line stroke size
  5020. itself. With <codeph class="+ topic/ph pr-d/codeph ">pixelHinting</codeph> set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, Flash Player hints line widths
  5021. to full pixel widths. With <codeph class="+ topic/ph pr-d/codeph ">pixelHinting</codeph> set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, disjoints can
  5022. appear for curves and straight lines. For example, the following illustrations show how
  5023. Flash Player renders two rounded rectangles that are identical, except that the
  5024. <codeph class="+ topic/ph pr-d/codeph ">pixelHinting</codeph> parameter used in the <codeph class="+ topic/ph pr-d/codeph ">lineStyle()</codeph> method is set
  5025. differently (the images are scaled by 200%, to emphasize the difference):
  5026. <p class="- topic/p "><adobeimage alt="pixelHinting false and pixelHinting true" href="../../images/lineStyle_pixelHinting.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5027. <p class="- topic/p ">If a value is not supplied, the line does not use pixel hinting.</p>
  5028. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">scaleMode</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">normal</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value from the LineScaleMode class that
  5029. specifies which scale mode to use:
  5030. <ul class="- topic/ul "><li class="- topic/li ">
  5031. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.NORMAL</codeph>Always scale the line thickness when the object is scaled
  5032. (the default).
  5033. </li><li class="- topic/li ">
  5034. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.NONE</codeph>Never scale the line thickness.
  5035. </li><li class="- topic/li ">
  5036. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.VERTICAL</codeph>Do not scale the line thickness if the object is scaled vertically
  5037. <i class="+ topic/ph hi-d/i ">only</i>. For example, consider the following circles, drawn with a one-pixel line, and each with the
  5038. <codeph class="+ topic/ph pr-d/codeph ">scaleMode</codeph> parameter set to <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.VERTICAL</codeph>. The circle on the left
  5039. is scaled vertically only, and the circle on the right is scaled both vertically and horizontally:
  5040. <p class="- topic/p "><adobeimage alt="A circle scaled vertically, and a circle scaled both vertically and horizontally." href="../../images/LineScaleMode_VERTICAL.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5041. </li><li class="- topic/li ">
  5042. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.HORIZONTAL</codeph>Do not scale the line thickness if the object is scaled horizontally
  5043. <i class="+ topic/ph hi-d/i ">only</i>. For example, consider the following circles, drawn with a one-pixel line, and each with the
  5044. <codeph class="+ topic/ph pr-d/codeph ">scaleMode</codeph> parameter set to <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.HORIZONTAL</codeph>. The circle on the left
  5045. is scaled horizontally only, and the circle on the right is scaled both vertically and horizontally:
  5046. <p class="- topic/p "><adobeimage alt="A circle scaled horizontally, and a circle scaled both vertically and horizontally." href="../../images/LineScaleMode_HORIZONTAL.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5047. </li></ul>
  5048. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">caps</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 ">A value from the CapsStyle class that specifies the type of caps at the end
  5049. of lines. Valid values are: <codeph class="+ topic/ph pr-d/codeph ">CapsStyle.NONE</codeph>, <codeph class="+ topic/ph pr-d/codeph ">CapsStyle.ROUND</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">CapsStyle.SQUARE</codeph>.
  5050. If a value is not indicated, Flash uses round caps.
  5051. <p class="- topic/p ">For example, the following illustrations show the different <codeph class="+ topic/ph pr-d/codeph ">capsStyle</codeph>
  5052. settings. For each setting, the illustration shows a blue line with a thickness of 30 (for
  5053. which the <codeph class="+ topic/ph pr-d/codeph ">capsStyle</codeph> applies), and a superimposed black line with a thickness of 1
  5054. (for which no <codeph class="+ topic/ph pr-d/codeph ">capsStyle</codeph> applies):
  5055. </p>
  5056. <p class="- topic/p "><adobeimage alt="NONE, ROUND, and SQUARE" href="../../images/linecap.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5057. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">joints</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">String</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">round</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A value from the JointStyle class that specifies the type of joint appearance
  5058. used at angles. Valid
  5059. values are: <codeph class="+ topic/ph pr-d/codeph ">JointStyle.BEVEL</codeph>, <codeph class="+ topic/ph pr-d/codeph ">JointStyle.MITER</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">JointStyle.ROUND</codeph>.
  5060. If a value is not indicated, Flash uses round joints.
  5061. <p class="- topic/p ">For example, the following illustrations show the different <codeph class="+ topic/ph pr-d/codeph ">joints</codeph>
  5062. settings. For each setting, the illustration shows an angled blue line with a thickness of
  5063. 30 (for which the <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph> applies), and a superimposed angled black line with a
  5064. thickness of 1 (for which no <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph> applies):
  5065. </p>
  5066. <p class="- topic/p "><adobeimage alt="MITER, ROUND, and BEVEL" href="../../images/linejoin.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5067. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> For <codeph class="+ topic/ph pr-d/codeph ">joints</codeph> set to <codeph class="+ topic/ph pr-d/codeph ">JointStyle.MITER</codeph>,
  5068. you can use the <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> parameter to limit the length of the miter.</p>
  5069. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">miterLimit</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">Number</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">3.0</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">A number that indicates the limit at which a miter is cut off.
  5070. Valid values range from 1 to 255 (and values outside that range are rounded to 1 or 255).
  5071. This value is only used if the <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph>
  5072. is set to <codeph class="+ topic/ph pr-d/codeph ">"miter"</codeph>. The
  5073. <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> value represents the length that a miter can extend beyond the point
  5074. at which the lines meet to form a joint. The value expresses a factor of the line
  5075. <codeph class="+ topic/ph pr-d/codeph ">thickness</codeph>. For example, with a <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> factor of 2.5 and a
  5076. <codeph class="+ topic/ph pr-d/codeph ">thickness</codeph> of 10 pixels, the miter is cut off at 25 pixels.
  5077. <p class="- topic/p ">For example, consider the following angled lines, each drawn with a <codeph class="+ topic/ph pr-d/codeph ">thickness</codeph>
  5078. of 20, but with <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> set to 1, 2, and 4. Superimposed are black reference
  5079. lines showing the meeting points of the joints:</p>
  5080. <p class="- topic/p "><adobeimage alt="lines with miterLimit set to 1, 2, and 4" href="../../images/miterLimit.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5081. <p class="- topic/p ">Notice that a given <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> value has a specific maximum angle
  5082. for which the miter is cut off. The following table lists some examples:</p>
  5083. <adobetable class="innertable"><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 ">miterLimit</codeph> value:</entry><entry class="- topic/entry ">Angles smaller than this are cut off:</entry></row></thead><tbody class="- topic/tbody "><row class="- topic/row "><entry class="- topic/entry ">1.414</entry><entry class="- topic/entry ">90 degrees</entry></row><row class="- topic/row "><entry class="- topic/entry ">2</entry><entry class="- topic/entry ">60 degrees</entry></row><row class="- topic/row "><entry class="- topic/entry ">4</entry><entry class="- topic/entry ">30 degrees</entry></row><row class="- topic/row "><entry class="- topic/entry ">8</entry><entry class="- topic/entry ">15 degrees</entry></row></tbody></tgroup></adobetable>
  5084. </apiDesc></apiParam><apiParam class="- topic/ph reference/ph apiRef/apiDefItem apiOperation/apiParam "><apiItemName class="- topic/keyword reference/keyword apiRef/apiItemName ">fill</apiItemName><apiOperationClassifier class="- topic/xref reference/xref apiRef/apiRelation apiOperation/apiOperationClassifier ">flash.display:IGraphicsFill</apiOperationClassifier><apiData class="- topic/ph reference/ph apiRef/apiData ">null</apiData><apiDesc class="- topic/section reference/section apiRef/apiDesc ">An IGraphicsFill instance containing data for filling a stroke. An IGraphicsFill
  5085. instance can represent a series of fill commands.
  5086. </apiDesc></apiParam></apiConstructorDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5087. Creates a new GraphicsStroke object.
  5088. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#LineScaleMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.LineScaleMode</linktext></link><link href="flash.display.xml#CapsStyle" class="- topic/link "><linktext class="- topic/linktext ">flash.display.CapsStyle</linktext></link><link href="flash.display.xml#JointStyle" class="- topic/link "><linktext class="- topic/linktext ">flash.display.JointStyle</linktext></link><link href="flash.display.xml#IGraphicsFill" class="- topic/link "><linktext class="- topic/linktext ">flash.display.IGraphicsFill</linktext></link></related-links></apiConstructor><apiValue id="flash.display:GraphicsStroke:fill" 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 ">fill</apiName><shortdesc class="- topic/shortdesc ">
  5089. Specifies the instance containing data for filling a stroke.</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 "><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 ">flash.display:IGraphicsFill</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5090. Specifies the instance containing data for filling a stroke. An IGraphicsFill
  5091. instance can represent a series of fill commands.
  5092. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#IGraphicsFill" class="- topic/link "><linktext class="- topic/linktext ">flash.display.IGraphicsFill</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsStroke:miterLimit" 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 ">miterLimit</apiName><shortdesc class="- topic/shortdesc ">
  5093. Indicates the limit at which a miter is cut off.</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 "><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 ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5094. Indicates the limit at which a miter is cut off.
  5095. Valid values range from 1 to 255 (and values outside that range are rounded to 1 or 255).
  5096. This value is only used if the <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph>
  5097. is set to <codeph class="+ topic/ph pr-d/codeph ">"miter"</codeph>. The
  5098. <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> value represents the length that a miter can extend beyond the point
  5099. at which the lines meet to form a joint. The value expresses a factor of the line
  5100. <codeph class="+ topic/ph pr-d/codeph ">thickness</codeph>. For example, with a <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> factor of 2.5 and a
  5101. <codeph class="+ topic/ph pr-d/codeph ">thickness</codeph> of 10 pixels, the miter is cut off at 25 pixels.
  5102. <p class="- topic/p ">For example, consider the following angled lines, each drawn with a <codeph class="+ topic/ph pr-d/codeph ">thickness</codeph>
  5103. of 20, but with <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> set to 1, 2, and 4. Superimposed are black reference
  5104. lines showing the meeting points of the joints:</p>
  5105. <p class="- topic/p "><adobeimage alt="lines with miterLimit set to 1, 2, and 4" href="../../images/miterLimit.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5106. <p class="- topic/p ">Notice that a given <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> value has a specific maximum angle
  5107. for which the miter is cut off. The following table lists some examples:</p>
  5108. <adobetable class="innertable"><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 ">miterLimit</codeph> value:</entry><entry class="- topic/entry ">Angles smaller than this are cut off:</entry></row></thead><tbody class="- topic/tbody "><row class="- topic/row "><entry class="- topic/entry ">1.414</entry><entry class="- topic/entry ">90 degrees</entry></row><row class="- topic/row "><entry class="- topic/entry ">2</entry><entry class="- topic/entry ">60 degrees</entry></row><row class="- topic/row "><entry class="- topic/entry ">4</entry><entry class="- topic/entry ">30 degrees</entry></row><row class="- topic/row "><entry class="- topic/entry ">8</entry><entry class="- topic/entry ">15 degrees</entry></row></tbody></tgroup></adobetable>
  5109. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsStroke:pixelHinting" 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 ">pixelHinting</apiName><shortdesc class="- topic/shortdesc ">
  5110. Specifies whether to hint strokes
  5111. to full 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="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 "><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 ">Boolean</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5112. Specifies whether to hint strokes
  5113. to full pixels. This affects both the position of anchors of a curve and the line stroke size
  5114. itself. With <codeph class="+ topic/ph pr-d/codeph ">pixelHinting</codeph> set to <codeph class="+ topic/ph pr-d/codeph ">true</codeph>, Flash Player hints line widths
  5115. to full pixel widths. With <codeph class="+ topic/ph pr-d/codeph ">pixelHinting</codeph> set to <codeph class="+ topic/ph pr-d/codeph ">false</codeph>, disjoints can
  5116. appear for curves and straight lines. For example, the following illustrations show how
  5117. Flash Player renders two rounded rectangles that are identical, except that the
  5118. <codeph class="+ topic/ph pr-d/codeph ">pixelHinting</codeph> parameter used in the <codeph class="+ topic/ph pr-d/codeph ">lineStyle()</codeph> method is set
  5119. differently (the images are scaled by 200%, to emphasize the difference):
  5120. <p class="- topic/p "><adobeimage alt="pixelHinting false and pixelHinting true" href="../../images/lineStyle_pixelHinting.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5121. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsStroke:thickness" 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 ">thickness</apiName><shortdesc class="- topic/shortdesc ">
  5122. Indicates the thickness of the line in
  5123. points; valid values are 0-255.</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 "><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 ">Number</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5124. Indicates the thickness of the line in
  5125. points; valid values are 0-255. If a number is not specified, or if the
  5126. parameter is undefined, a line is not drawn. If a value of less than 0 is passed,
  5127. the default is 0. The value 0 indicates hairline thickness; the maximum thickness
  5128. is 255. If a value greater than 255 is passed, the default is 255.
  5129. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:GraphicsStroke:caps: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 ">caps</apiName><shortdesc class="- topic/shortdesc ">
  5130. Specifies the type of caps at the end
  5131. of lines.</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 "><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 ">
  5132. Specifies the type of caps at the end
  5133. of lines. Valid values are: <codeph class="+ topic/ph pr-d/codeph ">CapsStyle.NONE</codeph>, <codeph class="+ topic/ph pr-d/codeph ">CapsStyle.ROUND</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">CapsStyle.SQUARE</codeph>.
  5134. If a value is not indicated, Flash uses round caps.
  5135. <p class="- topic/p ">For example, the following illustrations show the different <codeph class="+ topic/ph pr-d/codeph ">capsStyle</codeph>
  5136. settings. For each setting, the illustration shows a blue line with a thickness of 30 (for
  5137. which the <codeph class="+ topic/ph pr-d/codeph ">capsStyle</codeph> applies), and a superimposed black line with a thickness of 1
  5138. (for which no <codeph class="+ topic/ph pr-d/codeph ">capsStyle</codeph> applies):
  5139. </p>
  5140. <p class="- topic/p "><adobeimage alt="NONE, ROUND, and SQUARE" href="../../images/linecap.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5141. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#CapsStyle" class="- topic/link "><linktext class="- topic/linktext ">flash.display.CapsStyle</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsStroke:joints: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 ">joints</apiName><shortdesc class="- topic/shortdesc ">
  5142. Specifies the type of joint appearance
  5143. used at angles.</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 "><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 ">
  5144. Specifies the type of joint appearance
  5145. used at angles. Valid
  5146. values are: <codeph class="+ topic/ph pr-d/codeph ">JointStyle.BEVEL</codeph>, <codeph class="+ topic/ph pr-d/codeph ">JointStyle.MITER</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">JointStyle.ROUND</codeph>.
  5147. If a value is not indicated, Flash uses round joints.
  5148. <p class="- topic/p ">For example, the following illustrations show the different <codeph class="+ topic/ph pr-d/codeph ">joints</codeph>
  5149. settings. For each setting, the illustration shows an angled blue line with a thickness of
  5150. 30 (for which the <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph> applies), and a superimposed angled black line with a
  5151. thickness of 1 (for which no <codeph class="+ topic/ph pr-d/codeph ">jointStyle</codeph> applies):
  5152. </p>
  5153. <p class="- topic/p "><adobeimage alt="MITER, ROUND, and BEVEL" href="../../images/linejoin.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5154. <p class="- topic/p "><b class="+ topic/ph hi-d/b ">Note:</b> For <codeph class="+ topic/ph pr-d/codeph ">joints</codeph> set to <codeph class="+ topic/ph pr-d/codeph ">JointStyle.MITER</codeph>,
  5155. you can use the <codeph class="+ topic/ph pr-d/codeph ">miterLimit</codeph> parameter to limit the length of the miter.</p>
  5156. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#JointStyle" class="- topic/link "><linktext class="- topic/linktext ">flash.display.JointStyle</linktext></link></related-links></apiValue><apiValue id="flash.display:GraphicsStroke:scaleMode: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 ">scaleMode</apiName><shortdesc class="- topic/shortdesc ">
  5157. Specifies the stroke thickness scaling.</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 "><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 ">
  5158. Specifies the stroke thickness scaling. Valid values are:
  5159. <ul class="- topic/ul "><li class="- topic/li ">
  5160. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.NORMAL</codeph>Always scale the line thickness when the object is scaled
  5161. (the default).
  5162. </li><li class="- topic/li ">
  5163. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.NONE</codeph>Never scale the line thickness.
  5164. </li><li class="- topic/li ">
  5165. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.VERTICAL</codeph>Do not scale the line thickness if the object is scaled vertically
  5166. <i class="+ topic/ph hi-d/i ">only</i>. For example, consider the following circles, drawn with a one-pixel line, and each with the
  5167. <codeph class="+ topic/ph pr-d/codeph ">scaleMode</codeph> parameter set to <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.VERTICAL</codeph>. The circle on the left
  5168. is scaled vertically only, and the circle on the right is scaled both vertically and horizontally:
  5169. <p class="- topic/p "><adobeimage alt="A circle scaled vertically, and a circle scaled both vertically and horizontally." href="../../images/LineScaleMode_VERTICAL.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5170. </li><li class="- topic/li ">
  5171. <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.HORIZONTAL</codeph>Do not scale the line thickness if the object is scaled horizontally
  5172. <i class="+ topic/ph hi-d/i ">only</i>. For example, consider the following circles, drawn with a one-pixel line, and each with the
  5173. <codeph class="+ topic/ph pr-d/codeph ">scaleMode</codeph> parameter set to <codeph class="+ topic/ph pr-d/codeph ">LineScaleMode.HORIZONTAL</codeph>. The circle on the left
  5174. is scaled horizontally only, and the circle on the right is scaled both vertically and horizontally:
  5175. <p class="- topic/p "><adobeimage alt="A circle scaled horizontally, and a circle scaled both vertically and horizontally." href="../../images/LineScaleMode_HORIZONTAL.jpg" placement="inline" class="+ topic/image adobe-d/adobeimage "/></p>
  5176. </li></ul>
  5177. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#LineScaleMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.LineScaleMode</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:GraphicsEndFill" 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 ">GraphicsEndFill</apiName><shortdesc class="- topic/shortdesc ">
  5178. Indicates the end of a graphics fill.</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 "/><apiBaseInterface>flash.display:IGraphicsFill</apiBaseInterface><apiBaseInterface>flash.display:IGraphicsData</apiBaseInterface><apiBaseClassifier class="- topic/xref reference/xref apiRef/apiRelation apiClassifier/apiBaseClassifier ">Object</apiBaseClassifier></apiClassifierDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5179. Indicates the end of a graphics fill. Use a GraphicsEndFill object with the <codeph class="+ topic/ph pr-d/codeph ">Graphics.drawGraphicsData()</codeph> method.
  5180. <p class="- topic/p ">
  5181. Drawing a GraphicsEndFill object is the equivalent of calling the <codeph class="+ topic/ph pr-d/codeph ">Graphics.endFill()</codeph> method.
  5182. </p>
  5183. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/drawGraphicsData()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.drawGraphicsData()</linktext></link><link href="flash.display.xml#Graphics/endFill()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.endFill()</linktext></link></related-links><apiConstructor id="flash.display:GraphicsEndFill:GraphicsEndFill" 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 ">GraphicsEndFill</apiName><shortdesc class="- topic/shortdesc ">
  5184. Creates an object to use with the Graphics.drawGraphicsData() method to end
  5185. the fill, explicitly.</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><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 ">
  5186. Creates an object to use with the <codeph class="+ topic/ph pr-d/codeph ">Graphics.drawGraphicsData()</codeph> method to end
  5187. the fill, explicitly.
  5188. </apiDesc></apiConstructorDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Graphics/drawGraphicsData()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.drawGraphicsData()</linktext></link><link href="flash.display.xml#Graphics/endFill()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Graphics.endFill()</linktext></link></related-links></apiConstructor></apiClassifier><apiClassifier languages="" id="flash.display:ShaderPrecision" 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 ">ShaderPrecision</apiName><shortdesc class="- topic/shortdesc ">
  5189. This class defines the constants that represent the possible values for
  5190. the Shader class's precisionHint 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="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 ">
  5191. This class defines the constants that represent the possible values for
  5192. the Shader class's <codeph class="+ topic/ph pr-d/codeph ">precisionHint</codeph> property. Each constant
  5193. represents one of the precision modes for executing shader operations.
  5194. <p class="- topic/p ">The precision mode selection affects the following shader operations.
  5195. These operations are faster on an Intel processor
  5196. with the SSE instruction set:</p>
  5197. <ul class="- topic/ul "><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">sin(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">cos(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">tan(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">asin(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">acos(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">atan(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">atan(x, y)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">exp(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">exp2(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">log(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">log2(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">pow(x, y)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">reciprocal(x)</codeph></li><li class="- topic/li "><codeph class="+ topic/ph pr-d/codeph ">sqrt(x)</codeph></li></ul>
  5198. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Shader/precisionHint" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Shader.precisionHint</linktext></link></related-links><apiValue id="flash.display:ShaderPrecision:FAST" 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 ">FAST</apiName><shortdesc class="- topic/shortdesc ">
  5199. Represents fast precision 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="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 ">fast</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5200. Represents fast precision mode.
  5201. <p class="- topic/p ">Fast precision mode is designed for
  5202. maximum performance but does not work consistently on different platforms
  5203. and individual CPU configurations. In many cases, this level of precision
  5204. is sufficient to create graphic effects without visible artifacts.</p>
  5205. <p class="- topic/p ">It is usually faster to use fast precision mode than to use lookup tables.</p>
  5206. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Shader/precisionHint" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Shader.precisionHint</linktext></link></related-links></apiValue><apiValue id="flash.display:ShaderPrecision:FULL" 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 ">FULL</apiName><shortdesc class="- topic/shortdesc ">
  5207. Represents full precision 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="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 ">full</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5208. Represents full precision mode.
  5209. <p class="- topic/p ">In full precision mode, the shader computes all math
  5210. operations to the full width of the IEEE 32-bit floating standard. This mode provides
  5211. consistent behavior on all platforms. In this mode, some math operations such
  5212. as trigonometric and exponential functions can be slow.</p>
  5213. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#Shader/precisionHint" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Shader.precisionHint</linktext></link></related-links></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:BlendMode" 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 ">BlendMode</apiName><shortdesc class="- topic/shortdesc ">
  5214. A class that provides constant values for visual blend mode effects.</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><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 ">
  5215. A class that provides constant values for visual blend mode effects. These constants are used in the following:
  5216. <ul class="- topic/ul "><li class="- topic/li "> The <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property of the flash.display.DisplayObject class.</li><li class="- topic/li "> The <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> parameter of the <codeph class="+ topic/ph pr-d/codeph ">draw()</codeph> method of the
  5217. flash.display.BitmapData class</li></ul>
  5218. </apiDesc></apiClassifierDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/blendMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject.blendMode</linktext></link><link href="flash.display.xml#BitmapData/draw()" class="- topic/link "><linktext class="- topic/linktext ">flash.display.BitmapData.draw()</linktext></link></related-links><apiValue id="flash.display:BlendMode:ADD" 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 ">ADD</apiName><shortdesc class="- topic/shortdesc ">
  5219. Adds the values of the constituent colors of the display object to the colors of its background, applying a
  5220. ceiling of 0xFF.</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 "><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 ">add</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5221. Adds the values of the constituent colors of the display object to the colors of its background, applying a
  5222. ceiling of 0xFF. This setting is commonly used for animating a lightening dissolve between
  5223. two objects.
  5224. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xAAA633, and the background
  5225. pixel has an RGB value of 0xDD2200, the resulting RGB value for the displayed pixel is
  5226. 0xFFC833 (because 0xAA + 0xDD &gt; 0xFF, 0xA6 + 0x22 = 0xC8, and 0x33 + 0x00 = 0x33).</p>
  5227. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:ALPHA" 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 ">ALPHA</apiName><shortdesc class="- topic/shortdesc ">
  5228. Applies the alpha value of each pixel of the display object to the background.</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 "><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 ">alpha</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5229. Applies the alpha value of each pixel of the display object to the background.
  5230. This requires the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property of the parent display object be set to
  5231. <codeph class="+ topic/ph pr-d/codeph ">flash.display.BlendMode.LAYER</codeph>.
  5232. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5233. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:DARKEN" 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 ">DARKEN</apiName><shortdesc class="- topic/shortdesc ">
  5234. Selects the darker of the constituent colors of the display object and the colors of the background (the
  5235. colors with the smaller values).</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 "><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 ">darken</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5236. Selects the darker of the constituent colors of the display object and the colors of the background (the
  5237. colors with the smaller values). This setting is commonly used for superimposing type.
  5238. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background
  5239. pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
  5240. 0xDDCC00 (because 0xFF &gt; 0xDD, 0xCC &lt; 0xF8, and 0x33 &gt; 0x00 = 33).</p>
  5241. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5242. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:DIFFERENCE" 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 ">DIFFERENCE</apiName><shortdesc class="- topic/shortdesc ">
  5243. Compares the constituent colors of the display object with the colors of its background, and subtracts
  5244. the darker of the values of the two constituent colors from the lighter 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="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 "><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 ">difference</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5245. Compares the constituent colors of the display object with the colors of its background, and subtracts
  5246. the darker of the values of the two constituent colors from the lighter value. This setting is commonly
  5247. used for more vibrant colors.
  5248. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background
  5249. pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
  5250. 0x222C33 (because 0xFF - 0xDD = 0x22, 0xF8 - 0xCC = 0x2C, and 0x33 - 0x00 = 0x33).</p>
  5251. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:ERASE" 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 ">ERASE</apiName><shortdesc class="- topic/shortdesc ">
  5252. Erases the background based on the alpha value of the display 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></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 ">erase</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5253. Erases the background based on the alpha value of the display object. This process requires
  5254. that the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property of the parent display object be set to
  5255. <codeph class="+ topic/ph pr-d/codeph ">flash.display.BlendMode.LAYER</codeph>.
  5256. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5257. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:HARDLIGHT" 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 ">HARDLIGHT</apiName><shortdesc class="- topic/shortdesc ">
  5258. Adjusts the color of each pixel based on the darkness of the display 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></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 ">hardlight</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5259. Adjusts the color of each pixel based on the darkness of the display object.
  5260. If the display object is lighter than 50% gray, the display object and background colors are
  5261. screened, which results in a lighter color. If the display object is darker than 50% gray,
  5262. the colors are multiplied, which results in a darker color.
  5263. This setting is commonly used for shading effects.
  5264. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5265. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:INVERT" 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 ">INVERT</apiName><shortdesc class="- topic/shortdesc ">
  5266. Inverts the background.</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 "><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 ">invert</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5267. Inverts the background.
  5268. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:LAYER" 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 ">LAYER</apiName><shortdesc class="- topic/shortdesc ">
  5269. Forces the creation of a transparency group for the display 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></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 ">layer</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5270. Forces the creation of a transparency group for the display object. This means that the display
  5271. object is precomposed in a temporary buffer before it is processed further. The precomposition is done
  5272. automatically if the display object is precached by means of bitmap caching or if the display object is
  5273. a display object container that has at least one child object with a <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph>
  5274. setting other than <codeph class="+ topic/ph pr-d/codeph ">"normal"</codeph>.
  5275. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5276. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:LIGHTEN" 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 ">LIGHTEN</apiName><shortdesc class="- topic/shortdesc ">
  5277. Selects the lighter of the constituent colors of the display object and the colors of the background (the
  5278. colors with the larger values).</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 "><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 ">lighten</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5279. Selects the lighter of the constituent colors of the display object and the colors of the background (the
  5280. colors with the larger values). This setting is commonly used for superimposing type.
  5281. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background
  5282. pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
  5283. 0xFFF833 (because 0xFF &gt; 0xDD, 0xCC &lt; 0xF8, and 0x33 &gt; 0x00 = 33).</p>
  5284. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5285. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:MULTIPLY" 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 ">MULTIPLY</apiName><shortdesc class="- topic/shortdesc ">
  5286. Multiplies the values of the display object constituent colors by the constituent colors of
  5287. the background color, and normalizes by dividing by 0xFF,
  5288. resulting in darker colors.</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 "><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 ">multiply</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5289. Multiplies the values of the display object constituent colors by the constituent colors of
  5290. the background color, and normalizes by dividing by 0xFF,
  5291. resulting in darker colors. This setting is commonly used for shadows and depth effects.
  5292. <p class="- topic/p ">For example, if a constituent color (such as red) of one pixel in the display object and the
  5293. corresponding color of the pixel in the background both have the value 0x88, the multiplied
  5294. result is 0x4840. Dividing by 0xFF yields a value of 0x48 for that constituent color,
  5295. which is a darker shade than the color of the display object or the color of the background.</p>
  5296. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:NORMAL" 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 ">NORMAL</apiName><shortdesc class="- topic/shortdesc ">
  5297. The display object appears in front of the background.</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 "><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 ">normal</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5298. The display object appears in front of the background. Pixel values of the display object
  5299. override the pixel values of the background. Where the display object is transparent, the
  5300. background is visible.
  5301. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:OVERLAY" 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 ">OVERLAY</apiName><shortdesc class="- topic/shortdesc ">
  5302. Adjusts the color of each pixel based on the darkness of the background.</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 "><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 ">overlay</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5303. Adjusts the color of each pixel based on the darkness of the background.
  5304. If the background is lighter than 50% gray, the display object and background colors are
  5305. screened, which results in a lighter color. If the background is darker than 50% gray,
  5306. the colors are multiplied, which results in a darker color.
  5307. This setting is commonly used for shading effects.
  5308. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5309. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:SCREEN" 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 ">SCREEN</apiName><shortdesc class="- topic/shortdesc ">
  5310. Multiplies the complement (inverse) of the display object color by the complement of the background
  5311. color, resulting in a bleaching effect.</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 "><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 ">screen</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5312. Multiplies the complement (inverse) of the display object color by the complement of the background
  5313. color, resulting in a bleaching effect. This setting is commonly used for highlights or to remove black
  5314. areas of the display object.
  5315. </apiDesc></apiValueDetail></apiValue><apiValue id="flash.display:BlendMode:SHADER" 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 ">SHADER</apiName><shortdesc class="- topic/shortdesc ">
  5316. Uses a shader to define the blend between objects.</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 ">shader</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5317. Uses a shader to define the blend between objects.
  5318. <p class="- topic/p ">Setting the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property to a Shader instance
  5319. automatically sets the display object's <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to
  5320. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>. If the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is set to
  5321. <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph> without first setting the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property,
  5322. the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is set to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.NORMAL</codeph> instead.
  5323. If the <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property is set (which sets the
  5324. <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>), then later the value of the
  5325. <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property is changed, the blend mode can be reset to use the blend
  5326. shader simply by setting the <codeph class="+ topic/ph pr-d/codeph ">blendMode</codeph> property to <codeph class="+ topic/ph pr-d/codeph ">BlendMode.SHADER</codeph>.
  5327. The <codeph class="+ topic/ph pr-d/codeph ">blendShader</codeph> property does not need to be set again except to change the
  5328. shader that's used to define the blend mode.</p>
  5329. <p class="- topic/p ">Not supported under GPU rendering.</p>
  5330. </apiDesc></apiValueDetail><related-links class="- topic/related-links "><link href="flash.display.xml#DisplayObject/blendMode" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject.blendMode</linktext></link><link href="flash.display.xml#DisplayObject/blendShader" class="- topic/link "><linktext class="- topic/linktext ">flash.display.DisplayObject.blendShader</linktext></link><link href="flash.display.xml#Shader" class="- topic/link "><linktext class="- topic/linktext ">flash.display.Shader</linktext></link></related-links></apiValue><apiValue id="flash.display:BlendMode:SUBTRACT" 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 ">SUBTRACT</apiName><shortdesc class="- topic/shortdesc ">
  5331. Subtracts the values of the constituent colors in the display object from the values of the background
  5332. color, applying a floor of 0.</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 "><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 ">subtract</apiData><apiValueClassifier class="- topic/xref reference/xref apiRef/apiRelation apiValue/apiValueClassifier ">String</apiValueClassifier></apiValueDef><apiDesc class="- topic/section reference/section apiRef/apiDesc ">
  5333. Subtracts the values of the constituent colors in the display object from the values of the background
  5334. color, applying a floor of 0. This setting is commonly used for animating a darkening dissolve between
  5335. two objects.
  5336. <p class="- topic/p ">For example, if the display object has a pixel with an RGB value of 0xAA2233, and the background
  5337. pixel has an RGB value of 0xDDA600, the resulting RGB value for the displayed pixel is
  5338. 0x338400 (because 0xDD - 0xAA = 0x33, 0xA6 - 0x22 = 0x84, and 0x00 - 0x33 &lt; 0x00).</p>
  5339. </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier languages="" id="flash.display:Graphics" 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 ">Graphics</apiName><shortdesc class="- topic/shortdesc ">
  5340. The Graphics class contains a set of methods that you can use to create a vector shape.</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 ">
  5341. The Graphics class contains a set of methods that you can use to create a vector shape.
  5342. Display objects that support drawing include Sprite and Shape objects.
  5343. Each of these classes includes a <codeph class="+ topic/ph pr-d/codeph ">graphics</codeph> property that is a Graphics object.
  5344. The following are among those helper functions provided for ease of use:
  5345. <codeph class="+ topic/ph pr-d/codeph ">drawRect()</codeph>, <codeph class="+ topic/ph pr-d/codeph ">drawRoundRect()</codeph>,
  5346. <codeph class="+ topic/ph pr-d/codeph ">drawCircle()</codeph>, and <codeph class="+ topic/ph pr-d/codeph ">drawEllipse()</codeph>.
  5347. <p class="- topic/p ">You cannot create a Graphics object directly from ActionScript code.
  5348. If you call <codeph class="+ topic/ph pr-d/codeph ">new Graphics()</codeph>, an exception is thrown.</p>
  5349. <p class="- topic/p ">The Graphics class is final; it cannot be subclassed.</p>
  5350. </apiDesc><example conref="examples\GraphicsExample.as" class="- topic/example "> The following example uses the GraphicsExample class to draw a circle,
  5351. a rounded rectangle, and a square. This task is accomplished by using the following steps:
  5352. <ol class="- topic/ol "><li class="- topic/li ">Declare a <codeph class="+ topic/ph pr-d/codeph ">size</codeph> property for later use in determining the size of each shape.</li><li class="- topic/li ">Declare properties that set the background color to orange, the border color to
  5353. dark gray, the border size to 0 pixels, the corner radius to 9 pixels, and set the space
  5354. between the stage edge and the other objects to be 5 pixels.</li><li class="- topic/li ">Use the properties declared in the preceding steps along with the built in methods of the
  5355. Graphics class to draw the circle, rounded rectangle, and square at coordinates x = 0, y = 0.</li><li class="- topic/li ">Redraw each of the shapes along the top of the stage, start