PageRenderTime 153ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/src/fp9/com/lookmum/view/IComponent.as

https://github.com/ricick/lookmum
ActionScript | 494 lines | 140 code | 93 blank | 261 comment | 0 complexity | 33d7ee749a384fd4897f6b347fe4c18c MD5 | raw file
  1. package com.lookmum.view
  2. {
  3. import flash.accessibility.AccessibilityImplementation;
  4. import flash.accessibility.AccessibilityProperties;
  5. import flash.display.DisplayObject;
  6. import flash.display.DisplayObjectContainer;
  7. import flash.display.Graphics;
  8. import flash.display.LoaderInfo;
  9. import flash.display.MovieClip;
  10. import flash.display.Scene;
  11. import flash.display.Sprite;
  12. import flash.display.Stage;
  13. import flash.events.IEventDispatcher;
  14. import flash.geom.Point;
  15. import flash.geom.Rectangle;
  16. import flash.geom.Transform;
  17. import flash.media.SoundTransform;
  18. import flash.text.TextSnapshot;
  19. import flash.ui.ContextMenu;
  20. /**
  21. * ...
  22. * @author Phil Douglas
  23. */
  24. public interface IComponent extends IEventDispatcher
  25. {
  26. function get target():MovieClip;
  27. function setFocus():void;
  28. function getIsFocus():Boolean;
  29. function destroy():void;
  30. //{region override MovieClip properties and methods
  31. /**
  32. * Specifies the number of the frame in which the playhead is located in the timeline of the MovieClip instance.
  33. */
  34. function get currentFrame () : int;
  35. /**
  36. * The current label in which the playhead is located in the timeline of the MovieClip instance.
  37. */
  38. function get currentLabel () : String;
  39. /**
  40. * Returns an array of FrameLabel objects from the current scene.
  41. */
  42. function get currentLabels () : Array;
  43. /**
  44. * The current scene in which the playhead is located in the timeline of the MovieClip instance.
  45. */
  46. function get currentScene () : Scene;
  47. /**
  48. * A Boolean value that indicates whether a movie clip is enabled.
  49. */
  50. function get enabled () : Boolean;
  51. function set enabled (value:Boolean) : void;
  52. /**
  53. * The number of frames that are loaded from a streaming SWF file.
  54. */
  55. function get framesLoaded () : int;
  56. /**
  57. * An array of Scene objects, each listing the name, the number of frames, and the frame labels for a scene in the MovieClip instance.
  58. */
  59. function get scenes () : Array;
  60. /**
  61. * The total number of frames in the MovieClip instance.
  62. */
  63. function get totalFrames () : int;
  64. /**
  65. * Indicates whether other display objects that are SimpleButton or MovieClip objects can receive mouse release events.
  66. */
  67. function get trackAsMenu () : Boolean;
  68. function set trackAsMenu (value:Boolean) : void ;
  69. /**
  70. * [Undocumented] Takes a collection of frame (zero-based) - method pairs that associates a method with a frame on the timeline.
  71. */
  72. /*
  73. function addFrameScript (frame:int, method:Function) : void;
  74. */
  75. /**
  76. * Starts playing the SWF file at the specified frame.
  77. */
  78. function gotoAndPlay (frame:Object, scene:String = null) : void;
  79. /**
  80. * Brings the playhead to the specified frame of the movie clip and stops it there.
  81. */
  82. function gotoAndStop (frame:Object, scene:String = null) : void;
  83. /**
  84. * Sends the playhead to the next frame and stops it.
  85. */
  86. function nextFrame () : void;
  87. /**
  88. * Moves the playhead to the next scene of the MovieClip instance.
  89. */
  90. function nextScene () : void;
  91. /**
  92. * Moves the playhead in the timeline of the movie clip.
  93. */
  94. function play () : void;
  95. /**
  96. * Sends the playhead to the previous frame and stops it.
  97. */
  98. function prevFrame () : void;
  99. /**
  100. * Moves the playhead to the previous scene of the MovieClip instance.
  101. */
  102. function prevScene () : void;
  103. /**
  104. * Stops the playhead in the movie clip.
  105. */
  106. function stop () : void;
  107. //}
  108. //{region overriden Sprite properties and methods
  109. /**
  110. * Specifies the button mode of this sprite.
  111. */
  112. function get buttonMode () : Boolean;
  113. function set buttonMode (value:Boolean) : void;
  114. /**
  115. * Specifies the display object over which the sprite is being dragged, or on which the sprite was dropped.
  116. */
  117. function get dropTarget () : DisplayObject;
  118. /**
  119. * Specifies the Graphics object that belongs to this sprite where vector drawing commands can occur.
  120. */
  121. function get graphics () : Graphics;
  122. /**
  123. * Designates another sprite to serve as the hit area for a sprite.
  124. */
  125. function get hitArea () : Sprite;
  126. function set hitArea (value:Sprite) : void;
  127. /**
  128. * Controls sound within this sprite.
  129. */
  130. function get soundTransform () : SoundTransform;
  131. function set soundTransform (sndTransform:SoundTransform) : void;
  132. /**
  133. * A Boolean value that indicates whether the pointing hand (hand cursor) appears when the mouse rolls over a sprite in which the buttonMode property is set to true.
  134. */
  135. function get useHandCursor () : Boolean;
  136. function set useHandCursor (value:Boolean) : void;
  137. /**
  138. * Lets the user drag the specified sprite.
  139. */
  140. function startDrag (lockCenter:Boolean = false, bounds:Rectangle = null) : void;
  141. /**
  142. * Ends the startDrag() method.
  143. */
  144. function stopDrag () : void;
  145. function toString () : String;
  146. //}
  147. //{region overriden DisplayObjectContainer properties and methods
  148. /**
  149. * Determines whether or not the children of the object are mouse enabled.
  150. */
  151. function get mouseChildren () : Boolean;
  152. function set mouseChildren (enable:Boolean) : void;
  153. /**
  154. * Returns the number of children of this object.
  155. */
  156. function get numChildren () : int;
  157. /**
  158. * Determines whether the children of the object are tab enabled.
  159. */
  160. function get tabChildren () : Boolean;
  161. function set tabChildren (enable:Boolean) : void;
  162. /**
  163. * Returns a TextSnapshot object for this DisplayObjectContainer instance.
  164. */
  165. function get textSnapshot () : TextSnapshot;
  166. /**
  167. * Adds a child object to this DisplayObjectContainer instance.
  168. */
  169. function addChild (child:DisplayObject) : DisplayObject;
  170. /**
  171. * Adds a child object to this DisplayObjectContainer instance.
  172. */
  173. function addChildAt (child:DisplayObject, index:int) : DisplayObject;
  174. /**
  175. * Indicates whether the security restrictions would cause any display objects to be omitted from the list returned by calling the DisplayObjectContainer.getObjectsUnderPoint() method with the specified point point.
  176. */
  177. function areInaccessibleObjectsUnderPoint (point:Point) : Boolean;
  178. /**
  179. * Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.
  180. */
  181. function contains (child:DisplayObject) : Boolean;
  182. /**
  183. * Returns the child display object instance that exists at the specified index.
  184. */
  185. function getChildAt (index:int) : DisplayObject;
  186. /**
  187. * Returns the child display object that exists with the specified name.
  188. */
  189. function getChildByName (name:String) : DisplayObject;
  190. /**
  191. * Returns the index number of a child DisplayObject instance.
  192. */
  193. function getChildIndex (child:DisplayObject) : int;
  194. /**
  195. * Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance.
  196. */
  197. function getObjectsUnderPoint (point:Point) : Array;
  198. /**
  199. * Removes a child display object from the DisplayObjectContainer instance.
  200. */
  201. function removeChild (child:DisplayObject) : DisplayObject;
  202. /**
  203. * Removes a child display object, at the specified index position, from the DisplayObjectContainer instance.
  204. */
  205. function removeChildAt (index:int) : DisplayObject;
  206. /**
  207. * Changes the index number of an existing child.
  208. */
  209. function setChildIndex (child:DisplayObject, index:int) : void;
  210. /**
  211. * Swaps the z-order (front-to-back order) of the two specified child objects.
  212. */
  213. function swapChildren (child1:DisplayObject, child2:DisplayObject) : void;
  214. /**
  215. * Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.
  216. */
  217. function swapChildrenAt (index1:int, index2:int) : void;
  218. //}
  219. //{region overriden InteractiveObject properties and methods
  220. function get accessibilityImplementation () : AccessibilityImplementation;
  221. function set accessibilityImplementation (value:AccessibilityImplementation) : void;
  222. /**
  223. * Specifies the context menu associated with this object.
  224. */
  225. /*
  226. function get contextMenu () : ContextMenu;
  227. function set contextMenu (cm:ContextMenu) : void;
  228. */
  229. /**
  230. * Specifies whether the object receives doubleClick events.
  231. */
  232. function get doubleClickEnabled () : Boolean;
  233. function set doubleClickEnabled (enabled:Boolean) : void;
  234. /**
  235. * Specifies whether this object displays a focus rectangle.
  236. */
  237. function get focusRect () : Object;
  238. function set focusRect (focusRect:Object) : void;
  239. /**
  240. * Specifies whether this object receives mouse messages.
  241. */
  242. function get mouseEnabled () : Boolean;
  243. function set mouseEnabled (enabled:Boolean) : void;
  244. /**
  245. * Specifies whether this object is in the tab order.
  246. */
  247. function get tabEnabled () : Boolean;
  248. function set tabEnabled (enabled:Boolean) : void;
  249. /**
  250. * Specifies the tab ordering of objects in a SWF file.
  251. */
  252. function get tabIndex () : int;
  253. function set tabIndex (index:int) : void;
  254. //}
  255. //{region overriden DisplayObject properties and methods
  256. /**
  257. * The current accessibility options for this display object.
  258. */
  259. function get accessibilityProperties () : AccessibilityProperties;
  260. function set accessibilityProperties (value:AccessibilityProperties) : void;
  261. /**
  262. * Indicates the alpha transparency value of the object specified.
  263. */
  264. function get alpha () : Number;
  265. function set alpha (value:Number) : void;
  266. /**
  267. * A value from the BlendMode class that specifies which blend mode to use.
  268. */
  269. function get blendMode () : String;
  270. function set blendMode (value:String) : void;
  271. /**
  272. * If set to true, Flash Player caches an internal bitmap representation of the display object.
  273. */
  274. function get cacheAsBitmap () : Boolean;
  275. function set cacheAsBitmap (value:Boolean) : void;
  276. /**
  277. * An indexed array that contains each filter object currently associated with the display object.
  278. */
  279. function get filters () : Array;
  280. function set filters (value:Array) : void;
  281. /**
  282. * Indicates the height of the display object, in pixels.
  283. */
  284. function get height () : Number;
  285. function set height (value:Number) : void;
  286. /**
  287. * Returns a LoaderInfo object containing information about loading the file to which this display object belongs.
  288. */
  289. function get loaderInfo () : LoaderInfo;
  290. /**
  291. * The calling display object is masked by the specified mask object.
  292. */
  293. function get mask () : DisplayObject;
  294. function set mask (value:DisplayObject) : void;
  295. /**
  296. * Indicates the x coordinate of the mouse position, in pixels.
  297. */
  298. function get mouseX () : Number;
  299. /**
  300. * Indicates the y coordinate of the mouse position, in pixels.
  301. */
  302. function get mouseY () : Number;
  303. /**
  304. * Indicates the instance name of the DisplayObject.
  305. */
  306. function get name () : String;
  307. function set name (value:String) : void;
  308. /**
  309. * Specifies whether the display object is opaque with a certain background color.
  310. */
  311. function get opaqueBackground () : Object;
  312. function set opaqueBackground (value:Object) : void;
  313. /**
  314. * Indicates the DisplayObjectContainer object that contains this display object.
  315. */
  316. function get parent () : DisplayObjectContainer;
  317. /**
  318. * For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file.
  319. */
  320. function get root () : DisplayObject;
  321. /**
  322. * Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.
  323. */
  324. function get rotation () : Number;
  325. function set rotation (value:Number) : void;
  326. /**
  327. * The current scaling grid that is in effect.
  328. */
  329. function get scale9Grid () : Rectangle;
  330. function set scale9Grid (innerRectangle:Rectangle) : void;
  331. /**
  332. * Indicates the horizontal scale (percentage) of the object as applied from the registration point.
  333. */
  334. function get scaleX () : Number;
  335. function set scaleX (value:Number) : void;
  336. /**
  337. * Indicates the vertical scale (percentage) of an object as applied from the registration point of the object.
  338. */
  339. function get scaleY () : Number;
  340. function set scaleY (value:Number) : void;
  341. /**
  342. * The scroll rectangle bounds of the display object.
  343. */
  344. function get scrollRect () : Rectangle;
  345. function set scrollRect (value:Rectangle) : void;
  346. /**
  347. * The Stage of the display object.
  348. */
  349. function get stage () : Stage;
  350. /**
  351. * An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.
  352. */
  353. function get transform () : Transform;
  354. function set transform (value:Transform) : void;
  355. /**
  356. * Indicates the width of the display object, in pixels.
  357. */
  358. function get width () : Number;
  359. function set width (value:Number) : void;
  360. /**
  361. * Whether or not the display object is visible.
  362. */
  363. function get visible () : Boolean;
  364. function set visible (value:Boolean) : void;
  365. /**
  366. * Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer.
  367. */
  368. function get x () : Number;
  369. function set x (value:Number) : void;
  370. /**
  371. * Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer.
  372. */
  373. function get y () : Number;
  374. function set y (value:Number) : void;
  375. /**
  376. * Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.
  377. */
  378. function getBounds (targetCoordinateSpace:DisplayObject) : Rectangle;
  379. /**
  380. * Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes.
  381. */
  382. function getRect (targetCoordinateSpace:DisplayObject) : Rectangle;
  383. /**
  384. * Converts the point object from Stage (global) coordinates to the display object's (local) coordinates.
  385. */
  386. function globalToLocal (point:Point) : Point;
  387. /**
  388. * Evaluates the display object to see if it overlaps or intersects with the display object passed as a parameter.
  389. */
  390. function hitTestObject (obj:DisplayObject) : Boolean;
  391. /**
  392. * Evaluates the display object to see if it overlaps or intersects with a point specified by x and y.
  393. */
  394. function hitTestPoint (x:Number, y:Number, shapeFlag:Boolean = false) : Boolean;
  395. /**
  396. * Converts the point object from the display object's (local) coordinates to the Stage (global) coordinates.
  397. */
  398. function localToGlobal (point:Point) : Point;
  399. //}
  400. }
  401. }