From 5a5260911d111d601a078909dc1a7a1196da5b4f Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Thu, 8 Nov 2012 09:41:27 -0600 Subject: [PATCH] Adds AS2 button support; specifies button as a container --- examples/misc/button3.fla | Bin 0 -> 5531 bytes examples/misc/button3.swf | Bin 0 -> 762 bytes src/flash/display/SimpleButton.js | 9 +++++++++ 3 files changed, 9 insertions(+) create mode 100644 examples/misc/button3.fla create mode 100644 examples/misc/button3.swf diff --git a/examples/misc/button3.fla b/examples/misc/button3.fla new file mode 100644 index 0000000000000000000000000000000000000000..10a77320f5cb374c72ea6de2c6ca097da5c588e2 GIT binary patch literal 5531 zcmbVQby!r}*B-iS=yGU8UMIuwys8U+y$DaoM`DM5j6 zxL&VUpZojg+w-j1=j^lIwa=XM?lo(_nks1MWB>p*01&C_Al;U-6hjRF0Im%=1aNh9 zwe<<~u(kB?aB;M@^l@}|gZR1GfGus@t!%*ob}pK~!RZNX&~T8jYr{jDm9LMFyBptM zj@lZAM%=PG{J$fRPXDy)300M3w57F;AphIzI<^{ASDIT%UH)%3RBY_O?w*2cwki(| z0Fc240Em!oavExK?$*Apwr)P)09Th110(lYA>z;lz!?$#Y2mJ{@7LIBecWUuzJm4~tma0pS1K6h5UQ;kP|_L2gdLpf1bR%-w~--PDQCpnEV#lZ+CP9>oi ziWo-7AO zu}Zo$sH(Nj!K?voWs|J357c#X^`6iy?xMZ#5EoXhr{!E{2wp4m&~*!uw* zR5=LVy2zQ`xWa7HX$TpvUky5L`$!j`_|_|)EuO-nj#Ro3>!2%^+L(~fSuLC-lLeH) zI!evk)VdgF8sRH_=M9?7BIXI+At4}EVEXnm`Snjpe$OWN6r?@kFXWl81knXhrw!+qq2j@QC-vH)f=0Mx^uU?x>1#HFI$E%I{CF2?} zFQ?X0W+DU;cl+f7v=hl*0@Dht*y#4R1vd}};~;rhVn^ul^avG)W}lIt!l8lt0tj?* zezJ>i)!KVp-`O_Ai{7Q5b#=N;gDIA)K9IH-UJ?HBX5c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?CY# zVTkqV<$E_T{crj(KYA8F+QhlNAK#nrmphsT+IvF=da7*zzY6oXBK%$PsW+Xl=R&^z zYrC$ItsLDTND9c=de|c6Cu>V<2U~mO@EjH%03E4R;Q&|wyvTDTaR9i0pIiX|I;xQa z$o6~i|A)$jf=YHxMR3&@4#PqW^2ofA7ct4Dsha z=T`_@tpD8g{0i{jx#L#=ZRC&tuT1j$1NbwS{K7{d@jsvTPqtiVmY;X<^F{wj!(S2N okjd;nNcm@gKdJUBz&bL(PkB{S1q1W?3NG@Kfs{R1uPG1sKSicOb^rhX literal 0 HcmV?d00001 diff --git a/examples/misc/button3.swf b/examples/misc/button3.swf new file mode 100644 index 0000000000000000000000000000000000000000..636d85963820ff408f6e1fd3d689d62adbba0cee GIT binary patch literal 762 zcmVUYpfK`354RQv#5L{Y(uP(Q&sNq5_AyVhC* zd7Jq?&rF_~{5=?0066m!U^E1!;UNIHKQc4`khRsCJXb1no}rtL%-*JAORj6l2sIjw zcq0*~_97B9nG6ynBuP9Yc&BN)*yBxSESBQ}hZ1oVTeDn^nwQh*u}lXNqJJ} z7Vlx(a;j>z=8?p^B$q||k~~_rsHq-%W$8EYtxJPuG?hbdmY36_8_@hP7EsfemFvmeL+-kM1_9a+>TxI34 z>Y8wV^&|i_XKhx1;2CQKh{7r>p@q8ZvL8TUKhrW%VSEN!(Io2)fwvOH7j8d#!5&^O ze7SRK4MHK-@w63+LU6Q(Fa6kfzjp7U{%d{Y?fOiV!ox@;#H6qRF$RReg27FI$Dacs z44wV3Io8~I^6K5UnaKC-%{Po2XFYv8TsYvMmH;kby&E6D+Ls^L&#!!Hv;F(n7Q6Of sPn=`z!DoiT{)GC&eZlQ?e{h41$RO(*4>M-;=iMzoqHC<-H-P{3zKbSv?EnA( literal 0 HcmV?d00001 diff --git a/src/flash/display/SimpleButton.js b/src/flash/display/SimpleButton.js index e6fc06999..8dbfc9c62 100644 --- a/src/flash/display/SimpleButton.js +++ b/src/flash/display/SimpleButton.js @@ -27,6 +27,15 @@ const SimpleButtonDefinition = (function () { this._upState = val; }, + get _isContainer() { + return true; + }, + _getAS2Object: function () { + if (!this.$as2Object) { + new AS2Button().$attachNativeObject(this); + } + return this.$as2Object; + }, initialize: function () { this._downState = null; this._hitArea = null;