FWD.DY@5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! 5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! D,f D,# D,$ D,% D,& D,UD,D,D,*D,+=D,,]D,-D,.D,2)D,39D,fD,}D,5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! D,f D,# D,$ D,% D,& D,UD,D,D,*D,+=D,,]D,-D,.D,2)D,39D,fD,}D,t"t(Pttttt t!t#.t/Lt+5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! D,f D,# D,$ D,% D,& D,UD,D,D,*D,+=D,,]D,-D,.D,2)D,39D,fD,}D,t"t(Pttttt t!t#.t/Lt+@>@@@ <@ t@ 5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! D,f D,# D,$ D,% D,& D,UD,D,D,*D,+=D,,]D,-D,.D,2)D,39D,fD,}D,t"t(Pttttt t!t#.t/Lt+@>@@@ <@ t@ FBFqFrFFdFFFFFFFFFFF'F@F~FFFFPFrFFFFFF0F^FvFFF F% F7 FJ F\ Fh F F F F F !FN!F|!F!F!F!F!F!F"F1"Fg"F"F"F"F"F#FD#FF.#FWA#FkX#5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! D,f D,# D,$ D,% D,& D,UD,D,D,*D,+=D,,]D,-D,.D,2)D,39D,fD,}D,t"t(Pttttt t!t#.t/Lt+@>@@@ <@ t@ FBFqFrFFdFFFFFFFFFFF'F@F~FFFFPFrFFFFFF0F^FvFFF F% F7 FJ F\ Fh F F F F F !FN!F|!F!F!F!F!F!F"F1"Fg"F"F"F"F"F#FD#FF.#FWA#FkX#Y)))**7*O*****+3++++++,,,`,,,,,,-R---- .#..)/r///D0\00071a1112&2D2b222223U33333334B4g4444.5Z5 5 5 5656S6q667<77777768 O8#T8${8%8&8)8*$9+<9,S9-9/90&:3:4:5:6;8>;9;:;;6<>z<?<@<A=C>=Dk=E=G=J=K>Mn>N>O>Q>R>U?W?YDD EzEEF4FRFpFF[F^F`FbFd%GfNGfG5ϟ555B5f5555(5N5`5ס5 5515I55Т55575P5|555>5o555,5W55ť55 5 5 5 Ʀ55525b5 5!5#5$է5%5&5'5(45*Q5,5-5.ը50&51>53545>ԩ5?5@5B 5C&5D>5J5K5a5z55{F5|]5~n55{55Ҭ55.5G5Y5~55ݭ55L5^555ۮ5 575C5O5a555Ư55+575J5d5q5~555ݰ555E5i555 5*5D5555-535J5b55 x x HCx Iix Jx Kպx Lx Mqx Nx Ox P!x R5x SZx Tx Uȼx Wx [x \x ^x _ӽx ax bx h=x iWx nx sx }x ~x .x x ̿x ߿x x x x x x x x x x -x |x x x x x x x Dx x x x x x 9x hx tx x x x x !x ax x x x x x ?x ax !x x +x /x 0x 1.x 2Hx 3x .x =x Ax @"x QOx Uqx Tx ex ix hx n-x rOx sx ux qx {x 0x Jx \x ~x x x x  x .x rx x x x x :x Yx tx E>>>b>&>'>) >*>+<>-\>.n>/>0>2>3>5>>6P>8m>:>;><>=>>>C>D>E>F%>HD>IV>Jy>K>M>N>O>P>R>XN>Yl>Z~>[>\>]>^>_>a]>b>e>u>J6LQMPQRSTbVvWZ[H\y]_`abc"fMhlmMq3_   Aw{xz{|~%Cay/4m);Ydy 0Ul=Uo7BYs)HZ-7Jc /Fg    ax !"#!$B%m'~(+-.01&2I3b5z678;>?+BKGeHwJKLMRVSvTUVWXY]D`abdt@2CZ,QjTfx!^     1>K$H-:;<5=>?CO;P_RSTUW)XYZ"$&<(O?F0 F00@ F01R F02d F03v F04 F05 F06 F07 F08 F0: F0! D,f D,# D,$ D,% D,& D,UD,D,D,*D,+=D,,]D,-D,.D,2)D,39D,fD,}D,t"t(Pttttt t!t#.t/Lt+@>@@@ <@ t@ FBFqFrFFdFFFFFFFFFFF'F@F~FFFFPFrFFFFFF0F^FvFFF F% F7 FJ F\ Fh F F F F F !FN!F|!F!F!F!F!F!F"F1"Fg"F"F"F"F"F#FD#FF.#FWA#FkX#Y)))**7*O*****+3++++++,,,`,,,,,,-R---- .#..)/r///D0\00071a1112&2D2b222223U33333334B4g4444.5Z5 5 5 5656S6q667<77777768 O8#T8${8%8&8)8*$9+<9,S9-9/90&:3:4:5:6;8>;9;:;;6<>z<?<@<A=C>=Dk=E=G=J=K>Mn>N>O>Q>R>U?W?YDD EzEEF4FRFpFF[F^F`FbFd%GfNGfGFcom.greensock.plugins.TweenPlugin: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/plugins/TweenPlugin.as/** * VERSION: 1.4 * DATE: 2010-12-16 * AS2 * UPDATES AND DOCS AT: http://www.TweenMax.com **/ import com.greensock.*; import com.greensock.core.*; /** * TweenPlugin is the base class for all TweenLite/TweenMax plugins.

* * USAGE:
* * To create your own plugin, extend TweenPlugin and override whichever methods you need. Typically, * you only need to override onInitTween() and the changeFactor setter. I'd recommend looking at a * simple plugin like FramePlugin or ScalePlugin and using it as a template of sorts. There are a few * key concepts to keep in mind: *
    *
  1. In the constructor, set this.propName to whatever special property you want your plugin to handle.
  2. * *
  3. When a tween that uses your plugin initializes its tween values (normally when it starts), a new instance * of your plugin will be created and the onInitTween() method will be called. That's where you'll want to * store any initial values and prepare for the tween. onInitTween() should return a Boolean value that * essentially indicates whether or not the plugin initted successfully. If you return false, TweenLite/Max * will just use a normal tween for the value, ignoring the plugin for that particular tween.
  4. * *
  5. The changeFactor setter will be updated on every frame during the course of the tween with a multiplier * that describes the amount of change based on how far along the tween is and the ease applied. It will be * zero at the beginning of the tween and 1 at the end, but inbetween it could be any value based on the * ease applied (for example, an Elastic.easeOut tween would cause the value to shoot past 1 and back again before * the end of the tween). So if the tween uses the Linear.easeNone easing equation, when it's halfway finished, * the changeFactor will be 0.5.
  6. * *
  7. The overwriteProps is an Array that should contain the properties that your plugin should overwrite * when OverwriteManager's mode is AUTO and a tween of the same object is created. For example, the * autoAlpha plugin controls the "visible" and "alpha" properties of an object, so if another tween * is created that controls the alpha of the target object, your plugin's killProps() will be called * which should handle killing the "alpha" part of the tween. It is your responsibility to populate * (and depopulate) the overwriteProps Array. Failure to do so properly can cause odd overwriting behavior.
  8. * *
  9. Note that there's a "round" property that indicates whether or not values in your plugin should be * rounded to the nearest integer (compatible with TweenMax only). If you use the _tweens Array, populating * it through the addTween() method, rounding will happen automatically (if necessary) in the * updateTweens() method, but if you don't use addTween() and prefer to manually calculate tween values * in your changeFactor setter, just remember to accommodate the "round" flag if it makes sense in your plugin.
  10. * *
  11. If you need to run a block of code when the tween has finished, point the onComplete property to a * method you created inside your plugin.
  12. * *
  13. If you need to run a function when the tween gets disabled, point the onDisable property to a * method you created inside your plugin. Same for onEnable if you need to run code when a tween is * enabled. (A tween gets disabled when it gets overwritten or finishes or when its timeline gets disabled)
  14. * *
  15. Please use the same naming convention as the rest of the plugins, like MySpecialPropertyNamePlugin.
  16. * *
  17. IMPORTANT: The plugin framework is brand new, so there is a chance that it will change slightly over time and * you may need to adjust your custom plugins if the framework changes. I'll try to minimize the changes, * but I'd highly recommend getting a membership to Club GreenSock to make sure you get update notifications. * See http://blog.greensock.com/club/ for details.
  18. *
* * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.plugins.TweenPlugin { /** @private **/ public static var VERSION:Number = 1.4; /** @private **/ public static var API:Number = 1.0; //If the API/Framework for plugins changes in the future, this number helps determine compatibility /** Name of the special property that the plugin should intercept/handle **/ public var propName:String; /** * Array containing the names of the properties that should be overwritten in OverwriteManager's * AUTO mode. Typically the only value in this Array is the propName, but there are cases when it may * be different. For example, a bezier tween's propName is "bezier" but it can manage many different properties * like _x, _y, etc. depending on what's passed in to the tween. */ public var overwriteProps:Array; /** If the values should be rounded to the nearest integer, set this to true. **/ public var round:Boolean; /** Priority level in the render queue **/ public var priority:Number = 0; /** @private if the plugin actively changes properties of the target when it gets disabled (like the MotionBlurPlugin swaps out a temporary BitmapData for the target), activeDisplay should be true. Otherwise it should be false (it is much more common for it to be false). This is important because if it gets overwritten by another tween, that tween may init() with stale values - if activeDisable is true, it will force the new tween to re-init() when this plugin is overwritten (if ever). **/ public var activeDisable:Boolean; /** @private Called when the tween has finished initting all of the properties in the vars object (useful for things like roundProps which must wait for everything else to init). IMPORTANT: in order for the onInitAllProps to get called properly, you MUST set the TweenPlugin's "priority" property to a non-zero value (this is for optimization and file size purposes) **/ public var onInitAllProps:Function; /** Called when the tween is complete. **/ public var onComplete:Function; /** Called when the tween gets re-enabled after having been initted. Like if it finishes and then gets restarted later. **/ public var onEnable:Function; /** Called either when the plugin gets overwritten or when its parent tween gets killed/disabled **/ public var onDisable:Function; /** @private **/ private var _tweens:Array; /** @private **/ private var _changeFactor:Number; /** @private **/ public function TweenPlugin() { //constructor _tweens = []; _changeFactor = 0; } /** * Gets called when any tween of the special property begins. Store any initial values * and/or variables that will be used in the "changeFactor" setter when this method runs. * * @param target target object of the TweenLite instance using this plugin * @param value The value that is passed in through the special property in the tween. * @param tween The TweenLite or TweenMax instance using this plugin. * @return If the initialization failed, it returns false. Otherwise true. It may fail if, for example, the plugin requires that the target be a DisplayObject or has some other unmet criteria in which case the plugin is skipped and a normal property tween is used inside TweenLite */ public function onInitTween(target:Object, value:Object, tween:TweenLite):Boolean { addTween(target, this.propName, target[this.propName], value, this.propName); return true; } /** * Offers a simple way to add tweening values to the plugin. You don't need to use this, * but it is convenient because the tweens get updated in the updateTweens() method which also * handles rounding. killProps() nicely integrates with most tweens added via addTween() as well, * but if you prefer to handle this manually in your plugin, you're welcome to. * * @param object target object whose property you'd like to tween. (i.e. myClip) * @param propName the property name that should be tweened. (i.e. "_x") * @param start starting value * @param end end value (can be either numeric or a string value. If it's a string, it will be interpreted as relative to the starting value) * @param overwriteProp name of the property that should be associated with the tween for overwriting purposes. Normally, it's the same as propName, but not always. For example, you may tween the "changeFactor" property of a VisiblePlugin, but the property that it's actually controling in the end is "visible", so if a new overlapping tween of the target object is created that affects its "visible" property, this allows the plugin to kill the appropriate tween(s) when killProps() is called. */ private function addTween(object:Object, propName:String, start:Number, end:Object, overwriteProp:String):Void { if (end != undefined) { var change:Number = (typeof(end) == "number") ? Number(end) - start : Number(end); if (change != 0) { //don't tween values that aren't changing! It's a waste of CPU cycles _tweens[_tweens.length] = new PropTween(object, propName, start, change, overwriteProp || propName); } } } /** * Updates all the tweens in the _tweens Array. * * @param changeFactor Multiplier describing the amount of change that should be applied. It will be zero at the beginning of the tween and 1 at the end, but inbetween it could be any value based on the ease applied (for example, an Elastic tween would cause the value to shoot past 1 and back again before the end of the tween) */ private function updateTweens(changeFactor:Number):Void { var i:Number = _tweens.length, pt:PropTween; if (this.round) { var val:Number; while (--i > -1) { pt = _tweens[i]; val = pt.start + (pt.change * changeFactor); if (val > 0) { pt.target[pt.property] = (val + 0.5) >> 0; //4 times as fast as Math.round() } else { pt.target[pt.property] = (val - 0.5) >> 0; } } } else { while (--i > -1) { pt = _tweens[i]; pt.target[pt.property] = pt.start + (pt.change * changeFactor); } } } /** * In most cases, your custom updating code should go here. The changeFactor value describes the amount * of change based on how far along the tween is and the ease applied. It will be zero at the beginning * of the tween and 1 at the end, but inbetween it could be any value based on the ease applied (for example, * an Elastic tween would cause the value to shoot past 1 and back again before the end of the tween) * This value gets updated on every frame during the course of the tween. * * @param n Multiplier describing the amount of change that should be applied. It will be zero at the beginning of the tween and 1 at the end, but inbetween it could be any value based on the ease applied (for example, an Elastic tween would cause the value to shoot past 1 and back again before the end of the tween) */ public function get changeFactor():Number { return _changeFactor; } public function set changeFactor(n:Number):Void { updateTweens(n); _changeFactor = n; } /** * Gets called on plugins that have multiple overwritable properties by OverwriteManager when * in AUTO mode. Basically, it instructs the plugin to overwrite certain properties. For example, * if a bezier tween is affecting _x, _y, and _width, and then a new tween is created while the * bezier tween is in progress, and the new tween affects the "_x" property, we need a way * to kill just the "_x" part of the bezier tween. * * @param lookup An object containing properties that should be overwritten. We don't pass in an Array because looking up properties on the object is usually faster because it gives us random access. So to overwrite the "_x" and "_y" properties, a {_x:true, _y:true} object would be passed in. */ public function killProps(lookup:Object):Void { var i:Number = this.overwriteProps.length; while (--i > -1) { if (lookup[this.overwriteProps[i]]) { this.overwriteProps.splice(i, 1); } } i = _tweens.length; while (--i > -1) { if (lookup[_tweens[i].name]) { _tweens.splice(i, 1); } } } /** * @private * This method is called inside TweenLite after significant events occur, like when a tween * has finished initializing, when it has completed, and when its "enabled" property changes. * For example, the MotionBlurPlugin must run after normal _x/_y/_alpha PropTweens are rendered, * so the "init" event reorders the PropTweens linked list in order of priority. Some plugins * need to do things when a tween completes or when it gets disabled. Again, this * method is only for internal use inside TweenLite. It is separated into * this static method in order to minimize file size inside TweenLite. * * @param type The type of event "onInitAllProps", "onComplete", "onEnable", or "onDisable" * @param tween The TweenLite/Max instance to which the event pertains * @return A Boolean value indicating whether or not properties of the tween's target may have changed as a result of the event */ private static function onTweenEvent(type:String, tween:TweenLite):Boolean { var pt:PropTween = tween.cachedPT1, changed:Boolean; if (type == "onInitAllProps") { //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame. var tweens:Array = []; var i:Number = 0; while (pt) { tweens[i++] = pt; pt = pt.nextNode; } tweens.sortOn("priority", Array.NUMERIC | Array.DESCENDING); while (--i > -1) { tweens[i].nextNode = tweens[i + 1]; tweens[i].prevNode = tweens[i - 1]; } pt = tween.cachedPT1 = tweens[0]; } while (pt) { if (pt.isPlugin && pt.target[type]) { if (pt.target.activeDisable) { changed = true; } pt.target[type](); } pt = pt.nextNode; } return changed; } /** * Handles integrating the plugin into the GreenSock tweening platform. * * @param plugin An Array of Plugin classes (that all extend TweenPlugin) to be activated. For example, TweenPlugin.activate([FrameLabelPlugin, ShortRotationPlugin, TintPlugin]); */ public static function activate(plugins:Array):Boolean { TweenLite.onPluginEvent = TweenPlugin.onTweenEvent; var i:Number = plugins.length, instance:Object; while (i--) { if (plugins[i].API == 1) { instance = new plugins[i](); TweenLite.plugins[instance.propName] = plugins[i]; } } return true; } }tmx.utils.Delegate: /Users/cbull/Library/Application Support/Adobe/Flash CS6/en_US/Configuration/Classes/mx/utils/Delegate.as//**************************************************************************** //Copyright (C) 2003-2004 Macromedia, Inc. All Rights Reserved. //The following is Sample Code and is subject to all restrictions on //such code as contained in the End User License Agreement accompanying //this product. //**************************************************************************** /** The Delegate class creates a function wrapper to let you run a function in the context of the original object, rather than in the context of the second object, when you pass a function from one object to another. */ class mx.utils.Delegate extends Object { /** Creates a functions wrapper for the original function so that it runs in the provided context. @parameter obj Context in which to run the function. @paramater func Function to run. */ static function create(obj:Object, func:Function):Function { var f = function() { var target = arguments.callee.target; var func = arguments.callee.func; return func.apply(target, arguments); }; f.target = obj; f.func = func; return f; } function Delegate(f:Function) { func = f; } private var func:Function; function createDelegate(obj:Object):Function { return create(obj, func); } } com.greensock.plugins.MotionBlurPlugin: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/plugins/MotionBlurPlugin.as/** * VERSION: 2.05 * DATE: 2011-09-21 * AS2 * UPDATES AND DOCS AT: http://www.greensock.com **/ import com.greensock.*; import com.greensock.core.*; import com.greensock.plugins.*; import flash.display.*; import flash.filters.BlurFilter; import flash.geom.*; /** * MotionBlurPlugin provides an easy way to apply a directional blur to a MovieClip based on its velocity * and angle of movement in 2D (_x/_y). This creates a much more realistic effect than a standard BlurFilter for * several reasons: *
    *
  1. A regular BlurFilter is limited to blurring horizontally and/or vertically whereas the motionBlur * gets applied at the angle at which the object is moving.
  2. * *
  3. A BlurFilter tween has static start/end values whereas a motionBlur tween dynamically adjusts the * values on-the-fly during the tween based on the velocity of the object. So if you use a Strong.easeInOut * for example, the strength of the blur will start out low, then increase as the object moves faster, and * reduce again towards the end of the tween.
  4. *
* * motionBlur even works on bezier/bezierThrough tweens!

* * To accomplish the effect, MotionBlurPlugin creates a Bitmap that it places over the original object, changing * _alpha of the original to [almost] zero during the course of the tween. The original MovieClip still follows the * course of the tween, so Mouse events are properly dispatched. You shouldn't notice any loss of interactivity. * The MovieClip can also have animated contents - MotionBlurPlugin automatically updates on every frame. * Be aware, however, that as with most filter effects, MotionBlurPlugin is somewhat CPU-intensive, so it is not * recommended that you tween large quantities of objects simultaneously. You can activate fastMode * to significantly speed up rendering if the object's contents and size/color doesn't need to change during the * course of the tween.

* * motionBlur recognizes the following properties: * * * You can optionally set motionBlur to the Boolean value of true in order to use the defaults. (see below for examples)

* * Also note that due to a bug in Flash, if you apply motionBlur to an object that was masked in the Flash IDE it won't work * properly - you must apply the mask via ActionScript instead.

* * USAGE:

* * import com.greensock.~~;
* import com.greensock.plugins.~~;
* TweenPlugin.activate([MotionBlurPlugin]); //only do this once in your SWF to activate the plugin

* * TweenMax.to(mc, 2, {_x:400, _y:300, motionBlur:{strength:1.5, fastMode:true, padding:15}});

* * //or to use the default values, you can simply pass in the Boolean "true" instead:
* TweenMax.to(mc, 2, {_x:400, _y:300, motionBlur:true});

*
* * MotionBlurPlugin is a Club GreenSock membership benefit. * You must have a valid membership to use this class without violating the terms of use. Visit * http://www.greensock.com/club/ to sign up or get more details.

* * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.plugins.MotionBlurPlugin extends TweenPlugin { /** @private **/ public static var API:Number = 1.0; //If the API/Framework for plugins changes in the future, this number helps determine compatibility /** @private **/ private static var _DEG2RAD:Number = Math.PI / Math.PI; //precomputation for speed /** @private **/ private static var _RAD2DEG:Number = Math.PI / Math.PI; //precomputation for speed; /** @private **/ private static var _point:Point = new Point(0, 0); /** @private **/ private static var _ct:ColorTransform = new ColorTransform(); /** @private **/ private static var _blankArray:Array = []; /** @private **/ private var _target:MovieClip; /** @private **/ private var _time:Number; /** @private **/ private var _xCurrent:Number; /** @private **/ private var _yCurrent:Number; /** @private **/ private var _bd:BitmapData; /** @private **/ private var _bitmap:MovieClip; /** @private **/ private var _strength:Number; /** @private **/ private var _tween:TweenLite; /** @private **/ private var _blur:BlurFilter; /** @private **/ private var _matrix:Matrix; /** @private **/ private var _container:MovieClip; /** @private **/ private var _rect:Rectangle; /** @private **/ private var _angle:Number; /** @private **/ private var _alpha:Number; /** @private **/ private var _xRef:Number; //we keep recording this value every time the _target moves at least 2 pixels in either direction in order to accurately determine the angle (small measurements don't produce accurate results). /** @private **/ private var _yRef:Number; /** @private **/ private var _mask:MovieClip; /** @private **/ private var _padding:Number; /** @private **/ private var _bdCache:BitmapData; /** @private **/ private var _rectCache:Rectangle; /** @private **/ private var _cos:Number; /** @private **/ private var _sin:Number; /** @private **/ private var _smoothing:Boolean; /** @private **/ private var _xOffset:Number; /** @private **/ private var _yOffset:Number; /** @private **/ private var _cached:Boolean; /** @private **/ private var _fastMode:Boolean; /** @private **/ public function MotionBlurPlugin() { super(); this.propName = "motionBlur"; //name of the special property that the plugin should intercept/manage this.overwriteProps = ["motionBlur"]; this.onComplete = disable; this.onDisable = onTweenDisable; _blur = new BlurFilter(0, 0, 2); _matrix = new Matrix(); _strength = 0.05; TextField.prototype.getBounds = MovieClip.prototype.getBounds; TextField.prototype.swapDepths = MovieClip.prototype.swapDepths; this.priority = -2; //so that the _x/_y/_alpha tweens occur BEFORE the motion blur is applied (we need to determine the angle at which it moved first) this.activeDisable = true; } /** @private **/ public function onInitTween(target:Object, value:Object, tween:TweenLite):Boolean { if (typeof(target) != "movieclip" && !(target instanceof TextField)) { trace("motionBlur tweens only work for MovieClips and TextFields"); return false; } else if (value == false) { _strength = 0; } else if (typeof(value) == "object") { _strength = (value.strength || 1) * 0.05; _blur.quality = Number(value.quality) || 2; _fastMode = Boolean(value.fastMode == true); } var mc = target; //to get around data type error _target = mc; _tween = tween; _time = 0; _padding = (value.padding != undefined) ? Math.round(value.padding) : 10; _smoothing = Boolean(_blur.quality > 1); _xCurrent = _xRef = _target._x; _yCurrent = _yRef = _target._y; _alpha = _target._alpha; _mask = value.mask; if (_tween.propTweenLookup._x != undefined && _tween.propTweenLookup._y != undefined && !_tween.propTweenLookup._x.isPlugin && !_tween.propTweenLookup._y.isPlugin) { //if the tweens are plugins, like bezier or bezierThrough for example, we cannot assume the angle between the current _x/_y and the destination ones is what it should start at! _angle = Math.PI - Math.atan2(_tween.propTweenLookup._y.change, _tween.propTweenLookup._x.change); } else if (_tween.vars._x != undefined || _tween.vars._y != undefined) { var x:Number = _tween.vars._x || _target._x; var y:Number = _tween.vars._y || _target._y; _angle = Math.PI - Math.atan2((y - _target._y), (x - _target._x)); } else { _angle = 0; } _cos = Math.cos(_angle); _sin = Math.sin(_angle); _bd = new BitmapData(_target._width + _padding * 2, _target._height + _padding * 2, true, 0x00FFFFFF); _bdCache = _bd.clone(); _rectCache = new Rectangle(0, 0, _bd.width, _bd.height); _rect = _rectCache.clone(); return true; } /** @private **/ private function disable():Void { if (_strength != 0) { _target._alpha = _alpha; } if (_container._parent != undefined) { _container.swapDepths(_target); if (_mask) { _container.setMask(null); _target.setMask(_mask); } removeMovieClip(_container); } } /** @private **/ private function onTweenDisable():Void { if (_tween.cachedTime != _tween.cachedDuration && _tween.cachedTime != 0) { //if the tween is on a TimelineLite/Max that eventually completes, another tween might have affected the target's alpha in which case we don't want to mess with it - only disable() if it's mid-tween. Also remember that from() tweens will complete at a value of 0, not 1. disable(); } } /** @private **/ public function set changeFactor(n:Number):Void { var time:Number = (_tween.cachedTime - _time); if (time < 0) { time = -time; //faster than Math.abs(_tween.cachedTime - _time) } if (time < 0.0000001) { return; //number is too small - floating point errors will cause it to render incorrectly } var dx:Number = _target._x - _xCurrent; var dy:Number = _target._y - _yCurrent; var rx:Number = _target._x - _xRef; var ry:Number = _target._y - _yRef; _changeFactor = n; if (rx > 2 || ry > 2 || rx < -2 || ry < -2) { //setting a tolerance of 2 pixels helps eliminate floating point error funkiness. _angle = Math.PI - Math.atan2(ry, rx); _cos = Math.cos(_angle); _sin = Math.sin(_angle); _xRef = _target._x; _yRef = _target._y; } _blur.blurX = Math.sqrt(dx * dx + dy * dy) * _strength / time; _xCurrent = _target._x; _yCurrent = _target._y; _time = _tween.cachedTime; if (_container._parent != _target._parent) { _container = _target._parent.createEmptyMovieClip(_target._name + "_motionBlur", _target._parent.getNextHighestDepth()); _bitmap = _container.createEmptyMovieClip("bitmap", 0); _bitmap.attachBitmap(_bd, 0, "auto", _smoothing); if (_mask) { _target.setMask(null); _container.setMask(_mask); } _container.swapDepths(_target); } if (_target._parent == undefined || n == 0) { //when the strength/blur is less than zero can cause the appearance of vibration. Also, if the _target was removed from the stage, we should remove the Bitmap too disable(); return; } if (!_fastMode || !_cached) { var parentFilters:Array = _target._parent.filters; if (parentFilters.length != 0) { _target._parent.filters = _blankArray; //if the _parent has filters, it will choke when we move the child object (_target) to _x/_y of 20,000/20,000. } _target._x = _target._y = 20000; //get it away from everything else; var prevVisible:Boolean = _target._visible; _target._visible = true; var minMax:Object = _target.getBounds(_target._parent); var bounds:Rectangle = new Rectangle(minMax.xMin, minMax.yMin, minMax.xMax - minMax.xMin, minMax.yMax - minMax.yMin); if (bounds.width + _blur.blurX * 2 > 2870) { //in case it's too big and would exceed the 2880 maximum in Flash _blur.blurX = (bounds.width >= 2870) ? 0 : (2870 - bounds.width) * 0.5; } _xOffset = 20000 - bounds.x + _padding; _yOffset = 20000 - bounds.y + _padding; bounds.width += _padding * 2; bounds.height += _padding * 2; if (bounds.height > _bdCache.height || bounds.width > _bdCache.width) { _bdCache = new BitmapData(bounds.width, bounds.height, true, 0x00FFFFFF); _rectCache = new Rectangle(0, 0, _bdCache.width, _bdCache.height); _bitmap.attachBitmap(_bd, 0, "auto", _smoothing); } _matrix.tx = _padding - bounds.x; _matrix.ty = _padding - bounds.y; _matrix.a = _matrix.d = 1; _matrix.b = _matrix.c = 0; bounds.x = bounds.y = 0; if (_target._alpha == 0.390625) { _target._alpha = _alpha; } else { //means the tween is affecting alpha, so respect it. _alpha = _target._alpha; } _bdCache.fillRect(_rectCache, 0x00FFFFFF); _bdCache.draw(_target._parent, _matrix, _ct, "normal", bounds, _smoothing); _target._visible = prevVisible; _target._x = _xCurrent; _target._y = _yCurrent; if (parentFilters.length != 0) { _target._parent.filters = parentFilters; } _cached = true; } else if (_target._alpha != 0.390625) { //means the tween is affecting alpha, so respect it. _alpha = _target._alpha; } _target._alpha = 0.390625; //use 0.390625 instead of 0 so that we can identify if it was changed outside of this plugin next time through. We were running into trouble with tweens of alpha to 0 not being able to make the final value because of the conditional logic in this plugin. _matrix.tx = _matrix.ty = 0; _matrix.a = _cos; _matrix.b = _sin; _matrix.c = -_sin; _matrix.d = _cos; var width:Number, height:Number, val:Number; if ((width = _matrix.a * _bdCache.width) < 0) { _matrix.tx = -width; width = -width; } if ((val = _matrix.c * _bdCache.height) < 0) { _matrix.tx -= val; width -= val; } else { width += val; } if ((height = _matrix.d * _bdCache.height) < 0) { _matrix.ty = -height; height = -height; } if ((val = _matrix.b * _bdCache.width) < 0) { _matrix.ty -= val; height -= val; } else { height += val; } width += _blur.blurX * 2; _matrix.tx += _blur.blurX; if (width > _bd.width || height > _bd.height) { _bd = new BitmapData(width, height, true, 0x00FFFFFF); _rect = new Rectangle(0, 0, _bd.width, _bd.height); _bitmap.attachBitmap(_bd, 0, "auto", _smoothing); } _bd.fillRect(_rect, 0x00FFFFFF); _bd.draw(_bdCache, _matrix, _ct, "normal", _rect, _smoothing); _bd.applyFilter(_bd, _rect, _point, _blur); _bitmap._x = 0 - (_matrix.a * _xOffset + _matrix.c * _yOffset + _matrix.tx); _bitmap._y = 0 - (_matrix.d * _yOffset + _matrix.b * _xOffset + _matrix.ty); _matrix.b = -_sin; _matrix.c = _sin; _matrix.tx = _xCurrent; _matrix.ty = _yCurrent; _container.transform.matrix = _matrix; } }x com.greensock.core.TweenCore: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/core/TweenCore.as/** * VERSION: 1.693 * DATE: 2011-11-07 * AS2 (AS3 version is also available) * UPDATES AND DOCS AT: http://www.greensock.com **/ import com.greensock.*; import com.greensock.core.*; /** * TweenCore is the base class for all TweenLite, TweenMax, TimelineLite, and TimelineMax classes and * provides core functionality and properties. There is no reason to use this class directly.

* * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.core.TweenCore { /** @private **/ public static var version:Number = 1.693; /** @private **/ private static var _classInitted:Boolean; /** @private Delay in seconds (or frames for frames-based TweenCores) **/ private var _delay:Number; /** @private Has onUpdate. Tracking this as a Boolean value is faster than checking this.vars.onUpdate == null. **/ private var _hasUpdate:Boolean; /** @private Primarily used for zero-duration TweenCores to determine the direction/momentum of time which controls whether the starting or ending values should be rendered. For example, if a zero-duration tween renders and then its timeline reverses and goes back before the startTime, the zero-duration tween must render the starting values. Otherwise, if the render time is zero or later, it should always render the ending values. **/ private var _rawPrevTime:Number; /** Stores variables (things like alpha, y or whatever we're tweening as well as special properties like "onComplete"). **/ public var vars:Object; /** @private The tween has begun and is now active **/ public var active:Boolean; /** @private Flagged for garbage collection **/ public var gc:Boolean; /** @private Indicates whether or not initTweenVals() has been called (where all the tween property start/end value information is recorded) **/ public var initted:Boolean; /** Every tween belongs to one timeline. By default, it uses the TweenLite.rootTimeline (or TweenLite.rootFramesTimeline for frames-based TweenCores). **/ public var timeline:SimpleTimeline; /** @private Start time in seconds (or frames for frames-based TweenCores), according to its position on its parent timeline **/ public var cachedStartTime:Number; /** @private If a tween is going to repeat, its cachedTime will reset even though the cachedTotalTime continues linearly (or if it yoyos, the cachedTime may go forwards and backwards several times over the course of the tween). The cachedTime reflects the tween's "local" (which can never exceed the duration) time whereas the cachedTotalTime reflects the overall time. These will always match if the tween doesn't repeat/yoyo.**/ public var cachedTime:Number; /** @private The last rendered totalTime of this tween. It is prefaced with "cached" because using a public property like this is faster than using the getter which is essentially a function call. If you want to update the value, you should always use the normal property, like myTween.totalTime = 0.5.**/ public var cachedTotalTime:Number; /** @private Prefaced with "cached" because using a public property like this is faster than using the getter which is essentially a function call. If you want to update the value, you should always use the normal property, like myTween.duration = 0.5.**/ public var cachedDuration:Number; /** @private Prefaced with "cached" because using a public property like this is faster than using the getter which is essentially a function call. If you want to update the value, you should always use the normal property, like myTween.totalDuration = 0.5.**/ public var cachedTotalDuration:Number; /** @private parent timeline's rawTime at which the tween/timeline was paused (so that we can place it at the appropriate time when it is unpaused). NaN when the tween/timeline isn't paused. **/ public var cachedPauseTime:Number; /** @private timeScale allows you to slow down or speed up a tween/timeline. 1 = normal speed, 0.5 = half speed, 2 = double speed, etc. It is prefaced with "cached" because using a public property like this is faster than using the getter which is essentially a function call. If you want to update the value, you should always use the normal property, like myTween.timeScale = 2**/ public var cachedTimeScale:Number; /** @private Indicates whether or not the tween is reversed. **/ public var cachedReversed:Boolean; /** @private Next TweenCore object in the linked list.**/ public var nextNode:TweenCore; /** @private Previous TweenCore object in the linked list**/ public var prevNode:TweenCore; /** @private When a TweenCore has been removed from its timeline, it is considered an orphan. When it it added to a timeline, it is no longer an orphan. We don't just set its "timeline" property to null because we need to always keep track of the timeline in case the TweenCore is enabled again by restart() or basically any operation that would cause it to become active again. "cachedGC" is different in that a TweenCore could be eligible for gc yet not removed from its timeline, like when a TimelineLite completes for example. **/ public var cachedOrphan:Boolean; /** @private Indicates that the duration or totalDuration may need refreshing (like if a TimelineLite's child had a change in duration or startTime). This is another performance booster because if the cache isn't dirty, we can quickly read from the cachedDuration and/or cachedTotalDuration**/ public var cacheIsDirty:Boolean; /** @private Quicker way to read the paused property. It is public for speed purposes. When setting the paused state, always use the regular "paused" property.**/ public var cachedPaused:Boolean; /** Place to store any data you want.**/ public var data:Object; public function TweenCore(duration:Number, vars:Object) { this.vars = vars || {}; this.cachedDuration = this.cachedTotalDuration = duration || 0; _delay = Number(this.vars.delay) || 0; this.cachedTimeScale = this.vars.timeScale || 1; this.active = Boolean(duration == 0 && _delay == 0 && this.vars.immediateRender != false); this.cachedTotalTime = this.cachedTime = 0; this.data = this.vars.data; this.gc = this.initted = this.cacheIsDirty = this.cachedPaused = this.cachedReversed = false; _rawPrevTime = -1; if (!_classInitted) { if (TweenLite.rootFrame == undefined && TweenLite.initClass != undefined) { //Flash 6 instantiates the classes in a very odd order, so we need to check to make sure initClass exists first to work around the problem. TweenLite.initClass(); _classInitted = true; } else { return; } } var tl:SimpleTimeline = (this.vars.timeline instanceof SimpleTimeline) ? this.vars.timeline : (this.vars.useFrames == true) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; tl.insert(this, tl.cachedTotalTime); if (this.vars.reversed) { this.cachedReversed = true; } if (this.vars.paused) { this.paused = true; } } /** Starts playing forwards from the current position. (essentially unpauses and makes sure that it is not reversed) **/ public function play():Void { this.reversed = false; this.paused = false; } /** Pauses the tween/timeline **/ public function pause():Void { this.paused = true; } /** Starts playing from the current position without altering direction (forward or reversed). **/ public function resume():Void { this.paused = false; } /** * Restarts and begins playing forward. * * @param includeDelay Determines whether or not the delay (if any) is honored in the restart() * @param suppressEvents If true, no events or callbacks will be triggered as the "virtual playhead" moves to the new position (onComplete, onUpdate, onReverseComplete, etc. of this tween/timeline and any of its child tweens/timelines won't be triggered, nor will any of the associated events be dispatched) */ public function restart(includeDelay:Boolean, suppressEvents:Boolean):Void { this.reversed = false; this.paused = false; this.setTotalTime((includeDelay) ? -_delay : 0, Boolean(suppressEvents != false)); } /** * Reverses smoothly, adjusting the startTime to avoid any skipping. After being reversed, * it will play backwards, exactly opposite from its forward orientation, meaning that, for example, a * tween's easing equation will appear reversed as well. If a tween/timeline plays for 2 seconds and gets * reversed, it will play for another 2 seconds to return to the beginning. * * @param forceResume If true, it will resume() immediately upon reversing. Otherwise its paused state will remain unchanged. */ public function reverse(forceResume:Boolean):Void { this.reversed = true; if (forceResume != false) { this.paused = false; } else if (this.gc) { this.setEnabled(true, false); } } /** * @private * Renders the TweenCore at a particular time (or frame number for frames-based tweens). * The time is based simply on the overall duration. For example, if a TweenCore's duration * is 3, renderTime(1.5) would render it at the halfway finished point. * * @param time time (or frame number for frames-based TweenCores) to render. * @param suppressEvents If true, no events or callbacks will be triggered for this render (like onComplete, onUpdate, onReverseComplete, etc.) * @param force Normally the tween will skip rendering if the time matches the cachedTotalTime (to improve performance), but if force is true, it forces a render. This is primarily used internally for tweens with durations of zero in TimelineLite/Max instances. */ public function renderTime(time:Number, suppressEvents:Boolean, force:Boolean):Void { } /** * Forces the tween/timeline to completion. * * @param skipRender to skip rendering the final state of the tween, set skipRender to true (it's false by default). * @param suppressEvents If true, no events or callbacks will be triggered for this render (like onComplete, onUpdate, onReverseComplete, etc.) */ public function complete(skipRender:Boolean, suppressEvents:Boolean):Void { if (!skipRender) { renderTime(this.totalDuration, suppressEvents, false); //forces the final render return; //renderTime() will call complete() again, so just return here. } if (this.timeline.autoRemoveChildren) { this.setEnabled(false, false); } else { this.active = false; } if (!suppressEvents) { if (this.vars.onComplete && this.cachedTotalTime >= this.cachedTotalDuration && !this.cachedReversed) { //note: remember that tweens can have a duration of zero in which case their cachedTime and cachedDuration would always match. Also, TimelineLite/Max instances with autoRemoveChildren may have a cachedTotalTime that exceeds cachedTotalDuration because the children were removed after the last render. this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams); } else if (this.cachedReversed && this.cachedTotalTime == 0 && this.vars.onReverseComplete) { this.vars.onReverseComplete.apply(this.vars.onReverseCompleteScope, this.vars.onReverseCompleteParams); } } } /** * Clears any initialization data like starting values in tweens/timelines which can be useful if, for example, * you want to restart it without reverting to any previously recorded starting values. When you invalidate() * a tween/timeline, it will be re-initialized the next time it renders and its vars object will be re-parsed. * The timing of the tween/timeline (duration, startTime, delay) will NOT be affected. Another example would be if you * have a TweenMax(mc, 1, {_x:100, _y:100}) that ran when mc._x and mc._y were initially at 0, but now mc._x * and mc._y are 200 and you want them tween to 100 again, you could simply invalidate() the tween and * restart() it. Without invalidating() first, restarting it would cause the values jump back to 0 immediately * (where they started when the tween originally began). When you invalidate a timeline, it automatically invalidates * all of its children. **/ public function invalidate():Void { } /** * @private * If a TweenCore is enabled, it is eligible to be rendered (unless it is paused). Setting enabled to * false essentially removes it from its timeline and makes it eligible for garbage collection internally. * * @param enabled Enabled state of the TweenCore * @param ignoreTimeline By default, the TweenCore will remove itself from its timeline when it is disabled, and add itself when it is enabled, but this parameter allows you to override that behavior. * @return Boolean value indicating whether or not important properties may have changed when the TweenCore was enabled/disabled. For example, when a motionBlur (plugin) is disabled, it swaps out a BitmapData for the target and may alter the alpha. We need to know this in order to determine whether or not a new tween that is overwriting this one should be re-initted() with the changed properties. */ public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean):Boolean { this.gc = !enabled; if (enabled) { this.active = Boolean(!this.cachedPaused && this.cachedTotalTime > 0 && this.cachedTotalTime < this.cachedTotalDuration); if (ignoreTimeline != true && this.cachedOrphan) { this.timeline.insert(this, this.cachedStartTime - _delay); } } else { this.active = false; if (ignoreTimeline != true && !this.cachedOrphan) { this.timeline.remove(this, true); } } return false; } /** Kills the TweenCore, stopping it immediately. **/ public function kill():Void { setEnabled(false, false); } /** * @private * Sets the cacheIsDirty property of all anscestor timelines (and optionally this tween/timeline too). Setting * the cacheIsDirty property to true forces any necessary recalculation of its cachedDuration and cachedTotalDuration * properties and sorts the affected timelines' children TweenCores so that they're in the proper order * next time the duration or totalDuration is requested. We don't just recalculate them immediately because * it can be much faster to do it this way. * * @param includeSelf indicates whether or not this tween's cacheIsDirty property should be affected. */ private function setDirtyCache(includeSelf:Boolean):Void { var tween:TweenCore = (includeSelf != false) ? this : this.timeline; while (tween) { tween.cacheIsDirty = true; tween = tween.timeline; } } /** * @private * Sort of like placing the local "playhead" at a particular totalTime and then aligning it with * the parent timeline's "playhead" so that rendering continues from that point smoothly. This * changes the cachedStartTime. * * @param time Time that should be rendered (includes any repeats and repeatDelays for TimelineMax) * @param suppressEvents If true, no events or callbacks will be triggered for this render (like onComplete, onUpdate, onReverseComplete, etc.) **/ private function setTotalTime(time:Number, suppressEvents:Boolean):Void { if (this.timeline) { var tlTime:Number = (this.cachedPaused) ? this.cachedPauseTime : this.timeline.cachedTotalTime; if (this.cachedReversed) { var dur:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; this.cachedStartTime = tlTime - ((dur - time) / this.cachedTimeScale); } else { this.cachedStartTime = tlTime - (time / this.cachedTimeScale); } if (!this.timeline.cacheIsDirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the anscestors as dirty too, so skip the function call here. setDirtyCache(false); } if (this.cachedTotalTime != time) { renderTime(time, suppressEvents, false); } } } //---- GETTERS / SETTERS ------------------------------------------------------------ /** * Length of time in seconds (or frames for frames-based tweens) before the tween should begin. * The tween's starting values are not determined until after the delay has expired (except in from() tweens) **/ public function get delay():Number { return _delay; } public function set delay(n:Number):Void { this.startTime += (n - _delay); _delay = n; } /** * Duration of the tween in seconds (or frames for frames-based tweens/timelines) not including any repeats * or repeatDelays. totalDuration, by contrast, does include repeats and repeatDelays. If you alter * the duration of a tween while it is in-progress (active), its startTime will automatically * be adjusted in order to make the transition smoothly (without a sudden skip). **/ public function get duration():Number { return this.cachedDuration; } public function set duration(n:Number):Void { var ratio:Number = n / this.cachedDuration; this.cachedDuration = this.cachedTotalDuration = n; setDirtyCache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration. if (this.active && !this.cachedPaused && n != 0) { this.setTotalTime(this.cachedTotalTime * ratio, true); } } /** * Duration of the tween in seconds (or frames for frames-based tweens/timelines) including any repeats * or repeatDelays. "duration", by contrast, does NOT include repeats and repeatDelays. So if a * TweenMax's duration is 1 and it has a repeat of 2, the totalDuration would be 3. **/ public function get totalDuration():Number { return this.cachedTotalDuration; } public function set totalDuration(n:Number):Void { this.duration = n; } /** * Most recently rendered time (or frame for frames-based tweens/timelines) according to its * duration. totalTime, by contrast, is based on its totalDuration * which includes repeats and repeatDelays. Since TweenLite and TimelineLite don't offer * repeat and repeatDelay functionality, currentTime * and totalTime will always be the same but in TweenMax or TimelineMax, they * could be different. For example, if a TimelineMax instance has a duration * of 5 a repeat of 1 (meaning its totalDuration is 10), at the end of the second cycle, * currentTime would be 5 whereas totalTime would be 10. If you tracked both * properties over the course of the tween, you'd see currentTime go from 0 to 5 twice (one for each * cycle) in the same time it takes totalTime go from 0 to 10. **/ public function get currentTime():Number { return this.cachedTime; } public function set currentTime(n:Number):Void { setTotalTime(n, false); } /** * Most recently rendered time (or frame for frames-based tweens/timelines) according to its * totalDuration. currentTime, by contrast, is based on its duration * which does NOT include repeats and repeatDelays. Since TweenLite and TimelineLite don't offer * repeat and repeatDelay functionality, currentTime * and totalTime will always be the same but in TweenMax or TimelineMax, they * could be different. For example, if a TimelineMax instance has a duration * of 5 a repeat of 1 (meaning its totalDuration is 10), at the end of the second cycle, * currentTime would be 5 whereas totalTime would be 10. If you tracked both * properties over the course of the tween, you'd see currentTime go from 0 to 5 twice (one for each * cycle) in the same time it takes totalTime go from 0 to 10. **/ public function get totalTime():Number { return this.cachedTotalTime; } public function set totalTime(n:Number):Void { setTotalTime(n, false); } /** Start time in seconds (or frames for frames-based tweens/timelines), according to its position on its parent timeline **/ public function get startTime():Number { return this.cachedStartTime; } public function set startTime(n:Number):Void { if (this.timeline != undefined && (n != this.cachedStartTime || this.gc)) { this.timeline.insert(this, n - _delay); //ensures that any necessary re-sequencing of TweenCores in the timeline occurs to make sure the rendering order is correct. } else { this.cachedStartTime = n; } } /** Indicates the reversed state of the tween/timeline. This value is not affected by yoyo repeats and it does not take into account the reversed state of anscestor timelines. So for example, a tween that is not reversed might appear reversed if its parent timeline (or any ancenstor timeline) is reversed. **/ public function get reversed():Boolean { return this.cachedReversed; } public function set reversed(b:Boolean):Void { if (b != this.cachedReversed) { this.cachedReversed = b; setTotalTime(this.cachedTotalTime, true); } } /** Indicates the paused state of the tween/timeline. This does not take into account anscestor timelines. So for example, a tween that is not paused might appear paused if its parent timeline (or any ancenstor timeline) is paused. **/ public function get paused():Boolean { return this.cachedPaused; } public function set paused(b:Boolean):Void { if (b != this.cachedPaused && this.timeline) { if (b) { this.cachedPauseTime = this.timeline.rawTime; } else { this.cachedStartTime += this.timeline.rawTime - this.cachedPauseTime; this.cachedPauseTime = NaN; setDirtyCache(false); } this.cachedPaused = b; this.active = Boolean(!this.cachedPaused && this.cachedTotalTime > 0 && this.cachedTotalTime < this.cachedTotalDuration); } if (!b && this.gc) { this.setEnabled(true, false); } } }D,com.greensock.easing.CustomEase: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/easing/CustomEase.as/** * VERSION: 1.01 * DATE: 7/15/2009 * AS2 (AS3 is also available) * UPDATES AND DOCUMENTATION AT: http://blog.greensock.com/customease/ **/ import mx.utils.Delegate; /** * Facilitates creating custom bezier eases with the GreenSock Custom Ease Builder tool. It's essentially * a place to store the bezier segment information for each ease instead of recreating it inside each * function call which would slow things down. Please use the interactive tool available at * http://blog.greensock.com/customease/ to generate the necessary code. * * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.easing.CustomEase { public static var VERSION:Number = 1.01; private static var _all:Object = {}; //keeps track of all CustomEase instances. private var _segments:Array; private var _name:String; public var ease:Function; public static function create(name:String, segments:Array):Function { var b:CustomEase = new CustomEase(name, segments); return b.ease; } public static function byName(name:String):Function { return _all[name].ease; } public function CustomEase(name:String, segments:Array) { _name = name; _segments = segments; _all[name] = this; this.ease = Delegate.create(this, easeProxy); //to ensure scope is right. } public function easeProxy(time:Number, start:Number, change:Number, duration:Number):Number { var factor:Number = time / duration, qty:Number = _segments.length, t:Number, b:Object; var i:Number = (qty * factor) >> 0; t = (factor - (i * (1 / qty))) * qty; b = _segments[i]; return start + change * (b.s + t * (2 * (1 - t) * (b.cp - b.s) + t * (b.e - b.s))); } public function destroy():Void { _segments = null; delete _all[_name]; } }F0com.greensock.core.PropTween: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/core/PropTween.as/** * VERSION: 2.1 * DATE: 2009-09-12 * AS2 (AS3 version is also available) * UPDATES AND DOCUMENTATION AT: http://www.TweenLite.com **/ /** * Stores information about an individual property tween. There is no reason to use this class directly - TweenLite, TweenMax, and some plugins use it internally.

* * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.core.PropTween { /** Target object **/ public var target:Object; /** Name of the property that is being tweened **/ public var property:String; /** Starting value **/ public var start:Number; /** Amount to change (basically, the difference between the starting value and ending value) **/ public var change:Number; /** Alias to associate with the PropTween which is typically the same as the property, but can be different, particularly for plugins. **/ public var name:String; /** Priority in the rendering queue. The lower the value the later it will be tweened. Typically all PropTweens get a priority of 0, but some plugins must be rendered later (or earlier) **/ public var priority:Number; /** If the target of the PropTween is a TweenPlugin, isPlugin should be true. **/ public var isPlugin:Boolean; /** Next PropTween in the linked list **/ public var nextNode:PropTween; /** Previous PropTween in the linked list **/ public var prevNode:PropTween; /** * Constructor * * @param target Target object * @param property Name of the property that is being tweened * @param start Starting value * @param change Amount to change (basically, the difference between the starting value and ending value) * @param name Alias to associate with the PropTween which is typically the same as the property, but can be different, particularly for plugins. * @param isPlugin If the target of the PropTween is a TweenPlugin, isPlugin should be true. * @param nextNode Next PropTween in the linked list * @param priority Priority in the rendering queue. The lower the value the later it will be tweened. Typically all PropTweens get a priority of 0, but some plugins must be rendered later (or earlier) */ public function PropTween(target:Object, property:String, start:Number, change:Number, name:String, isPlugin:Boolean, nextNode:PropTween, priority:Number) { this.target = target; this.property = property; this.start = start; this.change = change; this.name = name; this.isPlugin = isPlugin; if (nextNode) { nextNode.prevNode = this; this.nextNode = nextNode; } this.priority = priority || 0; } }5com.greensock.TweenNano: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/TweenNano.as/** * VERSION: 1.06 * DATE: 2011-01-12 * AS2 (AS3 is also available) * UPDATES AND DOCS AT: http://www.greensock.com **/ /** * TweenNano is a super-lightweight (1.6k in AS3 and 2k in AS2) version of TweenLite * and is only recommended for situations where you absolutely cannot afford the extra 3.3k (5.3k total) that the normal * TweenLite engine would cost and your project doesn't require any plugins. Otherwise, I'd strongly advocate using * TweenLite because of the additional flexibility it provides via plugins and compatibility with TimelineLite and TimelineMax. * TweenNano can do everything TweenLite can do with the following exceptions: * * *
* SPECIAL PROPERTIES: *

* * Any of the following special properties can optionally be passed in through the vars object (the third parameter): * * * * EXAMPLES:

* * Tween the the MovieClip "mc" to an _alpha value of 50 and an x-coordinate of 120 * over the course of 1.5 seconds like so:

* * * import com.greensock.TweenNano;

* TweenNano.to(mc, 1.5, {_alpha:50, _x:120}); *


* * To tween the "mc" MovieClip's _alpha property to 50, its _x property to 120 using the Back.easeOut easing * function, delay starting the whole tween by 2 seconds, and then call a function named "onFinishTween" when it * has completed (it will have a duration of 5 seconds) and pass a few parameters to that function (a value of * 5 and a reference to the mc), you'd do so like:

* * * import com.greensock.TweenNano;
* import com.greensock.easing.Back;

* * TweenNano.to(mc, 5, {_alpha:50, _x:120, ease:Back.easeOut, delay:2, onComplete:onFinishTween, onCompleteParams:[5, mc]});
* function onFinishTween(param1:Number, param2:MovieClip):Void {
* trace("The tween has finished! param1 = " + param1 + ", and param2 = " + param2);
* } *


* * If you have a MovieClip on the stage that is already in it's end position and you just want to animate it into * place over 5 seconds (drop it into place by changing its _y property to 100 pixels higher on the screen and * dropping it from there), you could:

* * * import com.greensock.TweenNano;
* import com.greensock.easing.Elastic;

* * TweenNano.from(mc, 5, {_y:"-100", ease:Elastic.easeOut}); *


* * NOTES / TIPS:

* * * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.TweenNano { /** @private **/ private static var version:Number = 1.06; /** @private **/ private static var _time:Number; /** @private **/ private static var _frame:Number; /** @private Holds references to all our tweens based on their targets (an Array for each target) **/ private static var _masterList:Object = {}; /** @private A reference to the Shape that we use to drive all our ENTER_FRAME events. **/ private static var _timingClip:MovieClip; /** @private Indicates whether or not the TweenNano class has been initted. **/ private static var _tnInitted:Boolean; /** @private **/ private static var _reservedProps:Object = {ease:1, delay:1, useFrames:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, immediateRender:1, onUpdate:1, onUpdateParams:1}; /** @private **/ private static var _cnt:Number = -16000; /** Duration of the tween in seconds (or in frames if "useFrames" is true). **/ public var duration:Number; /** Stores variables (things like "alpha", "y" or whatever we're tweening, as well as special properties like "onComplete"). **/ public var vars:Object; /** @private Start time in seconds (or frames for frames-based tweens) **/ public var startTime:Number; /** Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. **/ public var target:Object; /** @private Indicates whether or not the tween is currently active **/ public var active:Boolean; /** @private Flagged for garbage collection **/ public var gc:Boolean; /** Indicates that frames should be used instead of seconds for timing purposes. So if useFrames is true and the tween's duration is 10, it would mean that the tween should take 10 frames to complete, not 10 seconds. **/ public var useFrames:Boolean; /** @private Target ID (a way to identify each end target, i.e. "t1", "t2", "t3") **/ public var endTargetID:String; /** @private result of _ease(this.time, 0, 1, this.duration). Usually between 0 and 1, but not always (like with Elastic.easeOut). **/ public var ratio:Number; /** @private Easing method to use which determines how the values animate over time. Examples are Elastic.easeOut and Strong.easeIn. Many are found in the fl.motion.easing package or com.greensock.easing. **/ private var _ease:Function; /** @private Indicates whether or not init() has been called (where all the tween property start/end value information is recorded) **/ private var _initted:Boolean; /** @private Contains parsed data for each property that's being tweened (property name, start, and change) **/ private var _propTweens:Array; /** * Constructor * * @param target Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. * @param duration Duration in seconds (or in frames if "useFrames" is true) * @param vars An object containing the end values of the properties you're tweening, like {_x:100, _y:50}. It can also contain special properties like "onComplete", "ease", "delay", etc. */ public function TweenNano(target:Object, duration:Number, vars:Object) { if (!_tnInitted) { _time = getTimer() * 0.001; _frame = 0; _tnInitted = true; } if (_timingClip.onEnterFrame != updateAll) { //subloaded swfs in Flash Lite restrict access to _root.createEmptyMovieClip(), so we find the subloaded swf MovieClip to createEmptyMovieClip(), but if it gets unloaded, the onEnterFrame will stop running so we need to check each time a tween is created. var mc:MovieClip = (_root.getBytesLoaded() == undefined) ? findSubloadedSWF(_root) : _root; //subloaded swfs won't return getBytesLoaded() in Flash Lite, and it locks us out from being able to createEmptyMovieClip(), so we must find the subloaded clip to do it there instead. var l:Number = 999; //Don't just do getNextHighestDepth() because often developers will hard-code stuff that uses low levels which would overwrite the TweenLite clip. Start at level 999 and make sure nothing's there. If there is, move up until we find an empty level. while (mc.getInstanceAtDepth(l) != undefined) { l++; } _timingClip = mc.createEmptyMovieClip("__tweenNano" + String(version).split(".").join("_"), l); _timingClip.onEnterFrame = updateAll; } this.vars = vars; this.duration = duration; this.ratio = 0; this.active = Boolean(duration == 0 && this.vars.delay == 0 && this.vars.immediateRender != false); this.target = target; if (typeof(this.vars.ease) != "function") { _ease = TweenNano.easeOut; } else { _ease = this.vars.ease; } _propTweens = []; this.useFrames = Boolean(vars.useFrames == true); var delay:Number = this.vars.delay || 0; this.startTime = (this.useFrames) ? _frame + delay : _time + delay; this.endTargetID = getID(target, true); var a:Array = _masterList[this.endTargetID].tweens; if (a == undefined || Number(this.vars.overwrite) == 1 || this.vars.overwrite == undefined) { _masterList[this.endTargetID] = {target:target, tweens:[this]}; } else { a[a.length] = this; } if (this.active || this.vars.immediateRender) { renderTime(0); } } /** * @private * Initializes the property tweens, determining their start values and amount of change. * Also triggers overwriting if necessary and sets the _hasUpdate variable. */ public function init():Void { for (var p:String in this.vars) { if (!_reservedProps[p]) { _propTweens[_propTweens.length] = [p, this.target[p], (typeof(this.vars[p]) == "number") ? this.vars[p] - this.target[p] : Number(this.vars[p])]; //[property, start, change] } } if (this.vars.runBackwards) { var pt:Array; var i:Number = _propTweens.length; while (--i > -1) { pt = _propTweens[i]; pt[1] += pt[2]; pt[2] = -pt[2]; } } _initted = true; } /** * Renders the tween at a particular time (or frame number for frames-based tweens) * WITHOUT changing its startTime, meaning if the tween is in progress when you call * renderTime(), it will not adjust the tween's timing to continue from the new time. * The time is based simply on the overall duration. For example, if a tween's duration * is 3, renderTime(1.5) would render it at the halfway finished point. * * @param time time (or frame number for frames-based tweens) to render. */ public function renderTime(time:Number):Void { if (!_initted) { init(); } var pt:Array, i:Number = _propTweens.length; if (time >= this.duration) { time = this.duration; this.ratio = 1; } else if (time <= 0) { this.ratio = 0; } else { this.ratio = _ease(time, 0, 1, this.duration); } while (--i > -1) { pt = _propTweens[i]; this.target[pt[0]] = pt[1] + (this.ratio * pt[2]); } if (this.vars.onUpdate) { this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams); } if (time == this.duration) { complete(true); } } /** * Forces the tween to completion. * * @param skipRender To skip rendering the final state of the tween, set skipRender to true. */ public function complete(skipRender:Boolean):Void { if (skipRender != true) { renderTime(this.duration); return; } kill(); if (this.vars.onComplete) { this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams); } } /** Kills the tween, stopping it immediately. **/ public function kill():Void { this.gc = true; this.active = false; } //---- STATIC FUNCTIONS ------------------------------------------------------------------------- /** * Static method for creating a TweenNano instance which can be more intuitive for some developers * and shields them from potential garbage collection issues that could arise when assigning a * tween instance to a variable that persists. The following lines of code all produce exactly * the same result:

* * var myTween:TweenNano = new TweenNano(mc, 1, {_x:100});
* TweenNano.to(mc, 1, {_x:100});
* var myTween:TweenNano = TweenNano.to(mc, 1, {_x:100});
* * @param target Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. * @param duration Duration in seconds (or frames if "useFrames" is true) * @param vars An object containing the end values of the properties you're tweening, like {_x:100, _y:50}. It can also contain special properties like "onComplete", "ease", "delay", etc. * @return TweenNano instance */ public static function to(target:Object, duration:Number, vars:Object):TweenNano { return new TweenNano(target, duration, vars); } /** * Static method for creating a TweenNano instance that tweens in the opposite direction * compared to a TweenNano.to() tween. In other words, you define the START values in the * vars object instead of the end values, and the tween will use the current values as * the end values. This can be very useful for animating things into place on the stage * because you can build them in their end positions and do some simple TweenNano.from() * calls to animate them into place. NOTE: By default, immediateRender * is true in from() tweens, meaning that they immediately render their starting state * regardless of any delay that is specified. You can override this behavior by passing * immediateRender:false in the vars object so that it will wait to * render until the tween actually begins. To illustrate the default behavior, the following code * will immediately set the alpha of mc to 0 and then wait 2 seconds * before tweening the alpha back to 1 over the course of 1.5 seconds:

* * TweenNano.from(mc, 1.5, {_alpha:0, delay:2}); * * @param target Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. * @param duration Duration in seconds (or frames if "useFrames" is true) * @param vars An object containing the start values of the properties you're tweening like {x:100, y:50}. It can also contain special properties like "onComplete", "ease", "delay", etc. * @return TweenNano instance */ public static function from(target:Object, duration:Number, vars:Object):TweenNano { vars.runBackwards = true; if (vars.immediateRender == undefined) { vars.immediateRender = true; } return new TweenNano(target, duration, vars); } /** * Provides a simple way to call a function after a set amount of time (or frames). You can * optionally pass any number of parameters to the function too. For example:

* * TweenNano.delayedCall(1, myFunction, ["param1", 2]);
* function myFunction(param1:String, param2:Number):Void {
* trace("called myFunction and passed params: " + param1 + ", " + param2);
* }
* * @param delay Delay in seconds (or frames if "useFrames" is true) before the function should be called * @param onComplete Function to call * @param onCompleteParams An Array of parameters to pass the function. * @param onCompleteScope the scope that should be used for the delayed function call (scope basically defines what "this" refers to in the function). * @param useFrames If true, the delay will be measured in frames instead of seconds. * @return TweenNano instance */ public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array, onCompleteScope:Object, useFrames:Boolean):TweenNano { return new TweenNano(onComplete, 0, {delay:delay, onComplete:onComplete, onCompleteParams:onCompleteParams, onCompleteScope:onCompleteScope, useFrames:useFrames, overwrite:0}); } /** * @private * Updates active tweens and activates those whose startTime is before the _time/_frame. */ public static function updateAll():Void { _frame++; _time = getTimer() * 0.001; var ml:Object = _masterList, a:Array, tgt:String, i:Number, t:Number, tween:TweenNano; for (tgt in ml) { a = ml[tgt].tweens; i = a.length; while (--i > -1) { tween = a[i]; t = (tween.useFrames) ? _frame : _time; if (tween.active || (!tween.gc && t >= tween.startTime)) { tween.renderTime(t - tween.startTime); } else if (tween.gc) { a.splice(i, 1); } } if (a.length == 0) { delete ml[tgt]; } } } /** * Kills all the tweens of a particular object, optionally forcing them to completion too. * * @param target Object whose tweens should be immediately killed * @param complete Indicates whether or not the tweens should be forced to completion before being killed. */ public static function killTweensOf(target:Object, complete:Boolean):Void { var id:String = getID(target, true); var a:Array = _masterList[id], i:Number; if (a) { if (complete) { i = a.length; while (--i > -1) { if (!a[i].gc) { a[i].complete(false); } } } delete _masterList[id]; } } /** @private **/ public static function getID(target:Object, lookup:Boolean):String { var id:String, ml:Object = _masterList; if (lookup) { if (typeof(target) == "movieclip") { if (ml[String(target)] != undefined) { return String(target); } else { id = String(target); ml[id] = {target:target, tweens:[]}; return id; } } else { for (var p:String in ml) { if (ml[p].target == target) { return p; } } } } _cnt++; id = "t" + _cnt; ml[id] = {target:target, tweens:[]}; return id; } /** @private **/ private static function easeOut(t:Number, b:Number, c:Number, d:Number):Number { return -1 * (t /= d) * (t - 2); } /** * @private * Subloaded SWFs in Flash Lite may not have access to _root.createEmptyMovieClip(), so we needed a way * to step through all the MovieClips on the Stage (including nested ones) until one is found that * can be used with createEmptyMovieClip(). Note: when getBytesLoaded() returns undefined, we know that * the MovieClip has been deemed off-limits by the Flash Player and it won't allow createEmptyMovieClip() * on that MovieClip. **/ private static function findSubloadedSWF(mc:MovieClip):MovieClip { for (var p:String in mc) { if (typeof(mc[p]) == "movieclip") { if (mc[p]._url != _root._url && mc[p].getBytesLoaded() != undefined) { return mc[p]; } else if (findSubloadedSWF(mc[p]) != undefined) { return findSubloadedSWF(mc[p]); } } } return undefined; } }>com.greensock.core.SimpleTimeline: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/core/SimpleTimeline.as/** * VERSION: 1.672 * DATE: 2011-08-29 * AS3 (AS2 version is also available) * UPDATES AND DOCS AT: http://www.TweenLite.com **/ import com.greensock.core.TweenCore; /** * SimpleTimeline is the base class for the TimelineLite and TimelineMax classes. It provides the * most basic timeline functionality and is used for the root timelines in TweenLite. It is meant * to be very fast and lightweight.

* * Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.core.SimpleTimeline extends TweenCore { /** @private **/ private var _firstChild:TweenCore; /** @private **/ private var _lastChild:TweenCore; /**If a timeline's autoRemoveChildren is true, its children will be removed and made eligible for garbage collection as soon as they complete. This is the default behavior for the main/root timeline. **/ public var autoRemoveChildren:Boolean; public function SimpleTimeline(vars:Object) { super(0, vars); } /** * Inserts a TweenLite, TweenMax, TimelineLite, or TimelineMax instance into the timeline at a specific time. * * @param tween TweenLite, TweenMax, TimelineLite, or TimelineMax instance to insert * @param time The time in seconds (or frames for frames-based timelines) at which the tween/timeline should be inserted. For example, myTimeline.insert(myTween, 3) would insert myTween 3-seconds into the timeline. * @return TweenLite, TweenMax, TimelineLite, or TimelineMax instance that was inserted */ public function insert(tween:TweenCore, time:Object):TweenCore { if (time == undefined) { time = 0; } var prevTimeline:SimpleTimeline = tween.timeline; if (!tween.cachedOrphan && prevTimeline) { prevTimeline.remove(tween, true); //removes from existing timeline so that it can be properly added to this one. } tween.timeline = this; tween.cachedStartTime = Number(time) + tween.delay; if (tween.gc) { tween.setEnabled(true, true); } if (tween.cachedPaused && prevTimeline != this) { //we only adjust the cachedPauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order). tween.cachedPauseTime = tween.cachedStartTime + ((this.rawTime - tween.cachedStartTime) / tween.cachedTimeScale); } if (_lastChild) { _lastChild.nextNode = tween; } else { _firstChild = tween; } tween.prevNode = _lastChild; _lastChild = tween; tween.nextNode = undefined; tween.cachedOrphan = false; return tween; } /** @private **/ public function remove(tween:TweenCore, skipDisable:Boolean):Void { if (tween.cachedOrphan) { return; //already removed! } else if (skipDisable != true) { tween.setEnabled(false, true); } if (tween.nextNode) { tween.nextNode.prevNode = tween.prevNode; } else if (_lastChild == tween) { _lastChild = tween.prevNode; } if (tween.prevNode) { tween.prevNode.nextNode = tween.nextNode; } else if (_firstChild == tween) { _firstChild = tween.nextNode; } tween.cachedOrphan = true; //don't null nextNode and prevNode, otherwise the chain could break in rendering loops. } /** @inheritDoc **/ public function renderTime(time:Number, suppressEvents:Boolean, force:Boolean):Void { var tween:TweenCore = _firstChild, dur:Number, next:TweenCore; this.cachedTotalTime = time; this.cachedTime = time; while (tween) { next = tween.nextNode; //record it here because the value could change after rendering... if (tween.active || (time >= tween.cachedStartTime && !tween.cachedPaused && !tween.gc)) { if (!tween.cachedReversed) { tween.renderTime((time - tween.cachedStartTime) * tween.cachedTimeScale, suppressEvents, false); } else { dur = (tween.cacheIsDirty) ? tween.totalDuration : tween.cachedTotalDuration; tween.renderTime(dur - ((time - tween.cachedStartTime) * tween.cachedTimeScale), suppressEvents, false); } } tween = next; } } //---- GETTERS / SETTERS ------------------------------------------------------------------------------ /** * @private * Reports the totalTime of the timeline without capping the number at the totalDuration (max) and zero (minimum) which can be useful when * unpausing tweens/timelines. Imagine a case where a paused tween is in a timeline that has already reached the end, but then * the tween gets unpaused - it needs a way to place itself accurately in time AFTER what was previously the timeline's end time. * In a SimpleTimeline, rawTime is always the same as cachedTotalTime, but in TimelineLite and TimelineMax, it can be different. * * @return The totalTime of the timeline without capping the number at the totalDuration (max) and zero (minimum) */ public function get rawTime():Number { return this.cachedTotalTime; } }@com.greensock.easing.Quad: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/easing/Quad.asclass com.greensock.easing.Quad { public static function easeIn (t:Number, b:Number, c:Number, d:Number):Number { return c*(t/=d)*t + b; } public static function easeOut (t:Number, b:Number, c:Number, d:Number):Number { return -c *(t/=d)*(t-2) + b; } public static function easeInOut (t:Number, b:Number, c:Number, d:Number):Number { if ((t/=d*0.5) < 1) return c*0.5*t*t + b; return -c*0.5 * ((--t)*(t-2) - 1) + b; } } com.greensock.TweenLite: /Users/cbull/Documents/fram/git/2012/CHYC129004_Prestone_Antifreeze/300x250/com/greensock/TweenLite.as/** * VERSION: 11.698 * DATE: 2012-03-27 * AS2 (AS3 version is also available) * UPDATES AND DOCS AT: http://www.greensock.com **/ import com.greensock.core.*; import com.greensock.plugins.*; /** * TweenLite is an extremely fast, lightweight, and flexible tweening engine that serves as the foundation of * the GreenSock Tweening Platform. A TweenLite instance handles tweening one or more numeric properties of any * object over time, updating them on every frame. Sounds simple, but there's a wealth of capabilities and conveniences * at your fingertips with TweenLite. With plenty of other tweening engines to choose from, here's why you might * want to consider TweenLite: * * *
* SPECIAL PROPERTIES (no plugins required): *

* * Any of the following special properties can optionally be passed in through the vars object (the third parameter): * * * * PLUGINS:

* * There are many plugins that add capabilities through other special properties. Some examples are "tint", * "volume", "frame", "frameLabel", "bezier", "blurFilter", "colorMatrixFilter", "hexColors", and many more. * Adding the capabilities is as simple as activating the plugin with a single line of code, like * TweenPlugin.activate([TintPlugin]); Get information about all the plugins at * http://www.TweenLite.com

* * EXAMPLES:

* * Tween the the MovieClip "mc" to an _alpha value of 50 and an x-coordinate of 120 * over the course of 1.5 seconds like so:

* * * import com.greensock.TweenLite;

* TweenLite.to(mc, 1.5, {_alpha:50, _x:120}); *


* * To tween the "mc" MovieClip's _alpha property to 50, its _x property to 120 using the Back.easeOut easing * function, delay starting the whole tween by 2 seconds, and then call a function named onFinishTween when it * has completed (it will have a duration of 5 seconds) and pass a few parameters to that function (a value of * 5 and a reference to the mc), you'd do so like:

* * * import com.greensock.TweenLite;
* import com.greensock.easing.Back;

* TweenLite.to(mc, 5, {_alpha:50, _x:120, ease:Back.easeOut, delay:2, onComplete:onFinishTween, onCompleteParams:[5, mc]});
* function onFinishTween(param1:Number, param2:MovieClip):Void {
* trace("The tween has finished! param1 = " + param1 + ", and param2 = " + param2);
* } *


* * If you have a MovieClip on the stage that is already in it's end position and you just want to animate it into * place over 5 seconds (drop it into place by changing its _y property to 100 pixels higher on the screen and * dropping it from there), you could:

* * * import com.greensock.TweenLite;
* import com.greensock.easing.Elastic;

* TweenLite.from(mc, 5, {_y:"-100", ease:Elastic.easeOut}); *


* * NOTES:

* * * Copyright 2012, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership. * * @author Jack Doyle, jack@greensock.com */ class com.greensock.TweenLite extends TweenCore { /** * @private * Initializes the class, activates default plugins, and starts the root timelines. This should only * be called internally. It is technically public only so that other classes in the GreenSock Tweening * Platform can access it, but again, please avoid calling this method directly. */ public static function initClass():Void { //ACTIVATE PLUGINS HERE... /* TweenPlugin.activate([ AutoAlphaPlugin, //tweens _alpha and then toggles "_visible" to false if/when _alpha is zero EndArrayPlugin, //tweens numbers in an Array FramePlugin, //tweens MovieClip frames RemoveTintPlugin, //allows you to remove a tint TintPlugin, //tweens tints VisiblePlugin, //tweens a target's "_visible" property VolumePlugin, //tweens the volume of a MovieClip or Sound BevelFilterPlugin, //tweens BevelFilters BezierPlugin, //enables bezier tweening BezierThroughPlugin, //enables bezierThrough tweening BlurFilterPlugin, //tweens BlurFilters ColorMatrixFilterPlugin, //tweens ColorMatrixFilters (including hue, saturation, colorize, contrast, brightness, and threshold) DropShadowFilterPlugin, //tweens DropShadowFilters GlowFilterPlugin, //tweens GlowFilters HexColorsPlugin, //tweens hex colors ShortRotationPlugin, //tweens rotation values in the shortest direction ColorTransformPlugin, //tweens advanced color properties like exposure, brightness, tintAmount, redOffset, redMultiplier, etc. FrameLabelPlugin, //tweens a MovieClip to particular label QuaternionsPlugin, //tweens 3D Quaternions ScalePlugin, //Tweens both the _xscale and _yscale properties ScrollRectPlugin, //tweens the scrollRect property of a MovieClip SetSizePlugin, //tweens the width/height of components via setSize() TransformMatrixPlugin, //Tweens the transform.matrix property of any MovieClip //DynamicPropsPlugin, //tweens to dynamic end values. You associate the property with a particular function that returns the target end value **Club GreenSock membership benefit** //MotionBlurPlugin, //applies a directional blur to a MovieClip based on the velocity and angle of movement. **Club GreenSock membership benefit** //Physics2DPlugin, //allows you to apply basic physics in 2D space, like velocity, angle, gravity, friction, acceleration, and accelerationAngle. **Club GreenSock membership benefit** //PhysicsPropsPlugin, //allows you to apply basic physics to any property using forces like velocity, acceleration, and/or friction. **Club GreenSock membership benefit** //TransformAroundCenterPlugin,//tweens the scale and/or rotation of MovieClips using the MovieClip's center as the registration point **Club GreenSock membership benefit** //TransformAroundPointPlugin, //tweens the scale and/or rotation of MovieClips around a particular point (like a custom registration point) **Club GreenSock membership benefit** {}]); */ rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.autoRemoveChildren = rootFramesTimeline.autoRemoveChildren = true; rootTimeline.cachedStartTime = getTimer() * 0.001; rootTimeline.cachedTotalTime = rootFramesTimeline.cachedTotalTime = 0; rootFramesTimeline.cachedStartTime = rootFrame; if (overwriteManager == undefined) { overwriteManager = {mode:1, enabled:false}; } jumpStart(_root); } /** @private **/ public static var version:Number = 11.698; /** @private When plugins are activated, the class is added (named based on the special property) to this object so that we can quickly look it up in the initTweenVals() method.**/ public static var plugins:Object = {}; /** @private For notifying plugins of significant events like when the tween finishes initializing, when it is disabled/enabled, and when it completes (some plugins need to take actions when those events occur) **/ public static var onPluginEvent:Function; /** @private **/ public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; /** Provides an easy way to change the default easing equation.**/ public static var defaultEase:Function = TweenLite.easeOut; /** @private Makes it possible to integrate OverwriteManager for adding various overwriting capabilities. **/ public static var overwriteManager:Object; /** @private Gets updated on every frame. This syncs all the tweens and prevents drifting of the startTime that happens under heavy loads with most other engines.**/ public static var rootFrame:Number; /** @private All tweens get associated with a timeline. The rootTimeline is the default for all time-based tweens.**/ public static var rootTimeline:SimpleTimeline; /** @private All tweens get associated with a timeline. The rootFramesTimeline is the default for all frames-based tweens.**/ public static var rootFramesTimeline:SimpleTimeline; /** @private Holds references to all our tween instances organized by target for quick lookups (for overwriting).**/ public static var masterList:Object = {}; /** @private Drives all our onEnterFrame events.**/ private static var _timingClip:MovieClip; /** @private Used to assign IDs to targets **/ private static var _cnt:Number = -16000; /** @private Lookup for all of the reserved "special property" keywords.**/ private static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onStart:1, onStartParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1, reversed:1}; /** Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. **/ public var target:Object; /** @private Lookup object for PropTween objects. For example, if this tween is handling the "_x" and "_y" properties of the target, the propTweenLookup object will have an "_x" and "_y" property, each pointing to the associated PropTween object. This can be very helpful for speeding up overwriting. This is a public variable, but should almost never be used directly. **/ public var propTweenLookup:Object; /** @private result of _ease(this.currentTime, 0, 1, this.duration). Usually between 0 and 1, but not always (like with Elastic.easeOut). **/ public var ratio:Number; /** @private First PropTween instance - all of which are stored in a linked list for speed. Traverse them using nextNode and prevNode. Typically you should NOT use this property (it is made public for speed and file size purposes). **/ public var cachedPT1:PropTween; /** @private Easing method to use which determines how the values animate over time. Examples are Elastic.easeOut and Strong.easeIn. Many are found in the fl.motion.easing package or com.greensock.easing. **/ private var _ease:Function; /** @private Target ID (a way to identify each end target, i.e. "t1", "t2", "t3") **/ private var _targetID:String; /** @private 0 = NONE, 1 = ALL, 2 = AUTO 3 = CONCURRENT, 4 = ALL_AFTER **/ private var _overwrite:Number; /** @private When other tweens overwrite properties in this tween, the properties get added to this object. Remember, sometimes properties are overwritten BEFORE the tween inits, like when two tweens start at the same time, the later one overwrites the previous one. **/ private var _overwrittenProps:Object; /** @private If this tween has any TweenPlugins, we set this to true - it helps speed things up in onComplete **/ private var _hasPlugins:Boolean; /** @private If this tween has any TweenPlugins that need to be notified of a change in the "enabled" status, this will be true. (speeds things up in the enabled setter) **/ private var _notifyPluginsOfEnabled:Boolean; /** * Constructor * * @param target Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. * @param duration Duration in seconds (or in frames if the tween's timing mode is frames-based) * @param vars An object containing the end values of the properties you're tweening. For example, to tween to _x=100, _y=100, you could pass {_x:100, _y:100}. It can also contain special properties like "onComplete", "ease", "delay", etc. */ public function TweenLite(target:Object, duration:Number, vars:Object) { super(duration, vars); if (_timingClip.onEnterFrame != updateAll) { //subloaded swfs in Flash Lite restrict access to _root.createEmptyMovieClip(), so we find the subloaded swf MovieClip to createEmptyMovieClip(), but if it gets unloaded, the onEnterFrame will stop running so we need to check each time a tween is created. jumpStart(_root); } this.ratio = 0; this.target = target; _targetID = getID(target, true); if (this.vars.timeScale != undefined && this.target instanceof TweenCore) { //if timeScale is in the vars object and the target is a TweenCore, this tween's timeScale must be adjusted (in TweenCore's constructor, it was set to whatever the vars.timeScale was) this.cachedTimeScale = 1; } propTweenLookup = {}; _ease = defaultEase; //temporarily - we'll check the vars object for an ease property in the init() method. We set it to the default initially for speed purposes. //handle overwriting (if necessary) and add the tween to the Dictionary for future _overwrite = (vars.overwrite == undefined || (!overwriteManager.enabled && vars.overwrite > 1)) ? overwriteManager.mode : Number(vars.overwrite); var a:Array = masterList[_targetID].tweens; if (a.length == 0) { a[0] = this; } else { if (_overwrite == 1) { //overwrite all other existing tweens of the same object (ALL mode) var i:Number = a.length; while (--i > -1) { if (!a[i].gc) { a[i].setEnabled(false, false); } } masterList[_targetID].tweens = [this]; } else { a[a.length] = this; } } if (this.active || this.vars.immediateRender) { renderTime(0, false, true); } } /** * @private * Initializes the property tweens, determining their start values and amount of change. * Also triggers overwriting if necessary and sets the _hasUpdate variable. */ private function init():Void { if (this.vars.onInit) { this.vars.onInit.apply(null, this.vars.onInitParams); } var p:String, i:Number, plugin:Object, prioritize:Boolean, siblings:Array; if (typeof(this.vars.ease) == "function") { _ease = this.vars.ease; } if (this.vars.easeParams != undefined) { this.vars.proxiedEase = _ease; _ease = easeProxy; } this.cachedPT1 = undefined; this.propTweenLookup = {}; for (p in this.vars) { if (_reservedProps[p] && !(p == "timeScale" && this.target instanceof TweenCore)) { //ignore } else if (plugins[p] && (plugin = new plugins[p]()).onInitTween(this.target, this.vars[p], this)) { this.cachedPT1 = new PropTween(plugin, "changeFactor", 0, 1, (plugin.overwriteProps.length == 1) ? plugin.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1); if (this.cachedPT1.name == "_MULTIPLE_") { i = plugin.overwriteProps.length; while (--i > -1) { this.propTweenLookup[plugin.overwriteProps[i]] = this.cachedPT1; } } else { this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1; } if (plugin.priority) { this.cachedPT1.priority = plugin.priority; prioritize = true; } if (plugin.onDisable || plugin.onEnable) { _notifyPluginsOfEnabled = true; } _hasPlugins = true; } else { this.cachedPT1 = new PropTween(this.target, p, Number(this.target[p]), (typeof(this.vars[p]) == "number") ? Number(this.vars[p]) - this.target[p] : Number(this.vars[p]), p, false, this.cachedPT1); this.propTweenLookup[p] = this.cachedPT1; } } if (prioritize) { onPluginEvent("onInitAllProps", this); //reorders the linked list in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite } if (this.vars.runBackwards) { var pt:PropTween = this.cachedPT1; while (pt) { pt.start += pt.change; pt.change = -pt.change; pt = pt.nextNode; } } _hasUpdate = Boolean(typeof(this.vars.onUpdate) == "function"); if (_overwrittenProps) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first) killVars(_overwrittenProps); if (this.cachedPT1 == undefined) { //if all tweening properties have been overwritten, kill the tween. this.setEnabled(false, false); } } if (_overwrite > 1 && this.cachedPT1 && (siblings = masterList[_targetID].tweens) && siblings.length > 1) { if (overwriteManager.manageOverwrites(this, this.propTweenLookup, siblings, _overwrite)) { //one of the plugins had activeDisable set to true, so properties may have changed when it was disabled meaning we need to re-init() init(); } } this.initted = true; } /** * Renders the tween at a particular time (or frame number for frames-based tweens). * The time is based simply on the overall duration. For example, if a tween's duration * is 3, renderTime(1.5) would render it at the halfway finished point. * * @param time time (or frame number for frames-based tweens) to render. * @param suppressEvents If true, no events or callbacks will be triggered for this render (like onComplete, onUpdate, onReverseComplete, etc.) * @param force Normally the tween will skip rendering if the time matches the cachedTotalTime (to improve performance), but if force is true, it forces a render. This is primarily used internally for tweens with durations of zero in TimelineLite/Max instances. */ public function renderTime(time:Number, suppressEvents:Boolean, force:Boolean):Void { var isComplete:Boolean, prevTime:Number = this.cachedTime; if (time >= this.cachedDuration) { this.cachedTotalTime = this.cachedTime = this.cachedDuration; this.ratio = 1; isComplete = !this.cachedReversed; if (this.cachedDuration == 0) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. if ((time == 0 || _rawPrevTime < 0) && _rawPrevTime != time) { force = true; } _rawPrevTime = time; } } else if (time <= 0) { this.cachedTotalTime = this.cachedTime = this.ratio = 0; if (time < 0) { this.active = false; if (this.cachedDuration == 0) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. if (_rawPrevTime >= 0) { force = true; isComplete = (_rawPrevTime > 0); } _rawPrevTime = time; } } if (this.cachedReversed && prevTime != 0) { isComplete = true; } } else { this.cachedTotalTime = this.cachedTime = time; this.ratio = _ease(time, 0, 1, this.cachedDuration); } if (this.cachedTime == prevTime && !force) { return; } else if (!this.initted) { init(); if (!isComplete && this.cachedTime) { //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); } } if (!this.active && !this.cachedPaused) { this.active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. } if (prevTime == 0 && this.vars.onStart && (this.cachedTime != 0 || this.cachedDuration == 0) && !suppressEvents) { this.vars.onStart.apply(this.vars.onStartScope, this.vars.onStartParams); } var pt:PropTween = this.cachedPT1; while (pt) { pt.target[pt.property] = pt.start + (this.ratio * pt.change); pt = pt.nextNode; } if (_hasUpdate && !suppressEvents) { this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams); } if (isComplete && !this.gc) { //check gc because there's a chance that kill() could be called in an onUpdate if (_hasPlugins && this.cachedPT1) { onPluginEvent("onComplete", this); } complete(true, suppressEvents); } } /** * Allows particular properties of the tween to be killed. For example, if a tween is affecting * the "_x", "_y", and "_alpha" properties and you want to kill just the "_x" and "_y" parts of the * tween, you'd do myTween.killVars({_x:true, _y:true}); * * @param vars An object containing a corresponding property for each one that should be killed. The values don't really matter. For example, to kill the _x and _y property tweens, do myTween.killVars({_x:true, _y:true}); * @param permanent If true, the properties specified in the vars object will be permanently disallowed in the tween. Typically the only time false might be used is while the tween is in the process of initting and a plugin needs to make sure tweens of a particular property (or set of properties) is killed. * @return Boolean value indicating whether or not properties may have changed on the target when any of the vars were disabled. For example, when a motionBlur (plugin) is disabled, it swaps out a BitmapData for the target and may alter the alpha. We need to know this in order to determine whether or not a new tween that is overwriting this one should be re-initted() with the changed properties. */ public function killVars(vars:Object, permanent:Boolean):Boolean { if (_overwrittenProps == undefined) { _overwrittenProps = {}; } var p:String, pt:PropTween, changed:Boolean; for (p in vars) { if (propTweenLookup[p]) { pt = propTweenLookup[p]; if (pt.isPlugin && pt.name == "_MULTIPLE_") { pt.target.killProps(vars); if (pt.target.overwriteProps.length == 0) { pt.name = ""; } if (p != pt.target.propName || pt.name == "") { delete propTweenLookup[p]; } } if (pt.name != "_MULTIPLE_") { //remove PropTween (do it inline to improve speed and keep file size low) if (pt.nextNode) { pt.nextNode.prevNode = pt.prevNode; } if (pt.prevNode) { pt.prevNode.nextNode = pt.nextNode; } else if (this.cachedPT1 == pt) { this.cachedPT1 = pt.nextNode; } if (pt.isPlugin && pt.target.onDisable) { pt.target.onDisable(); //some plugins need to be notified so they can perform cleanup tasks first if (pt.target.activeDisable) { changed = true; } } delete propTweenLookup[p]; } } if (permanent != false && vars != _overwrittenProps) { _overwrittenProps[p] = 1; } } return changed; } /** @inheritDoc **/ public function invalidate():Void { if (_notifyPluginsOfEnabled) { onPluginEvent("onDisable", this); } this.cachedPT1 = undefined; _overwrittenProps = undefined; _hasUpdate = this.initted = this.active = _notifyPluginsOfEnabled = false; this.propTweenLookup = {}; } /** @private **/ public function setEnabled(enabled:Boolean, ignoreTimeline:Boolean):Boolean { if (enabled && this.gc) { var a:Array = masterList[_targetID].tweens; if (a) { var i:Number = a.length; a[i] = this; while (--i > -1) { if (a[i] == this) { a.splice(i, 1); //in case this tween was disabled and then enabled before it was gc'd, we need to make sure instances don't build up in the master list over time (in extremely rare situations this could bog down performance, like if a tween's onComplete restarts it infinitely) } } } else { masterList[_targetID] = {target:this.target, tweens:[this]}; } } super.setEnabled(enabled, ignoreTimeline); if (_notifyPluginsOfEnabled && this.cachedPT1) { return onPluginEvent(((enabled) ? "onEnable" : "onDisable"), this); } return false; } /** * @private * Only used for easing equations that accept extra parameters (like Elastic.easeOut and Back.easeOut). * Basically, it acts as a proxy. To utilize it, pass an Array of extra parameters via the vars object's * "easeParams" special property * * @param t time * @param b start * @param c change * @param d duration * @return Eased value */ private function easeProxy(t:Number, b:Number, c:Number, d:Number):Number { return this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)); } //---- STATIC FUNCTIONS ----------------------------------------------------------------------------------- /** * Static method for creating a TweenLite instance. This can be more intuitive for some developers * and shields them from potential garbage collection issues that could arise when assigning a * tween instance to a variable that persists. The following lines of code produce exactly * the same result:

* * var myTween:TweenLite = new TweenLite(mc, 1, {_x:100});
* TweenLite.to(mc, 1, {_x:100});
* var myTween:TweenLite = TweenLite.to(mc, 1, {_x:100});
* * @param target Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. * @param duration Duration in seconds (or in frames if the tween's timing mode is frames-based) * @param vars An object containing the end values of the properties you're tweening. For example, to tween to _x=100, _y=100, you could pass {_x:100, _y:100}. It can also contain special properties like "onComplete", "ease", "delay", etc. * @return TweenLite instance */ public static function to(target:Object, duration:Number, vars:Object):TweenLite { return new TweenLite(target, duration, vars); } /** * Static method for creating a TweenLite instance that tweens in the opposite direction * compared to a TweenLite.to() tween. In other words, you define the START values in the * vars object instead of the end values, and the tween will use the current values as * the end values. This can be very useful for animating things into place on the stage * because you can build them in their end positions and do some simple TweenLite.from() * calls to animate them into place. NOTE: By default, immediateRender * is true in from() tweens, meaning that they immediately render their starting state * regardless of any delay that is specified. You can override this behavior by passing * immediateRender:false in the vars object so that it will wait to * render until the tween actually begins (often the desired behavior when inserting into timelines). * To illustrate the default behavior, the following code will immediately set the _alpha of mc * to 0 and then wait 2 seconds before tweening the _alpha back to 100 over the course * of 1.5 seconds:

* * TweenLite.from(mc, 1.5, {_alpha:0, delay:2}); * * @param target Target object whose properties this tween affects. This can be ANY object, not just a MovieClip. * @param duration Duration in seconds (or in frames if the tween's timing mode is frames-based) * @param vars An object containing the start values of the properties you're tweening. For example, to tween from _x=100, _y=100, you could pass {_x:100, _y:100}. It can also contain special properties like "onComplete", "ease", "delay", etc. * @return TweenLite instance */ public static function from(target:Object, duration:Number, vars:Object):TweenLite { vars.runBackwards = true; if (vars.immediateRender != false) { vars.immediateRender = true; } return new TweenLite(target, duration, vars); } /** * Provides a simple way to call a function after a set amount of time (or frames). You can * optionally pass any number of parameters to the function too. For example:

* * TweenLite.delayedCall(1, myFunction, ["param1", 2]);
* function myFunction(param1:String, param2:Number):Void {
* trace("called myFunction and passed params: " + param1 + ", " + param2);
* }
* * @param delay Delay in seconds (or frames if useFrames is true) before the function should be called * @param onComplete Function to call * @param onCompleteParams An Array of parameters to pass the function. * @return TweenLite instance */ public static function delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array, onCompleteScope:Object, useFrames:Boolean):TweenLite { return new TweenLite(onComplete, 0, {delay:delay, onComplete:onComplete, onCompleteParams:onCompleteParams, onCompleteScope:onCompleteScope, immediateRender:false, useFrames:useFrames, overwrite:0}); } /** * @private * Updates the rootTimeline and rootFramesTimeline and collects garbage every 60 frames. */ private static function updateAll():Void { rootTimeline.renderTime(((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale, false, false); rootFrame++; rootFramesTimeline.renderTime((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale, false, false); if (!(rootFrame % 60)) { //garbage collect every 60 frames... var ml:Object = masterList, i:Number, a:Array; for (var p:String in ml) { a = ml[p].tweens; i = a.length; while (--i > -1) { if (a[i].gc) { a.splice(i, 1); } } if (a.length == 0) { delete ml[p]; } } } } /** * Kills all the tweens of a particular object or delayedCalls to a particular function, optionally * completing them first. If, for example, you want to kill all tweens of the "mc" object, you'd do:

* * TweenLite.killTweensOf(mc);

* * But if you only want to kill all the "_alpha" and "_x" portions of mc's tweens, you'd do:

* * TweenLite.killTweensOf(mc, false, {_alpha:true, _x:true});

* * To kill all the delayedCalls that were created like TweenLite.delayedCall(5, myFunction);, * you can simply call TweenLite.killTweensOf(myFunction); because delayedCalls are just * tweens that have their target and onComplete set to the same function (and * a delay of course).

* * killTweensOf() affects tweens that haven't begun yet too. If, for example, * a tween of object "mc" has a delay of 5 seconds and TweenLite.killTweensOf(mc) is called * 2 seconds after the tween was created, it will still be killed even though it hasn't started yet.

* * @param target Object whose tweens should be immediately killed * @param complete Indicates whether or not the tweens should be forced to completion before being killed (false by default) * @param vars An object defining which tweening properties should be killed (undefined, the default, causes all properties to be killed). For example, if you only want to kill "_alpha" and "_x" tweens of object "mc", you'd do myTimeline.killTweensOf(mc, true, {_alpha:true, _x:true}). If there are no tweening properties remaining in a tween after the indicated properties are killed, the entire tween is killed, meaning any onComplete, onUpdate, onStart, etc. won't fire. */ public static function killTweensOf(target:Object, complete:Boolean, vars:Object):Void { var id:String = getID(target, true); var a:Array = masterList[id].tweens, i:Number, tween:TweenLite; if (a != undefined) { i = a.length; while (--i > -1) { tween = a[i]; if (!tween.gc) { if (complete == true) { tween.complete(false, false); } if (vars != undefined) { tween.killVars(vars); } if (vars == undefined || (tween.cachedPT1 == undefined && tween.initted)) { tween.setEnabled(false, false); } } } if (vars == undefined) { delete masterList[id]; } } } /** @private **/ public static function getID(target:Object, lookup:Boolean):String { var id:String; if (lookup) { var ml:Object = masterList; if (typeof(target) == "movieclip") { if (ml[String(target)] != undefined) { return String(target); } else { id = String(target); masterList[id] = {target:target, tweens:[]}; return id; } } else { for (var p:String in ml) { if (ml[p].target == target) { return p; } } } } _cnt++; id = "t" + _cnt; masterList[id] = {target:target, tweens:[]}; return id; } /** * @private * Default easing equation * * @param t time * @param b start (must be 0) * @param c change (must be 1) * @param d duration * @return Eased value */ private static function easeOut(t:Number, b:Number, c:Number, d:Number):Number { return -1 * (t /= d) * (t - 2); } /** * @private * Subloaded SWFs in Flash Lite may not have access to _root.createEmptyMovieClip(), so we needed a way * to step through all the MovieClips on the Stage (including nested ones) until one is found that * can be used with createEmptyMovieClip(). Note: when getBytesLoaded() returns undefined, we know that * the MovieClip has been deemed off-limits by the Flash Player and it won't allow createEmptyMovieClip() * on that MovieClip. **/ private static function findSubloadedSWF(mc:MovieClip):MovieClip { for (var p:String in mc) { if (typeof(mc[p]) == "movieclip") { if (mc[p]._url != _root._url && mc[p].getBytesLoaded() != undefined) { return mc[p]; } else if (findSubloadedSWF(mc[p]) != undefined) { return findSubloadedSWF(mc[p]); } } } return undefined; } /** * @private * This method was made public because in some very rare situations (like when an AS2/AS1-based swf * is subloaded into an AS3-based one, then unloaded, and another one is loaded subsequently), a bug in the Flash Player * prevented the onEnterFrame from working properly and the _root reference became invalid. If you run into a * situation where tweens appear to stop working in subsequent subloads, just make a call to TweenLite.jumpStart(_root) * on the first frame of those subloaded swfs to jump-start the rendering. **/ public static function jumpStart(root:MovieClip):Void { if (_timingClip != undefined) { _timingClip.removeMovieClip(); } var mc:MovieClip = (root.getBytesLoaded() == undefined) ? findSubloadedSWF(root) : root; //subloaded swfs won't return getBytesLoaded() in Flash Lite, and it locks us out from being able to createEmptyMovieClip(), so we must find the subloaded clip to do it there instead. var l:Number = 999; //Don't just do getNextHighestDepth() because often developers will hard-code stuff that uses low levels which would overwrite the TweenLite clip. Start at level 999 and make sure nothing's there. If there is, move up until we find an empty level. while (mc.getInstanceAtDepth(l) != undefined) { l++; } _timingClip = mc.createEmptyMovieClip("__tweenLite" + String(version).split(".").join("_"), l); _timingClip.onEnterFrame = updateAll; TweenLite.to({}, 0, {}); //just to properly instantiate the class and get all the necessary variables/properties set up before updateAll() starts getting called. rootTimeline.cachedTime = rootTimeline.cachedTotalTime = ((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale; //so that the start time of subsequent tweens that get created are correct. Otherwise, in cases where an AS2/AS1 swf is unloaded from an AS3 swf and time elapses and then another AS2/AS1 swf is loaded, the tweens will have their cachedStartTime set to the timeline's cachedTotalTime which won't have been updated because the onEnterFrame may have been stopped because of the bug in Flash. } }LActions for Scene 1: Frame 1 of Layer Name AS2 - Global// --------------------------------------------- // Global Items // --------------------------------------------- // Tween Nano, must have com.greensock next to FLA. import com.greensock.*; import com.greensock.easing.*; // Auto Resizing Border border._x = 0 border._y = 0 border._width = Stage.width-.5 border._height = Stage.height-.5 // Auto Resize Clicktag ct._x = 0 ct._y = 0 ct._alpha = 0; ct._width = Stage.width ct._height = Stage.height // Clicktags (calls to HTML ufo.js) // Use the format catchTheTag(clickTag + number), no quotes // This also works for multi clicks, clickTag2, clickTag3, etc. function catchTheTag(clickToUse){ getURL(clickToUse, "_blank"); trace("Clicktag used : "+ clickToUse.toString()); } // Clicktag Button ct.onRelease = function(){ catchTheTag(clickTag1); } // CTA Button Functionality cta.onRelease = function(){ catchTheTag(clickTag1); } cta.onRollOver = function(){ TweenNano.to(cta.rollColor, .5, {_alpha:100}); cta.shine.gotoAndPlay(2); } cta.onRollOut = function(){ TweenNano.to(cta.rollColor, .5, {_alpha:0}); } LWLfL L L L LLL/LGL_L wL!L%L&L)L*L++L.OL/b'Actions for MC : Shine: Frame 1 of Layer Name Layer 5stop();'n?+Actions for MC : Shine: Frame 34 of Layer Name Layer 5stop();?+#pduActions for Scene 1: Frame 1 of Layer Name AS2 - Banner Specific// Tween Nano, must have com.greensock next to FLA. import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate([MotionBlurPlugin]); // Coords First Landing var endProdY1:Number = 36; var endBGY1:Number = -56; var yellBarX1:Number = -28.5; // Coords Second Landing var endProdY2:Number = 123.5; var endBGY2:Number = 31.5; var yellBarY1:Number = 200; var endTextY1:Number = 41.85; CustomEase.create("myCustomEase",[{s:0, cp:0.558, e:0.804}, {s:0.804, cp:1.05, e:0.984}, {s:0.984, cp:0.918, e:0.9}, {s:0.9, cp:0.882, e:0.9}, {s:0.9, cp:0.918, e:1}]); // 01 function startBanner() { // Intro Panel Reading Time TweenLite.to(ct,2,{_alpha:0, onComplete:bringProductIn}); } // 02 function bringProductIn() { TweenLite.to(endPanel,.75,{_y:endBGY1, motionBlur:{strength:0.2, quality:3}, ease:CustomEase.byName("myCustomEase")}); TweenLite.to(endProd,.75,{_y:endProdY1, motionBlur:{strength:0.2, quality:3}, ease:CustomEase.byName("myCustomEase")}); // timer TweenLite.to(ct,1.5,{_alpha:0, onComplete:bringYellowBarIn}); } // 03 function bringYellowBarIn() { TweenLite.to(yellowBar,1,{_x:yellBarX1, ease:Quad.easeOut, onComplete:shiftProdDown}); TweenLite.to(yellowBar.txt_it,0,{_alpha:100, delay:.7}); // Delay one sec } // 04 function shiftProdDown() { TweenLite.to(endText,.75,{_y:endTextY1, ease:Quad.easeOut}); TweenLite.to(yellowBar,.75,{_y:yellBarY1, ease:Quad.easeOut}); TweenLite.to(endPanel,.75,{_y:endBGY2, motionBlur:{strength:0.2, quality:3}, ease:Quad.easeOut}); TweenLite.to(endProd,.75,{_y:endProdY2, motionBlur:{strength:0.2, quality:3}, ease:Quad.easeOut, onComplete:bringEndTextIn}); } // 05 function bringEndTextIn() { TweenLite.to(cta,.5,{_alpha:100, onComplete:shineCTA}); } // 06 function shineCTA() { cta.shine.gotoAndPlay(2); TweenLite.to(ct,1.75,{_alpha:0}); } startBanner(); var looped:Boolean = false; function restartAd() { if (looped == true) { trace("done"); } else { TweenLite.to(whiteout,.25,{_alpha:100, onComplete:resetEverything}); } } function resetEverything() { yellowBar.txt_it._alpha = 0; endProd._y = -219; endPanel._y = -311; endText._y = -48.15; yellowBar._y = 112.5; yellowBar._x = -268.5; cta._alpha = 0; TweenLite.to(whiteout,.50,{_alpha:0, onComplete:startBanner}); looped = true; }du du  du! du#J du( du)+ du/ du0 du1tdu2 du7du<%du=HduDduEduGduL.duMLduN`duOtduPduQduRduSduT,du7du du du dudududududu?NduAa