libraries/EaselJS_docs/classes/BitmapText.html (view raw)
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <link rel="stylesheet" href="../assets/css/yui-cssgrids-min.css">
6 <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
7 <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
8 <link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
9 <script src="../assets/js/yui-source.js"></script>
10 <title>EaselJS v1.0.0 API Documentation : BitmapText</title>
11</head>
12<body class="yui3-skin-sam">
13
14<div id="doc">
15 <div id="hd" class="yui3-g header">
16 <div class="yui3-u-3-4">
17
18 <h1><a href="http://www.createjs.com/easeljs"><img src="../assets/docs-icon-EaselJS.png" title="EaselJS"></a></h1>
19
20 </div>
21 <div class="version">
22 <em>API Documentation for: 1.0.0</em>
23 </div>
24 </div>
25 <div id="bd" class="yui3-g">
26
27 <div class="yui3-u-1-4">
28 <div id="docs-sidebar" class="sidebar apidocs">
29 <div id="api-list">
30 <h2 class="off-left">APIs</h2>
31 <div id="api-tabview" class="tabview">
32 <ul class="tabs">
33 <li><a href="#api-classes">Classes</a></li>
34 </ul>
35
36 <div id="api-tabview-filter">
37 <input type="search" id="api-filter" placeholder="Type to filter APIs">
38 </div>
39
40 <div id="api-tabview-panel">
41 <ul id="api-classes" class="apis classes">
42
43 <li><a href="../classes/AlphaMapFilter.html">AlphaMapFilter</a></li>
44
45 <li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
46
47 <li><a href="../classes/Bitmap.html">Bitmap</a></li>
48
49 <li><a href="../classes/BitmapCache.html">BitmapCache</a></li>
50
51 <li><a href="../classes/BitmapText.html">BitmapText</a></li>
52
53 <li><a href="../classes/BlurFilter.html">BlurFilter</a></li>
54
55 <li><a href="../classes/ButtonHelper.html">ButtonHelper</a></li>
56
57 <li><a href="../classes/ColorFilter.html">ColorFilter</a></li>
58
59 <li><a href="../classes/ColorMatrix.html">ColorMatrix</a></li>
60
61 <li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
62
63 <li><a href="../classes/Container.html">Container</a></li>
64
65 <li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
66
67 <li><a href="../classes/DisplayProps.html">DisplayProps</a></li>
68
69 <li><a href="../classes/DOMElement.html">DOMElement</a></li>
70
71 <li><a href="../classes/EaselJS.html">EaselJS</a></li>
72
73 <li><a href="../classes/Event.html">Event</a></li>
74
75 <li><a href="../classes/EventDispatcher.html">EventDispatcher</a></li>
76
77 <li><a href="../classes/Filter.html">Filter</a></li>
78
79 <li><a href="../classes/Graphics.html">Graphics</a></li>
80
81 <li><a href="../classes/Graphics.Arc.html">Graphics.Arc</a></li>
82
83 <li><a href="../classes/Graphics.ArcTo.html">Graphics.ArcTo</a></li>
84
85 <li><a href="../classes/Graphics.BeginPath.html">Graphics.BeginPath</a></li>
86
87 <li><a href="../classes/Graphics.BezierCurveTo.html">Graphics.BezierCurveTo</a></li>
88
89 <li><a href="../classes/Graphics.Circle.html">Graphics.Circle</a></li>
90
91 <li><a href="../classes/Graphics.ClosePath.html">Graphics.ClosePath</a></li>
92
93 <li><a href="../classes/Graphics.Ellipse.html">Graphics.Ellipse</a></li>
94
95 <li><a href="../classes/Graphics.Fill.html">Graphics.Fill</a></li>
96
97 <li><a href="../classes/Graphics.LineTo.html">Graphics.LineTo</a></li>
98
99 <li><a href="../classes/Graphics.MoveTo.html">Graphics.MoveTo</a></li>
100
101 <li><a href="../classes/Graphics.PolyStar.html">Graphics.PolyStar</a></li>
102
103 <li><a href="../classes/Graphics.QuadraticCurveTo.html">Graphics.QuadraticCurveTo</a></li>
104
105 <li><a href="../classes/Graphics.Rect.html">Graphics.Rect</a></li>
106
107 <li><a href="../classes/Graphics.RoundRect.html">Graphics.RoundRect</a></li>
108
109 <li><a href="../classes/Graphics.Stroke.html">Graphics.Stroke</a></li>
110
111 <li><a href="../classes/Graphics.StrokeDash.html">Graphics.StrokeDash</a></li>
112
113 <li><a href="../classes/Graphics.StrokeStyle.html">Graphics.StrokeStyle</a></li>
114
115 <li><a href="../classes/Matrix2D.html">Matrix2D</a></li>
116
117 <li><a href="../classes/MouseEvent.html">MouseEvent</a></li>
118
119 <li><a href="../classes/MovieClip.html">MovieClip</a></li>
120
121 <li><a href="../classes/MovieClipPlugin.html">MovieClipPlugin</a></li>
122
123 <li><a href="../classes/Point.html">Point</a></li>
124
125 <li><a href="../classes/Rectangle.html">Rectangle</a></li>
126
127 <li><a href="../classes/Shadow.html">Shadow</a></li>
128
129 <li><a href="../classes/Shape.html">Shape</a></li>
130
131 <li><a href="../classes/Sprite.html">Sprite</a></li>
132
133 <li><a href="../classes/SpriteSheet.html">SpriteSheet</a></li>
134
135 <li><a href="../classes/SpriteSheetBuilder.html">SpriteSheetBuilder</a></li>
136
137 <li><a href="../classes/SpriteSheetUtils.html">SpriteSheetUtils</a></li>
138
139 <li><a href="../classes/Stage.html">Stage</a></li>
140
141 <li><a href="../classes/StageGL.html">StageGL</a></li>
142
143 <li><a href="../classes/Text.html">Text</a></li>
144
145 <li><a href="../classes/Ticker.html">Ticker</a></li>
146
147 <li><a href="../classes/Touch.html">Touch</a></li>
148
149 <li><a href="../classes/UID.html">UID</a></li>
150
151 <li><a href="../classes/Utility Methods.html">Utility Methods</a></li>
152
153 <li><a href="../classes/VideoBuffer.html">VideoBuffer</a></li>
154
155 <li><a href="../classes/WebGLInspector.html">WebGLInspector</a></li>
156
157 </ul>
158
159 <ul id="api-modules" class="apis modules">
160
161 <li><a href="../modules/CreateJS.html">CreateJS</a></li>
162
163 <li><a href="../modules/EaselJS.html">EaselJS</a></li>
164
165 </ul>
166 </div>
167 </div>
168</div>
169
170 </div>
171 </div>
172 <div class="yui3-u-3-4">
173 <div id="api-options">
174 Show:
175 <label for="api-show-inherited">
176 <input type="checkbox" id="api-show-inherited" checked>
177 Inherited
178 </label>
179
180 <label for="api-show-protected">
181 <input type="checkbox" id="api-show-protected">
182 Protected
183 </label>
184
185 <label for="api-show-private">
186 <input type="checkbox" id="api-show-private">
187 Private
188 </label>
189 <label for="api-show-deprecated">
190 <input type="checkbox" id="api-show-deprecated">
191 Deprecated
192 </label>
193
194 </div>
195 <div class="apidocs">
196 <div id="docs-main">
197 <div class="content">
198 <h1>BitmapText Class</h1>
199<div class="box meta">
200
201
202
203 <div class="extends">
204 Extends <a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a>
205 </div>
206
207
208
209 <div class="foundat">
210 Defined in: <a href="../files/easeljs_display_BitmapText.js.html#l36"><code>BitmapText:36</code></a>
211 </div>
212
213
214
215
216 Module: <a href="../modules/EaselJS.html">EaselJS</a>
217
218
219
220
221</div>
222
223
224
225<div class="box intro">
226 <p>Displays text using bitmap glyphs defined in a sprite sheet. Multi-line text is supported using new line characters,
227but automatic wrapping is not supported. See the <a href="../classes/BitmapText.html#property_spriteSheet" class="crosslink">spriteSheet</a>
228property for more information on defining glyphs.</p>
229<p><strong>Important:</strong> While BitmapText extends Container, it is not designed to be used as one.
230As such, methods like addChild and removeChild are disabled.</p>
231
232</div>
233
234
235 <div class="constructor">
236 <h2>Constructor</h2>
237 <div id="method_BitmapText" class="method item">
238 <h3 class="name"><code>BitmapText</code></h3>
239
240
241 <div class="args">
242 <span class="paren">(</span><ul class="args-list inline commas">
243
244 <li class="arg">
245
246 <code class="optional">[text=""]</code>
247
248 </li>
249
250 <li class="arg">
251
252 <code class="optional">[spriteSheet=null]</code>
253
254 </li>
255
256 </ul><span class="paren">)</span>
257 </div>
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274 <div class="meta">
275
276
277
278 <p>
279
280 Defined in
281
282
283
284
285 <a href="../files/easeljs_display_BitmapText.js.html#l36"><code>BitmapText:36</code></a>
286
287 </p>
288
289
290
291
292
293 </div>
294
295 <div class="description">
296
297 </div>
298
299
300 <div class="params">
301 <h4>Parameters:</h4>
302
303 <ul class="params-list">
304
305 <li class="param">
306
307 <code class="param-name optional">[text=""]</code>
308 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
309 <span class="flag optional" title="This parameter is optional.">optional</span>
310
311
312
313
314 <div class="param-description">
315 <p>The text to display.</p>
316
317 </div>
318
319
320 </li>
321
322 <li class="param">
323
324 <code class="param-name optional">[spriteSheet=null]</code>
325 <span class="type"><a href="../classes/SpriteSheet.html" class="crosslink">SpriteSheet</a></span>
326 <span class="flag optional" title="This parameter is optional.">optional</span>
327
328
329
330
331 <div class="param-description">
332 <p>The spritesheet that defines the character glyphs.</p>
333
334 </div>
335
336
337 </li>
338
339 </ul>
340 </div>
341
342
343
344
345
346</div>
347
348 </div>
349
350
351<div id="classdocs" class="tabview">
352 <ul class="api-class-tabs">
353 <li class="api-class-tab index"><a href="#index">Index</a></li>
354
355
356 <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
357
358
359 <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
360
361
362
363 <li class="api-class-tab events"><a href="#events">Events</a></li>
364
365 </ul>
366
367 <div>
368 <div id="index" class="api-class-tabpanel index">
369 <h2 class="off-left">Item Index</h2>
370
371
372 <div class="index-section methods">
373 <h3>Methods</h3>
374
375 <ul class="index-list methods extends">
376
377 <li class="index-item method protected inherited">
378 <a href="#method__applyShadow">_applyShadow</a>
379
380
381
382 </li>
383
384 <li class="index-item method protected inherited">
385 <a href="#method__cloneProps">_cloneProps</a>
386
387
388
389 </li>
390
391 <li class="index-item method protected inherited">
392 <a href="#method__dispatchEvent">_dispatchEvent</a>
393
394
395
396 </li>
397
398 <li class="index-item method protected inherited">
399 <a href="#method__getBounds">_getBounds</a>
400
401
402
403 </li>
404
405 <li class="index-item method protected">
406 <a href="#method__getFrame">_getFrame</a>
407
408
409
410 </li>
411
412 <li class="index-item method protected">
413 <a href="#method__getFrameIndex">_getFrameIndex</a>
414
415
416
417 </li>
418
419 <li class="index-item method protected">
420 <a href="#method__getLineHeight">_getLineHeight</a>
421
422
423
424 </li>
425
426 <li class="index-item method protected">
427 <a href="#method__getSpaceWidth">_getSpaceWidth</a>
428
429
430
431 </li>
432
433 <li class="index-item method protected inherited">
434 <a href="#method__getStage">_getStage</a>
435
436
437
438 </li>
439
440 <li class="index-item method protected inherited">
441 <a href="#method__isMouseOpaque">_isMouseOpaque</a>
442
443
444
445 </li>
446
447 <li class="index-item method protected inherited">
448 <a href="#method__testHit">_testHit</a>
449
450
451
452 </li>
453
454 <li class="index-item method protected inherited">
455 <a href="#method__tick">_tick</a>
456
457
458
459 </li>
460
461 <li class="index-item method protected inherited">
462 <a href="#method__transformBounds">_transformBounds</a>
463
464
465
466 </li>
467
468 <li class="index-item method inherited">
469 <a href="#method__updateState">_updateState</a>
470
471
472
473 </li>
474
475 <li class="index-item method protected">
476 <a href="#method__updateText">_updateText</a>
477
478
479
480 </li>
481
482 <li class="index-item method">
483 <a href="#method_addChild">addChild</a>
484
485
486
487 </li>
488
489 <li class="index-item method">
490 <a href="#method_addChildAt">addChildAt</a>
491
492
493
494 </li>
495
496 <li class="index-item method inherited">
497 <a href="#method_addEventListener">addEventListener</a>
498
499
500
501 </li>
502
503 <li class="index-item method inherited">
504 <a href="#method_cache">cache</a>
505
506
507
508 </li>
509
510 <li class="index-item method inherited">
511 <a href="#method_clone">clone</a>
512
513
514
515 </li>
516
517 <li class="index-item method inherited">
518 <a href="#method_dispatchEvent">dispatchEvent</a>
519
520
521
522 </li>
523
524 <li class="index-item method inherited">
525 <a href="#method_draw">draw</a>
526
527
528
529 </li>
530
531 <li class="index-item method inherited">
532 <a href="#method_getBounds">getBounds</a>
533
534
535
536 </li>
537
538 <li class="index-item method inherited">
539 <a href="#method_getCacheDataURL">getCacheDataURL</a>
540
541
542
543 </li>
544
545 <li class="index-item method inherited">
546 <a href="#method_getConcatenatedDisplayProps">getConcatenatedDisplayProps</a>
547
548
549
550 </li>
551
552 <li class="index-item method inherited">
553 <a href="#method_getConcatenatedMatrix">getConcatenatedMatrix</a>
554
555
556
557 </li>
558
559 <li class="index-item method inherited">
560 <a href="#method_getMatrix">getMatrix</a>
561
562
563
564 </li>
565
566 <li class="index-item method inherited">
567 <a href="#method_getTransformedBounds">getTransformedBounds</a>
568
569
570
571 </li>
572
573 <li class="index-item method inherited">
574 <a href="#method_globalToLocal">globalToLocal</a>
575
576
577
578 </li>
579
580 <li class="index-item method inherited">
581 <a href="#method_hasEventListener">hasEventListener</a>
582
583
584
585 </li>
586
587 <li class="index-item method inherited">
588 <a href="#method_hitTest">hitTest</a>
589
590
591
592 </li>
593
594 <li class="index-item method inherited">
595 <a href="#method_isVisible">isVisible</a>
596
597
598
599 </li>
600
601 <li class="index-item method inherited">
602 <a href="#method_localToGlobal">localToGlobal</a>
603
604
605
606 </li>
607
608 <li class="index-item method inherited">
609 <a href="#method_localToLocal">localToLocal</a>
610
611
612
613 </li>
614
615 <li class="index-item method inherited">
616 <a href="#method_off">off</a>
617
618
619
620 </li>
621
622 <li class="index-item method inherited">
623 <a href="#method_on">on</a>
624
625
626
627 </li>
628
629 <li class="index-item method">
630 <a href="#method_removeAllChildren">removeAllChildren</a>
631
632
633
634 </li>
635
636 <li class="index-item method inherited">
637 <a href="#method_removeAllEventListeners">removeAllEventListeners</a>
638
639
640
641 </li>
642
643 <li class="index-item method">
644 <a href="#method_removeChild">removeChild</a>
645
646
647
648 </li>
649
650 <li class="index-item method">
651 <a href="#method_removeChildAt">removeChildAt</a>
652
653
654
655 </li>
656
657 <li class="index-item method inherited">
658 <a href="#method_removeEventListener">removeEventListener</a>
659
660
661
662 </li>
663
664 <li class="index-item method inherited">
665 <a href="#method_set">set</a>
666
667
668
669 </li>
670
671 <li class="index-item method inherited">
672 <a href="#method_setBounds">setBounds</a>
673
674
675
676 </li>
677
678 <li class="index-item method inherited">
679 <a href="#method_setTransform">setTransform</a>
680
681
682
683 </li>
684
685 <li class="index-item method inherited inherited">
686 <a href="#method_toString">toString</a>
687
688
689
690 </li>
691
692 <li class="index-item method inherited">
693 <a href="#method_uncache">uncache</a>
694
695
696
697 </li>
698
699 <li class="index-item method inherited">
700 <a href="#method_updateCache">updateCache</a>
701
702
703
704 </li>
705
706 <li class="index-item method inherited">
707 <a href="#method_updateContext">updateContext</a>
708
709
710
711 </li>
712
713 <li class="index-item method inherited">
714 <a href="#method_willTrigger">willTrigger</a>
715
716
717
718 </li>
719
720 </ul>
721 </div>
722
723
724
725 <div class="index-section properties">
726 <h3>Properties</h3>
727
728 <ul class="index-list properties extends">
729
730 <li class="index-item property protected inherited">
731 <a href="#property__bounds">_bounds</a>
732
733
734
735 </li>
736
737 <li class="index-item property protected deprecated inherited">
738 <a href="#property__cacheDataURL">_cacheDataURL</a>
739
740
741
742 <span class="flag deprecated">deprecated</span>
743
744 </li>
745
746 <li class="index-item property protected deprecated inherited">
747 <a href="#property__cacheDataURLID">_cacheDataURLID</a>
748
749
750
751 <span class="flag deprecated">deprecated</span>
752
753 </li>
754
755 <li class="index-item property protected deprecated inherited">
756 <a href="#property__cacheScale">_cacheScale</a>
757
758
759
760 <span class="flag deprecated">deprecated</span>
761
762 </li>
763
764 <li class="index-item property protected inherited">
765 <a href="#property__captureListeners">_captureListeners</a>
766
767
768
769 </li>
770
771 <li class="index-item property protected">
772 <a href="#property__drawAction">_drawAction</a>
773
774
775
776 </li>
777
778 <li class="index-item property protected inherited">
779 <a href="#property__listeners">_listeners</a>
780
781
782
783 </li>
784
785 <li class="index-item property protected">
786 <a href="#property__oldProps">_oldProps</a>
787
788
789
790 </li>
791
792 <li class="index-item property protected">
793 <a href="#property__oldStage">_oldStage</a>
794
795
796
797 </li>
798
799 <li class="index-item property protected inherited">
800 <a href="#property__props">_props</a>
801
802
803
804 </li>
805
806 <li class="index-item property protected inherited">
807 <a href="#property__rectangle">_rectangle</a>
808
809
810
811 </li>
812
813 <li class="index-item property protected inherited">
814 <a href="#property__webGLRenderStyle">_webGLRenderStyle</a>
815
816
817
818 </li>
819
820 <li class="index-item property inherited">
821 <a href="#property_alpha">alpha</a>
822
823
824
825 </li>
826
827 <li class="index-item property inherited">
828 <a href="#property_bitmapCache">bitmapCache</a>
829
830
831
832 </li>
833
834 <li class="index-item property inherited">
835 <a href="#property_cacheCanvas">cacheCanvas</a>
836
837
838
839 </li>
840
841 <li class="index-item property deprecated inherited">
842 <a href="#property_cacheID">cacheID</a>
843
844
845
846 <span class="flag deprecated">deprecated</span>
847
848 </li>
849
850 <li class="index-item property inherited">
851 <a href="#property_compositeOperation">compositeOperation</a>
852
853
854
855 </li>
856
857 <li class="index-item property inherited">
858 <a href="#property_cursor">cursor</a>
859
860
861
862 </li>
863
864 <li class="index-item property inherited">
865 <a href="#property_filters">filters</a>
866
867
868
869 </li>
870
871 <li class="index-item property inherited">
872 <a href="#property_hitArea">hitArea</a>
873
874
875
876 </li>
877
878 <li class="index-item property inherited">
879 <a href="#property_id">id</a>
880
881
882
883 </li>
884
885 <li class="index-item property">
886 <a href="#property_letterSpacing">letterSpacing</a>
887
888
889
890 </li>
891
892 <li class="index-item property">
893 <a href="#property_lineHeight">lineHeight</a>
894
895
896
897 </li>
898
899 <li class="index-item property inherited">
900 <a href="#property_mask">mask</a>
901
902
903
904 </li>
905
906 <li class="index-item property">
907 <a href="#property_maxPoolSize">maxPoolSize</a>
908
909
910 <span class="flag static">static</span>
911
912
913 </li>
914
915 <li class="index-item property inherited">
916 <a href="#property_mouseEnabled">mouseEnabled</a>
917
918
919
920 </li>
921
922 <li class="index-item property inherited">
923 <a href="#property_name">name</a>
924
925
926
927 </li>
928
929 <li class="index-item property inherited">
930 <a href="#property_parent">parent</a>
931
932
933
934 </li>
935
936 <li class="index-item property inherited">
937 <a href="#property_regX">regX</a>
938
939
940
941 </li>
942
943 <li class="index-item property inherited">
944 <a href="#property_regY">regY</a>
945
946
947
948 </li>
949
950 <li class="index-item property inherited">
951 <a href="#property_rotation">rotation</a>
952
953
954
955 </li>
956
957 <li class="index-item property inherited inherited">
958 <a href="#property_scaleX">scaleX</a>
959
960
961
962 </li>
963
964 <li class="index-item property inherited">
965 <a href="#property_scaleY">scaleY</a>
966
967
968
969 </li>
970
971 <li class="index-item property inherited">
972 <a href="#property_shadow">shadow</a>
973
974
975
976 </li>
977
978 <li class="index-item property inherited">
979 <a href="#property_skewX">skewX</a>
980
981
982
983 </li>
984
985 <li class="index-item property inherited">
986 <a href="#property_skewY">skewY</a>
987
988
989
990 </li>
991
992 <li class="index-item property inherited">
993 <a href="#property_snapToPixel">snapToPixel</a>
994
995
996
997 </li>
998
999 <li class="index-item property">
1000 <a href="#property_spaceWidth">spaceWidth</a>
1001
1002
1003
1004 </li>
1005
1006 <li class="index-item property">
1007 <a href="#property_spriteSheet">spriteSheet</a>
1008
1009
1010
1011 </li>
1012
1013 <li class="index-item property inherited">
1014 <a href="#property_stage">stage</a>
1015
1016
1017
1018 </li>
1019
1020 <li class="index-item property">
1021 <a href="#property_text">text</a>
1022
1023
1024
1025 </li>
1026
1027 <li class="index-item property inherited">
1028 <a href="#property_tickEnabled">tickEnabled</a>
1029
1030
1031
1032 </li>
1033
1034 <li class="index-item property inherited">
1035 <a href="#property_transformMatrix">transformMatrix</a>
1036
1037
1038
1039 </li>
1040
1041 <li class="index-item property inherited">
1042 <a href="#property_visible">visible</a>
1043
1044
1045
1046 </li>
1047
1048 <li class="index-item property inherited">
1049 <a href="#property_x">x</a>
1050
1051
1052
1053 </li>
1054
1055 <li class="index-item property inherited">
1056 <a href="#property_y">y</a>
1057
1058
1059
1060 </li>
1061
1062 </ul>
1063 </div>
1064
1065
1066
1067
1068
1069 <div class="index-section events">
1070 <h3>Events</h3>
1071
1072 <ul class="index-list events extends">
1073
1074 <li class="index-item event inherited">
1075 <a href="#event_added">added</a>
1076
1077
1078
1079 </li>
1080
1081 <li class="index-item event inherited">
1082 <a href="#event_click">click</a>
1083
1084
1085
1086 </li>
1087
1088 <li class="index-item event inherited">
1089 <a href="#event_dblclick">dblclick</a>
1090
1091
1092
1093 </li>
1094
1095 <li class="index-item event inherited">
1096 <a href="#event_mousedown">mousedown</a>
1097
1098
1099
1100 </li>
1101
1102 <li class="index-item event inherited">
1103 <a href="#event_mouseout">mouseout</a>
1104
1105
1106
1107 </li>
1108
1109 <li class="index-item event inherited">
1110 <a href="#event_mouseover">mouseover</a>
1111
1112
1113
1114 </li>
1115
1116 <li class="index-item event inherited">
1117 <a href="#event_pressmove">pressmove</a>
1118
1119
1120
1121 </li>
1122
1123 <li class="index-item event inherited">
1124 <a href="#event_pressup">pressup</a>
1125
1126
1127
1128 </li>
1129
1130 <li class="index-item event inherited">
1131 <a href="#event_removed">removed</a>
1132
1133
1134
1135 </li>
1136
1137 <li class="index-item event inherited">
1138 <a href="#event_rollout">rollout</a>
1139
1140
1141
1142 </li>
1143
1144 <li class="index-item event inherited">
1145 <a href="#event_rollover">rollover</a>
1146
1147
1148
1149 </li>
1150
1151 <li class="index-item event inherited">
1152 <a href="#event_tick">tick</a>
1153
1154
1155
1156 </li>
1157
1158 </ul>
1159 </div>
1160
1161 </div>
1162
1163
1164 <div id="methods" class="api-class-tabpanel">
1165 <h2 class="off-left">Methods</h2>
1166
1167
1168 <div id="method__applyShadow" class="method item protected inherited">
1169 <h3 class="name"><code>_applyShadow</code></h3>
1170
1171
1172 <div class="args">
1173 <span class="paren">(</span><ul class="args-list inline commas">
1174
1175 <li class="arg">
1176
1177 <code>ctx</code>
1178
1179 </li>
1180
1181 <li class="arg">
1182
1183 <code>shadow</code>
1184
1185 </li>
1186
1187 </ul><span class="paren">)</span>
1188 </div>
1189
1190
1191
1192
1193
1194
1195
1196 <span class="flag protected">protected</span>
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207 <div class="meta">
1208
1209
1210 <p>Inherited from
1211 <a href="../classes/DisplayObject.html#method__applyShadow">DisplayObject</a>:
1212
1213
1214
1215 <a href="../files/easeljs_display_DisplayObject.js.html#l1261"><code>_applyShadow:1261</code></a>
1216
1217 </p>
1218
1219
1220
1221
1222
1223 </div>
1224
1225 <div class="description">
1226
1227 </div>
1228
1229
1230 <div class="params">
1231 <h4>Parameters:</h4>
1232
1233 <ul class="params-list">
1234
1235 <li class="param">
1236
1237 <code class="param-name">ctx</code>
1238 <span class="type">CanvasRenderingContext2D</span>
1239
1240
1241
1242
1243 <div class="param-description">
1244
1245 </div>
1246
1247
1248 </li>
1249
1250 <li class="param">
1251
1252 <code class="param-name">shadow</code>
1253 <span class="type"><a href="../classes/Shadow.html" class="crosslink">Shadow</a></span>
1254
1255
1256
1257
1258 <div class="param-description">
1259
1260 </div>
1261
1262
1263 </li>
1264
1265 </ul>
1266 </div>
1267
1268
1269
1270
1271
1272</div>
1273
1274
1275 <div id="method__cloneProps" class="method item protected">
1276 <h3 class="name"><code>_cloneProps</code></h3>
1277
1278
1279 <div class="args">
1280 <span class="paren">(</span><ul class="args-list inline commas">
1281
1282 <li class="arg">
1283
1284 <code>o</code>
1285
1286 </li>
1287
1288 </ul><span class="paren">)</span>
1289 </div>
1290
1291
1292
1293 <span class="returns-inline">
1294 <span class="type"><a href="../classes/BitmapText.html" class="crosslink">BitmapText</a></span>
1295 </span>
1296
1297
1298
1299
1300
1301 <span class="flag protected">protected</span>
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312 <div class="meta">
1313
1314 <p>Inherited from
1315 <a href="../classes/DisplayObject.html#method__cloneProps">
1316 DisplayObject
1317 </a>
1318
1319 but overwritten in
1320
1321
1322
1323 <a href="../files/easeljs_display_BitmapText.js.html#l229"><code>_cloneProps:229</code></a>
1324
1325 </p>
1326
1327
1328
1329
1330
1331 </div>
1332
1333 <div class="description">
1334
1335 </div>
1336
1337
1338 <div class="params">
1339 <h4>Parameters:</h4>
1340
1341 <ul class="params-list">
1342
1343 <li class="param">
1344
1345 <code class="param-name">o</code>
1346 <span class="type"><a href="../classes/BitmapText.html" class="crosslink">BitmapText</a></span>
1347
1348
1349
1350
1351 <div class="param-description">
1352
1353 </div>
1354
1355
1356 </li>
1357
1358 </ul>
1359 </div>
1360
1361
1362
1363 <div class="returns">
1364 <h4>Returns:</h4>
1365
1366 <div class="returns-description">
1367
1368
1369 <span class="type"><a href="../classes/BitmapText.html" class="crosslink">BitmapText</a></span>:
1370
1371 <p>o</p>
1372
1373
1374 </div>
1375 </div>
1376
1377
1378
1379</div>
1380
1381
1382 <div id="method__dispatchEvent" class="method item protected inherited">
1383 <h3 class="name"><code>_dispatchEvent</code></h3>
1384
1385
1386 <div class="args">
1387 <span class="paren">(</span><ul class="args-list inline commas">
1388
1389 <li class="arg">
1390
1391 <code>eventObj</code>
1392
1393 </li>
1394
1395 <li class="arg">
1396
1397 <code>eventPhase</code>
1398
1399 </li>
1400
1401 </ul><span class="paren">)</span>
1402 </div>
1403
1404
1405
1406
1407
1408
1409
1410 <span class="flag protected">protected</span>
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421 <div class="meta">
1422
1423
1424 <p>Inherited from
1425 <a href="../classes/EventDispatcher.html#method__dispatchEvent">EventDispatcher</a>:
1426
1427
1428
1429 <a href="../files/createjs_events_EventDispatcher.js.html#l380"><code>_dispatchEvent:380</code></a>
1430
1431 </p>
1432
1433
1434
1435
1436
1437 </div>
1438
1439 <div class="description">
1440
1441 </div>
1442
1443
1444 <div class="params">
1445 <h4>Parameters:</h4>
1446
1447 <ul class="params-list">
1448
1449 <li class="param">
1450
1451 <code class="param-name">eventObj</code>
1452 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="../classes/Event.html" class="crosslink">Event</a></span>
1453
1454
1455
1456
1457 <div class="param-description">
1458
1459 </div>
1460
1461
1462 </li>
1463
1464 <li class="param">
1465
1466 <code class="param-name">eventPhase</code>
1467 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
1468
1469
1470
1471
1472 <div class="param-description">
1473
1474 </div>
1475
1476
1477 </li>
1478
1479 </ul>
1480 </div>
1481
1482
1483
1484
1485
1486</div>
1487
1488
1489 <div id="method__getBounds" class="method item protected inherited">
1490 <h3 class="name"><code>_getBounds</code></h3>
1491
1492
1493 <div class="args">
1494 <span class="paren">(</span><ul class="args-list inline commas">
1495
1496 <li class="arg">
1497
1498 <code>matrix</code>
1499
1500 </li>
1501
1502 <li class="arg">
1503
1504 <code>ignoreTransform</code>
1505
1506 </li>
1507
1508 </ul><span class="paren">)</span>
1509 </div>
1510
1511
1512
1513 <span class="returns-inline">
1514 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
1515 </span>
1516
1517
1518
1519
1520
1521 <span class="flag protected">protected</span>
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532 <div class="meta">
1533
1534
1535 <p>Inherited from
1536 <a href="../classes/DisplayObject.html#method__getBounds">DisplayObject</a>:
1537
1538
1539
1540 <a href="../files/easeljs_display_DisplayObject.js.html#l1308"><code>_getBounds:1308</code></a>
1541
1542 </p>
1543
1544
1545
1546
1547
1548 </div>
1549
1550 <div class="description">
1551
1552 </div>
1553
1554
1555 <div class="params">
1556 <h4>Parameters:</h4>
1557
1558 <ul class="params-list">
1559
1560 <li class="param">
1561
1562 <code class="param-name">matrix</code>
1563 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
1564
1565
1566
1567
1568 <div class="param-description">
1569
1570 </div>
1571
1572
1573 </li>
1574
1575 <li class="param">
1576
1577 <code class="param-name">ignoreTransform</code>
1578 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1579
1580
1581
1582
1583 <div class="param-description">
1584 <p>If true, does not apply this object's transform.</p>
1585
1586 </div>
1587
1588
1589 </li>
1590
1591 </ul>
1592 </div>
1593
1594
1595
1596 <div class="returns">
1597 <h4>Returns:</h4>
1598
1599 <div class="returns-description">
1600
1601
1602 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
1603
1604
1605 </div>
1606 </div>
1607
1608
1609
1610</div>
1611
1612
1613 <div id="method__getFrame" class="method item protected">
1614 <h3 class="name"><code>_getFrame</code></h3>
1615
1616
1617 <div class="args">
1618 <span class="paren">(</span><ul class="args-list inline commas">
1619
1620 <li class="arg">
1621
1622 <code>character</code>
1623
1624 </li>
1625
1626 <li class="arg">
1627
1628 <code>spriteSheet</code>
1629
1630 </li>
1631
1632 </ul><span class="paren">)</span>
1633 </div>
1634
1635
1636
1637 <span class="returns-inline">
1638 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
1639 </span>
1640
1641
1642
1643
1644
1645 <span class="flag protected">protected</span>
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656 <div class="meta">
1657
1658
1659
1660 <p>
1661
1662 Defined in
1663
1664
1665
1666
1667 <a href="../files/easeljs_display_BitmapText.js.html#l259"><code>_getFrame:259</code></a>
1668
1669 </p>
1670
1671
1672
1673
1674
1675 </div>
1676
1677 <div class="description">
1678
1679 </div>
1680
1681
1682 <div class="params">
1683 <h4>Parameters:</h4>
1684
1685 <ul class="params-list">
1686
1687 <li class="param">
1688
1689 <code class="param-name">character</code>
1690 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1691
1692
1693
1694
1695 <div class="param-description">
1696
1697 </div>
1698
1699
1700 </li>
1701
1702 <li class="param">
1703
1704 <code class="param-name">spriteSheet</code>
1705 <span class="type"><a href="../classes/SpriteSheet.html" class="crosslink">SpriteSheet</a></span>
1706
1707
1708
1709
1710 <div class="param-description">
1711
1712 </div>
1713
1714
1715 </li>
1716
1717 </ul>
1718 </div>
1719
1720
1721
1722 <div class="returns">
1723 <h4>Returns:</h4>
1724
1725 <div class="returns-description">
1726
1727
1728 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
1729
1730
1731 </div>
1732 </div>
1733
1734
1735
1736</div>
1737
1738
1739 <div id="method__getFrameIndex" class="method item protected">
1740 <h3 class="name"><code>_getFrameIndex</code></h3>
1741
1742
1743 <div class="args">
1744 <span class="paren">(</span><ul class="args-list inline commas">
1745
1746 <li class="arg">
1747
1748 <code>character</code>
1749
1750 </li>
1751
1752 <li class="arg">
1753
1754 <code>spriteSheet</code>
1755
1756 </li>
1757
1758 </ul><span class="paren">)</span>
1759 </div>
1760
1761
1762
1763 <span class="returns-inline">
1764 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1765 </span>
1766
1767
1768
1769
1770
1771 <span class="flag protected">protected</span>
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782 <div class="meta">
1783
1784
1785
1786 <p>
1787
1788 Defined in
1789
1790
1791
1792
1793 <a href="../files/easeljs_display_BitmapText.js.html#l243"><code>_getFrameIndex:243</code></a>
1794
1795 </p>
1796
1797
1798
1799
1800
1801 </div>
1802
1803 <div class="description">
1804
1805 </div>
1806
1807
1808 <div class="params">
1809 <h4>Parameters:</h4>
1810
1811 <ul class="params-list">
1812
1813 <li class="param">
1814
1815 <code class="param-name">character</code>
1816 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1817
1818
1819
1820
1821 <div class="param-description">
1822
1823 </div>
1824
1825
1826 </li>
1827
1828 <li class="param">
1829
1830 <code class="param-name">spriteSheet</code>
1831 <span class="type"><a href="../classes/SpriteSheet.html" class="crosslink">SpriteSheet</a></span>
1832
1833
1834
1835
1836 <div class="param-description">
1837
1838 </div>
1839
1840
1841 </li>
1842
1843 </ul>
1844 </div>
1845
1846
1847
1848 <div class="returns">
1849 <h4>Returns:</h4>
1850
1851 <div class="returns-description">
1852
1853
1854 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>:
1855
1856
1857 </div>
1858 </div>
1859
1860
1861
1862</div>
1863
1864
1865 <div id="method__getLineHeight" class="method item protected">
1866 <h3 class="name"><code>_getLineHeight</code></h3>
1867
1868
1869 <div class="args">
1870 <span class="paren">(</span><ul class="args-list inline commas">
1871
1872 <li class="arg">
1873
1874 <code>ss</code>
1875
1876 </li>
1877
1878 </ul><span class="paren">)</span>
1879 </div>
1880
1881
1882
1883 <span class="returns-inline">
1884 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1885 </span>
1886
1887
1888
1889
1890
1891 <span class="flag protected">protected</span>
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902 <div class="meta">
1903
1904
1905
1906 <p>
1907
1908 Defined in
1909
1910
1911
1912
1913 <a href="../files/easeljs_display_BitmapText.js.html#l271"><code>_getLineHeight:271</code></a>
1914
1915 </p>
1916
1917
1918
1919
1920
1921 </div>
1922
1923 <div class="description">
1924
1925 </div>
1926
1927
1928 <div class="params">
1929 <h4>Parameters:</h4>
1930
1931 <ul class="params-list">
1932
1933 <li class="param">
1934
1935 <code class="param-name">ss</code>
1936 <span class="type"><a href="../classes/SpriteSheet.html" class="crosslink">SpriteSheet</a></span>
1937
1938
1939
1940
1941 <div class="param-description">
1942
1943 </div>
1944
1945
1946 </li>
1947
1948 </ul>
1949 </div>
1950
1951
1952
1953 <div class="returns">
1954 <h4>Returns:</h4>
1955
1956 <div class="returns-description">
1957
1958
1959 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>:
1960
1961
1962 </div>
1963 </div>
1964
1965
1966
1967</div>
1968
1969
1970 <div id="method__getSpaceWidth" class="method item protected">
1971 <h3 class="name"><code>_getSpaceWidth</code></h3>
1972
1973
1974 <div class="args">
1975 <span class="paren">(</span><ul class="args-list inline commas">
1976
1977 <li class="arg">
1978
1979 <code>ss</code>
1980
1981 </li>
1982
1983 </ul><span class="paren">)</span>
1984 </div>
1985
1986
1987
1988 <span class="returns-inline">
1989 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1990 </span>
1991
1992
1993
1994
1995
1996 <span class="flag protected">protected</span>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007 <div class="meta">
2008
2009
2010
2011 <p>
2012
2013 Defined in
2014
2015
2016
2017
2018 <a href="../files/easeljs_display_BitmapText.js.html#l282"><code>_getSpaceWidth:282</code></a>
2019
2020 </p>
2021
2022
2023
2024
2025
2026 </div>
2027
2028 <div class="description">
2029
2030 </div>
2031
2032
2033 <div class="params">
2034 <h4>Parameters:</h4>
2035
2036 <ul class="params-list">
2037
2038 <li class="param">
2039
2040 <code class="param-name">ss</code>
2041 <span class="type"><a href="../classes/SpriteSheet.html" class="crosslink">SpriteSheet</a></span>
2042
2043
2044
2045
2046 <div class="param-description">
2047
2048 </div>
2049
2050
2051 </li>
2052
2053 </ul>
2054 </div>
2055
2056
2057
2058 <div class="returns">
2059 <h4>Returns:</h4>
2060
2061 <div class="returns-description">
2062
2063
2064 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>:
2065
2066
2067 </div>
2068 </div>
2069
2070
2071
2072</div>
2073
2074
2075 <div id="method__getStage" class="method item protected inherited">
2076 <h3 class="name"><code>_getStage</code></h3>
2077
2078
2079 <span class="paren">()</span>
2080
2081
2082
2083 <span class="returns-inline">
2084 <span class="type"><a href="../classes/Stage.html" class="crosslink">Stage</a></span>
2085 </span>
2086
2087
2088
2089
2090
2091 <span class="flag protected">protected</span>
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102 <div class="meta">
2103
2104
2105 <p>Inherited from
2106 <a href="../classes/DisplayObject.html#method__getStage">DisplayObject</a>:
2107
2108
2109
2110 <a href="../files/easeljs_display_DisplayObject.js.html#l672"><code>_getStage:672</code></a>
2111
2112 </p>
2113
2114
2115
2116
2117
2118 </div>
2119
2120 <div class="description">
2121 <p>Use the <a href="../classes/DisplayObject.html#property_stage" class="crosslink">stage</a> property instead.</p>
2122
2123 </div>
2124
2125
2126
2127
2128 <div class="returns">
2129 <h4>Returns:</h4>
2130
2131 <div class="returns-description">
2132
2133
2134 <span class="type"><a href="../classes/Stage.html" class="crosslink">Stage</a></span>:
2135
2136
2137 </div>
2138 </div>
2139
2140
2141
2142</div>
2143
2144
2145 <div id="method__isMouseOpaque" class="method item protected inherited">
2146 <h3 class="name"><code>_isMouseOpaque</code></h3>
2147
2148
2149 <span class="paren">()</span>
2150
2151
2152
2153 <span class="returns-inline">
2154 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
2155 </span>
2156
2157
2158
2159
2160
2161 <span class="flag protected">protected</span>
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172 <div class="meta">
2173
2174
2175 <p>Inherited from
2176 <a href="../classes/DisplayObject.html#method__isMouseOpaque">DisplayObject</a>:
2177
2178
2179
2180 <a href="../files/easeljs_display_DisplayObject.js.html#l1352"><code>_isMouseOpaque:1352</code></a>
2181
2182 </p>
2183
2184
2185
2186
2187
2188 </div>
2189
2190 <div class="description">
2191 <p>Indicates whether the display object has any mouse event listeners or a cursor.</p>
2192
2193 </div>
2194
2195
2196
2197
2198 <div class="returns">
2199 <h4>Returns:</h4>
2200
2201 <div class="returns-description">
2202
2203
2204 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
2205
2206
2207 </div>
2208 </div>
2209
2210
2211
2212</div>
2213
2214
2215 <div id="method__testHit" class="method item protected inherited">
2216 <h3 class="name"><code>_testHit</code></h3>
2217
2218
2219 <div class="args">
2220 <span class="paren">(</span><ul class="args-list inline commas">
2221
2222 <li class="arg">
2223
2224 <code>ctx</code>
2225
2226 </li>
2227
2228 </ul><span class="paren">)</span>
2229 </div>
2230
2231
2232
2233 <span class="returns-inline">
2234 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
2235 </span>
2236
2237
2238
2239
2240
2241 <span class="flag protected">protected</span>
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252 <div class="meta">
2253
2254
2255 <p>Inherited from
2256 <a href="../classes/DisplayObject.html#method__testHit">DisplayObject</a>:
2257
2258
2259
2260 <a href="../files/easeljs_display_DisplayObject.js.html#l1291"><code>_testHit:1291</code></a>
2261
2262 </p>
2263
2264
2265
2266
2267
2268 </div>
2269
2270 <div class="description">
2271
2272 </div>
2273
2274
2275 <div class="params">
2276 <h4>Parameters:</h4>
2277
2278 <ul class="params-list">
2279
2280 <li class="param">
2281
2282 <code class="param-name">ctx</code>
2283 <span class="type">CanvasRenderingContext2D</span>
2284
2285
2286
2287
2288 <div class="param-description">
2289
2290 </div>
2291
2292
2293 </li>
2294
2295 </ul>
2296 </div>
2297
2298
2299
2300 <div class="returns">
2301 <h4>Returns:</h4>
2302
2303 <div class="returns-description">
2304
2305
2306 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
2307
2308
2309 </div>
2310 </div>
2311
2312
2313
2314</div>
2315
2316
2317 <div id="method__tick" class="method item protected inherited">
2318 <h3 class="name"><code>_tick</code></h3>
2319
2320
2321 <div class="args">
2322 <span class="paren">(</span><ul class="args-list inline commas">
2323
2324 <li class="arg">
2325
2326 <code>evtObj</code>
2327
2328 </li>
2329
2330 </ul><span class="paren">)</span>
2331 </div>
2332
2333
2334
2335
2336
2337
2338
2339 <span class="flag protected">protected</span>
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350 <div class="meta">
2351
2352
2353 <p>Inherited from
2354 <a href="../classes/DisplayObject.html#method__tick">DisplayObject</a>:
2355
2356
2357
2358 <a href="../files/easeljs_display_DisplayObject.js.html#l1275"><code>_tick:1275</code></a>
2359
2360 </p>
2361
2362
2363
2364
2365
2366 </div>
2367
2368 <div class="description">
2369
2370 </div>
2371
2372
2373 <div class="params">
2374 <h4>Parameters:</h4>
2375
2376 <ul class="params-list">
2377
2378 <li class="param">
2379
2380 <code class="param-name">evtObj</code>
2381 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
2382
2383
2384
2385
2386 <div class="param-description">
2387 <p>An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.</p>
2388
2389 </div>
2390
2391
2392 </li>
2393
2394 </ul>
2395 </div>
2396
2397
2398
2399
2400
2401</div>
2402
2403
2404 <div id="method__transformBounds" class="method item protected inherited">
2405 <h3 class="name"><code>_transformBounds</code></h3>
2406
2407
2408 <div class="args">
2409 <span class="paren">(</span><ul class="args-list inline commas">
2410
2411 <li class="arg">
2412
2413 <code>bounds</code>
2414
2415 </li>
2416
2417 <li class="arg">
2418
2419 <code>matrix</code>
2420
2421 </li>
2422
2423 <li class="arg">
2424
2425 <code>ignoreTransform</code>
2426
2427 </li>
2428
2429 </ul><span class="paren">)</span>
2430 </div>
2431
2432
2433
2434 <span class="returns-inline">
2435 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
2436 </span>
2437
2438
2439
2440
2441
2442 <span class="flag protected">protected</span>
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453 <div class="meta">
2454
2455
2456 <p>Inherited from
2457 <a href="../classes/DisplayObject.html#method__transformBounds">DisplayObject</a>:
2458
2459
2460
2461 <a href="../files/easeljs_display_DisplayObject.js.html#l1319"><code>_transformBounds:1319</code></a>
2462
2463 </p>
2464
2465
2466
2467
2468
2469 </div>
2470
2471 <div class="description">
2472
2473 </div>
2474
2475
2476 <div class="params">
2477 <h4>Parameters:</h4>
2478
2479 <ul class="params-list">
2480
2481 <li class="param">
2482
2483 <code class="param-name">bounds</code>
2484 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
2485
2486
2487
2488
2489 <div class="param-description">
2490
2491 </div>
2492
2493
2494 </li>
2495
2496 <li class="param">
2497
2498 <code class="param-name">matrix</code>
2499 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
2500
2501
2502
2503
2504 <div class="param-description">
2505
2506 </div>
2507
2508
2509 </li>
2510
2511 <li class="param">
2512
2513 <code class="param-name">ignoreTransform</code>
2514 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
2515
2516
2517
2518
2519 <div class="param-description">
2520
2521 </div>
2522
2523
2524 </li>
2525
2526 </ul>
2527 </div>
2528
2529
2530
2531 <div class="returns">
2532 <h4>Returns:</h4>
2533
2534 <div class="returns-description">
2535
2536
2537 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
2538
2539
2540 </div>
2541 </div>
2542
2543
2544
2545</div>
2546
2547
2548 <div id="method__updateState" class="method item inherited">
2549 <h3 class="name"><code>_updateState</code></h3>
2550
2551
2552 <span class="paren">()</span>
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569 <div class="meta">
2570
2571
2572 <p>Inherited from
2573 <a href="../classes/DisplayObject.html#method__updateState">DisplayObject</a>:
2574
2575
2576
2577 <a href="../files/easeljs_display_DisplayObject.js.html#l1214"><code>_updateState:1214</code></a>
2578
2579 </p>
2580
2581
2582
2583
2584
2585 </div>
2586
2587 <div class="description">
2588 <p>Called before the object gets drawn and is a chance to ensure the display state of the object is correct.
2589Mostly used by <a href="../classes/MovieClip.html" class="crosslink">MovieClip</a> and <a href="../classes/BitmapText.html" class="crosslink">BitmapText</a> to
2590correct their internal state and children prior to being drawn.</p>
2591<p>Is manually called via draw in a <a href="../classes/Stage.html" class="crosslink">Stage</a> but is automatically called when
2592present in a <a href="../classes/StageGL.html" class="crosslink">StageGL</a> instance.</p>
2593
2594 </div>
2595
2596
2597
2598
2599
2600
2601</div>
2602
2603
2604 <div id="method__updateText" class="method item protected">
2605 <h3 class="name"><code>_updateText</code></h3>
2606
2607
2608 <span class="paren">()</span>
2609
2610
2611
2612
2613
2614
2615
2616 <span class="flag protected">protected</span>
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627 <div class="meta">
2628
2629
2630
2631 <p>
2632
2633 Defined in
2634
2635
2636
2637
2638 <a href="../files/easeljs_display_BitmapText.js.html#l293"><code>_updateText:293</code></a>
2639
2640 </p>
2641
2642
2643
2644
2645
2646 </div>
2647
2648 <div class="description">
2649
2650 </div>
2651
2652
2653
2654
2655
2656
2657</div>
2658
2659
2660 <div id="method_addChild" class="method item">
2661 <h3 class="name"><code>addChild</code></h3>
2662
2663
2664 <span class="paren">()</span>
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681 <div class="meta">
2682
2683
2684
2685 <p>
2686
2687 Defined in
2688
2689
2690
2691
2692 <a href="../files/easeljs_display_BitmapText.js.html#l198"><code>addChild:198</code></a>
2693
2694 </p>
2695
2696
2697
2698
2699
2700 </div>
2701
2702 <div class="description">
2703 <p><strong>Disabled in BitmapText.</strong></p>
2704
2705 </div>
2706
2707
2708
2709
2710
2711
2712</div>
2713
2714
2715 <div id="method_addChildAt" class="method item">
2716 <h3 class="name"><code>addChildAt</code></h3>
2717
2718
2719 <span class="paren">()</span>
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736 <div class="meta">
2737
2738
2739
2740 <p>
2741
2742 Defined in
2743
2744
2745
2746
2747 <a href="../files/easeljs_display_BitmapText.js.html#l202"><code>addChildAt:202</code></a>
2748
2749 </p>
2750
2751
2752
2753
2754
2755 </div>
2756
2757 <div class="description">
2758 <p><strong>Disabled in BitmapText.</strong></p>
2759
2760 </div>
2761
2762
2763
2764
2765
2766
2767</div>
2768
2769
2770 <div id="method_addEventListener" class="method item inherited">
2771 <h3 class="name"><code>addEventListener</code></h3>
2772
2773
2774 <div class="args">
2775 <span class="paren">(</span><ul class="args-list inline commas">
2776
2777 <li class="arg">
2778
2779 <code>type</code>
2780
2781 </li>
2782
2783 <li class="arg">
2784
2785 <code>listener</code>
2786
2787 </li>
2788
2789 <li class="arg">
2790
2791 <code class="optional">[useCapture]</code>
2792
2793 </li>
2794
2795 </ul><span class="paren">)</span>
2796 </div>
2797
2798
2799
2800 <span class="returns-inline">
2801 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
2802 </span>
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817 <div class="meta">
2818
2819
2820 <p>Inherited from
2821 <a href="../classes/EventDispatcher.html#method_addEventListener">EventDispatcher</a>:
2822
2823
2824
2825 <a href="../files/createjs_events_EventDispatcher.js.html#l140"><code>addEventListener:140</code></a>
2826
2827 </p>
2828
2829
2830
2831
2832
2833 </div>
2834
2835 <div class="description">
2836 <p><p>Adds the specified event listener. Note that adding multiple listeners to the same function will result in
2837multiple callbacks getting fired.</p></p>
2838<h4>Example</h4>
2839
2840<pre class="code prettyprint"><code> displayObject.addEventListener("click", handleClick);
2841 function handleClick(event) {
2842 // Click happened.
2843 }</code></pre>
2844
2845 </div>
2846
2847
2848 <div class="params">
2849 <h4>Parameters:</h4>
2850
2851 <ul class="params-list">
2852
2853 <li class="param">
2854
2855 <code class="param-name">type</code>
2856 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
2857
2858
2859
2860
2861 <div class="param-description">
2862 <p>The string type of the event.</p>
2863
2864 </div>
2865
2866
2867 </li>
2868
2869 <li class="param">
2870
2871 <code class="param-name">listener</code>
2872 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
2873
2874
2875
2876
2877 <div class="param-description">
2878 <p>An object with a handleEvent method, or a function that will be called when
2879the event is dispatched.</p>
2880
2881 </div>
2882
2883
2884 </li>
2885
2886 <li class="param">
2887
2888 <code class="param-name optional">[useCapture]</code>
2889 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
2890 <span class="flag optional" title="This parameter is optional.">optional</span>
2891
2892
2893
2894
2895 <div class="param-description">
2896 <p>For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.</p>
2897
2898 </div>
2899
2900
2901 </li>
2902
2903 </ul>
2904 </div>
2905
2906
2907
2908 <div class="returns">
2909 <h4>Returns:</h4>
2910
2911 <div class="returns-description">
2912
2913
2914 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
2915
2916 <p>Returns the listener for chaining or assignment.</p>
2917
2918
2919 </div>
2920 </div>
2921
2922
2923
2924</div>
2925
2926
2927 <div id="method_cache" class="method item inherited">
2928 <h3 class="name"><code>cache</code></h3>
2929
2930
2931 <div class="args">
2932 <span class="paren">(</span><ul class="args-list inline commas">
2933
2934 <li class="arg">
2935
2936 <code>x</code>
2937
2938 </li>
2939
2940 <li class="arg">
2941
2942 <code>y</code>
2943
2944 </li>
2945
2946 <li class="arg">
2947
2948 <code>width</code>
2949
2950 </li>
2951
2952 <li class="arg">
2953
2954 <code>height</code>
2955
2956 </li>
2957
2958 <li class="arg">
2959
2960 <code class="optional">[scale=1]</code>
2961
2962 </li>
2963
2964 <li class="arg">
2965
2966 <code class="optional">[options=undefined]</code>
2967
2968 </li>
2969
2970 </ul><span class="paren">)</span>
2971 </div>
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988 <div class="meta">
2989
2990
2991 <p>Inherited from
2992 <a href="../classes/DisplayObject.html#method_cache">DisplayObject</a>:
2993
2994
2995
2996 <a href="../files/easeljs_display_DisplayObject.js.html#l792"><code>cache:792</code></a>
2997
2998 </p>
2999
3000
3001
3002
3003
3004 </div>
3005
3006 <div class="description">
3007 <p>Draws the display object into a new element, which is then used for subsequent draws. Intended for complex content
3008that does not change frequently (ex. a Container with many children that do not move, or a complex vector Shape),
3009this can provide for much faster rendering because the content does not need to be re-rendered each tick. The
3010cached display object can be moved, rotated, faded, etc freely, however if its content changes, you must manually
3011update the cache by calling <code>updateCache()</code> again. You must specify the cached area via the x, y, w,
3012and h parameters. This defines the rectangle that will be rendered and cached using this display object's coordinates.</p>
3013<p><h4>Example</h4>
3014For example if you defined a Shape that drew a circle at 0, 0 with a radius of 25:</p>
3015<pre class="code prettyprint"><code> var shape = new createjs.Shape();
3016 shape.graphics.beginFill("#ff0000").drawCircle(0, 0, 25);
3017 shape.cache(-25, -25, 50, 50);</code></pre>
3018<p>Note that filters need to be defined <em>before</em> the cache is applied or you will have to call updateCache after
3019application. Check out the <a href="../classes/Filter.html" class="crosslink">Filter</a> class for more information. Some filters
3020(ex. BlurFilter) may not work as expected in conjunction with the scale param.</p>
3021<p>Usually, the resulting cacheCanvas will have the dimensions width <em> scale, height </em> scale, however some filters (ex. BlurFilter)
3022will add padding to the canvas dimensions.</p>
3023<p>In previous versions caching was handled on DisplayObject but has since been moved to <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a>.
3024This allows for easier interaction and alternate cache methods like WebGL with <a href="../classes/StageGL.html" class="crosslink">StageGL</a>.
3025For more information on the options object, see the BitmapCache BitmapCache/define.</p>
3026
3027 </div>
3028
3029
3030 <div class="params">
3031 <h4>Parameters:</h4>
3032
3033 <ul class="params-list">
3034
3035 <li class="param">
3036
3037 <code class="param-name">x</code>
3038 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
3039
3040
3041
3042
3043 <div class="param-description">
3044 <p>The x coordinate origin for the cache region.</p>
3045
3046 </div>
3047
3048
3049 </li>
3050
3051 <li class="param">
3052
3053 <code class="param-name">y</code>
3054 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
3055
3056
3057
3058
3059 <div class="param-description">
3060 <p>The y coordinate origin for the cache region.</p>
3061
3062 </div>
3063
3064
3065 </li>
3066
3067 <li class="param">
3068
3069 <code class="param-name">width</code>
3070 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
3071
3072
3073
3074
3075 <div class="param-description">
3076 <p>The width of the cache region.</p>
3077
3078 </div>
3079
3080
3081 </li>
3082
3083 <li class="param">
3084
3085 <code class="param-name">height</code>
3086 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
3087
3088
3089
3090
3091 <div class="param-description">
3092 <p>The height of the cache region.</p>
3093
3094 </div>
3095
3096
3097 </li>
3098
3099 <li class="param">
3100
3101 <code class="param-name optional">[scale=1]</code>
3102 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
3103 <span class="flag optional" title="This parameter is optional.">optional</span>
3104
3105
3106
3107
3108 <div class="param-description">
3109 <p>The scale at which the cache will be created. For example, if you cache a vector shape using
3110 myShape.cache(0,0,100,100,2) then the resulting cacheCanvas will be 200x200 px. This lets you scale and rotate
3111 cached elements with greater fidelity. Default is 1.</p>
3112
3113 </div>
3114
3115
3116 </li>
3117
3118 <li class="param">
3119
3120 <code class="param-name optional">[options=undefined]</code>
3121 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
3122 <span class="flag optional" title="This parameter is optional.">optional</span>
3123
3124
3125
3126
3127 <div class="param-description">
3128 <p>Specify additional parameters for the cache logic</p>
3129
3130 </div>
3131
3132
3133 </li>
3134
3135 </ul>
3136 </div>
3137
3138
3139
3140
3141
3142</div>
3143
3144
3145 <div id="method_clone" class="method item inherited">
3146 <h3 class="name"><code>clone</code></h3>
3147
3148
3149 <span class="paren">()</span>
3150
3151
3152
3153 <span class="returns-inline">
3154 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
3155 </span>
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170 <div class="meta">
3171
3172
3173 <p>Inherited from
3174 <a href="../classes/DisplayObject.html#method_clone">DisplayObject</a>:
3175
3176
3177
3178 <a href="../files/easeljs_display_DisplayObject.js.html#l1192"><code>clone:1192</code></a>
3179
3180 </p>
3181
3182
3183
3184
3185
3186 </div>
3187
3188 <div class="description">
3189 <p>Returns a clone of this DisplayObject. Some properties that are specific to this instance's current context are
3190reverted to their defaults (for example .parent). Caches are not maintained across clones, and some elements
3191are copied by reference (masks, individual filter instances, hit area)</p>
3192
3193 </div>
3194
3195
3196
3197
3198 <div class="returns">
3199 <h4>Returns:</h4>
3200
3201 <div class="returns-description">
3202
3203
3204 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>:
3205
3206 <p>A clone of the current DisplayObject instance.</p>
3207
3208
3209 </div>
3210 </div>
3211
3212
3213
3214</div>
3215
3216
3217 <div id="method_dispatchEvent" class="method item inherited">
3218 <h3 class="name"><code>dispatchEvent</code></h3>
3219
3220
3221 <div class="args">
3222 <span class="paren">(</span><ul class="args-list inline commas">
3223
3224 <li class="arg">
3225
3226 <code>eventObj</code>
3227
3228 </li>
3229
3230 <li class="arg">
3231
3232 <code class="optional">[bubbles]</code>
3233
3234 </li>
3235
3236 <li class="arg">
3237
3238 <code class="optional">[cancelable]</code>
3239
3240 </li>
3241
3242 </ul><span class="paren">)</span>
3243 </div>
3244
3245
3246
3247 <span class="returns-inline">
3248 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
3249 </span>
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264 <div class="meta">
3265
3266
3267 <p>Inherited from
3268 <a href="../classes/EventDispatcher.html#method_dispatchEvent">EventDispatcher</a>:
3269
3270
3271
3272 <a href="../files/createjs_events_EventDispatcher.js.html#l285"><code>dispatchEvent:285</code></a>
3273
3274 </p>
3275
3276
3277
3278
3279
3280 </div>
3281
3282 <div class="description">
3283 <p><p>Dispatches the specified event to all listeners.</p></p>
3284<h4>Example</h4>
3285
3286<pre class="code prettyprint"><code> // Use a string event
3287 this.dispatchEvent("complete");
3288
3289 // Use an Event instance
3290 var event = new createjs.Event("progress");
3291 this.dispatchEvent(event);</code></pre>
3292
3293 </div>
3294
3295
3296 <div class="params">
3297 <h4>Parameters:</h4>
3298
3299 <ul class="params-list">
3300
3301 <li class="param">
3302
3303 <code class="param-name">eventObj</code>
3304 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="../classes/Event.html" class="crosslink">Event</a></span>
3305
3306
3307
3308
3309 <div class="param-description">
3310 <p>An object with a "type" property, or a string type.
3311While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,
3312dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can
3313be used to avoid event object instantiation for non-bubbling events that may not have any listeners.</p>
3314
3315 </div>
3316
3317
3318 </li>
3319
3320 <li class="param">
3321
3322 <code class="param-name optional">[bubbles]</code>
3323 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
3324 <span class="flag optional" title="This parameter is optional.">optional</span>
3325
3326
3327
3328
3329 <div class="param-description">
3330 <p>Specifies the <code>bubbles</code> value when a string was passed to eventObj.</p>
3331
3332 </div>
3333
3334
3335 </li>
3336
3337 <li class="param">
3338
3339 <code class="param-name optional">[cancelable]</code>
3340 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
3341 <span class="flag optional" title="This parameter is optional.">optional</span>
3342
3343
3344
3345
3346 <div class="param-description">
3347 <p>Specifies the <code>cancelable</code> value when a string was passed to eventObj.</p>
3348
3349 </div>
3350
3351
3352 </li>
3353
3354 </ul>
3355 </div>
3356
3357
3358
3359 <div class="returns">
3360 <h4>Returns:</h4>
3361
3362 <div class="returns-description">
3363
3364
3365 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
3366
3367 <p>Returns false if <code>preventDefault()</code> was called on a cancelable event, true otherwise.</p>
3368
3369
3370 </div>
3371 </div>
3372
3373
3374
3375</div>
3376
3377
3378 <div id="method_draw" class="method item inherited">
3379 <h3 class="name"><code>draw</code></h3>
3380
3381
3382 <div class="args">
3383 <span class="paren">(</span><ul class="args-list inline commas">
3384
3385 <li class="arg">
3386
3387 <code>ctx</code>
3388
3389 </li>
3390
3391 <li class="arg">
3392
3393 <code class="optional">[ignoreCache=false]</code>
3394
3395 </li>
3396
3397 </ul><span class="paren">)</span>
3398 </div>
3399
3400
3401
3402 <span class="returns-inline">
3403 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
3404 </span>
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419 <div class="meta">
3420
3421
3422 <p>Inherited from
3423 <a href="../classes/DisplayObject.html#method_draw">DisplayObject</a>:
3424
3425
3426
3427 <a href="../files/easeljs_display_DisplayObject.js.html#l741"><code>draw:741</code></a>
3428
3429 </p>
3430
3431
3432
3433
3434
3435 </div>
3436
3437 <div class="description">
3438 <p>Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.
3439Returns <code>true</code> if the draw was handled (useful for overriding functionality).</p>
3440<p>NOTE: This method is mainly for internal use, though it may be useful for advanced uses.</p>
3441
3442 </div>
3443
3444
3445 <div class="params">
3446 <h4>Parameters:</h4>
3447
3448 <ul class="params-list">
3449
3450 <li class="param">
3451
3452 <code class="param-name">ctx</code>
3453 <span class="type">CanvasRenderingContext2D</span>
3454
3455
3456
3457
3458 <div class="param-description">
3459 <p>The canvas 2D context object to draw into.</p>
3460
3461 </div>
3462
3463
3464 </li>
3465
3466 <li class="param">
3467
3468 <code class="param-name optional">[ignoreCache=false]</code>
3469 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
3470 <span class="flag optional" title="This parameter is optional.">optional</span>
3471
3472
3473
3474
3475 <div class="param-description">
3476 <p>Indicates whether the draw operation should ignore any current cache. For example,
3477used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).</p>
3478
3479 </div>
3480
3481
3482 </li>
3483
3484 </ul>
3485 </div>
3486
3487
3488
3489 <div class="returns">
3490 <h4>Returns:</h4>
3491
3492 <div class="returns-description">
3493
3494
3495 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
3496
3497
3498 </div>
3499 </div>
3500
3501
3502
3503</div>
3504
3505
3506 <div id="method_getBounds" class="method item inherited">
3507 <h3 class="name"><code>getBounds</code></h3>
3508
3509
3510 <span class="paren">()</span>
3511
3512
3513
3514 <span class="returns-inline">
3515 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
3516 </span>
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531 <div class="meta">
3532
3533
3534 <p>Inherited from
3535 <a href="../classes/DisplayObject.html#method_getBounds">DisplayObject</a>:
3536
3537
3538
3539 <a href="../files/easeljs_display_DisplayObject.js.html#l1089"><code>getBounds:1089</code></a>
3540
3541 </p>
3542
3543
3544
3545
3546
3547 </div>
3548
3549 <div class="description">
3550 <p>Returns a rectangle representing this object's bounds in its local coordinate system (ie. with no transformation).
3551Objects that have been cached will return the bounds of the cache.</p>
3552<p>Not all display objects can calculate their own bounds (ex. Shape). For these objects, you can use
3553<a href="../classes/DisplayObject.html#method_setBounds" class="crosslink">setBounds</a> so that they are included when calculating Container
3554bounds.</p>
3555<table>
3556 <tr><td><b>All</b></td><td>
3557 All display objects support setting bounds manually using setBounds(). Likewise, display objects that
3558 have been cached using cache() will return the bounds of their cache. Manual and cache bounds will override
3559 the automatic calculations listed below.
3560 </td></tr>
3561 <tr><td><b>Bitmap</b></td><td>
3562 Returns the width and height of the sourceRect (if specified) or image, extending from (x=0,y=0).
3563 </td></tr>
3564 <tr><td><b>Sprite</b></td><td>
3565 Returns the bounds of the current frame. May have non-zero x/y if a frame registration point was specified
3566 in the spritesheet data. See also <a href="../classes/SpriteSheet.html#method_getFrameBounds" class="crosslink">getFrameBounds</a>
3567 </td></tr>
3568 <tr><td><b>Container</b></td><td>
3569 Returns the aggregate (combined) bounds of all children that return a non-null value from getBounds().
3570 </td></tr>
3571 <tr><td><b>Shape</b></td><td>
3572 Does not currently support automatic bounds calculations. Use setBounds() to manually define bounds.
3573 </td></tr>
3574 <tr><td><b>Text</b></td><td>
3575 Returns approximate bounds. Horizontal values (x/width) are quite accurate, but vertical values (y/height) are
3576 not, especially when using textBaseline values other than "top".
3577 </td></tr>
3578 <tr><td><b>BitmapText</b></td><td>
3579 Returns approximate bounds. Values will be more accurate if spritesheet frame registration points are close
3580 to (x=0,y=0).
3581 </td></tr>
3582</table>
3583
3584<p>Bounds can be expensive to calculate for some objects (ex. text, or containers with many children), and
3585are recalculated each time you call getBounds(). You can prevent recalculation on static objects by setting the
3586bounds explicitly:</p>
3587<pre class="code prettyprint"><code>var bounds = obj.getBounds();
3588obj.setBounds(bounds.x, bounds.y, bounds.width, bounds.height);
3589// getBounds will now use the set values, instead of recalculating</code></pre>
3590<p>To reduce memory impact, the returned Rectangle instance may be reused internally; clone the instance or copy its
3591values if you need to retain it.</p>
3592<pre class="code prettyprint"><code>var myBounds = obj.getBounds().clone();
3593// OR:
3594myRect.copy(obj.getBounds());</code></pre>
3595
3596 </div>
3597
3598
3599
3600
3601 <div class="returns">
3602 <h4>Returns:</h4>
3603
3604 <div class="returns-description">
3605
3606
3607 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
3608
3609 <p>A Rectangle instance representing the bounds, or null if bounds are not available for this
3610object.</p>
3611
3612
3613 </div>
3614 </div>
3615
3616
3617
3618</div>
3619
3620
3621 <div id="method_getCacheDataURL" class="method item inherited">
3622 <h3 class="name"><code>getCacheDataURL</code></h3>
3623
3624
3625 <span class="paren">()</span>
3626
3627
3628
3629 <span class="returns-inline">
3630 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
3631 </span>
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646 <div class="meta">
3647
3648
3649 <p>Inherited from
3650 <a href="../classes/DisplayObject.html#method_getCacheDataURL">DisplayObject</a>:
3651
3652
3653
3654 <a href="../files/easeljs_display_DisplayObject.js.html#l875"><code>getCacheDataURL:875</code></a>
3655
3656 </p>
3657
3658
3659
3660
3661
3662 </div>
3663
3664 <div class="description">
3665 <p>Returns a data URL for the cache, or null if this display object is not cached.
3666Only generated if the cache has changed, otherwise returns last result.</p>
3667
3668 </div>
3669
3670
3671
3672
3673 <div class="returns">
3674 <h4>Returns:</h4>
3675
3676 <div class="returns-description">
3677
3678
3679 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
3680
3681 <p>The image data url for the cache.</p>
3682
3683
3684 </div>
3685 </div>
3686
3687
3688
3689</div>
3690
3691
3692 <div id="method_getConcatenatedDisplayProps" class="method item inherited">
3693 <h3 class="name"><code>getConcatenatedDisplayProps</code></h3>
3694
3695
3696 <div class="args">
3697 <span class="paren">(</span><ul class="args-list inline commas">
3698
3699 <li class="arg">
3700
3701 <code class="optional">[props]</code>
3702
3703 </li>
3704
3705 </ul><span class="paren">)</span>
3706 </div>
3707
3708
3709
3710 <span class="returns-inline">
3711 <span class="type"><a href="../classes/DisplayProps.html" class="crosslink">DisplayProps</a></span>
3712 </span>
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727 <div class="meta">
3728
3729
3730 <p>Inherited from
3731 <a href="../classes/DisplayObject.html#method_getConcatenatedDisplayProps">DisplayObject</a>:
3732
3733
3734
3735 <a href="../files/easeljs_display_DisplayObject.js.html#l1021"><code>getConcatenatedDisplayProps:1021</code></a>
3736
3737 </p>
3738
3739
3740
3741
3742
3743 </div>
3744
3745 <div class="description">
3746 <p>Generates a DisplayProps object representing the combined display properties of the object and all of its
3747parent Containers up to the highest level ancestor (usually the <a href="../classes/Stage.html" class="crosslink">Stage</a>).</p>
3748
3749 </div>
3750
3751
3752 <div class="params">
3753 <h4>Parameters:</h4>
3754
3755 <ul class="params-list">
3756
3757 <li class="param">
3758
3759 <code class="param-name optional">[props]</code>
3760 <span class="type"><a href="../classes/DisplayProps.html" class="crosslink">DisplayProps</a></span>
3761 <span class="flag optional" title="This parameter is optional.">optional</span>
3762
3763
3764
3765
3766 <div class="param-description">
3767 <p>A <a href="../classes/DisplayProps.html" class="crosslink">DisplayProps</a> object to populate with the calculated values.
3768If null, a new DisplayProps object is returned.</p>
3769
3770 </div>
3771
3772
3773 </li>
3774
3775 </ul>
3776 </div>
3777
3778
3779
3780 <div class="returns">
3781 <h4>Returns:</h4>
3782
3783 <div class="returns-description">
3784
3785
3786 <span class="type"><a href="../classes/DisplayProps.html" class="crosslink">DisplayProps</a></span>:
3787
3788 <p>The combined display properties.</p>
3789
3790
3791 </div>
3792 </div>
3793
3794
3795
3796</div>
3797
3798
3799 <div id="method_getConcatenatedMatrix" class="method item inherited">
3800 <h3 class="name"><code>getConcatenatedMatrix</code></h3>
3801
3802
3803 <div class="args">
3804 <span class="paren">(</span><ul class="args-list inline commas">
3805
3806 <li class="arg">
3807
3808 <code class="optional">[matrix]</code>
3809
3810 </li>
3811
3812 </ul><span class="paren">)</span>
3813 </div>
3814
3815
3816
3817 <span class="returns-inline">
3818 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
3819 </span>
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834 <div class="meta">
3835
3836
3837 <p>Inherited from
3838 <a href="../classes/DisplayObject.html#method_getConcatenatedMatrix">DisplayObject</a>:
3839
3840
3841
3842 <a href="../files/easeljs_display_DisplayObject.js.html#l1003"><code>getConcatenatedMatrix:1003</code></a>
3843
3844 </p>
3845
3846
3847
3848
3849
3850 </div>
3851
3852 <div class="description">
3853 <p>Generates a Matrix2D object representing the combined transform of the display object and all of its
3854parent Containers up to the highest level ancestor (usually the <a href="../classes/Stage.html" class="crosslink">Stage</a>). This can
3855be used to transform positions between coordinate spaces, such as with <a href="../classes/DisplayObject.html#method_localToGlobal" class="crosslink">localToGlobal</a>
3856and <a href="../classes/DisplayObject.html#method_globalToLocal" class="crosslink">globalToLocal</a>.</p>
3857
3858 </div>
3859
3860
3861 <div class="params">
3862 <h4>Parameters:</h4>
3863
3864 <ul class="params-list">
3865
3866 <li class="param">
3867
3868 <code class="param-name optional">[matrix]</code>
3869 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
3870 <span class="flag optional" title="This parameter is optional.">optional</span>
3871
3872
3873
3874
3875 <div class="param-description">
3876 <p>A <a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a> object to populate with the calculated values.
3877If null, a new Matrix2D object is returned.</p>
3878
3879 </div>
3880
3881
3882 </li>
3883
3884 </ul>
3885 </div>
3886
3887
3888
3889 <div class="returns">
3890 <h4>Returns:</h4>
3891
3892 <div class="returns-description">
3893
3894
3895 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>:
3896
3897 <p>The combined matrix.</p>
3898
3899
3900 </div>
3901 </div>
3902
3903
3904
3905</div>
3906
3907
3908 <div id="method_getMatrix" class="method item inherited">
3909 <h3 class="name"><code>getMatrix</code></h3>
3910
3911
3912 <div class="args">
3913 <span class="paren">(</span><ul class="args-list inline commas">
3914
3915 <li class="arg">
3916
3917 <code>matrix</code>
3918
3919 </li>
3920
3921 </ul><span class="paren">)</span>
3922 </div>
3923
3924
3925
3926 <span class="returns-inline">
3927 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
3928 </span>
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943 <div class="meta">
3944
3945
3946 <p>Inherited from
3947 <a href="../classes/DisplayObject.html#method_getMatrix">DisplayObject</a>:
3948
3949
3950
3951 <a href="../files/easeljs_display_DisplayObject.js.html#l991"><code>getMatrix:991</code></a>
3952
3953 </p>
3954
3955
3956
3957
3958
3959 </div>
3960
3961 <div class="description">
3962 <p>Returns a matrix based on this object's current transform.</p>
3963
3964 </div>
3965
3966
3967 <div class="params">
3968 <h4>Parameters:</h4>
3969
3970 <ul class="params-list">
3971
3972 <li class="param">
3973
3974 <code class="param-name">matrix</code>
3975 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
3976
3977
3978
3979
3980 <div class="param-description">
3981 <p>Optional. A Matrix2D object to populate with the calculated values. If null, a new
3982Matrix object is returned.</p>
3983
3984 </div>
3985
3986
3987 </li>
3988
3989 </ul>
3990 </div>
3991
3992
3993
3994 <div class="returns">
3995 <h4>Returns:</h4>
3996
3997 <div class="returns-description">
3998
3999
4000 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>:
4001
4002 <p>A matrix representing this display object's transform.</p>
4003
4004
4005 </div>
4006 </div>
4007
4008
4009
4010</div>
4011
4012
4013 <div id="method_getTransformedBounds" class="method item inherited">
4014 <h3 class="name"><code>getTransformedBounds</code></h3>
4015
4016
4017 <span class="paren">()</span>
4018
4019
4020
4021 <span class="returns-inline">
4022 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
4023 </span>
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038 <div class="meta">
4039
4040
4041 <p>Inherited from
4042 <a href="../classes/DisplayObject.html#method_getTransformedBounds">DisplayObject</a>:
4043
4044
4045
4046 <a href="../files/easeljs_display_DisplayObject.js.html#l1155"><code>getTransformedBounds:1155</code></a>
4047
4048 </p>
4049
4050
4051
4052
4053
4054 </div>
4055
4056 <div class="description">
4057 <p>Returns a rectangle representing this object's bounds in its parent's coordinate system (ie. with transformations applied).
4058Objects that have been cached will return the transformed bounds of the cache.</p>
4059<p>Not all display objects can calculate their own bounds (ex. Shape). For these objects, you can use
4060<a href="../classes/DisplayObject.html#method_setBounds" class="crosslink">setBounds</a> so that they are included when calculating Container
4061bounds.</p>
4062<p>To reduce memory impact, the returned Rectangle instance may be reused internally; clone the instance or copy its
4063values if you need to retain it.</p>
4064<p>Container instances calculate aggregate bounds for all children that return bounds via getBounds.</p>
4065
4066 </div>
4067
4068
4069
4070
4071 <div class="returns">
4072 <h4>Returns:</h4>
4073
4074 <div class="returns-description">
4075
4076
4077 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
4078
4079 <p>A Rectangle instance representing the bounds, or null if bounds are not available for this object.</p>
4080
4081
4082 </div>
4083 </div>
4084
4085
4086
4087</div>
4088
4089
4090 <div id="method_globalToLocal" class="method item inherited">
4091 <h3 class="name"><code>globalToLocal</code></h3>
4092
4093
4094 <div class="args">
4095 <span class="paren">(</span><ul class="args-list inline commas">
4096
4097 <li class="arg">
4098
4099 <code>x</code>
4100
4101 </li>
4102
4103 <li class="arg">
4104
4105 <code>y</code>
4106
4107 </li>
4108
4109 <li class="arg">
4110
4111 <code class="optional">[pt]</code>
4112
4113 </li>
4114
4115 </ul><span class="paren">)</span>
4116 </div>
4117
4118
4119
4120 <span class="returns-inline">
4121 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
4122 </span>
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137 <div class="meta">
4138
4139
4140 <p>Inherited from
4141 <a href="../classes/DisplayObject.html#method_globalToLocal">DisplayObject</a>:
4142
4143
4144
4145 <a href="../files/easeljs_display_DisplayObject.js.html#l910"><code>globalToLocal:910</code></a>
4146
4147 </p>
4148
4149
4150
4151
4152
4153 </div>
4154
4155 <div class="description">
4156 <p>Transforms the specified x and y position from the global (stage) coordinate space to the
4157coordinate space of the display object. For example, this could be used to determine
4158the current mouse position within the display object. Returns a Point instance with x and y properties
4159correlating to the transformed position in the display object's coordinate space.</p>
4160<h4>Example</h4>
4161
4162<pre class="code prettyprint"><code> displayObject.x = 300;
4163 displayObject.y = 200;
4164 stage.addChild(displayObject);
4165 var point = displayObject.globalToLocal(100, 100);
4166 // Results in x=-200, y=-100</code></pre>
4167
4168 </div>
4169
4170
4171 <div class="params">
4172 <h4>Parameters:</h4>
4173
4174 <ul class="params-list">
4175
4176 <li class="param">
4177
4178 <code class="param-name">x</code>
4179 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4180
4181
4182
4183
4184 <div class="param-description">
4185 <p>The x position on the stage to transform.</p>
4186
4187 </div>
4188
4189
4190 </li>
4191
4192 <li class="param">
4193
4194 <code class="param-name">y</code>
4195 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4196
4197
4198
4199
4200 <div class="param-description">
4201 <p>The y position on the stage to transform.</p>
4202
4203 </div>
4204
4205
4206 </li>
4207
4208 <li class="param">
4209
4210 <code class="param-name optional">[pt]</code>
4211 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
4212 <span class="flag optional" title="This parameter is optional.">optional</span>
4213
4214
4215
4216
4217 <div class="param-description">
4218 <p>An object to copy the result into. If omitted a new Point object with x/y properties will be returned.</p>
4219
4220 </div>
4221
4222
4223 </li>
4224
4225 </ul>
4226 </div>
4227
4228
4229
4230 <div class="returns">
4231 <h4>Returns:</h4>
4232
4233 <div class="returns-description">
4234
4235
4236 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>:
4237
4238 <p>A Point instance with x and y properties correlating to the transformed position in the
4239display object's coordinate space.</p>
4240
4241
4242 </div>
4243 </div>
4244
4245
4246
4247</div>
4248
4249
4250 <div id="method_hasEventListener" class="method item inherited">
4251 <h3 class="name"><code>hasEventListener</code></h3>
4252
4253
4254 <div class="args">
4255 <span class="paren">(</span><ul class="args-list inline commas">
4256
4257 <li class="arg">
4258
4259 <code>type</code>
4260
4261 </li>
4262
4263 </ul><span class="paren">)</span>
4264 </div>
4265
4266
4267
4268 <span class="returns-inline">
4269 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
4270 </span>
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285 <div class="meta">
4286
4287
4288 <p>Inherited from
4289 <a href="../classes/EventDispatcher.html#method_hasEventListener">EventDispatcher</a>:
4290
4291
4292
4293 <a href="../files/createjs_events_EventDispatcher.js.html#l339"><code>hasEventListener:339</code></a>
4294
4295 </p>
4296
4297
4298
4299
4300
4301 </div>
4302
4303 <div class="description">
4304 <p>Indicates whether there is at least one listener for the specified event type.</p>
4305
4306 </div>
4307
4308
4309 <div class="params">
4310 <h4>Parameters:</h4>
4311
4312 <ul class="params-list">
4313
4314 <li class="param">
4315
4316 <code class="param-name">type</code>
4317 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
4318
4319
4320
4321
4322 <div class="param-description">
4323 <p>The string type of the event.</p>
4324
4325 </div>
4326
4327
4328 </li>
4329
4330 </ul>
4331 </div>
4332
4333
4334
4335 <div class="returns">
4336 <h4>Returns:</h4>
4337
4338 <div class="returns-description">
4339
4340
4341 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
4342
4343 <p>Returns true if there is at least one listener for the specified event.</p>
4344
4345
4346 </div>
4347 </div>
4348
4349
4350
4351</div>
4352
4353
4354 <div id="method_hitTest" class="method item inherited">
4355 <h3 class="name"><code>hitTest</code></h3>
4356
4357
4358 <div class="args">
4359 <span class="paren">(</span><ul class="args-list inline commas">
4360
4361 <li class="arg">
4362
4363 <code>x</code>
4364
4365 </li>
4366
4367 <li class="arg">
4368
4369 <code>y</code>
4370
4371 </li>
4372
4373 </ul><span class="paren">)</span>
4374 </div>
4375
4376
4377
4378 <span class="returns-inline">
4379 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
4380 </span>
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395 <div class="meta">
4396
4397
4398 <p>Inherited from
4399 <a href="../classes/DisplayObject.html#method_hitTest">DisplayObject</a>:
4400
4401
4402
4403 <a href="../files/easeljs_display_DisplayObject.js.html#l1042"><code>hitTest:1042</code></a>
4404
4405 </p>
4406
4407
4408
4409
4410
4411 </div>
4412
4413 <div class="description">
4414 <p>Tests whether the display object intersects the specified point in local coordinates (ie. draws a pixel with alpha > 0 at
4415the specified position). This ignores the alpha, shadow, hitArea, mask, and compositeOperation of the display object.</p>
4416<h4>Example</h4>
4417
4418<pre class="code prettyprint"><code> stage.addEventListener("stagemousedown", handleMouseDown);
4419 function handleMouseDown(event) {
4420 var hit = myShape.hitTest(event.stageX, event.stageY);
4421 }</code></pre>
4422<p>Please note that shape-to-shape collision is not currently supported by EaselJS.</p>
4423
4424 </div>
4425
4426
4427 <div class="params">
4428 <h4>Parameters:</h4>
4429
4430 <ul class="params-list">
4431
4432 <li class="param">
4433
4434 <code class="param-name">x</code>
4435 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4436
4437
4438
4439
4440 <div class="param-description">
4441 <p>The x position to check in the display object's local coordinates.</p>
4442
4443 </div>
4444
4445
4446 </li>
4447
4448 <li class="param">
4449
4450 <code class="param-name">y</code>
4451 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4452
4453
4454
4455
4456 <div class="param-description">
4457 <p>The y position to check in the display object's local coordinates.</p>
4458
4459 </div>
4460
4461
4462 </li>
4463
4464 </ul>
4465 </div>
4466
4467
4468
4469 <div class="returns">
4470 <h4>Returns:</h4>
4471
4472 <div class="returns-description">
4473
4474
4475 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
4476
4477 <p>A Boolean indicating whether a visible portion of the DisplayObject intersect the specified
4478local Point.</p>
4479
4480
4481 </div>
4482 </div>
4483
4484
4485
4486</div>
4487
4488
4489 <div id="method_isVisible" class="method item">
4490 <h3 class="name"><code>isVisible</code></h3>
4491
4492
4493 <span class="paren">()</span>
4494
4495
4496
4497 <span class="returns-inline">
4498 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
4499 </span>
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514 <div class="meta">
4515
4516 <p>Inherited from
4517 <a href="../classes/DisplayObject.html#method_isVisible">
4518 DisplayObject
4519 </a>
4520
4521 but overwritten in
4522
4523
4524
4525 <a href="../files/easeljs_display_BitmapText.js.html#l182"><code>isVisible:182</code></a>
4526
4527 </p>
4528
4529
4530
4531
4532
4533 </div>
4534
4535 <div class="description">
4536 <p>Returns true or false indicating whether the display object would be visible if drawn to a canvas.
4537This does not account for whether it would be visible within the boundaries of the stage.
4538NOTE: This method is mainly for internal use, though it may be useful for advanced uses.</p>
4539
4540 </div>
4541
4542
4543
4544
4545 <div class="returns">
4546 <h4>Returns:</h4>
4547
4548 <div class="returns-description">
4549
4550
4551 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
4552
4553 <p>Boolean indicating whether the display object would be visible if drawn to a canvas</p>
4554
4555
4556 </div>
4557 </div>
4558
4559
4560
4561</div>
4562
4563
4564 <div id="method_localToGlobal" class="method item inherited">
4565 <h3 class="name"><code>localToGlobal</code></h3>
4566
4567
4568 <div class="args">
4569 <span class="paren">(</span><ul class="args-list inline commas">
4570
4571 <li class="arg">
4572
4573 <code>x</code>
4574
4575 </li>
4576
4577 <li class="arg">
4578
4579 <code>y</code>
4580
4581 </li>
4582
4583 <li class="arg">
4584
4585 <code class="optional">[pt]</code>
4586
4587 </li>
4588
4589 </ul><span class="paren">)</span>
4590 </div>
4591
4592
4593
4594 <span class="returns-inline">
4595 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
4596 </span>
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611 <div class="meta">
4612
4613
4614 <p>Inherited from
4615 <a href="../classes/DisplayObject.html#method_localToGlobal">DisplayObject</a>:
4616
4617
4618
4619 <a href="../files/easeljs_display_DisplayObject.js.html#l885"><code>localToGlobal:885</code></a>
4620
4621 </p>
4622
4623
4624
4625
4626
4627 </div>
4628
4629 <div class="description">
4630 <p>Transforms the specified x and y position from the coordinate space of the display object
4631to the global (stage) coordinate space. For example, this could be used to position an HTML label
4632over a specific point on a nested display object. Returns a Point instance with x and y properties
4633correlating to the transformed coordinates on the stage.</p>
4634<h4>Example</h4>
4635
4636<pre class="code prettyprint"><code> displayObject.x = 300;
4637 displayObject.y = 200;
4638 stage.addChild(displayObject);
4639 var point = displayObject.localToGlobal(100, 100);
4640 // Results in x=400, y=300</code></pre>
4641
4642 </div>
4643
4644
4645 <div class="params">
4646 <h4>Parameters:</h4>
4647
4648 <ul class="params-list">
4649
4650 <li class="param">
4651
4652 <code class="param-name">x</code>
4653 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4654
4655
4656
4657
4658 <div class="param-description">
4659 <p>The x position in the source display object to transform.</p>
4660
4661 </div>
4662
4663
4664 </li>
4665
4666 <li class="param">
4667
4668 <code class="param-name">y</code>
4669 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4670
4671
4672
4673
4674 <div class="param-description">
4675 <p>The y position in the source display object to transform.</p>
4676
4677 </div>
4678
4679
4680 </li>
4681
4682 <li class="param">
4683
4684 <code class="param-name optional">[pt]</code>
4685 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
4686 <span class="flag optional" title="This parameter is optional.">optional</span>
4687
4688
4689
4690
4691 <div class="param-description">
4692 <p>An object to copy the result into. If omitted a new Point object with x/y properties will be returned.</p>
4693
4694 </div>
4695
4696
4697 </li>
4698
4699 </ul>
4700 </div>
4701
4702
4703
4704 <div class="returns">
4705 <h4>Returns:</h4>
4706
4707 <div class="returns-description">
4708
4709
4710 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>:
4711
4712 <p>A Point instance with x and y properties correlating to the transformed coordinates
4713on the stage.</p>
4714
4715
4716 </div>
4717 </div>
4718
4719
4720
4721</div>
4722
4723
4724 <div id="method_localToLocal" class="method item inherited">
4725 <h3 class="name"><code>localToLocal</code></h3>
4726
4727
4728 <div class="args">
4729 <span class="paren">(</span><ul class="args-list inline commas">
4730
4731 <li class="arg">
4732
4733 <code>x</code>
4734
4735 </li>
4736
4737 <li class="arg">
4738
4739 <code>y</code>
4740
4741 </li>
4742
4743 <li class="arg">
4744
4745 <code>target</code>
4746
4747 </li>
4748
4749 <li class="arg">
4750
4751 <code class="optional">[pt]</code>
4752
4753 </li>
4754
4755 </ul><span class="paren">)</span>
4756 </div>
4757
4758
4759
4760 <span class="returns-inline">
4761 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
4762 </span>
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777 <div class="meta">
4778
4779
4780 <p>Inherited from
4781 <a href="../classes/DisplayObject.html#method_localToLocal">DisplayObject</a>:
4782
4783
4784
4785 <a href="../files/easeljs_display_DisplayObject.js.html#l935"><code>localToLocal:935</code></a>
4786
4787 </p>
4788
4789
4790
4791
4792
4793 </div>
4794
4795 <div class="description">
4796 <p>Transforms the specified x and y position from the coordinate space of this display object to the coordinate
4797space of the target display object. Returns a Point instance with x and y properties correlating to the
4798transformed position in the target's coordinate space. Effectively the same as using the following code with
4799<a href="../classes/DisplayObject.html#method_localToGlobal" class="crosslink">localToGlobal</a> and <a href="../classes/DisplayObject.html#method_globalToLocal" class="crosslink">globalToLocal</a>.</p>
4800<pre class="code prettyprint"><code> var pt = this.localToGlobal(x, y);
4801 pt = target.globalToLocal(pt.x, pt.y);</code></pre>
4802
4803 </div>
4804
4805
4806 <div class="params">
4807 <h4>Parameters:</h4>
4808
4809 <ul class="params-list">
4810
4811 <li class="param">
4812
4813 <code class="param-name">x</code>
4814 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4815
4816
4817
4818
4819 <div class="param-description">
4820 <p>The x position in the source display object to transform.</p>
4821
4822 </div>
4823
4824
4825 </li>
4826
4827 <li class="param">
4828
4829 <code class="param-name">y</code>
4830 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
4831
4832
4833
4834
4835 <div class="param-description">
4836 <p>The y position on the source display object to transform.</p>
4837
4838 </div>
4839
4840
4841 </li>
4842
4843 <li class="param">
4844
4845 <code class="param-name">target</code>
4846 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
4847
4848
4849
4850
4851 <div class="param-description">
4852 <p>The target display object to which the coordinates will be transformed.</p>
4853
4854 </div>
4855
4856
4857 </li>
4858
4859 <li class="param">
4860
4861 <code class="param-name optional">[pt]</code>
4862 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
4863 <span class="flag optional" title="This parameter is optional.">optional</span>
4864
4865
4866
4867
4868 <div class="param-description">
4869 <p>An object to copy the result into. If omitted a new Point object with x/y properties will be returned.</p>
4870
4871 </div>
4872
4873
4874 </li>
4875
4876 </ul>
4877 </div>
4878
4879
4880
4881 <div class="returns">
4882 <h4>Returns:</h4>
4883
4884 <div class="returns-description">
4885
4886
4887 <span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>:
4888
4889 <p>Returns a Point instance with x and y properties correlating to the transformed position
4890in the target's coordinate space.</p>
4891
4892
4893 </div>
4894 </div>
4895
4896
4897
4898</div>
4899
4900
4901 <div id="method_off" class="method item inherited">
4902 <h3 class="name"><code>off</code></h3>
4903
4904
4905 <div class="args">
4906 <span class="paren">(</span><ul class="args-list inline commas">
4907
4908 <li class="arg">
4909
4910 <code>type</code>
4911
4912 </li>
4913
4914 <li class="arg">
4915
4916 <code>listener</code>
4917
4918 </li>
4919
4920 <li class="arg">
4921
4922 <code class="optional">[useCapture]</code>
4923
4924 </li>
4925
4926 </ul><span class="paren">)</span>
4927 </div>
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944 <div class="meta">
4945
4946
4947 <p>Inherited from
4948 <a href="../classes/EventDispatcher.html#method_off">EventDispatcher</a>:
4949
4950
4951
4952 <a href="../files/createjs_events_EventDispatcher.js.html#l249"><code>off:249</code></a>
4953
4954 </p>
4955
4956
4957
4958
4959
4960 </div>
4961
4962 <div class="description">
4963 <p>A shortcut to the removeEventListener method, with the same parameters and return value. This is a companion to the
4964.on method.</p>
4965<p><b>IMPORTANT:</b> To remove a listener added with <code>on</code>, you must pass in the returned wrapper function as the listener. See
4966<a href="../classes/EventDispatcher.html#method_on" class="crosslink">on</a> for an example.</p>
4967
4968 </div>
4969
4970
4971 <div class="params">
4972 <h4>Parameters:</h4>
4973
4974 <ul class="params-list">
4975
4976 <li class="param">
4977
4978 <code class="param-name">type</code>
4979 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
4980
4981
4982
4983
4984 <div class="param-description">
4985 <p>The string type of the event.</p>
4986
4987 </div>
4988
4989
4990 </li>
4991
4992 <li class="param">
4993
4994 <code class="param-name">listener</code>
4995 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
4996
4997
4998
4999
5000 <div class="param-description">
5001 <p>The listener function or object.</p>
5002
5003 </div>
5004
5005
5006 </li>
5007
5008 <li class="param">
5009
5010 <code class="param-name optional">[useCapture]</code>
5011 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
5012 <span class="flag optional" title="This parameter is optional.">optional</span>
5013
5014
5015
5016
5017 <div class="param-description">
5018 <p>For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.</p>
5019
5020 </div>
5021
5022
5023 </li>
5024
5025 </ul>
5026 </div>
5027
5028
5029
5030
5031
5032</div>
5033
5034
5035 <div id="method_on" class="method item inherited">
5036 <h3 class="name"><code>on</code></h3>
5037
5038
5039 <div class="args">
5040 <span class="paren">(</span><ul class="args-list inline commas">
5041
5042 <li class="arg">
5043
5044 <code>type</code>
5045
5046 </li>
5047
5048 <li class="arg">
5049
5050 <code>listener</code>
5051
5052 </li>
5053
5054 <li class="arg">
5055
5056 <code class="optional">[scope]</code>
5057
5058 </li>
5059
5060 <li class="arg">
5061
5062 <code class="optional">[once=false]</code>
5063
5064 </li>
5065
5066 <li class="arg">
5067
5068 <code class="optional">[data]</code>
5069
5070 </li>
5071
5072 <li class="arg">
5073
5074 <code class="optional">[useCapture=false]</code>
5075
5076 </li>
5077
5078 </ul><span class="paren">)</span>
5079 </div>
5080
5081
5082
5083 <span class="returns-inline">
5084 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
5085 </span>
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100 <div class="meta">
5101
5102
5103 <p>Inherited from
5104 <a href="../classes/EventDispatcher.html#method_on">EventDispatcher</a>:
5105
5106
5107
5108 <a href="../files/createjs_events_EventDispatcher.js.html#l173"><code>on:173</code></a>
5109
5110 </p>
5111
5112
5113
5114
5115
5116 </div>
5117
5118 <div class="description">
5119 <p><p>A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener
5120only run once, associate arbitrary data with the listener, and remove the listener.</p></p>
5121<p><p>This method works by creating an anonymous wrapper function and subscribing it with addEventListener.
5122The wrapper function is returned for use with <code>removeEventListener</code> (or <code>off</code>).</p></p>
5123<p><p><b>IMPORTANT:</b> To remove a listener added with <code>on</code>, you must pass in the returned wrapper function as the listener, or use
5124<a href="../classes/Event.html#method_remove" class="crosslink">remove</a>. Likewise, each time you call <code>on</code> a NEW wrapper function is subscribed, so multiple calls
5125to <code>on</code> with the same params will create multiple listeners.</p></p>
5126<h4>Example</h4>
5127
5128<pre class="code prettyprint"><code> var listener = myBtn.on("click", handleClick, null, false, {count:3});
5129 function handleClick(evt, data) {
5130 data.count -= 1;
5131 console.log(this == myBtn); // true - scope defaults to the dispatcher
5132 if (data.count == 0) {
5133 alert("clicked 3 times!");
5134 myBtn.off("click", listener);
5135 // alternately: evt.remove();
5136 }
5137 }</code></pre>
5138
5139 </div>
5140
5141
5142 <div class="params">
5143 <h4>Parameters:</h4>
5144
5145 <ul class="params-list">
5146
5147 <li class="param">
5148
5149 <code class="param-name">type</code>
5150 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
5151
5152
5153
5154
5155 <div class="param-description">
5156 <p>The string type of the event.</p>
5157
5158 </div>
5159
5160
5161 </li>
5162
5163 <li class="param">
5164
5165 <code class="param-name">listener</code>
5166 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
5167
5168
5169
5170
5171 <div class="param-description">
5172 <p>An object with a handleEvent method, or a function that will be called when
5173the event is dispatched.</p>
5174
5175 </div>
5176
5177
5178 </li>
5179
5180 <li class="param">
5181
5182 <code class="param-name optional">[scope]</code>
5183 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
5184 <span class="flag optional" title="This parameter is optional.">optional</span>
5185
5186
5187
5188
5189 <div class="param-description">
5190 <p>The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).</p>
5191
5192 </div>
5193
5194
5195 </li>
5196
5197 <li class="param">
5198
5199 <code class="param-name optional">[once=false]</code>
5200 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
5201 <span class="flag optional" title="This parameter is optional.">optional</span>
5202
5203
5204
5205
5206 <div class="param-description">
5207 <p>If true, the listener will remove itself after the first time it is triggered.</p>
5208
5209 </div>
5210
5211
5212 </li>
5213
5214 <li class="param">
5215
5216 <code class="param-name optional">[data]</code>
5217 <span class="type"></span>
5218 <span class="flag optional" title="This parameter is optional.">optional</span>
5219
5220
5221
5222
5223 <div class="param-description">
5224 <p>Arbitrary data that will be included as the second parameter when the listener is called.</p>
5225
5226 </div>
5227
5228
5229 </li>
5230
5231 <li class="param">
5232
5233 <code class="param-name optional">[useCapture=false]</code>
5234 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
5235 <span class="flag optional" title="This parameter is optional.">optional</span>
5236
5237
5238
5239
5240 <div class="param-description">
5241 <p>For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.</p>
5242
5243 </div>
5244
5245
5246 </li>
5247
5248 </ul>
5249 </div>
5250
5251
5252
5253 <div class="returns">
5254 <h4>Returns:</h4>
5255
5256 <div class="returns-description">
5257
5258
5259 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>:
5260
5261 <p>Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.</p>
5262
5263
5264 </div>
5265 </div>
5266
5267
5268
5269</div>
5270
5271
5272 <div id="method_removeAllChildren" class="method item">
5273 <h3 class="name"><code>removeAllChildren</code></h3>
5274
5275
5276 <span class="paren">()</span>
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293 <div class="meta">
5294
5295
5296
5297 <p>
5298
5299 Defined in
5300
5301
5302
5303
5304 <a href="../files/easeljs_display_BitmapText.js.html#l214"><code>removeAllChildren:214</code></a>
5305
5306 </p>
5307
5308
5309
5310
5311
5312 </div>
5313
5314 <div class="description">
5315 <p><strong>Disabled in BitmapText.</strong></p>
5316
5317 </div>
5318
5319
5320
5321
5322
5323
5324</div>
5325
5326
5327 <div id="method_removeAllEventListeners" class="method item inherited">
5328 <h3 class="name"><code>removeAllEventListeners</code></h3>
5329
5330
5331 <div class="args">
5332 <span class="paren">(</span><ul class="args-list inline commas">
5333
5334 <li class="arg">
5335
5336 <code class="optional">[type]</code>
5337
5338 </li>
5339
5340 </ul><span class="paren">)</span>
5341 </div>
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358 <div class="meta">
5359
5360
5361 <p>Inherited from
5362 <a href="../classes/EventDispatcher.html#method_removeAllEventListeners">EventDispatcher</a>:
5363
5364
5365
5366 <a href="../files/createjs_events_EventDispatcher.js.html#l263"><code>removeAllEventListeners:263</code></a>
5367
5368 </p>
5369
5370
5371
5372
5373
5374 </div>
5375
5376 <div class="description">
5377 <p><p>Removes all listeners for the specified type, or all listeners of all types.</p></p>
5378<h4>Example</h4>
5379
5380<pre class="code prettyprint"><code> // Remove all listeners
5381 displayObject.removeAllEventListeners();
5382
5383 // Remove all click listeners
5384 displayObject.removeAllEventListeners("click");</code></pre>
5385
5386 </div>
5387
5388
5389 <div class="params">
5390 <h4>Parameters:</h4>
5391
5392 <ul class="params-list">
5393
5394 <li class="param">
5395
5396 <code class="param-name optional">[type]</code>
5397 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
5398 <span class="flag optional" title="This parameter is optional.">optional</span>
5399
5400
5401
5402
5403 <div class="param-description">
5404 <p>The string type of the event. If omitted, all listeners for all types will be removed.</p>
5405
5406 </div>
5407
5408
5409 </li>
5410
5411 </ul>
5412 </div>
5413
5414
5415
5416
5417
5418</div>
5419
5420
5421 <div id="method_removeChild" class="method item">
5422 <h3 class="name"><code>removeChild</code></h3>
5423
5424
5425 <span class="paren">()</span>
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442 <div class="meta">
5443
5444
5445
5446 <p>
5447
5448 Defined in
5449
5450
5451
5452
5453 <a href="../files/easeljs_display_BitmapText.js.html#l206"><code>removeChild:206</code></a>
5454
5455 </p>
5456
5457
5458
5459
5460
5461 </div>
5462
5463 <div class="description">
5464 <p><strong>Disabled in BitmapText.</strong></p>
5465
5466 </div>
5467
5468
5469
5470
5471
5472
5473</div>
5474
5475
5476 <div id="method_removeChildAt" class="method item">
5477 <h3 class="name"><code>removeChildAt</code></h3>
5478
5479
5480 <span class="paren">()</span>
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497 <div class="meta">
5498
5499
5500
5501 <p>
5502
5503 Defined in
5504
5505
5506
5507
5508 <a href="../files/easeljs_display_BitmapText.js.html#l210"><code>removeChildAt:210</code></a>
5509
5510 </p>
5511
5512
5513
5514
5515
5516 </div>
5517
5518 <div class="description">
5519 <p><strong>Disabled in BitmapText.</strong></p>
5520
5521 </div>
5522
5523
5524
5525
5526
5527
5528</div>
5529
5530
5531 <div id="method_removeEventListener" class="method item inherited">
5532 <h3 class="name"><code>removeEventListener</code></h3>
5533
5534
5535 <div class="args">
5536 <span class="paren">(</span><ul class="args-list inline commas">
5537
5538 <li class="arg">
5539
5540 <code>type</code>
5541
5542 </li>
5543
5544 <li class="arg">
5545
5546 <code>listener</code>
5547
5548 </li>
5549
5550 <li class="arg">
5551
5552 <code class="optional">[useCapture]</code>
5553
5554 </li>
5555
5556 </ul><span class="paren">)</span>
5557 </div>
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574 <div class="meta">
5575
5576
5577 <p>Inherited from
5578 <a href="../classes/EventDispatcher.html#method_removeEventListener">EventDispatcher</a>:
5579
5580
5581
5582 <a href="../files/createjs_events_EventDispatcher.js.html#l219"><code>removeEventListener:219</code></a>
5583
5584 </p>
5585
5586
5587
5588
5589
5590 </div>
5591
5592 <div class="description">
5593 <p><p>Removes the specified event listener.</p></p>
5594<p><p><b>Important Note:</b> that you must pass the exact function reference used when the event was added. If a proxy
5595function, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or
5596closure will not work.</p></p>
5597<h4>Example</h4>
5598
5599<pre class="code prettyprint"><code> displayObject.removeEventListener("click", handleClick);</code></pre>
5600
5601 </div>
5602
5603
5604 <div class="params">
5605 <h4>Parameters:</h4>
5606
5607 <ul class="params-list">
5608
5609 <li class="param">
5610
5611 <code class="param-name">type</code>
5612 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
5613
5614
5615
5616
5617 <div class="param-description">
5618 <p>The string type of the event.</p>
5619
5620 </div>
5621
5622
5623 </li>
5624
5625 <li class="param">
5626
5627 <code class="param-name">listener</code>
5628 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
5629
5630
5631
5632
5633 <div class="param-description">
5634 <p>The listener function or object.</p>
5635
5636 </div>
5637
5638
5639 </li>
5640
5641 <li class="param">
5642
5643 <code class="param-name optional">[useCapture]</code>
5644 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
5645 <span class="flag optional" title="This parameter is optional.">optional</span>
5646
5647
5648
5649
5650 <div class="param-description">
5651 <p>For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.</p>
5652
5653 </div>
5654
5655
5656 </li>
5657
5658 </ul>
5659 </div>
5660
5661
5662
5663
5664
5665</div>
5666
5667
5668 <div id="method_set" class="method item inherited">
5669 <h3 class="name"><code>set</code></h3>
5670
5671
5672 <div class="args">
5673 <span class="paren">(</span><ul class="args-list inline commas">
5674
5675 <li class="arg">
5676
5677 <code>props</code>
5678
5679 </li>
5680
5681 </ul><span class="paren">)</span>
5682 </div>
5683
5684
5685
5686 <span class="returns-inline">
5687 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
5688 </span>
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700 <span class="flag chainable">chainable</span>
5701
5702
5703
5704
5705 <div class="meta">
5706
5707
5708 <p>Inherited from
5709 <a href="../classes/DisplayObject.html#method_set">DisplayObject</a>:
5710
5711
5712
5713 <a href="../files/easeljs_display_DisplayObject.js.html#l1071"><code>set:1071</code></a>
5714
5715 </p>
5716
5717
5718
5719
5720
5721 </div>
5722
5723 <div class="description">
5724 <p>Provides a chainable shortcut method for setting a number of properties on the instance.</p>
5725<h4>Example</h4>
5726
5727<pre class="code prettyprint"><code> var myGraphics = new createjs.Graphics().beginFill("#ff0000").drawCircle(0, 0, 25);
5728 var shape = stage.addChild(new Shape()).set({graphics:myGraphics, x:100, y:100, alpha:0.5});</code></pre>
5729
5730 </div>
5731
5732
5733 <div class="params">
5734 <h4>Parameters:</h4>
5735
5736 <ul class="params-list">
5737
5738 <li class="param">
5739
5740 <code class="param-name">props</code>
5741 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
5742
5743
5744
5745
5746 <div class="param-description">
5747 <p>A generic object containing properties to copy to the DisplayObject instance.</p>
5748
5749 </div>
5750
5751
5752 </li>
5753
5754 </ul>
5755 </div>
5756
5757
5758
5759 <div class="returns">
5760 <h4>Returns:</h4>
5761
5762 <div class="returns-description">
5763
5764
5765 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>:
5766
5767 <p>Returns the instance the method is called on (useful for chaining calls.)</p>
5768
5769
5770 </div>
5771 </div>
5772
5773
5774
5775</div>
5776
5777
5778 <div id="method_setBounds" class="method item inherited">
5779 <h3 class="name"><code>setBounds</code></h3>
5780
5781
5782 <div class="args">
5783 <span class="paren">(</span><ul class="args-list inline commas">
5784
5785 <li class="arg">
5786
5787 <code>x</code>
5788
5789 </li>
5790
5791 <li class="arg">
5792
5793 <code>y</code>
5794
5795 </li>
5796
5797 <li class="arg">
5798
5799 <code>width</code>
5800
5801 </li>
5802
5803 <li class="arg">
5804
5805 <code>height</code>
5806
5807 </li>
5808
5809 </ul><span class="paren">)</span>
5810 </div>
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827 <div class="meta">
5828
5829
5830 <p>Inherited from
5831 <a href="../classes/DisplayObject.html#method_setBounds">DisplayObject</a>:
5832
5833
5834
5835 <a href="../files/easeljs_display_DisplayObject.js.html#l1174"><code>setBounds:1174</code></a>
5836
5837 </p>
5838
5839
5840
5841
5842
5843 </div>
5844
5845 <div class="description">
5846 <p>Allows you to manually specify the bounds of an object that either cannot calculate their own bounds (ex. Shape &
5847Text) for future reference, or so the object can be included in Container bounds. Manually set bounds will always
5848override calculated bounds.</p>
5849<p>The bounds should be specified in the object's local (untransformed) coordinates. For example, a Shape instance
5850with a 25px radius circle centered at 0,0 would have bounds of (-25, -25, 50, 50).</p>
5851
5852 </div>
5853
5854
5855 <div class="params">
5856 <h4>Parameters:</h4>
5857
5858 <ul class="params-list">
5859
5860 <li class="param">
5861
5862 <code class="param-name">x</code>
5863 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
5864
5865
5866
5867
5868 <div class="param-description">
5869 <p>The x origin of the bounds. Pass null to remove the manual bounds.</p>
5870
5871 </div>
5872
5873
5874 </li>
5875
5876 <li class="param">
5877
5878 <code class="param-name">y</code>
5879 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
5880
5881
5882
5883
5884 <div class="param-description">
5885 <p>The y origin of the bounds.</p>
5886
5887 </div>
5888
5889
5890 </li>
5891
5892 <li class="param">
5893
5894 <code class="param-name">width</code>
5895 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
5896
5897
5898
5899
5900 <div class="param-description">
5901 <p>The width of the bounds.</p>
5902
5903 </div>
5904
5905
5906 </li>
5907
5908 <li class="param">
5909
5910 <code class="param-name">height</code>
5911 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
5912
5913
5914
5915
5916 <div class="param-description">
5917 <p>The height of the bounds.</p>
5918
5919 </div>
5920
5921
5922 </li>
5923
5924 </ul>
5925 </div>
5926
5927
5928
5929
5930
5931</div>
5932
5933
5934 <div id="method_setTransform" class="method item inherited">
5935 <h3 class="name"><code>setTransform</code></h3>
5936
5937
5938 <div class="args">
5939 <span class="paren">(</span><ul class="args-list inline commas">
5940
5941 <li class="arg">
5942
5943 <code class="optional">[x=0]</code>
5944
5945 </li>
5946
5947 <li class="arg">
5948
5949 <code class="optional">[y=0]</code>
5950
5951 </li>
5952
5953 <li class="arg">
5954
5955 <code class="optional">[scaleX=1]</code>
5956
5957 </li>
5958
5959 <li class="arg">
5960
5961 <code class="optional">[scaleY=1]</code>
5962
5963 </li>
5964
5965 <li class="arg">
5966
5967 <code class="optional">[rotation=0]</code>
5968
5969 </li>
5970
5971 <li class="arg">
5972
5973 <code class="optional">[skewX=0]</code>
5974
5975 </li>
5976
5977 <li class="arg">
5978
5979 <code class="optional">[skewY=0]</code>
5980
5981 </li>
5982
5983 <li class="arg">
5984
5985 <code class="optional">[regX=0]</code>
5986
5987 </li>
5988
5989 <li class="arg">
5990
5991 <code class="optional">[regY=0]</code>
5992
5993 </li>
5994
5995 </ul><span class="paren">)</span>
5996 </div>
5997
5998
5999
6000 <span class="returns-inline">
6001 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
6002 </span>
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014 <span class="flag chainable">chainable</span>
6015
6016
6017
6018
6019 <div class="meta">
6020
6021
6022 <p>Inherited from
6023 <a href="../classes/DisplayObject.html#method_setTransform">DisplayObject</a>:
6024
6025
6026
6027 <a href="../files/easeljs_display_DisplayObject.js.html#l957"><code>setTransform:957</code></a>
6028
6029 </p>
6030
6031
6032
6033
6034
6035 </div>
6036
6037 <div class="description">
6038 <p>Shortcut method to quickly set the transform properties on the display object. All parameters are optional.
6039Omitted parameters will have the default value set.</p>
6040<h4>Example</h4>
6041
6042<pre class="code prettyprint"><code> displayObject.setTransform(100, 100, 2, 2);</code></pre>
6043
6044 </div>
6045
6046
6047 <div class="params">
6048 <h4>Parameters:</h4>
6049
6050 <ul class="params-list">
6051
6052 <li class="param">
6053
6054 <code class="param-name optional">[x=0]</code>
6055 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6056 <span class="flag optional" title="This parameter is optional.">optional</span>
6057
6058
6059
6060
6061 <div class="param-description">
6062 <p>The horizontal translation (x position) in pixels</p>
6063
6064 </div>
6065
6066
6067 </li>
6068
6069 <li class="param">
6070
6071 <code class="param-name optional">[y=0]</code>
6072 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6073 <span class="flag optional" title="This parameter is optional.">optional</span>
6074
6075
6076
6077
6078 <div class="param-description">
6079 <p>The vertical translation (y position) in pixels</p>
6080
6081 </div>
6082
6083
6084 </li>
6085
6086 <li class="param">
6087
6088 <code class="param-name optional">[scaleX=1]</code>
6089 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6090 <span class="flag optional" title="This parameter is optional.">optional</span>
6091
6092
6093
6094
6095 <div class="param-description">
6096 <p>The horizontal scale, as a percentage of 1</p>
6097
6098 </div>
6099
6100
6101 </li>
6102
6103 <li class="param">
6104
6105 <code class="param-name optional">[scaleY=1]</code>
6106 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6107 <span class="flag optional" title="This parameter is optional.">optional</span>
6108
6109
6110
6111
6112 <div class="param-description">
6113 <p>the vertical scale, as a percentage of 1</p>
6114
6115 </div>
6116
6117
6118 </li>
6119
6120 <li class="param">
6121
6122 <code class="param-name optional">[rotation=0]</code>
6123 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6124 <span class="flag optional" title="This parameter is optional.">optional</span>
6125
6126
6127
6128
6129 <div class="param-description">
6130 <p>The rotation, in degrees</p>
6131
6132 </div>
6133
6134
6135 </li>
6136
6137 <li class="param">
6138
6139 <code class="param-name optional">[skewX=0]</code>
6140 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6141 <span class="flag optional" title="This parameter is optional.">optional</span>
6142
6143
6144
6145
6146 <div class="param-description">
6147 <p>The horizontal skew factor</p>
6148
6149 </div>
6150
6151
6152 </li>
6153
6154 <li class="param">
6155
6156 <code class="param-name optional">[skewY=0]</code>
6157 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6158 <span class="flag optional" title="This parameter is optional.">optional</span>
6159
6160
6161
6162
6163 <div class="param-description">
6164 <p>The vertical skew factor</p>
6165
6166 </div>
6167
6168
6169 </li>
6170
6171 <li class="param">
6172
6173 <code class="param-name optional">[regX=0]</code>
6174 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6175 <span class="flag optional" title="This parameter is optional.">optional</span>
6176
6177
6178
6179
6180 <div class="param-description">
6181 <p>The horizontal registration point in pixels</p>
6182
6183 </div>
6184
6185
6186 </li>
6187
6188 <li class="param">
6189
6190 <code class="param-name optional">[regY=0]</code>
6191 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6192 <span class="flag optional" title="This parameter is optional.">optional</span>
6193
6194
6195
6196
6197 <div class="param-description">
6198 <p>The vertical registration point in pixels</p>
6199
6200 </div>
6201
6202
6203 </li>
6204
6205 </ul>
6206 </div>
6207
6208
6209
6210 <div class="returns">
6211 <h4>Returns:</h4>
6212
6213 <div class="returns-description">
6214
6215
6216 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>:
6217
6218 <p>Returns this instance. Useful for chaining commands.</p>
6219
6220
6221 </div>
6222 </div>
6223
6224
6225
6226</div>
6227
6228
6229 <div id="method_toString" class="method item inherited">
6230 <h3 class="name"><code>toString</code></h3>
6231
6232
6233 <span class="paren">()</span>
6234
6235
6236
6237 <span class="returns-inline">
6238 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
6239 </span>
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254 <div class="meta">
6255
6256 <p>Inherited from
6257 <a href="../classes/EventDispatcher.html#method_toString">
6258 EventDispatcher
6259 </a>
6260
6261 but overwritten in
6262
6263
6264
6265 <a href="../files/easeljs_display_DisplayObject.js.html#l1203"><code>toString:1203</code></a>
6266
6267 </p>
6268
6269
6270
6271
6272
6273 </div>
6274
6275 <div class="description">
6276 <p>Returns a string representation of this object.</p>
6277
6278 </div>
6279
6280
6281
6282
6283 <div class="returns">
6284 <h4>Returns:</h4>
6285
6286 <div class="returns-description">
6287
6288
6289 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
6290
6291 <p>a string representation of the instance.</p>
6292
6293
6294 </div>
6295 </div>
6296
6297
6298
6299</div>
6300
6301
6302 <div id="method_uncache" class="method item inherited">
6303 <h3 class="name"><code>uncache</code></h3>
6304
6305
6306 <span class="paren">()</span>
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323 <div class="meta">
6324
6325
6326 <p>Inherited from
6327 <a href="../classes/DisplayObject.html#method_uncache">DisplayObject</a>:
6328
6329
6330
6331 <a href="../files/easeljs_display_DisplayObject.js.html#l864"><code>uncache:864</code></a>
6332
6333 </p>
6334
6335
6336
6337
6338
6339 </div>
6340
6341 <div class="description">
6342 <p>Clears the current cache. See <a href="../classes/DisplayObject.html#method_cache" class="crosslink">cache</a> for more information.</p>
6343
6344 </div>
6345
6346
6347
6348
6349
6350
6351</div>
6352
6353
6354 <div id="method_updateCache" class="method item inherited">
6355 <h3 class="name"><code>updateCache</code></h3>
6356
6357
6358 <div class="args">
6359 <span class="paren">(</span><ul class="args-list inline commas">
6360
6361 <li class="arg">
6362
6363 <code>compositeOperation</code>
6364
6365 </li>
6366
6367 </ul><span class="paren">)</span>
6368 </div>
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385 <div class="meta">
6386
6387
6388 <p>Inherited from
6389 <a href="../classes/DisplayObject.html#method_updateCache">DisplayObject</a>:
6390
6391
6392
6393 <a href="../files/easeljs_display_DisplayObject.js.html#l835"><code>updateCache:835</code></a>
6394
6395 </p>
6396
6397
6398
6399
6400
6401 </div>
6402
6403 <div class="description">
6404 <p>Redraws the display object to its cache. Calling updateCache without an active cache will throw an error.
6405If compositeOperation is null the current cache will be cleared prior to drawing. Otherwise the display object
6406will be drawn over the existing cache using the specified compositeOperation.</p>
6407<p><h4>Example</h4>
6408Clear the current graphics of a cached shape, draw some new instructions, and then update the cache. The new line
6409will be drawn on top of the old one.</p>
6410<pre class="code prettyprint"><code> // Not shown: Creating the shape, and caching it.
6411 shapeInstance.clear();
6412 shapeInstance.setStrokeStyle(3).beginStroke("#ff0000").moveTo(100, 100).lineTo(200,200);
6413 shapeInstance.updateCache();</code></pre>
6414<p>In previous versions caching was handled on DisplayObject but has since been moved to <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a>.
6415This allows for easier interaction and alternate cache methods like WebGL and <a href="../classes/StageGL.html" class="crosslink">StageGL</a>.</p>
6416
6417 </div>
6418
6419
6420 <div class="params">
6421 <h4>Parameters:</h4>
6422
6423 <ul class="params-list">
6424
6425 <li class="param">
6426
6427 <code class="param-name">compositeOperation</code>
6428 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
6429
6430
6431
6432
6433 <div class="param-description">
6434 <p>The compositeOperation to use, or null to clear the cache and redraw it.
6435<a href="https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation">
6436whatwg spec on compositing</a>.</p>
6437
6438 </div>
6439
6440
6441 </li>
6442
6443 </ul>
6444 </div>
6445
6446
6447
6448
6449
6450</div>
6451
6452
6453 <div id="method_updateContext" class="method item inherited">
6454 <h3 class="name"><code>updateContext</code></h3>
6455
6456
6457 <div class="args">
6458 <span class="paren">(</span><ul class="args-list inline commas">
6459
6460 <li class="arg">
6461
6462 <code>ctx</code>
6463
6464 </li>
6465
6466 </ul><span class="paren">)</span>
6467 </div>
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484 <div class="meta">
6485
6486
6487 <p>Inherited from
6488 <a href="../classes/DisplayObject.html#method_updateContext">DisplayObject</a>:
6489
6490
6491
6492 <a href="../files/easeljs_display_DisplayObject.js.html#l760"><code>updateContext:760</code></a>
6493
6494 </p>
6495
6496
6497
6498
6499
6500 </div>
6501
6502 <div class="description">
6503 <p>Applies this display object's transformation, alpha, globalCompositeOperation, clipping path (mask), and shadow
6504to the specified context. This is typically called prior to <a href="../classes/DisplayObject.html#method_draw" class="crosslink">draw</a>.</p>
6505
6506 </div>
6507
6508
6509 <div class="params">
6510 <h4>Parameters:</h4>
6511
6512 <ul class="params-list">
6513
6514 <li class="param">
6515
6516 <code class="param-name">ctx</code>
6517 <span class="type">CanvasRenderingContext2D</span>
6518
6519
6520
6521
6522 <div class="param-description">
6523 <p>The canvas 2D to update.</p>
6524
6525 </div>
6526
6527
6528 </li>
6529
6530 </ul>
6531 </div>
6532
6533
6534
6535
6536
6537</div>
6538
6539
6540 <div id="method_willTrigger" class="method item inherited">
6541 <h3 class="name"><code>willTrigger</code></h3>
6542
6543
6544 <div class="args">
6545 <span class="paren">(</span><ul class="args-list inline commas">
6546
6547 <li class="arg">
6548
6549 <code>type</code>
6550
6551 </li>
6552
6553 </ul><span class="paren">)</span>
6554 </div>
6555
6556
6557
6558 <span class="returns-inline">
6559 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
6560 </span>
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575 <div class="meta">
6576
6577
6578 <p>Inherited from
6579 <a href="../classes/EventDispatcher.html#method_willTrigger">EventDispatcher</a>:
6580
6581
6582
6583 <a href="../files/createjs_events_EventDispatcher.js.html#l350"><code>willTrigger:350</code></a>
6584
6585 </p>
6586
6587
6588
6589
6590
6591 </div>
6592
6593 <div class="description">
6594 <p>Indicates whether there is at least one listener for the specified event type on this object or any of its
6595ancestors (parent, parent's parent, etc). A return value of true indicates that if a bubbling event of the
6596specified type is dispatched from this object, it will trigger at least one listener.</p>
6597<p>This is similar to <a href="../classes/EventDispatcher.html#method_hasEventListener" class="crosslink">hasEventListener</a>, but it searches the entire
6598event flow for a listener, not just this object.</p>
6599
6600 </div>
6601
6602
6603 <div class="params">
6604 <h4>Parameters:</h4>
6605
6606 <ul class="params-list">
6607
6608 <li class="param">
6609
6610 <code class="param-name">type</code>
6611 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
6612
6613
6614
6615
6616 <div class="param-description">
6617 <p>The string type of the event.</p>
6618
6619 </div>
6620
6621
6622 </li>
6623
6624 </ul>
6625 </div>
6626
6627
6628
6629 <div class="returns">
6630 <h4>Returns:</h4>
6631
6632 <div class="returns-description">
6633
6634
6635 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
6636
6637 <p>Returns <code>true</code> if there is at least one listener for the specified event.</p>
6638
6639
6640 </div>
6641 </div>
6642
6643
6644
6645</div>
6646
6647
6648 </div>
6649
6650
6651
6652 <div id="properties" class="api-class-tabpanel">
6653 <h2 class="off-left">Properties</h2>
6654
6655
6656 <div id="property__bounds" class="property item protected inherited">
6657 <h3 class="name"><code>_bounds</code></h3>
6658 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
6659
6660
6661
6662
6663 <span class="flag protected">protected</span>
6664
6665
6666
6667
6668
6669
6670
6671
6672 <div class="meta">
6673
6674
6675 <p>Inherited from
6676 <a href="../classes/DisplayObject.html#property__bounds">DisplayObject</a>:
6677
6678
6679
6680 <a href="../files/easeljs_display_DisplayObject.js.html#l443"><code>_bounds:443</code></a>
6681
6682 </p>
6683
6684
6685
6686
6687 </div>
6688
6689 <div class="description">
6690
6691 </div>
6692
6693
6694 <p><strong>Default:</strong> null</p>
6695
6696
6697
6698
6699
6700</div>
6701
6702
6703 <div id="property__cacheDataURL" class="property item protected deprecated inherited">
6704 <h3 class="name"><code>_cacheDataURL</code></h3>
6705 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
6706
6707
6708 <span class="flag deprecated">deprecated</span>
6709
6710
6711
6712 <span class="flag protected">protected</span>
6713
6714
6715
6716
6717
6718
6719
6720
6721 <div class="meta">
6722
6723
6724 <p>Inherited from
6725 <a href="../classes/DisplayObject.html#property__cacheDataURL">DisplayObject</a>:
6726
6727
6728
6729 <a href="../files/easeljs_display_DisplayObject.js.html#l418"><code>_cacheDataURL:418</code></a>
6730
6731 </p>
6732
6733
6734
6735
6736 </div>
6737
6738 <div class="description">
6739 <p>Moved to <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a></p>
6740
6741 </div>
6742
6743
6744 <p><strong>Default:</strong> null</p>
6745
6746
6747
6748
6749
6750</div>
6751
6752
6753 <div id="property__cacheDataURLID" class="property item protected deprecated inherited">
6754 <h3 class="name"><code>_cacheDataURLID</code></h3>
6755 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6756
6757
6758 <span class="flag deprecated">deprecated</span>
6759
6760
6761
6762 <span class="flag protected">protected</span>
6763
6764
6765
6766
6767
6768
6769
6770
6771 <div class="meta">
6772
6773
6774 <p>Inherited from
6775 <a href="../classes/DisplayObject.html#property__cacheDataURLID">DisplayObject</a>:
6776
6777
6778
6779 <a href="../files/easeljs_display_DisplayObject.js.html#l409"><code>_cacheDataURLID:409</code></a>
6780
6781 </p>
6782
6783
6784
6785
6786 </div>
6787
6788 <div class="description">
6789 <p>Moved to <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a></p>
6790
6791 </div>
6792
6793
6794 <p><strong>Default:</strong> 0</p>
6795
6796
6797
6798
6799
6800</div>
6801
6802
6803 <div id="property__cacheScale" class="property item protected deprecated inherited">
6804 <h3 class="name"><code>_cacheScale</code></h3>
6805 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
6806
6807
6808 <span class="flag deprecated">deprecated</span>
6809
6810
6811
6812 <span class="flag protected">protected</span>
6813
6814
6815
6816
6817
6818
6819
6820
6821 <div class="meta">
6822
6823
6824 <p>Inherited from
6825 <a href="../classes/DisplayObject.html#property__cacheScale">DisplayObject</a>:
6826
6827
6828
6829 <a href="../files/easeljs_display_DisplayObject.js.html#l400"><code>_cacheScale:400</code></a>
6830
6831 </p>
6832
6833
6834
6835
6836 </div>
6837
6838 <div class="description">
6839 <p>Moved to <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a></p>
6840
6841 </div>
6842
6843
6844 <p><strong>Default:</strong> 1</p>
6845
6846
6847
6848
6849
6850</div>
6851
6852
6853 <div id="property__captureListeners" class="property item protected inherited">
6854 <h3 class="name"><code>_captureListeners</code></h3>
6855 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
6856
6857
6858
6859
6860 <span class="flag protected">protected</span>
6861
6862
6863
6864
6865
6866
6867
6868
6869 <div class="meta">
6870
6871
6872 <p>Inherited from
6873 <a href="../classes/EventDispatcher.html#property__captureListeners">EventDispatcher</a>:
6874
6875
6876
6877 <a href="../files/createjs_events_EventDispatcher.js.html#l106"><code>_captureListeners:106</code></a>
6878
6879 </p>
6880
6881
6882
6883
6884 </div>
6885
6886 <div class="description">
6887
6888 </div>
6889
6890
6891
6892
6893
6894
6895</div>
6896
6897
6898 <div id="property__drawAction" class="property item protected">
6899 <h3 class="name"><code>_drawAction</code></h3>
6900 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
6901
6902
6903
6904
6905 <span class="flag protected">protected</span>
6906
6907
6908
6909
6910
6911
6912
6913
6914 <div class="meta">
6915
6916
6917
6918 <p>
6919
6920 Defined in
6921
6922
6923
6924
6925 <a href="../files/easeljs_display_BitmapText.js.html#l133"><code>_drawAction:133</code></a>
6926
6927 </p>
6928
6929
6930
6931
6932 </div>
6933
6934 <div class="description">
6935 <p>The event listener proxy triggered drawing draw for special circumstances.</p>
6936
6937 </div>
6938
6939
6940
6941
6942
6943
6944</div>
6945
6946
6947 <div id="property__listeners" class="property item protected inherited">
6948 <h3 class="name"><code>_listeners</code></h3>
6949 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
6950
6951
6952
6953
6954 <span class="flag protected">protected</span>
6955
6956
6957
6958
6959
6960
6961
6962
6963 <div class="meta">
6964
6965
6966 <p>Inherited from
6967 <a href="../classes/EventDispatcher.html#property__listeners">EventDispatcher</a>:
6968
6969
6970
6971 <a href="../files/createjs_events_EventDispatcher.js.html#l99"><code>_listeners:99</code></a>
6972
6973 </p>
6974
6975
6976
6977
6978 </div>
6979
6980 <div class="description">
6981
6982 </div>
6983
6984
6985
6986
6987
6988
6989</div>
6990
6991
6992 <div id="property__oldProps" class="property item protected">
6993 <h3 class="name"><code>_oldProps</code></h3>
6994 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
6995
6996
6997
6998
6999 <span class="flag protected">protected</span>
7000
7001
7002
7003
7004
7005
7006
7007
7008 <div class="meta">
7009
7010
7011
7012 <p>
7013
7014 Defined in
7015
7016
7017
7018
7019 <a href="../files/easeljs_display_BitmapText.js.html#l119"><code>_oldProps:119</code></a>
7020
7021 </p>
7022
7023
7024
7025
7026 </div>
7027
7028 <div class="description">
7029
7030 </div>
7031
7032
7033
7034
7035
7036
7037</div>
7038
7039
7040 <div id="property__oldStage" class="property item protected">
7041 <h3 class="name"><code>_oldStage</code></h3>
7042 <span class="type"><a href="../classes/Stage.html" class="crosslink">Stage</a></span>
7043
7044
7045
7046
7047 <span class="flag protected">protected</span>
7048
7049
7050
7051
7052
7053
7054
7055
7056 <div class="meta">
7057
7058
7059
7060 <p>
7061
7062 Defined in
7063
7064
7065
7066
7067 <a href="../files/easeljs_display_BitmapText.js.html#l126"><code>_oldStage:126</code></a>
7068
7069 </p>
7070
7071
7072
7073
7074 </div>
7075
7076 <div class="description">
7077 <p>Used to track the object which this class attached listeners to, helps optimize listener attachment.</p>
7078
7079 </div>
7080
7081
7082
7083
7084
7085
7086</div>
7087
7088
7089 <div id="property__props" class="property item protected inherited">
7090 <h3 class="name"><code>_props</code></h3>
7091 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
7092
7093
7094
7095
7096 <span class="flag protected">protected</span>
7097
7098
7099
7100
7101
7102
7103
7104
7105 <div class="meta">
7106
7107
7108 <p>Inherited from
7109 <a href="../classes/DisplayObject.html#property__props">DisplayObject</a>:
7110
7111
7112
7113 <a href="../files/easeljs_display_DisplayObject.js.html#l427"><code>_props:427</code></a>
7114
7115 </p>
7116
7117
7118
7119
7120 </div>
7121
7122 <div class="description">
7123
7124 </div>
7125
7126
7127 <p><strong>Default:</strong> null</p>
7128
7129
7130
7131
7132
7133</div>
7134
7135
7136 <div id="property__rectangle" class="property item protected inherited">
7137 <h3 class="name"><code>_rectangle</code></h3>
7138 <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
7139
7140
7141
7142
7143 <span class="flag protected">protected</span>
7144
7145
7146
7147
7148
7149
7150
7151
7152 <div class="meta">
7153
7154
7155 <p>Inherited from
7156 <a href="../classes/DisplayObject.html#property__rectangle">DisplayObject</a>:
7157
7158
7159
7160 <a href="../files/easeljs_display_DisplayObject.js.html#l435"><code>_rectangle:435</code></a>
7161
7162 </p>
7163
7164
7165
7166
7167 </div>
7168
7169 <div class="description">
7170
7171 </div>
7172
7173
7174 <p><strong>Default:</strong> null</p>
7175
7176
7177
7178
7179
7180</div>
7181
7182
7183 <div id="property__webGLRenderStyle" class="property item protected inherited">
7184 <h3 class="name"><code>_webGLRenderStyle</code></h3>
7185 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7186
7187
7188
7189
7190 <span class="flag protected">protected</span>
7191
7192
7193
7194
7195
7196
7197
7198
7199 <div class="meta">
7200
7201
7202 <p>Inherited from
7203 <a href="../classes/DisplayObject.html#property__webGLRenderStyle">DisplayObject</a>:
7204
7205
7206
7207 <a href="../files/easeljs_display_DisplayObject.js.html#l451"><code>_webGLRenderStyle:451</code></a>
7208
7209 </p>
7210
7211
7212
7213
7214 </div>
7215
7216 <div class="description">
7217 <p>Where StageGL should look for required display properties, matters only for leaf display objects. Containers
7218or cached objects won't use this property, it's for native display of terminal elements.</p>
7219
7220 </div>
7221
7222
7223 <p><strong>Default:</strong> 0</p>
7224
7225
7226
7227
7228
7229</div>
7230
7231
7232 <div id="property_alpha" class="property item inherited">
7233 <h3 class="name"><code>alpha</code></h3>
7234 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246 <div class="meta">
7247
7248
7249 <p>Inherited from
7250 <a href="../classes/DisplayObject.html#property_alpha">DisplayObject</a>:
7251
7252
7253
7254 <a href="../files/easeljs_display_DisplayObject.js.html#l144"><code>alpha:144</code></a>
7255
7256 </p>
7257
7258
7259
7260
7261 </div>
7262
7263 <div class="description">
7264 <p>The alpha (transparency) for this display object. 0 is fully transparent, 1 is fully opaque.</p>
7265
7266 </div>
7267
7268
7269 <p><strong>Default:</strong> 1</p>
7270
7271
7272
7273
7274
7275</div>
7276
7277
7278 <div id="property_bitmapCache" class="property item inherited">
7279 <h3 class="name"><code>bitmapCache</code></h3>
7280 <span class="type"><a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a></span>
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291 <span class="flag readonly">readonly</span>
7292
7293
7294 <div class="meta">
7295
7296
7297 <p>Inherited from
7298 <a href="../classes/DisplayObject.html#property_bitmapCache">DisplayObject</a>:
7299
7300
7301
7302 <a href="../files/easeljs_display_DisplayObject.js.html#l162"><code>bitmapCache:162</code></a>
7303
7304 </p>
7305
7306
7307
7308
7309 </div>
7310
7311 <div class="description">
7312 <p>If a cache has been made, this returns the class that is managing the cacheCanvas and its properties. See <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a>
7313for more information. Use this to control, inspect, and change the cache. In special circumstances this may be a modified or subclassed BitmapCache.</p>
7314
7315 </div>
7316
7317
7318 <p><strong>Default:</strong> null</p>
7319
7320
7321
7322
7323
7324</div>
7325
7326
7327 <div id="property_cacheCanvas" class="property item inherited">
7328 <h3 class="name"><code>cacheCanvas</code></h3>
7329 <span class="type">HTMLCanvasElement | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340 <span class="flag readonly">readonly</span>
7341
7342
7343 <div class="meta">
7344
7345
7346 <p>Inherited from
7347 <a href="../classes/DisplayObject.html#property_cacheCanvas">DisplayObject</a>:
7348
7349
7350
7351 <a href="../files/easeljs_display_DisplayObject.js.html#l152"><code>cacheCanvas:152</code></a>
7352
7353 </p>
7354
7355
7356
7357
7358 </div>
7359
7360 <div class="description">
7361 <p>If a cache is active, this returns the canvas that holds the image of this display object. See <a href="../classes/DisplayObject.html#method_cache" class="crosslink">cache</a>
7362for more information. Use this to display the result of a cache. This will be a HTMLCanvasElement unless special cache rules have been deliberately enabled for this cache.</p>
7363
7364 </div>
7365
7366
7367 <p><strong>Default:</strong> null</p>
7368
7369
7370
7371
7372
7373</div>
7374
7375
7376 <div id="property_cacheID" class="property item deprecated inherited">
7377 <h3 class="name"><code>cacheID</code></h3>
7378 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7379
7380
7381 <span class="flag deprecated">deprecated</span>
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392 <div class="meta">
7393
7394
7395 <p>Inherited from
7396 <a href="../classes/DisplayObject.html#property_cacheID">DisplayObject</a>:
7397
7398
7399
7400 <a href="../files/easeljs_display_DisplayObject.js.html#l695"><code>cacheID:695</code></a>
7401
7402 </p>
7403
7404
7405
7406
7407 </div>
7408
7409 <div class="description">
7410 <p>Returns an ID number that uniquely identifies the current cache for this display object. This can be used to
7411determine if the cache has changed since a previous check.
7412Moved to <a href="../classes/BitmapCache.html" class="crosslink">BitmapCache</a></p>
7413
7414 </div>
7415
7416
7417 <p><strong>Default:</strong> 0</p>
7418
7419
7420
7421
7422
7423</div>
7424
7425
7426 <div id="property_compositeOperation" class="property item inherited">
7427 <h3 class="name"><code>compositeOperation</code></h3>
7428 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440 <div class="meta">
7441
7442
7443 <p>Inherited from
7444 <a href="../classes/DisplayObject.html#property_compositeOperation">DisplayObject</a>:
7445
7446
7447
7448 <a href="../files/easeljs_display_DisplayObject.js.html#l330"><code>compositeOperation:330</code></a>
7449
7450 </p>
7451
7452
7453
7454
7455 </div>
7456
7457 <div class="description">
7458 <p>The composite operation indicates how the pixels of this display object will be composited with the elements
7459behind it. If <code>null</code>, this property is inherited from the parent container. For more information, read the
7460<a href="https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation">
7461whatwg spec on compositing</a>. For a list of supported compositeOperation value, visit
7462<a href="https://drafts.fxtf.org/compositing/">the W3C draft on Compositing and Blending</a>.</p>
7463
7464 </div>
7465
7466
7467 <p><strong>Default:</strong> null</p>
7468
7469
7470
7471
7472
7473</div>
7474
7475
7476 <div id="property_cursor" class="property item inherited">
7477 <h3 class="name"><code>cursor</code></h3>
7478 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490 <div class="meta">
7491
7492
7493 <p>Inherited from
7494 <a href="../classes/DisplayObject.html#property_cursor">DisplayObject</a>:
7495
7496
7497
7498 <a href="../files/easeljs_display_DisplayObject.js.html#l388"><code>cursor:388</code></a>
7499
7500 </p>
7501
7502
7503
7504
7505 </div>
7506
7507 <div class="description">
7508 <p>A CSS cursor (ex. "pointer", "help", "text", etc) that will be displayed when the user hovers over this display
7509object. You must enable mouseover events using the <a href="../classes/Stage.html#method_enableMouseOver" class="crosslink">enableMouseOver</a> method to
7510use this property. Setting a non-null cursor on a Container will override the cursor set on its descendants.</p>
7511
7512 </div>
7513
7514
7515 <p><strong>Default:</strong> null</p>
7516
7517
7518
7519
7520
7521</div>
7522
7523
7524 <div id="property_filters" class="property item inherited">
7525 <h3 class="name"><code>filters</code></h3>
7526 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538 <div class="meta">
7539
7540
7541 <p>Inherited from
7542 <a href="../classes/DisplayObject.html#property_filters">DisplayObject</a>:
7543
7544
7545
7546 <a href="../files/easeljs_display_DisplayObject.js.html#l352"><code>filters:352</code></a>
7547
7548 </p>
7549
7550
7551
7552
7553 </div>
7554
7555 <div class="description">
7556 <p>An array of Filter objects to apply to this display object. Filters are only applied / updated when Cache
7557or UpdateCache is called on the display object, and only apply to the area that is
7558cached.</p>
7559
7560 </div>
7561
7562
7563 <p><strong>Default:</strong> null</p>
7564
7565
7566
7567
7568
7569</div>
7570
7571
7572 <div id="property_hitArea" class="property item inherited">
7573 <h3 class="name"><code>hitArea</code></h3>
7574 <span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586 <div class="meta">
7587
7588
7589 <p>Inherited from
7590 <a href="../classes/DisplayObject.html#property_hitArea">DisplayObject</a>:
7591
7592
7593
7594 <a href="../files/easeljs_display_DisplayObject.js.html#l371"><code>hitArea:371</code></a>
7595
7596 </p>
7597
7598
7599
7600
7601 </div>
7602
7603 <div class="description">
7604 <p>A display object that will be tested when checking mouse interactions or testing <a href="../classes/Container.html#method_getObjectsUnderPoint" class="crosslink">getObjectsUnderPoint</a>.
7605The hit area will have its transformation applied relative to this display object's coordinate space (as though
7606the hit test object were a child of this display object and relative to its regX/Y). The hitArea will be tested
7607using only its own <code>alpha</code> value regardless of the alpha value on the target display object, or the target's
7608ancestors (parents).</p>
7609<p>If set on a <a href="../classes/Container.html" class="crosslink">Container</a>, children of the Container will not receive mouse events.
7610This is similar to setting MouseChildren to false.</p>
7611<p>Note that hitArea is NOT currently used by the <code>hitTest()</code> method, nor is it supported for <a href="../classes/Stage.html" class="crosslink">Stage</a>.</p>
7612
7613 </div>
7614
7615
7616 <p><strong>Default:</strong> null</p>
7617
7618
7619
7620
7621
7622</div>
7623
7624
7625 <div id="property_id" class="property item inherited">
7626 <h3 class="name"><code>id</code></h3>
7627 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639 <div class="meta">
7640
7641
7642 <p>Inherited from
7643 <a href="../classes/DisplayObject.html#property_id">DisplayObject</a>:
7644
7645
7646
7647 <a href="../files/easeljs_display_DisplayObject.js.html#l172"><code>id:172</code></a>
7648
7649 </p>
7650
7651
7652
7653
7654 </div>
7655
7656 <div class="description">
7657 <p>Unique ID for this display object. Makes display objects easier for some uses.</p>
7658
7659 </div>
7660
7661
7662 <p><strong>Default:</strong> -1</p>
7663
7664
7665
7666
7667
7668</div>
7669
7670
7671 <div id="property_letterSpacing" class="property item">
7672 <h3 class="name"><code>letterSpacing</code></h3>
7673 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685 <div class="meta">
7686
7687
7688
7689 <p>
7690
7691 Defined in
7692
7693
7694
7695
7696 <a href="../files/easeljs_display_BitmapText.js.html#l97"><code>letterSpacing:97</code></a>
7697
7698 </p>
7699
7700
7701
7702
7703 </div>
7704
7705 <div class="description">
7706 <p>This spacing (in pixels) will be added after each character in the output.</p>
7707
7708 </div>
7709
7710
7711 <p><strong>Default:</strong> 0</p>
7712
7713
7714
7715
7716
7717</div>
7718
7719
7720 <div id="property_lineHeight" class="property item">
7721 <h3 class="name"><code>lineHeight</code></h3>
7722 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734 <div class="meta">
7735
7736
7737
7738 <p>
7739
7740 Defined in
7741
7742
7743
7744
7745 <a href="../files/easeljs_display_BitmapText.js.html#l86"><code>lineHeight:86</code></a>
7746
7747 </p>
7748
7749
7750
7751
7752 </div>
7753
7754 <div class="description">
7755 <p>The height of each line of text. If 0, then it will use a line height calculated
7756by checking for the height of the "1", "T", or "L" character (in that order). If
7757those characters are not defined, it will use the height of the first frame of the
7758sprite sheet.</p>
7759
7760 </div>
7761
7762
7763 <p><strong>Default:</strong> 0</p>
7764
7765
7766
7767
7768
7769</div>
7770
7771
7772 <div id="property_mask" class="property item inherited">
7773 <h3 class="name"><code>mask</code></h3>
7774 <span class="type"><a href="../classes/Shape.html" class="crosslink">Shape</a></span>
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786 <div class="meta">
7787
7788
7789 <p>Inherited from
7790 <a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
7791
7792
7793
7794 <a href="../files/easeljs_display_DisplayObject.js.html#l362"><code>mask:362</code></a>
7795
7796 </p>
7797
7798
7799
7800
7801 </div>
7802
7803 <div class="description">
7804 <p>A Shape instance that defines a vector mask (clipping path) for this display object. The shape's transformation
7805will be applied relative to the display object's parent coordinates (as if it were a child of the parent).</p>
7806
7807 </div>
7808
7809
7810 <p><strong>Default:</strong> null</p>
7811
7812
7813
7814
7815
7816</div>
7817
7818
7819 <div id="property_maxPoolSize" class="property item">
7820 <h3 class="name"><code>maxPoolSize</code></h3>
7821 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
7822
7823
7824
7825
7826
7827
7828
7829
7830 <span class="flag static">static</span>
7831
7832
7833
7834
7835 <div class="meta">
7836
7837
7838
7839 <p>
7840
7841 Defined in
7842
7843
7844
7845
7846 <a href="../files/easeljs_display_BitmapText.js.html#l144"><code>maxPoolSize:144</code></a>
7847
7848 </p>
7849
7850
7851
7852
7853 </div>
7854
7855 <div class="description">
7856 <p>BitmapText uses Sprite instances to draw text. To reduce the creation and destruction of instances (and thus garbage collection), it maintains
7857an internal object pool of sprite instances to reuse. Increasing this value can cause more sprites to be
7858retained, slightly increasing memory use, but reducing instantiation.</p>
7859
7860 </div>
7861
7862
7863 <p><strong>Default:</strong> 100</p>
7864
7865
7866
7867
7868
7869</div>
7870
7871
7872 <div id="property_mouseEnabled" class="property item inherited">
7873 <h3 class="name"><code>mouseEnabled</code></h3>
7874 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886 <div class="meta">
7887
7888
7889 <p>Inherited from
7890 <a href="../classes/DisplayObject.html#property_mouseEnabled">DisplayObject</a>:
7891
7892
7893
7894 <a href="../files/easeljs_display_DisplayObject.js.html#l180"><code>mouseEnabled:180</code></a>
7895
7896 </p>
7897
7898
7899
7900
7901 </div>
7902
7903 <div class="description">
7904 <p>Indicates whether to include this object when running mouse interactions. Setting this to <code>false</code> for children
7905of a <a href="../classes/Container.html" class="crosslink">Container</a> will cause events on the Container to not fire when that child is
7906clicked. Setting this property to <code>false</code> does not prevent the <a href="../classes/Container.html#method_getObjectsUnderPoint" class="crosslink">getObjectsUnderPoint</a>
7907method from returning the child.</p>
7908<p><strong>Note:</strong> In EaselJS 0.7.0, the mouseEnabled property will not work properly with nested Containers. Please
7909check out the latest NEXT version in <a href="https://github.com/CreateJS/EaselJS/tree/master/lib">GitHub</a> for an updated version with this issue resolved. The fix will be
7910provided in the next release of EaselJS.</p>
7911
7912 </div>
7913
7914
7915 <p><strong>Default:</strong> true</p>
7916
7917
7918
7919
7920
7921</div>
7922
7923
7924 <div id="property_name" class="property item inherited">
7925 <h3 class="name"><code>name</code></h3>
7926 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938 <div class="meta">
7939
7940
7941 <p>Inherited from
7942 <a href="../classes/DisplayObject.html#property_name">DisplayObject</a>:
7943
7944
7945
7946 <a href="../files/easeljs_display_DisplayObject.js.html#l205"><code>name:205</code></a>
7947
7948 </p>
7949
7950
7951
7952
7953 </div>
7954
7955 <div class="description">
7956 <p>An optional name for this display object. Included in <a href="../classes/DisplayObject.html#method_toString" class="crosslink">toString</a> . Useful for
7957debugging.</p>
7958
7959 </div>
7960
7961
7962 <p><strong>Default:</strong> null</p>
7963
7964
7965
7966
7967
7968</div>
7969
7970
7971 <div id="property_parent" class="property item inherited">
7972 <h3 class="name"><code>parent</code></h3>
7973 <span class="type"><a href="../classes/Container.html" class="crosslink">Container</a></span>
7974
7975
7976
7977
7978
7979
7980 <span class="flag final">final</span>
7981
7982
7983
7984
7985
7986 <span class="flag readonly">readonly</span>
7987
7988
7989 <div class="meta">
7990
7991
7992 <p>Inherited from
7993 <a href="../classes/DisplayObject.html#property_parent">DisplayObject</a>:
7994
7995
7996
7997 <a href="../files/easeljs_display_DisplayObject.js.html#l214"><code>parent:214</code></a>
7998
7999 </p>
8000
8001
8002
8003
8004 </div>
8005
8006 <div class="description">
8007 <p>A reference to the <a href="../classes/Container.html" class="crosslink">Container</a> or <a href="../classes/Stage.html" class="crosslink">Stage</a> object that
8008contains this display object, or null if it has not been added
8009to one.</p>
8010
8011 </div>
8012
8013
8014 <p><strong>Default:</strong> null</p>
8015
8016
8017
8018
8019
8020</div>
8021
8022
8023 <div id="property_regX" class="property item inherited">
8024 <h3 class="name"><code>regX</code></h3>
8025 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037 <div class="meta">
8038
8039
8040 <p>Inherited from
8041 <a href="../classes/DisplayObject.html#property_regX">DisplayObject</a>:
8042
8043
8044
8045 <a href="../files/easeljs_display_DisplayObject.js.html#l226"><code>regX:226</code></a>
8046
8047 </p>
8048
8049
8050
8051
8052 </div>
8053
8054 <div class="description">
8055 <p>The left offset for this display object's registration point. For example, to make a 100x100px Bitmap rotate
8056around its center, you would set regX and <a href="../classes/DisplayObject.html#property_regY" class="crosslink">regY</a> to 50.
8057Cached object's registration points should be set based on pre-cache conditions, not cached size.</p>
8058
8059 </div>
8060
8061
8062 <p><strong>Default:</strong> 0</p>
8063
8064
8065
8066
8067
8068</div>
8069
8070
8071 <div id="property_regY" class="property item inherited">
8072 <h3 class="name"><code>regY</code></h3>
8073 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085 <div class="meta">
8086
8087
8088 <p>Inherited from
8089 <a href="../classes/DisplayObject.html#property_regY">DisplayObject</a>:
8090
8091
8092
8093 <a href="../files/easeljs_display_DisplayObject.js.html#l236"><code>regY:236</code></a>
8094
8095 </p>
8096
8097
8098
8099
8100 </div>
8101
8102 <div class="description">
8103 <p>The y offset for this display object's registration point. For example, to make a 100x100px Bitmap rotate around
8104its center, you would set <a href="../classes/DisplayObject.html#property_regX" class="crosslink">regX</a> and regY to 50.
8105Cached object's registration points should be set based on pre-cache conditions, not cached size.</p>
8106
8107 </div>
8108
8109
8110 <p><strong>Default:</strong> 0</p>
8111
8112
8113
8114
8115
8116</div>
8117
8118
8119 <div id="property_rotation" class="property item inherited">
8120 <h3 class="name"><code>rotation</code></h3>
8121 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133 <div class="meta">
8134
8135
8136 <p>Inherited from
8137 <a href="../classes/DisplayObject.html#property_rotation">DisplayObject</a>:
8138
8139
8140
8141 <a href="../files/easeljs_display_DisplayObject.js.html#l246"><code>rotation:246</code></a>
8142
8143 </p>
8144
8145
8146
8147
8148 </div>
8149
8150 <div class="description">
8151 <p>The rotation in degrees for this display object.</p>
8152
8153 </div>
8154
8155
8156 <p><strong>Default:</strong> 0</p>
8157
8158
8159
8160
8161
8162</div>
8163
8164
8165 <div id="property_scaleX" class="property item inherited">
8166 <h3 class="name"><code>scaleX</code></h3>
8167 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179 <div class="meta">
8180
8181 <p>Inherited from
8182 <a href="../classes/DisplayObject.html#property_scaleX">
8183 DisplayObject
8184 </a>
8185
8186 but overwritten in
8187
8188
8189
8190 <a href="../files/easeljs_display_DisplayObject.js.html#l254"><code>scaleX:254</code></a>
8191
8192 </p>
8193
8194
8195
8196
8197 </div>
8198
8199 <div class="description">
8200 <p>The factor to stretch this display object horizontally. For example, setting scaleX to 2 will stretch the display
8201object to twice its nominal width. To horizontally flip an object, set the scale to a negative number.</p>
8202
8203 </div>
8204
8205
8206 <p><strong>Default:</strong> 1</p>
8207
8208
8209
8210
8211
8212</div>
8213
8214
8215 <div id="property_scaleY" class="property item inherited">
8216 <h3 class="name"><code>scaleY</code></h3>
8217 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229 <div class="meta">
8230
8231
8232 <p>Inherited from
8233 <a href="../classes/DisplayObject.html#property_scaleY">DisplayObject</a>:
8234
8235
8236
8237 <a href="../files/easeljs_display_DisplayObject.js.html#l263"><code>scaleY:263</code></a>
8238
8239 </p>
8240
8241
8242
8243
8244 </div>
8245
8246 <div class="description">
8247 <p>The factor to stretch this display object vertically. For example, setting scaleY to 0.5 will stretch the display
8248object to half its nominal height. To vertically flip an object, set the scale to a negative number.</p>
8249
8250 </div>
8251
8252
8253 <p><strong>Default:</strong> 1</p>
8254
8255
8256
8257
8258
8259</div>
8260
8261
8262 <div id="property_shadow" class="property item inherited">
8263 <h3 class="name"><code>shadow</code></h3>
8264 <span class="type"><a href="../classes/Shadow.html" class="crosslink">Shadow</a></span>
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276 <div class="meta">
8277
8278
8279 <p>Inherited from
8280 <a href="../classes/DisplayObject.html#property_shadow">DisplayObject</a>:
8281
8282
8283
8284 <a href="../files/easeljs_display_DisplayObject.js.html#l288"><code>shadow:288</code></a>
8285
8286 </p>
8287
8288
8289
8290
8291 </div>
8292
8293 <div class="description">
8294 <p>A shadow object that defines the shadow to render on this display object. Set to <code>null</code> to remove a shadow. If
8295null, this property is inherited from the parent container.</p>
8296
8297 </div>
8298
8299
8300 <p><strong>Default:</strong> null</p>
8301
8302
8303
8304
8305
8306</div>
8307
8308
8309 <div id="property_skewX" class="property item inherited">
8310 <h3 class="name"><code>skewX</code></h3>
8311 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323 <div class="meta">
8324
8325
8326 <p>Inherited from
8327 <a href="../classes/DisplayObject.html#property_skewX">DisplayObject</a>:
8328
8329
8330
8331 <a href="../files/easeljs_display_DisplayObject.js.html#l272"><code>skewX:272</code></a>
8332
8333 </p>
8334
8335
8336
8337
8338 </div>
8339
8340 <div class="description">
8341 <p>The factor to skew this display object horizontally.</p>
8342
8343 </div>
8344
8345
8346 <p><strong>Default:</strong> 0</p>
8347
8348
8349
8350
8351
8352</div>
8353
8354
8355 <div id="property_skewY" class="property item inherited">
8356 <h3 class="name"><code>skewY</code></h3>
8357 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369 <div class="meta">
8370
8371
8372 <p>Inherited from
8373 <a href="../classes/DisplayObject.html#property_skewY">DisplayObject</a>:
8374
8375
8376
8377 <a href="../files/easeljs_display_DisplayObject.js.html#l280"><code>skewY:280</code></a>
8378
8379 </p>
8380
8381
8382
8383
8384 </div>
8385
8386 <div class="description">
8387 <p>The factor to skew this display object vertically.</p>
8388
8389 </div>
8390
8391
8392 <p><strong>Default:</strong> 0</p>
8393
8394
8395
8396
8397
8398</div>
8399
8400
8401 <div id="property_snapToPixel" class="property item inherited">
8402 <h3 class="name"><code>snapToPixel</code></h3>
8403 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415 <div class="meta">
8416
8417
8418 <p>Inherited from
8419 <a href="../classes/DisplayObject.html#property_snapToPixel">DisplayObject</a>:
8420
8421
8422
8423 <a href="../files/easeljs_display_DisplayObject.js.html#l342"><code>snapToPixel:342</code></a>
8424
8425 </p>
8426
8427
8428
8429
8430 </div>
8431
8432 <div class="description">
8433 <p>Indicates whether the display object should be drawn to a whole pixel when
8434Stage/snapToPixelEnabled is true. To enable/disable snapping on whole
8435categories of display objects, set this value on the prototype (Ex. Text.prototype.snapToPixel = true).</p>
8436
8437 </div>
8438
8439
8440 <p><strong>Default:</strong> true</p>
8441
8442
8443
8444
8445
8446</div>
8447
8448
8449 <div id="property_spaceWidth" class="property item">
8450 <h3 class="name"><code>spaceWidth</code></h3>
8451 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463 <div class="meta">
8464
8465
8466
8467 <p>
8468
8469 Defined in
8470
8471
8472
8473
8474 <a href="../files/easeljs_display_BitmapText.js.html#l105"><code>spaceWidth:105</code></a>
8475
8476 </p>
8477
8478
8479
8480
8481 </div>
8482
8483 <div class="description">
8484 <p>If a space character is not defined in the sprite sheet, then empty pixels equal to
8485spaceWidth will be inserted instead. If 0, then it will use a value calculated
8486by checking for the width of the "1", "l", "E", or "A" character (in that order). If
8487those characters are not defined, it will use the width of the first frame of the
8488sprite sheet.</p>
8489
8490 </div>
8491
8492
8493 <p><strong>Default:</strong> 0</p>
8494
8495
8496
8497
8498
8499</div>
8500
8501
8502 <div id="property_spriteSheet" class="property item">
8503 <h3 class="name"><code>spriteSheet</code></h3>
8504 <span class="type"><a href="../classes/SpriteSheet.html" class="crosslink">SpriteSheet</a></span>
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516 <div class="meta">
8517
8518
8519
8520 <p>
8521
8522 Defined in
8523
8524
8525
8526
8527 <a href="../files/easeljs_display_BitmapText.js.html#l64"><code>spriteSheet:64</code></a>
8528
8529 </p>
8530
8531
8532
8533
8534 </div>
8535
8536 <div class="description">
8537 <p>A SpriteSheet instance that defines the glyphs for this bitmap text. Each glyph/character
8538should have a single frame animation defined in the sprite sheet named the same as
8539corresponding character. For example, the following animation definition:</p>
8540<pre class="code prettyprint"><code> "A": {frames: [0]}</code></pre>
8541<p>would indicate that the frame at index 0 of the spritesheet should be drawn for the "A" character. The short form
8542is also acceptable:</p>
8543<pre class="code prettyprint"><code> "A": 0</code></pre>
8544<p>Note that if a character in the text is not found in the sprite sheet, it will also
8545try to use the alternate case (upper or lower).</p>
8546<p>See SpriteSheet for more information on defining sprite sheet data.</p>
8547
8548 </div>
8549
8550
8551 <p><strong>Default:</strong> null</p>
8552
8553
8554
8555
8556
8557</div>
8558
8559
8560 <div id="property_stage" class="property item inherited">
8561 <h3 class="name"><code>stage</code></h3>
8562 <span class="type"><a href="../classes/Stage.html" class="crosslink">Stage</a></span>
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573 <span class="flag readonly">readonly</span>
8574
8575
8576 <div class="meta">
8577
8578
8579 <p>Inherited from
8580 <a href="../classes/DisplayObject.html#property_stage">DisplayObject</a>:
8581
8582
8583
8584 <a href="../files/easeljs_display_DisplayObject.js.html#l688"><code>stage:688</code></a>
8585
8586 </p>
8587
8588
8589
8590
8591 </div>
8592
8593 <div class="description">
8594 <p>Returns the Stage instance that this display object will be rendered on, or null if it has not been added to one.</p>
8595
8596 </div>
8597
8598
8599
8600
8601
8602
8603</div>
8604
8605
8606 <div id="property_text" class="property item">
8607 <h3 class="name"><code>text</code></h3>
8608 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620 <div class="meta">
8621
8622
8623
8624 <p>
8625
8626 Defined in
8627
8628
8629
8630
8631 <a href="../files/easeljs_display_BitmapText.js.html#l56"><code>text:56</code></a>
8632
8633 </p>
8634
8635
8636
8637
8638 </div>
8639
8640 <div class="description">
8641 <p>The text to display.</p>
8642
8643 </div>
8644
8645
8646 <p><strong>Default:</strong> ""</p>
8647
8648
8649
8650
8651
8652</div>
8653
8654
8655 <div id="property_tickEnabled" class="property item inherited">
8656 <h3 class="name"><code>tickEnabled</code></h3>
8657 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669 <div class="meta">
8670
8671
8672 <p>Inherited from
8673 <a href="../classes/DisplayObject.html#property_tickEnabled">DisplayObject</a>:
8674
8675
8676
8677 <a href="../files/easeljs_display_DisplayObject.js.html#l195"><code>tickEnabled:195</code></a>
8678
8679 </p>
8680
8681
8682
8683
8684 </div>
8685
8686 <div class="description">
8687 <p>If false, the tick will not run on this display object (or its children). This can provide some performance benefits.
8688In addition to preventing the "tick" event from being dispatched, it will also prevent tick related updates
8689on some display objects (ex. Sprite & MovieClip frame advancing, and DOMElement display properties).</p>
8690
8691 </div>
8692
8693
8694 <p><strong>Default:</strong> true</p>
8695
8696
8697
8698
8699
8700</div>
8701
8702
8703 <div id="property_transformMatrix" class="property item inherited">
8704 <h3 class="name"><code>transformMatrix</code></h3>
8705 <span class="type"><a href="../classes/Matrix2D.html" class="crosslink">Matrix2D</a></span>
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717 <div class="meta">
8718
8719
8720 <p>Inherited from
8721 <a href="../classes/DisplayObject.html#property_transformMatrix">DisplayObject</a>:
8722
8723
8724
8725 <a href="../files/easeljs_display_DisplayObject.js.html#l321"><code>transformMatrix:321</code></a>
8726
8727 </p>
8728
8729
8730
8731
8732 </div>
8733
8734 <div class="description">
8735 <p>If set, defines the transformation for this display object, overriding all other transformation properties
8736(x, y, rotation, scale, skew).</p>
8737
8738 </div>
8739
8740
8741 <p><strong>Default:</strong> null</p>
8742
8743
8744
8745
8746
8747</div>
8748
8749
8750 <div id="property_visible" class="property item inherited">
8751 <h3 class="name"><code>visible</code></h3>
8752 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764 <div class="meta">
8765
8766
8767 <p>Inherited from
8768 <a href="../classes/DisplayObject.html#property_visible">DisplayObject</a>:
8769
8770
8771
8772 <a href="../files/easeljs_display_DisplayObject.js.html#l297"><code>visible:297</code></a>
8773
8774 </p>
8775
8776
8777
8778
8779 </div>
8780
8781 <div class="description">
8782 <p>Indicates whether this display object should be rendered to the canvas and included when running the Stage
8783Stage/getObjectsUnderPoint method.</p>
8784
8785 </div>
8786
8787
8788 <p><strong>Default:</strong> true</p>
8789
8790
8791
8792
8793
8794</div>
8795
8796
8797 <div id="property_x" class="property item inherited">
8798 <h3 class="name"><code>x</code></h3>
8799 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811 <div class="meta">
8812
8813
8814 <p>Inherited from
8815 <a href="../classes/DisplayObject.html#property_x">DisplayObject</a>:
8816
8817
8818
8819 <a href="../files/easeljs_display_DisplayObject.js.html#l306"><code>x:306</code></a>
8820
8821 </p>
8822
8823
8824
8825
8826 </div>
8827
8828 <div class="description">
8829 <p>The x (horizontal) position of the display object, relative to its parent.</p>
8830
8831 </div>
8832
8833
8834 <p><strong>Default:</strong> 0</p>
8835
8836
8837
8838
8839
8840</div>
8841
8842
8843 <div id="property_y" class="property item inherited">
8844 <h3 class="name"><code>y</code></h3>
8845 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857 <div class="meta">
8858
8859
8860 <p>Inherited from
8861 <a href="../classes/DisplayObject.html#property_y">DisplayObject</a>:
8862
8863
8864
8865 <a href="../files/easeljs_display_DisplayObject.js.html#l314"><code>y:314</code></a>
8866
8867 </p>
8868
8869
8870
8871
8872 </div>
8873
8874 <div class="description">
8875
8876 </div>
8877
8878
8879 <p><strong>Default:</strong> 0</p>
8880
8881
8882
8883
8884
8885</div>
8886
8887
8888 </div>
8889
8890
8891
8892
8893
8894 <div id="events" class="api-class-tabpanel">
8895 <h2 class="off-left">Events</h2>
8896
8897
8898 <div id="event_added" class="events item inherited">
8899 <h3 class="name"><code>added</code></h3>
8900 <span class="type"></span>
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910 <div class="meta">
8911
8912
8913 <p>Inherited from
8914 <a href="../classes/DisplayObject.html#event_added">DisplayObject</a>:
8915
8916
8917
8918 <a href="../files/easeljs_display_DisplayObject.js.html#l646"><code>added:646</code></a>
8919
8920 </p>
8921
8922
8923
8924
8925 </div>
8926
8927 <div class="description">
8928 <p>Dispatched when the display object is added to a parent container.</p>
8929
8930 </div>
8931
8932
8933
8934
8935
8936</div>
8937
8938
8939 <div id="event_click" class="events item inherited">
8940 <h3 class="name"><code>click</code></h3>
8941 <span class="type"></span>
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951 <div class="meta">
8952
8953
8954 <p>Inherited from
8955 <a href="../classes/DisplayObject.html#event_click">DisplayObject</a>:
8956
8957
8958
8959 <a href="../files/easeljs_display_DisplayObject.js.html#l546"><code>click:546</code></a>
8960
8961 </p>
8962
8963
8964
8965
8966 <p>Available since 0.6.0</p>
8967
8968 </div>
8969
8970 <div class="description">
8971 <p>Dispatched when the user presses their left mouse button and then releases it while over the display object.
8972See the <a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
8973
8974 </div>
8975
8976
8977
8978
8979
8980</div>
8981
8982
8983 <div id="event_dblclick" class="events item inherited">
8984 <h3 class="name"><code>dblclick</code></h3>
8985 <span class="type"></span>
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995 <div class="meta">
8996
8997
8998 <p>Inherited from
8999 <a href="../classes/DisplayObject.html#event_dblclick">DisplayObject</a>:
9000
9001
9002
9003 <a href="../files/easeljs_display_DisplayObject.js.html#l553"><code>dblclick:553</code></a>
9004
9005 </p>
9006
9007
9008
9009
9010 <p>Available since 0.6.0</p>
9011
9012 </div>
9013
9014 <div class="description">
9015 <p>Dispatched when the user double clicks their left mouse button over this display object.
9016See the <a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
9017
9018 </div>
9019
9020
9021
9022
9023
9024</div>
9025
9026
9027 <div id="event_mousedown" class="events item inherited">
9028 <h3 class="name"><code>mousedown</code></h3>
9029 <span class="type"></span>
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039 <div class="meta">
9040
9041
9042 <p>Inherited from
9043 <a href="../classes/DisplayObject.html#event_mousedown">DisplayObject</a>:
9044
9045
9046
9047 <a href="../files/easeljs_display_DisplayObject.js.html#l539"><code>mousedown:539</code></a>
9048
9049 </p>
9050
9051
9052
9053
9054 <p>Available since 0.6.0</p>
9055
9056 </div>
9057
9058 <div class="description">
9059 <p>Dispatched when the user presses their left mouse button over the display object. See the
9060<a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
9061
9062 </div>
9063
9064
9065
9066
9067
9068</div>
9069
9070
9071 <div id="event_mouseout" class="events item inherited">
9072 <h3 class="name"><code>mouseout</code></h3>
9073 <span class="type"></span>
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083 <div class="meta">
9084
9085
9086 <p>Inherited from
9087 <a href="../classes/DisplayObject.html#event_mouseout">DisplayObject</a>:
9088
9089
9090
9091 <a href="../files/easeljs_display_DisplayObject.js.html#l568"><code>mouseout:568</code></a>
9092
9093 </p>
9094
9095
9096
9097
9098 <p>Available since 0.6.0</p>
9099
9100 </div>
9101
9102 <div class="description">
9103 <p>Dispatched when the user's mouse leaves this display object. This event must be enabled using
9104<a href="../classes/Stage.html#method_enableMouseOver" class="crosslink">enableMouseOver</a>. See also <a href="../classes/DisplayObject.html#event_rollout" class="crosslink">rollout</a>.
9105See the <a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
9106
9107 </div>
9108
9109
9110
9111
9112
9113</div>
9114
9115
9116 <div id="event_mouseover" class="events item inherited">
9117 <h3 class="name"><code>mouseover</code></h3>
9118 <span class="type"></span>
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128 <div class="meta">
9129
9130
9131 <p>Inherited from
9132 <a href="../classes/DisplayObject.html#event_mouseover">DisplayObject</a>:
9133
9134
9135
9136 <a href="../files/easeljs_display_DisplayObject.js.html#l560"><code>mouseover:560</code></a>
9137
9138 </p>
9139
9140
9141
9142
9143 <p>Available since 0.6.0</p>
9144
9145 </div>
9146
9147 <div class="description">
9148 <p>Dispatched when the user's mouse enters this display object. This event must be enabled using
9149<a href="../classes/Stage.html#method_enableMouseOver" class="crosslink">enableMouseOver</a>. See also <a href="../classes/DisplayObject.html#event_rollover" class="crosslink">rollover</a>.
9150See the <a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
9151
9152 </div>
9153
9154
9155
9156
9157
9158</div>
9159
9160
9161 <div id="event_pressmove" class="events item inherited">
9162 <h3 class="name"><code>pressmove</code></h3>
9163 <span class="type"></span>
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173 <div class="meta">
9174
9175
9176 <p>Inherited from
9177 <a href="../classes/DisplayObject.html#event_pressmove">DisplayObject</a>:
9178
9179
9180
9181 <a href="../files/easeljs_display_DisplayObject.js.html#l616"><code>pressmove:616</code></a>
9182
9183 </p>
9184
9185
9186
9187
9188 <p>Available since 0.7.0</p>
9189
9190 </div>
9191
9192 <div class="description">
9193 <p>After a <a href="../classes/DisplayObject.html#event_mousedown" class="crosslink">mousedown</a> occurs on a display object, a pressmove
9194event will be generated on that object whenever the mouse moves until the mouse press is released. This can be
9195useful for dragging and similar operations.</p>
9196<p><strong>Please note</strong> that if the initial mouse target from a <code>mousedown</code> event is removed from the stage after being pressed
9197(e.g. during a <code>pressmove</code> event), a <code>pressmove</code> event is still generated. However since it is no longer in the
9198display list, the event can not bubble. This means that previous ancestors (parent containers) will not receive
9199the event, and therefore can not re-dispatch it. If you intend to listen for <code><a href="../classes/DisplayObject.html#event_pressup" class="crosslink">pressup</a></code>
9200or <code>pressmove</code> on a dynamic object (such as a <a href="../classes/MovieClip.html" class="crosslink">MovieClip</a> or <a href="../classes/Container.html" class="crosslink">Container</a>),
9201then ensure you set <a href="../classes/Container.html#property_mouseChildren" class="crosslink">mouseChildren</a> to <code>false</code>.</p>
9202
9203 </div>
9204
9205
9206
9207
9208
9209</div>
9210
9211
9212 <div id="event_pressup" class="events item inherited">
9213 <h3 class="name"><code>pressup</code></h3>
9214 <span class="type"></span>
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224 <div class="meta">
9225
9226
9227 <p>Inherited from
9228 <a href="../classes/DisplayObject.html#event_pressup">DisplayObject</a>:
9229
9230
9231
9232 <a href="../files/easeljs_display_DisplayObject.js.html#l631"><code>pressup:631</code></a>
9233
9234 </p>
9235
9236
9237
9238
9239 <p>Available since 0.7.0</p>
9240
9241 </div>
9242
9243 <div class="description">
9244 <p>After a <a href="../classes/DisplayObject.html#event_mousedown" class="crosslink">mousedown</a> occurs on a display object, a pressup event
9245will be generated on that object when that mouse press is released. This can be useful for dragging and similar
9246operations.</p>
9247<p><strong>Please note</strong> that if the initial mouse target from a <code>mousedown</code> event is removed from the stage after being pressed
9248(e.g. during a <code>pressmove</code> event), a <code>pressup</code> event is still generated. However since it is no longer in the
9249display list, the event can not bubble. This means that previous ancestors (parent containers) will not receive
9250the event, and therefore can not re-dispatch it. If you intend to listen for <code><a href="../classes/DisplayObject.html#event_pressmove" class="crosslink">pressmove</a></code>
9251or <code>pressup</code> on a dynamic object (such as a <a href="../classes/MovieClip.html" class="crosslink">MovieClip</a> or <a href="../classes/Container.html" class="crosslink">Container</a>),
9252then ensure you set <a href="../classes/Container.html#property_mouseChildren" class="crosslink">mouseChildren</a> to <code>false</code>.</p>
9253
9254 </div>
9255
9256
9257
9258
9259
9260</div>
9261
9262
9263 <div id="event_removed" class="events item inherited">
9264 <h3 class="name"><code>removed</code></h3>
9265 <span class="type"></span>
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275 <div class="meta">
9276
9277
9278 <p>Inherited from
9279 <a href="../classes/DisplayObject.html#event_removed">DisplayObject</a>:
9280
9281
9282
9283 <a href="../files/easeljs_display_DisplayObject.js.html#l651"><code>removed:651</code></a>
9284
9285 </p>
9286
9287
9288
9289
9290 </div>
9291
9292 <div class="description">
9293 <p>Dispatched when the display object is removed from its parent container.</p>
9294
9295 </div>
9296
9297
9298
9299
9300
9301</div>
9302
9303
9304 <div id="event_rollout" class="events item inherited">
9305 <h3 class="name"><code>rollout</code></h3>
9306 <span class="type"></span>
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316 <div class="meta">
9317
9318
9319 <p>Inherited from
9320 <a href="../classes/DisplayObject.html#event_rollout">DisplayObject</a>:
9321
9322
9323
9324 <a href="../files/easeljs_display_DisplayObject.js.html#l596"><code>rollout:596</code></a>
9325
9326 </p>
9327
9328
9329
9330
9331 <p>Available since 0.7.0</p>
9332
9333 </div>
9334
9335 <div class="description">
9336 <p>This event is similar to <a href="../classes/DisplayObject.html#event_mouseout" class="crosslink">mouseout</a>, with the following
9337differences: it does not bubble, and it considers <a href="../classes/Container.html" class="crosslink">Container</a> instances as an
9338aggregate of their content.</p>
9339<p>For example, myContainer contains two overlapping children: shapeA and shapeB. The user moves their mouse over
9340shapeA, then directly on to shapeB, then off both. With a listener for Mouseout:event
9341on myContainer, two events would be received, each targeting a child element:<OL></p>
9342<p><LI>when the mouse leaves shapeA (target=shapeA)</LI></p>
9343<p><LI>when the mouse leaves shapeB (target=shapeB)</LI>
9344</OL>
9345However, with a listener for "rollout" instead, only a single event is received when the mouse leaves
9346the aggregate myContainer content (target=myContainer).</p>
9347<p>This event must be enabled using <a href="../classes/Stage.html#method_enableMouseOver" class="crosslink">enableMouseOver</a>.
9348See the <a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
9349
9350 </div>
9351
9352
9353
9354
9355
9356</div>
9357
9358
9359 <div id="event_rollover" class="events item inherited">
9360 <h3 class="name"><code>rollover</code></h3>
9361 <span class="type"></span>
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371 <div class="meta">
9372
9373
9374 <p>Inherited from
9375 <a href="../classes/DisplayObject.html#event_rollover">DisplayObject</a>:
9376
9377
9378
9379 <a href="../files/easeljs_display_DisplayObject.js.html#l576"><code>rollover:576</code></a>
9380
9381 </p>
9382
9383
9384
9385
9386 <p>Available since 0.7.0</p>
9387
9388 </div>
9389
9390 <div class="description">
9391 <p>This event is similar to <a href="../classes/DisplayObject.html#event_mouseover" class="crosslink">mouseover</a>, with the following
9392differences: it does not bubble, and it considers <a href="../classes/Container.html" class="crosslink">Container</a> instances as an
9393aggregate of their content.</p>
9394<p>For example, myContainer contains two overlapping children: shapeA and shapeB. The user moves their mouse over
9395shapeA and then directly on to shapeB. With a listener for Mouseover:event on
9396myContainer, two events would be received, each targeting a child element:<OL></p>
9397<p><LI>when the mouse enters shapeA (target=shapeA)</LI></p>
9398<p><LI>when the mouse enters shapeB (target=shapeB)</LI>
9399</OL>
9400However, with a listener for "rollover" instead, only a single event is received when the mouse first enters
9401the aggregate myContainer content (target=myContainer).</p>
9402<p>This event must be enabled using <a href="../classes/Stage.html#method_enableMouseOver" class="crosslink">enableMouseOver</a>.
9403See the <a href="../classes/MouseEvent.html" class="crosslink">MouseEvent</a> class for a listing of event properties.</p>
9404
9405 </div>
9406
9407
9408
9409
9410
9411</div>
9412
9413
9414 <div id="event_tick" class="events item inherited">
9415 <h3 class="name"><code>tick</code></h3>
9416 <span class="type"></span>
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426 <div class="meta">
9427
9428
9429 <p>Inherited from
9430 <a href="../classes/DisplayObject.html#event_tick">DisplayObject</a>:
9431
9432
9433
9434 <a href="../files/easeljs_display_DisplayObject.js.html#l656"><code>tick:656</code></a>
9435
9436 </p>
9437
9438
9439
9440
9441 <p>Available since 0.6.0</p>
9442
9443 </div>
9444
9445 <div class="description">
9446 <p>Dispatched on each display object on a stage whenever the stage updates. This occurs immediately before the
9447rendering (draw) pass. When <a href="../classes/Stage.html#method_update" class="crosslink">update</a> is called, first all display objects on
9448the stage dispatch the tick event, then all of the display objects are drawn to stage. Children will have their
9449Tick:event event dispatched in order of their depth prior to the event being
9450dispatched on their parent.</p>
9451
9452 </div>
9453
9454
9455 <div class="params">
9456 <h4>Event Payload:</h4>
9457
9458 <ul class="params-list">
9459
9460 <li class="param">
9461
9462 <code class="param-name">target</code>
9463 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
9464
9465
9466
9467
9468 <div class="param-description">
9469 <p>The object that dispatched the event.</p>
9470
9471 </div>
9472
9473
9474 </li>
9475
9476 <li class="param">
9477
9478 <code class="param-name">type</code>
9479 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
9480
9481
9482
9483
9484 <div class="param-description">
9485 <p>The event type.</p>
9486
9487 </div>
9488
9489
9490 </li>
9491
9492 <li class="param">
9493
9494 <code class="param-name">params</code>
9495 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
9496
9497
9498
9499
9500 <div class="param-description">
9501 <p>An array containing any arguments that were passed to the Stage.update() method. For
9502 example if you called stage.update("hello"), then the params would be ["hello"].</p>
9503
9504 </div>
9505
9506
9507 </li>
9508
9509 </ul>
9510 </div>
9511
9512
9513
9514
9515</div>
9516
9517
9518 </div>
9519
9520 </div>
9521</div>
9522
9523 </div>
9524 </div>
9525 </div>
9526 </div>
9527 </div>
9528</div>
9529<script src="../assets/vendor/prettify/prettify-min.js"></script>
9530<script>prettyPrint();</script>
9531<script src="../assets/js/yui-prettify.js"></script>
9532<script src="../assets/../api.js"></script>
9533<script src="../assets/js/api-filter.js"></script>
9534<script src="../assets/js/api-list.js"></script>
9535<script src="../assets/js/api-search.js"></script>
9536<script src="../assets/js/apidocs.js"></script>
9537</body>
9538</html>