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