Copyright 2008-2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | public class TweenAlign { 17 | public static const NORMAL:String = "normal"; 18 | public static const SEQUENCE:String = "sequence"; 19 | public static const START:String = "start"; 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/com/greensock/easing/Bounce.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * Eases, bouncing either at the beginning (easeIn), the end (easeOut), or both (easeInOut). 10 | *Bounce
is a convenience class that congregates the 3 types of Bounce eases (BounceIn, BounceOut,
11 | * and BounceInOut) as static properties so that they can be referenced using the standard synatax, like
12 | * Bounce.easeIn
, Bounce.easeOut
, and Bounce.easeInOut
.
13 | *
14 | * Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
15 | * 16 | * @author Jack Doyle, jack@greensock.com 17 | **/ 18 | final public class Bounce { 19 | 20 | /** Eases out, bouncing at the end. **/ 21 | public static var easeOut:BounceOut = new BounceOut(); 22 | 23 | /** Bounces slightly at first, then to a greater degree over time, accelerating as the ease progresses. **/ 24 | public static var easeIn:BounceIn = new BounceIn(); 25 | 26 | /** Bounces in increasing degree towards the center of the ease, then eases out, bouncing to the end (decreasing in degree at the end). **/ 27 | public static var easeInOut:BounceInOut = new BounceInOut(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/com/greensock/easing/BounceIn.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Bounces slightly at first, then to a greater degree over time, accelerating as the ease progresses. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class BounceIn extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:BounceIn = new BounceIn(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | if ((p = 1 - p) < 1 / 2.75) { 24 | return 1 - (7.5625 * p * p); 25 | } else if (p < 2 / 2.75) { 26 | return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + .75); 27 | } else if (p < 2.5 / 2.75) { 28 | return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + .9375); 29 | } else { 30 | return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + .984375); 31 | } 32 | } 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/com/greensock/easing/BounceInOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Bounces in increasing degree towards the center of the ease, then eases out, bouncing to the end (decreasing in degree at the end). 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class BounceInOut extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:BounceInOut = new BounceInOut(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | var invert:Boolean; 24 | if (p < 0.5) { 25 | invert = true; 26 | p = 1 - (p * 2); 27 | } else { 28 | p = (p * 2) - 1; 29 | } 30 | if (p < 1 / 2.75) { 31 | p = 7.5625 * p * p; 32 | } else if (p < 2 / 2.75) { 33 | p = 7.5625 * (p -= 1.5 / 2.75) * p + .75; 34 | } else if (p < 2.5 / 2.75) { 35 | p = 7.5625 * (p -= 2.25 / 2.75) * p + .9375; 36 | } else { 37 | p = 7.5625 * (p -= 2.625 / 2.75) * p + .984375; 38 | } 39 | return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5; 40 | } 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/com/greensock/easing/BounceOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases out, bouncing at the end. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class BounceOut extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:BounceOut = new BounceOut(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | if (p < 1 / 2.75) { 24 | return 7.5625 * p * p; 25 | } else if (p < 2 / 2.75) { 26 | return 7.5625 * (p -= 1.5 / 2.75) * p + .75; 27 | } else if (p < 2.5 / 2.75) { 28 | return 7.5625 * (p -= 2.25 / 2.75) * p + .9375; 29 | } else { 30 | return 7.5625 * (p -= 2.625 / 2.75) * p + .984375; 31 | } 32 | } 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/com/greensock/easing/Circ.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * Eases with an abrupt change in velocity either at the beginning (easeIn), the end (easeOut), or both (easeInOut). 10 | *Circ
is a convenience class that congregates the 3 types of Circ eases (CircIn, CircOut,
11 | * and CircInOut) as static properties so that they can be referenced using the standard synatax, like
12 | * Circ.easeIn
, Circ.easeOut
, and Circ.easeInOut
.
13 | *
14 | * Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
15 | * 16 | * @author Jack Doyle, jack@greensock.com 17 | **/ 18 | final public class Circ { 19 | 20 | /** Eases out with an abrupt change in velocity. **/ 21 | public static var easeOut:CircOut = new CircOut(); 22 | 23 | /** Eases in with an abrupt change in velocity. **/ 24 | public static var easeIn:CircIn = new CircIn(); 25 | 26 | /** Eases in and out with an abrupt change in velocity. **/ 27 | public static var easeInOut:CircInOut = new CircInOut(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/com/greensock/easing/CircIn.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases in with an abrupt change in velocity. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class CircIn extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:CircIn = new CircIn(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | return -(Math.sqrt(1 - (p * p)) - 1); 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/greensock/easing/CircInOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases in and out with an abrupt change in velocity. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class CircInOut extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:CircInOut = new CircInOut(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1); 24 | } 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/greensock/easing/CircOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases out with an abrupt change in velocity. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class CircOut extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:CircOut = new CircOut(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | return Math.sqrt(1 - (p = p - 1) * p); 24 | } 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/greensock/easing/ExpoIn.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases in a strong fashion starting out slowly and then accelerating. Produces an effect similar to the 11 | * popular "Zeno's paradox" style of scripted easing, where each interval of time decreases the remaining 12 | * distance by a constant proportion. 13 | * 14 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
15 | * 16 | * @author Jack Doyle, jack@greensock.com 17 | **/ 18 | final public class ExpoIn extends Ease { 19 | 20 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 21 | public static var ease:ExpoIn = new ExpoIn(); 22 | 23 | /** @inheritDoc **/ 24 | override public function getRatio(p:Number):Number { 25 | return Math.pow(2, 10 * (p - 1)) - 0.001; 26 | } 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/com/greensock/easing/ExpoInOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases in a strong fashion starting out slowly and then accelerating, then decelerating at the end. 11 | * Produces an effect similar to the popular "Zeno's paradox" style of scripted easing, where each 12 | * interval of time decreases the remaining distance by a constant proportion. 13 | * 14 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
15 | * 16 | * @author Jack Doyle, jack@greensock.com 17 | **/ 18 | final public class ExpoInOut extends Ease { 19 | 20 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 21 | public static var ease:ExpoInOut = new ExpoInOut(); 22 | 23 | /** @inheritDoc **/ 24 | override public function getRatio(p:Number):Number { 25 | return ((p*=2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); 26 | } 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/com/greensock/easing/ExpoOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases out in a strong fashion starting out fast and then decelerating. Produces an effect similar to the 11 | * popular "Zeno's paradox" style of scripted easing, where each interval of time decreases the remaining 12 | * distance by a constant proportion. 13 | * 14 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
15 | * 16 | * @author Jack Doyle, jack@greensock.com 17 | **/ 18 | final public class ExpoOut extends Ease { 19 | 20 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 21 | public static var ease:ExpoOut = new ExpoOut(); 22 | 23 | /** @inheritDoc **/ 24 | override public function getRatio(p:Number):Number { 25 | return 1 - Math.pow(2, -10 * p); 26 | } 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/com/greensock/easing/Sine.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * Eases with a relatively low power either at the beginning (easeIn), the end (easeOut), or both (easeInOut). 10 | *Sine
is a convenience class that congregates the 3 types of Sine eases (SineIn, SineOut,
11 | * and SineInOut) as static properties so that they can be referenced using the standard synatax, like
12 | * Sine.easeIn
, Sine.easeOut
, and Sine.easeInOut
.
13 | *
14 | * Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
15 | * 16 | * @author Jack Doyle, jack@greensock.com 17 | **/ 18 | final public class Sine { 19 | 20 | /** Eases out with slight deceleration. **/ 21 | public static var easeOut:SineOut = new SineOut(); 22 | 23 | /** Eases in with slight acceleration. **/ 24 | public static var easeIn:SineIn = new SineIn(); 25 | 26 | /** Eases in and then out with slight acceleration/deceleration. **/ 27 | public static var easeInOut:SineInOut = new SineInOut(); 28 | } 29 | } -------------------------------------------------------------------------------- /src/com/greensock/easing/SineIn.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases in with slight acceleration. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class SineIn extends Ease { 17 | 18 | /** @private **/ 19 | private static const _HALF_PI:Number = Math.PI / 2; 20 | 21 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 22 | public static var ease:SineIn = new SineIn(); 23 | 24 | /** @inheritDoc **/ 25 | override public function getRatio(p:Number):Number { 26 | return -Math.cos(p * _HALF_PI) + 1; 27 | } 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/com/greensock/easing/SineInOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases in and then out with slight acceleration/deceleration. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class SineInOut extends Ease { 17 | 18 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 19 | public static var ease:SineInOut = new SineInOut(); 20 | 21 | /** @inheritDoc **/ 22 | override public function getRatio(p:Number):Number { 23 | return -0.5 * (Math.cos(Math.PI * p) - 1); 24 | } 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/greensock/easing/SineOut.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0 3 | * DATE: 2012-03-22 4 | * AS3 (AS2 and JS versions are also available) 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing { 8 | /** 9 | * @private 10 | * Eases out with slight deceleration. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class SineOut extends Ease { 17 | 18 | /** @private **/ 19 | private static const _HALF_PI:Number = Math.PI / 2; 20 | 21 | /** The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time. **/ 22 | public static var ease:SineOut = new SineOut(); 23 | 24 | /** @inheritDoc **/ 25 | override public function getRatio(p:Number):Number { 26 | return Math.sin(p * _HALF_PI); 27 | } 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/com/greensock/easing/core/EasePoint.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 1.0.0 3 | * DATE: 2013-03-27 4 | * AS3 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.easing.core { 8 | /** 9 | * @private 10 | * Used by RoughEase. Couldn't use an internal class due to instantiation order issues caused by referencing an EasePoint inside the RoughEase constructor when we create an "ease" public static var that's a RoughEase. 11 | * 12 | *Copyright 2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
13 | * 14 | * @author Jack Doyle, jack@greensock.com 15 | **/ 16 | final public class EasePoint { 17 | public var time:Number; 18 | public var gap:Number; 19 | public var value:Number; 20 | public var change:Number; 21 | public var next:EasePoint; 22 | public var prev:EasePoint; 23 | 24 | public function EasePoint(time:Number, value:Number, next:EasePoint) { 25 | this.time = time; 26 | this.value = value; 27 | if (next) { 28 | this.next = next; 29 | next.prev = this; 30 | this.change = next.value - value; 31 | this.gap = next.time - time; 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/com/greensock/events/TweenEvent.as: -------------------------------------------------------------------------------- 1 | package com.greensock.events { 2 | import flash.events.Event; 3 | /** 4 | * Used for dispatching events from the GreenSock Animation Platform. 5 | * 6 | *Copyright 2008-2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
7 | * 8 | * @author Jack Doyle, jack@greensock.com 9 | */ 10 | public class TweenEvent extends Event { 11 | /** @private **/ 12 | public static const VERSION:Number = 12.0; 13 | public static const START:String = "start"; 14 | public static const UPDATE:String = "change"; 15 | public static const COMPLETE:String = "complete"; 16 | public static const REVERSE_COMPLETE:String = "reverseComplete"; 17 | public static const REPEAT:String = "repeat"; 18 | 19 | public function TweenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 20 | super(type, bubbles, cancelable); 21 | } 22 | 23 | public override function clone():Event { 24 | return new TweenEvent(this.type, this.bubbles, this.cancelable); 25 | } 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /src/com/greensock/plugins/BezierThroughPlugin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 12.0 3 | * DATE: 2012-01-12 4 | * AS3 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.plugins { 8 | import com.greensock.TweenLite; 9 | /** 10 | * @private 11 | * [AS3/AS2 only] LEGACY 12 | * 13 | *Copyright 2008-2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
14 | * 15 | * @author Jack Doyle, jack@greensock.com 16 | */ 17 | public class BezierThroughPlugin extends BezierPlugin { 18 | /** @private **/ 19 | public static const API:Number = 2; //If the API/Framework for plugins changes in the future, this number helps determine compatibility 20 | 21 | /** @private **/ 22 | public function BezierThroughPlugin() { 23 | super(); 24 | _propName = "bezierThrough"; 25 | } 26 | 27 | /** @private **/ 28 | override public function _onInitTween(target:Object, value:*, tween:TweenLite):Boolean { 29 | if (value is Array) { 30 | value = {values:value}; 31 | } 32 | value.type = "thru"; 33 | return super._onInitTween(target, value, tween); 34 | } 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/greensock/plugins/RemoveTintPlugin.as: -------------------------------------------------------------------------------- 1 | /** 2 | * VERSION: 12.0 3 | * DATE: 2012-01-14 4 | * AS3 5 | * UPDATES AND DOCS AT: http://www.greensock.com 6 | **/ 7 | package com.greensock.plugins { 8 | import com.greensock.plugins.TintPlugin; 9 | /** 10 | * [AS3/AS2 only] [deprecated in favor of tint:null] Removes the tint of a DisplayObject over time. 11 | * 12 | *USAGE:
13 | *Copyright 2008-2014, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.
23 | * 24 | * @author Jack Doyle, jack@greensock.com 25 | */ 26 | public class RemoveTintPlugin extends TintPlugin { 27 | /** @private **/ 28 | public static const API:Number = 2; //If the API/Framework for plugins changes in the future, this number helps determine compatibility 29 | 30 | /** @private **/ 31 | public function RemoveTintPlugin() { 32 | super(); 33 | _propName = "removeTint"; 34 | } 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketError.as: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * Copyright 2010-2012 Worlize Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ***********************************************************************/ 16 | 17 | package com.worlize.websocket 18 | { 19 | 20 | public class WebSocketError extends Error 21 | { 22 | public function WebSocketError(message:* = "", id:* = 0) 23 | { 24 | super(message, id); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketErrorEvent.as: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * Copyright 2010-2012 Worlize Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ***********************************************************************/ 16 | 17 | package com.worlize.websocket 18 | { 19 | import flash.events.ErrorEvent; 20 | 21 | public class WebSocketErrorEvent extends ErrorEvent 22 | { 23 | public static const CONNECTION_FAIL:String = "connectionFail"; 24 | public static const ABNORMAL_CLOSE:String = "abnormalClose"; 25 | 26 | public function WebSocketErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") 27 | { 28 | super(type, bubbles, cancelable, text); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketEvent.as: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * Copyright 2010-2012 Worlize Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ***********************************************************************/ 16 | 17 | package com.worlize.websocket 18 | { 19 | import flash.events.Event; 20 | 21 | public class WebSocketEvent extends Event 22 | { 23 | public static const OPEN:String = "open"; 24 | public static const CLOSED:String = "closed"; 25 | public static const MESSAGE:String = "message"; 26 | public static const FRAME:String = "frame"; 27 | public static const PING:String = "ping"; 28 | public static const PONG:String = "pong"; 29 | 30 | public var message:WebSocketMessage; 31 | public var frame:WebSocketFrame; 32 | 33 | public function WebSocketEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) 34 | { 35 | super(type, bubbles, cancelable); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketMessage.as: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * Copyright 2010-2012 Worlize Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ***********************************************************************/ 16 | 17 | package com.worlize.websocket 18 | { 19 | import flash.utils.ByteArray; 20 | 21 | public class WebSocketMessage 22 | { 23 | public static const TYPE_BINARY:String = "binary"; 24 | public static const TYPE_UTF8:String = "utf8"; 25 | 26 | public var type:String; 27 | public var utf8Data:String; 28 | public var binaryData:ByteArray; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketOpcode.as: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * Copyright 2010-2012 Worlize Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ***********************************************************************/ 16 | 17 | package com.worlize.websocket 18 | { 19 | 20 | public final class WebSocketOpcode 21 | { 22 | // non-control opcodes 23 | public static const CONTINUATION:int = 0x00; 24 | public static const TEXT_FRAME:int = 0x01; 25 | public static const BINARY_FRAME:int = 0x02; 26 | public static const EXT_DATA:int = 0x03; 27 | // 0x04 - 0x07 = Reserved for further control frames 28 | 29 | // Control opcodes 30 | public static const CONNECTION_CLOSE:int = 0x08; 31 | public static const PING:int = 0x09; 32 | public static const PONG:int = 0x0A; 33 | public static const EXT_CONTROL:int = 0x0B; 34 | // 0x0C - 0x0F = Reserved for further control frames 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketState.as: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * Copyright 2010-2012 Worlize Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ***********************************************************************/ 16 | 17 | package com.worlize.websocket 18 | { 19 | 20 | public final class WebSocketState 21 | { 22 | public static const CONNECTING:int = 0; 23 | public static const OPEN:int = 1; 24 | public static const CLOSED:int = 2; 25 | public static const INIT:int = 3; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/worlize/websocket/WebSocketURI.as: -------------------------------------------------------------------------------- 1 | package com.worlize.websocket 2 | { 3 | 4 | public class WebSocketURI 5 | { 6 | public var scheme:String; 7 | public var host:String; 8 | public var port:uint; 9 | public var path:String; 10 | 11 | public function WebSocketURI(host:String, port:uint = 80, scheme:String = "ws", path:String = "/") 12 | { 13 | this.host = host; 14 | this.port = port; 15 | this.scheme = scheme; 16 | this.path = path; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/game/controls/ComboTotal.as: -------------------------------------------------------------------------------- 1 | package game.controls 2 | { 3 | import flash.display.DisplayObjectContainer; 4 | import game.GameOptions; 5 | 6 | public class ComboTotal extends Combo 7 | { 8 | public function ComboTotal(options:GameOptions, parent:DisplayObjectContainer) 9 | { 10 | super(options, parent); 11 | } 12 | 13 | override public function get id():String 14 | { 15 | return GameLayoutManager.LAYOUT_TOTAL; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackEvent.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataOutput; 4 | 5 | public class GamePlaybackEvent 6 | { 7 | public var id:uint; 8 | public var index:uint; 9 | public var timestamp:uint; 10 | 11 | public function GamePlaybackEvent(id:uint, index:uint, timestamp:uint) 12 | { 13 | this.id = id; 14 | this.index = index; 15 | this.timestamp = timestamp; 16 | } 17 | 18 | public function writeData(output:IDataOutput):void 19 | { 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackFocusChange.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataInput; 4 | import flash.utils.IDataOutput; 5 | 6 | public class GamePlaybackFocusChange extends GamePlaybackEvent 7 | { 8 | public static const ID:uint = 5; 9 | 10 | public var isFocus:Boolean; 11 | 12 | public function GamePlaybackFocusChange(index:uint, timestamp:int, isFocus:Boolean):void 13 | { 14 | super(ID, index, timestamp); 15 | this.isFocus = isFocus; 16 | } 17 | 18 | override public function writeData(output:IDataOutput):void 19 | { 20 | output.writeByte(ID); 21 | output.writeByte(4 + 4 + 1); // Length of everything below this. 22 | output.writeUnsignedInt(index); 23 | output.writeUnsignedInt(timestamp); 24 | output.writeByte(isFocus ? 1 : 0); 25 | } 26 | 27 | public static function readData(input:IDataInput):GamePlaybackFocusChange 28 | { 29 | var index:uint = input.readUnsignedInt(); 30 | var timestamp:uint = input.readUnsignedInt(); 31 | var isFocus:Boolean = input.readUnsignedByte() == 1 ? true : false; 32 | 33 | return new GamePlaybackFocusChange(index, timestamp, isFocus); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackJudgeResult.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataInput; 4 | import flash.utils.IDataOutput; 5 | 6 | public class GamePlaybackJudgeResult extends GamePlaybackEvent 7 | { 8 | public static const ID:uint = 2; 9 | 10 | public var noteID:int; 11 | public var accuracy:int; 12 | 13 | public function GamePlaybackJudgeResult(index:uint, noteID:uint, accuracy:int, timestamp:Number):void 14 | { 15 | super(ID, index, timestamp); 16 | this.noteID = index; 17 | this.accuracy = accuracy; 18 | } 19 | 20 | override public function writeData(output:IDataOutput):void 21 | { 22 | output.writeByte(ID); 23 | output.writeByte(4 + 4 + 4 + 2); // Length of everything below this. 24 | output.writeUnsignedInt(index); 25 | output.writeUnsignedInt(timestamp); 26 | output.writeInt(noteID); 27 | output.writeShort(accuracy); 28 | } 29 | 30 | public static function readData(input:IDataInput):GamePlaybackJudgeResult 31 | { 32 | var index:uint = input.readUnsignedInt(); 33 | var timestamp:uint = input.readUnsignedInt(); 34 | var noteID:int = input.readInt(); 35 | var accuracy:int = input.readShort(); 36 | 37 | return new GamePlaybackJudgeResult(index, noteID, accuracy, timestamp); 38 | } 39 | 40 | public function toString():String 41 | { 42 | return index + ":" + timestamp + ":" + noteID + ":" + accuracy; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackKeyDown.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataInput; 4 | import flash.utils.IDataOutput; 5 | 6 | public class GamePlaybackKeyDown extends GamePlaybackEvent 7 | { 8 | public static const ID:uint = 3; 9 | 10 | public var key:uint; 11 | 12 | public function GamePlaybackKeyDown(index:uint, timestamp:Number, key:uint):void 13 | { 14 | super(ID, index, timestamp); 15 | this.key = key; 16 | } 17 | 18 | override public function writeData(output:IDataOutput):void 19 | { 20 | output.writeByte(ID); 21 | output.writeByte(4 + 4 + 1); // Length of everything below this. 22 | output.writeUnsignedInt(index); 23 | output.writeUnsignedInt(timestamp); 24 | output.writeByte(key); 25 | } 26 | 27 | public static function readData(input:IDataInput):GamePlaybackKeyDown 28 | { 29 | var index:uint = input.readUnsignedInt(); 30 | var timestamp:uint = input.readUnsignedInt(); 31 | var key:uint = input.readUnsignedByte(); 32 | 33 | return new GamePlaybackKeyDown(index, timestamp, key); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackKeyUp.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataInput; 4 | import flash.utils.IDataOutput; 5 | 6 | public class GamePlaybackKeyUp extends GamePlaybackEvent 7 | { 8 | public static const ID:uint = 4; 9 | 10 | public var key:uint; 11 | 12 | public function GamePlaybackKeyUp(index:uint, timestamp:Number, key:uint):void 13 | { 14 | super(ID, index, timestamp); 15 | this.key = key; 16 | } 17 | 18 | override public function writeData(output:IDataOutput):void 19 | { 20 | output.writeByte(ID); 21 | output.writeByte(4 + 4 + 1); // Length of everything below this. 22 | output.writeUnsignedInt(index); 23 | output.writeUnsignedInt(timestamp); 24 | output.writeByte(key); 25 | } 26 | 27 | public static function readData(input:IDataInput):GamePlaybackKeyUp 28 | { 29 | var index:uint = input.readUnsignedInt(); 30 | var timestamp:uint = input.readUnsignedInt(); 31 | var key:uint = input.readUnsignedByte(); 32 | 33 | return new GamePlaybackKeyUp(index, timestamp, key); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackSpectatorEnd.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataInput; 4 | import flash.utils.IDataOutput; 5 | 6 | public class GamePlaybackSpectatorEnd extends GamePlaybackEvent 7 | { 8 | public static const ID:uint = 7; 9 | 10 | public var direction:String; 11 | 12 | public function GamePlaybackSpectatorEnd(index:uint, timestamp:Number):void 13 | { 14 | super(ID, index, timestamp); 15 | } 16 | 17 | override public function writeData(output:IDataOutput):void 18 | { 19 | output.writeByte(ID); 20 | output.writeByte(4 + 4 + 1); // Length of everything below this. 21 | output.writeUnsignedInt(index); 22 | output.writeUnsignedInt(timestamp); 23 | output.writeByte(0); 24 | } 25 | 26 | public static function readData(input:IDataInput):GamePlaybackSpectatorEnd 27 | { 28 | var index:uint = input.readUnsignedInt(); 29 | var timestamp:uint = input.readUnsignedInt(); 30 | var end_type:uint = input.readByte(); 31 | 32 | return new GamePlaybackSpectatorEnd(index, timestamp); 33 | } 34 | 35 | public function toString():String 36 | { 37 | return "[GamePlaybackSpectatorEnd = " + index + ":" + timestamp + "]"; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/game/events/GamePlaybackSpectatorHit.as: -------------------------------------------------------------------------------- 1 | package game.events 2 | { 3 | import flash.utils.IDataInput; 4 | import flash.utils.IDataOutput; 5 | 6 | public class GamePlaybackSpectatorHit extends GamePlaybackEvent 7 | { 8 | public static const ID:uint = 6; 9 | 10 | public var direction:String; 11 | 12 | public function GamePlaybackSpectatorHit(index:uint, timestamp:Number, direction:String):void 13 | { 14 | super(ID, index, timestamp); 15 | this.direction = direction; 16 | } 17 | 18 | override public function writeData(output:IDataOutput):void 19 | { 20 | output.writeByte(ID); 21 | output.writeByte(4 + 4 + 1); // Length of everything below this. 22 | output.writeUnsignedInt(index); 23 | output.writeUnsignedInt(timestamp); 24 | output.writeByte(direction.charCodeAt(0)); 25 | } 26 | 27 | public static function readData(input:IDataInput):GamePlaybackSpectatorHit 28 | { 29 | var index:uint = input.readUnsignedInt(); 30 | var timestamp:uint = input.readUnsignedInt(); 31 | var direction:String = String.fromCharCode(input.readByte()); 32 | 33 | return new GamePlaybackSpectatorHit(index, timestamp, direction); 34 | } 35 | 36 | public function toString():String 37 | { 38 | return "[GamePlaybackSpectatorHit = " + index + ":" + timestamp + ":" + direction + "]"; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/game/graph/GraphCrossPoint.as: -------------------------------------------------------------------------------- 1 | package game.graph 2 | { 3 | 4 | public class GraphCrossPoint 5 | { 6 | public var index:int; 7 | public var x:Number; 8 | public var y:Number; 9 | public var timing:Number; 10 | public var color:uint; 11 | public var score:int; 12 | public var column:String; 13 | 14 | public function GraphCrossPoint(index:int, pos_x:Number, pos_y:Number, timing:Number, color:uint, score:int, column:String):void 15 | { 16 | this.index = index; 17 | this.x = pos_x; 18 | this.y = pos_y; 19 | this.timing = timing; 20 | this.color = color; 21 | this.score = score; 22 | this.column = column; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin1.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin1 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin1.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 1; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "Default", 16 | "rotation": 90, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin10.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin10 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin10.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 10; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "FFR Orbular", 16 | "rotation": 0, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin2.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin2 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin2.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 2; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "Velocity", 16 | "rotation": 90, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin3.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin3 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin3.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 3; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "BeatMania", 16 | "rotation": 0, 17 | "width": 88, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin4.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin4 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin4.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 4; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "SM Orbular", 16 | "rotation": 0, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin5.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin5 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin5.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 5; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "Metal", 16 | "rotation": 90, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin6.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin6 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin6.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 6; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "Delta", 16 | "rotation": 90, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin7.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin7 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin7.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 7; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "Delta (White)", 16 | "rotation": 90, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin8.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin8 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin8.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 8; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "BeatMania (v2)", 16 | "rotation": 0, 17 | "width": 70, 18 | "height": 51} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskin9.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | public class EmbedNoteskin9 extends EmbedNoteskinBase 6 | { 7 | [Embed(source = "NoteSkin9.swf", mimeType = 'application/octet-stream')] 8 | private static const EMBED_SWF:Class; 9 | 10 | private static const ID:int = 9; 11 | 12 | override public function getData():Object 13 | { 14 | return {"id": ID, 15 | "name": "Minestorm", 16 | "rotation": 0, 17 | "width": 64, 18 | "height": 64} 19 | } 20 | 21 | override public function getBytes():ByteArray 22 | { 23 | return new EMBED_SWF(); 24 | } 25 | 26 | override public function getID():int 27 | { 28 | return ID; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/game/noteskins/EmbedNoteskinBase.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | 4 | import flash.utils.ByteArray; 5 | 6 | public class EmbedNoteskinBase 7 | { 8 | public function getData():Object 9 | { 10 | return null; 11 | } 12 | 13 | public function getBytes():ByteArray 14 | { 15 | return null; 16 | } 17 | 18 | public function getID():int 19 | { 20 | return 1; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/game/noteskins/ExternalNoteskin.as: -------------------------------------------------------------------------------- 1 | package game.noteskins 2 | { 3 | 4 | public class ExternalNoteskin 5 | { 6 | public var file:String; 7 | public var data:Object; 8 | public var json:String; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin1.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:06224097b3574c466a2862b58a09c3c1e89a7f14b95a626fa5520a2e0b18d6cb 3 | size 66653 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin10.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:db725724518cf8170360f7772a7d0d22895962ab4f7fc2bc1aec99cc9af697d5 3 | size 50723 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin2.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5de2c0e4adf614ec9947e8665185ad4a80ee37da5a73aeba4a4ee90e6fcef8e9 3 | size 16909 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin3.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6aae9d9f78853cb122a135a818719afcb7e2ed3379c29156cee44d7a7460768f 3 | size 15827 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin4.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cde3da948233805c97a60a8c6bfe4d253ad84b076125efe841dbf1e13c582c9e 3 | size 32294 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin5.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8782acc4b8c6875114bfc274703e60e7129841ba73da621b5e7e220efaafefde 3 | size 46663 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin6.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:16b04ffb2770fc57c645b96defca59ab60169de63206c867caa220e692a9524e 3 | size 36576 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin7.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e25ff19eaa4acd915c46b2780b7d33ea7fad863a8f49397cb17d08fcd45e4d45 3 | size 39441 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin8.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0cd1ce584e07de4995ad694f5b5f1672a5fc9b1e6cd53d4a8ce03c63358459b6 3 | size 18099 4 | -------------------------------------------------------------------------------- /src/game/noteskins/NoteSkin9.swf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:835470cc7ed7a4dcf365713cf02acaa054d8d096326124ae56ea996c1c053bc3 3 | size 14000 4 | -------------------------------------------------------------------------------- /src/game/results/GameResultBackground.as: -------------------------------------------------------------------------------- 1 | package game.results 2 | { 3 | import assets.GameBackgroundStripes; 4 | import flash.display.BitmapData; 5 | import flash.display.GradientType; 6 | import flash.display.Sprite; 7 | import flash.geom.Matrix; 8 | 9 | public class GameResultBackground extends Sprite 10 | { 11 | static public var BG_LIGHT:int = 0x1495BD; 12 | static public var BG_DARK:int = 0x033242; 13 | 14 | public function GameResultBackground():void 15 | { 16 | // Create Background 17 | var _matrix:Matrix = new Matrix(); 18 | _matrix.createGradientBox(Main.GAME_WIDTH, Main.GAME_HEIGHT, 5.75); 19 | this.graphics.clear(); 20 | this.graphics.beginGradientFill(GradientType.LINEAR, [BG_LIGHT, BG_DARK], [1, 1], [0x00, 0xFF], _matrix); 21 | this.graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT); 22 | this.graphics.endFill(); 23 | this.cacheAsBitmap = true; 24 | this.cacheAsBitmapMatrix = _matrix; 25 | 26 | var bt:BitmapData = new GameBackgroundStripes(); 27 | this.graphics.beginBitmapFill(bt, null, false); 28 | this.graphics.drawRect(0, 0, Main.GAME_WIDTH, Main.GAME_HEIGHT); 29 | this.graphics.endFill(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/menu/MenuButton.as: -------------------------------------------------------------------------------- 1 | package menu 2 | { 3 | import classes.ui.BoxButton; 4 | import flash.display.DisplayObjectContainer; 5 | 6 | public class MenuButton extends BoxButton 7 | { 8 | public var panel:String; 9 | public var index:String; 10 | 11 | public function MenuButton(parent:DisplayObjectContainer = null, xpos:Number = 0, wid:Number = 0, message:String = "", isActive:Boolean = false, listener:Function = null):void 12 | { 13 | super(parent, xpos, 0, wid, 28, message, 12, listener); 14 | super.active = isActive; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/menu/MenuSongSelectionOptions.as: -------------------------------------------------------------------------------- 1 | package menu 2 | { 3 | 4 | public class MenuSongSelectionOptions 5 | { 6 | public var activeGenre:int = 0; 7 | public var activeIndex:int = -1; 8 | public var activeSongId:int = -1; 9 | public var pageNumber:int = 0; 10 | public var infoTab:int = 0; 11 | 12 | public var scroll_position:Number = 0; 13 | 14 | public var last_search_text:String; 15 | public var last_search_type:String; 16 | 17 | public var last_sort_type:String; 18 | public var last_sort_order:String; 19 | 20 | public var isFilter:Boolean = false; 21 | public var filter:Function = null; 22 | 23 | public var queuePlaylist:Array = []; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/popups/filebrowser/FileBrowserDifficultyItem.as: -------------------------------------------------------------------------------- 1 | package popups.filebrowser 2 | { 3 | import assets.menu.ChartDifficultyLargeItem; 4 | import classes.ui.Text; 5 | 6 | public class FileBrowserDifficultyItem extends DifficultyItem 7 | { 8 | public var cache_info:FileFolderItem; 9 | 10 | public function FileBrowserDifficultyItem(index:int, cache_info:FileFolderItem):void 11 | { 12 | this.cache_info = cache_info; 13 | 14 | super(index, cache_info['info']['chart'][index]); 15 | } 16 | 17 | override protected function drawUI():void 18 | { 19 | addChild(new ChartDifficultyLargeItem()); 20 | 21 | var diff:Text = new Text(this, -1, 0, chart['difficulty']); 22 | diff.setAreaParams(24, 25, "center"); 23 | 24 | var name:Text = new Text(this, 27, 0, chart['class']); 25 | name.setAreaParams(169, 25); 26 | 27 | var type:Text = new Text(this, 184, 0, getChartType(chart['type'])); 28 | type.setAreaParams(30, 25, "right"); 29 | 30 | this.graphics.lineStyle(0, 0, 0); 31 | this.graphics.beginFill(DIFFICULTY_COLORS[getChartColorIndex(chart['class_color'])], 1); 32 | this.graphics.drawRect(1, 1, 24, 22); 33 | this.graphics.endFill(); 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/popups/filebrowser/FileBrowserFilter.as: -------------------------------------------------------------------------------- 1 | package popups.filebrowser 2 | { 3 | 4 | public class FileBrowserFilter 5 | { 6 | public var type:String = "any"; 7 | public var term:String = ""; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/popups/filebrowser/FileFolder.as: -------------------------------------------------------------------------------- 1 | package popups.filebrowser 2 | { 3 | 4 | public class FileFolder 5 | { 6 | public var folder:String; 7 | public var file:String; 8 | public var data:Vector.