Section 1
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function isInArray(_arg1:String, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package caurina.transitions
Section 2
//Equations (caurina.transitions.Equations)
package caurina.transitions {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5, _arg6));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5, _arg6));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
}
}//package caurina.transitions
Section 3
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var modifierParameters:Array;
public var valueComplete:Number;
public var modifierFunction:Function;
public var hasModifier:Boolean;
public var valueStart:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Function, _arg4:Array){
valueStart = _arg1;
valueComplete = _arg2;
hasModifier = Boolean(_arg3);
modifierFunction = _arg3;
modifierParameters = _arg4;
}
public function toString():String{
var _local1:String;
_local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj;
_local1 = new PropertyInfoObj(valueStart, valueComplete, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 4
//SpecialPropertiesDefault (caurina.transitions.SpecialPropertiesDefault)
package caurina.transitions {
import flash.filters.*;
import flash.media.*;
import flash.geom.*;
public class SpecialPropertiesDefault {
public function SpecialPropertiesDefault(){
trace("SpecialProperties is a static class and should not be instantiated.");
}
public static function _sound_volume_get(_arg1:Object):Number{
return (_arg1.soundTransform.volume);
}
public static function _color_splitter(_arg1, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
if (_arg1 == null){
_local3.push({name:"_color_ra", value:1});
_local3.push({name:"_color_rb", value:0});
_local3.push({name:"_color_ga", value:1});
_local3.push({name:"_color_gb", value:0});
_local3.push({name:"_color_ba", value:1});
_local3.push({name:"_color_bb", value:0});
} else {
_local3.push({name:"_color_ra", value:0});
_local3.push({name:"_color_rb", value:AuxFunctions.numberToR(_arg1)});
_local3.push({name:"_color_ga", value:0});
_local3.push({name:"_color_gb", value:AuxFunctions.numberToG(_arg1)});
_local3.push({name:"_color_ba", value:0});
_local3.push({name:"_color_bb", value:AuxFunctions.numberToB(_arg1)});
};
return (_local3);
}
public static function frame_get(_arg1:Object):Number{
return (_arg1.currentFrame);
}
public static function _sound_pan_get(_arg1:Object):Number{
return (_arg1.soundTransform.pan);
}
public static function _color_property_get(_arg1:Object, _arg2:Array):Number{
return (_arg1.transform.colorTransform[_arg2[0]]);
}
public static function _sound_volume_set(_arg1:Object, _arg2:Number):void{
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.volume = _arg2;
_arg1.soundTransform = _local3;
}
public static function _autoAlpha_get(_arg1:Object):Number{
return (_arg1.alpha);
}
public static function _filter_splitter(_arg1:BitmapFilter, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
if ((_arg1 is BlurFilter)){
_local3.push({name:"_blur_blurX", value:BlurFilter(_arg1).blurX});
_local3.push({name:"_blur_blurY", value:BlurFilter(_arg1).blurY});
_local3.push({name:"_blur_quality", value:BlurFilter(_arg1).quality});
} else {
trace("??");
};
return (_local3);
}
public static function init():void{
Tweener.registerSpecialProperty("_frame", frame_get, frame_set);
Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
Tweener.registerSpecialProperty("_color_ra", _color_property_get, _color_property_set, ["redMultiplier"]);
Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["redOffset"]);
Tweener.registerSpecialProperty("_color_ga", _color_property_get, _color_property_set, ["greenMultiplier"]);
Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["greenOffset"]);
Tweener.registerSpecialProperty("_color_ba", _color_property_get, _color_property_set, ["blueMultiplier"]);
Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["blueOffset"]);
Tweener.registerSpecialProperty("_color_aa", _color_property_get, _color_property_set, ["alphaMultiplier"]);
Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["alphaOffset"]);
Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter);
Tweener.registerSpecialProperty("_blur_blurX", _filter_property_get, _filter_property_set, [BlurFilter, "blurX"]);
Tweener.registerSpecialProperty("_blur_blurY", _filter_property_get, _filter_property_set, [BlurFilter, "blurY"]);
Tweener.registerSpecialProperty("_blur_quality", _filter_property_get, _filter_property_set, [BlurFilter, "quality"]);
Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get);
}
public static function _sound_pan_set(_arg1:Object, _arg2:Number):void{
var _local3:SoundTransform;
_local3 = _arg1.soundTransform;
_local3.pan = _arg2;
_arg1.soundTransform = _local3;
}
public static function _color_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{
var _local4:ColorTransform;
_local4 = _arg1.transform.colorTransform;
_local4[_arg3[0]] = _arg2;
_arg1.transform.colorTransform = _local4;
}
public static function _filter_property_get(_arg1:Object, _arg2:Array):Number{
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:String;
var _local7:Object;
_local3 = _arg1.filters;
_local5 = _arg2[0];
_local6 = _arg2[1];
_local4 = 0;
while (_local4 < _local3.length) {
if ((((_local3[_local4] is BlurFilter)) && ((_local5 == BlurFilter)))){
return (_local3[_local4][_local6]);
};
_local4++;
};
switch (_local5){
case BlurFilter:
_local7 = {blurX:0, blurY:0, quality:NaN};
break;
};
return (_local7[_local6]);
}
public static function _bezier_get(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{
var _local5:uint;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg4.length == 1){
return ((_arg1 + (_arg3 * (((2 * (1 - _arg3)) * (_arg4[0] - _arg1)) + (_arg3 * (_arg2 - _arg1))))));
};
_local5 = Math.floor((_arg3 * _arg4.length));
_local6 = ((_arg3 - (_local5 * (1 / _arg4.length))) * _arg4.length);
if (_local5 == 0){
_local7 = _arg1;
_local8 = ((_arg4[0] + _arg4[1]) / 2);
} else {
if (_local5 == (_arg4.length - 1)){
_local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2);
_local8 = _arg2;
} else {
_local7 = ((_arg4[(_local5 - 1)] + _arg4[_local5]) / 2);
_local8 = ((_arg4[_local5] + _arg4[(_local5 + 1)]) / 2);
};
};
return ((_local7 + (_local6 * (((2 * (1 - _local6)) * (_arg4[_local5] - _local7)) + (_local6 * (_local8 - _local7))))));
}
public static function frame_set(_arg1:Object, _arg2:Number):void{
_arg1.gotoAndStop(Math.round(_arg2));
}
public static function _filter_property_set(_arg1:Object, _arg2:Number, _arg3:Array):void{
var _local4:Array;
var _local5:uint;
var _local6:Object;
var _local7:String;
var _local8:BitmapFilter;
_local4 = _arg1.filters;
_local6 = _arg3[0];
_local7 = _arg3[1];
_local5 = 0;
while (_local5 < _local4.length) {
if ((((_local4[_local5] is BlurFilter)) && ((_local6 == BlurFilter)))){
_local4[_local5][_local7] = _arg2;
_arg1.filters = _local4;
return;
};
_local5++;
};
if (_local4 == null){
_local4 = new Array();
};
switch (_local6){
case BlurFilter:
_local8 = new BlurFilter(0, 0);
break;
};
_local8[_local7] = _arg2;
_local4.push(_local8);
_arg1.filters = _local4;
}
public static function _autoAlpha_set(_arg1:Object, _arg2:Number):void{
_arg1.alpha = _arg2;
_arg1.visible = (_arg2 > 0);
}
public static function _scale_splitter(_arg1:Number, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
_local3.push({name:"scaleX", value:_arg1});
_local3.push({name:"scaleY", value:_arg1});
return (_local3);
}
public static function _colorTransform_splitter(_arg1, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
if (_arg1 == null){
_local3.push({name:"_color_ra", value:1});
_local3.push({name:"_color_rb", value:0});
_local3.push({name:"_color_ga", value:1});
_local3.push({name:"_color_gb", value:0});
_local3.push({name:"_color_ba", value:1});
_local3.push({name:"_color_bb", value:0});
} else {
if (_arg1.ra != undefined){
_local3.push({name:"_color_ra", value:_arg1.ra});
};
if (_arg1.rb != undefined){
_local3.push({name:"_color_rb", value:_arg1.rb});
};
if (_arg1.ga != undefined){
_local3.push({name:"_color_ba", value:_arg1.ba});
};
if (_arg1.gb != undefined){
_local3.push({name:"_color_bb", value:_arg1.bb});
};
if (_arg1.ba != undefined){
_local3.push({name:"_color_ga", value:_arg1.ga});
};
if (_arg1.bb != undefined){
_local3.push({name:"_color_gb", value:_arg1.gb});
};
if (_arg1.aa != undefined){
_local3.push({name:"_color_aa", value:_arg1.aa});
};
if (_arg1.ab != undefined){
_local3.push({name:"_color_ab", value:_arg1.ab});
};
};
return (_local3);
}
public static function _bezier_modifier(_arg1):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local6:Object;
_local2 = [];
if ((_arg1 is Array)){
_local3 = _arg1;
} else {
_local3 = [_arg1];
};
_local6 = {};
_local4 = 0;
while (_local4 < _local3.length) {
for (_local5 in _local3[_local4]) {
if (_local6[_local5] == undefined){
_local6[_local5] = [];
};
_local6[_local5].push(_local3[_local4][_local5]);
};
_local4++;
};
for (_local5 in _local6) {
_local2.push({name:_local5, parameters:_local6[_local5]});
};
return (_local2);
}
}
}//package caurina.transitions
Section 5
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var getValue:Function;
public var setValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 6
//SpecialPropertyModifier (caurina.transitions.SpecialPropertyModifier)
package caurina.transitions {
public class SpecialPropertyModifier {
public var getValue:Function;
public var modifyValues:Function;
public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){
modifyValues = _arg1;
getValue = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 7
//SpecialPropertySplitter (caurina.transitions.SpecialPropertySplitter)
package caurina.transitions {
public class SpecialPropertySplitter {
public var parameters:Array;
public var splitValues:Function;
public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){
splitValues = _arg1;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 8
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null):void{
var _local5:SpecialProperty;
if (!_inited){
init();
};
_local5 = new SpecialProperty(_arg2, _arg3, _arg4);
_specialPropertyList[_arg1] = _local5;
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Function;
var _local11:TweenListObj;
var _local12:Number;
var _local13:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
_local4 = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
_local7 = arguments[(arguments.length - 1)];
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
if (typeof(_local7.transition) == "string"){
_local13 = _local7.transition.toLowerCase();
_local10 = _transitionList[_local13];
} else {
_local10 = _local7.transition;
};
if (!Boolean(_local10)){
_local10 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local11 = new TweenListObj(_local4[_local5], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), (_local7.useFrames == true), _local10);
_local11.properties = null;
_local11.onStart = _local7.onStart;
_local11.onUpdate = _local7.onUpdate;
_local11.onComplete = _local7.onComplete;
_local11.onOverwrite = _local7.onOverwrite;
_local11.onStartParams = _local7.onStartParams;
_local11.onUpdateParams = _local7.onUpdateParams;
_local11.onCompleteParams = _local7.onCompleteParams;
_local11.onOverwriteParams = _local7.onOverwriteParams;
_local11.isCaller = true;
_local11.count = _local7.count;
_local11.waitFrames = _local7.waitFrames;
_tweenList.push(_local11);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local12 = (_tweenList.length - 1);
updateTweenByIndex(_local12);
removeTweenByIndex(_local12);
};
_local5++;
};
return (true);
}
public static function init(_arg1=null):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
SpecialPropertiesDefault.init();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function pauseAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local3:TweenListObj;
var _local4:TweenListObj;
var _local5:uint;
var _local6:String;
var _local7:Boolean;
_local3 = _tweenList[_arg1];
_local4 = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local2.timeStart = (_local2.timeStart + (_currentTime - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_currentTime - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function debug_getList():String{
var _local1:String;
var _local2:uint;
var _local3:uint;
_local1 = "";
_local2 = 0;
while (_local2 < _tweenList.length) {
_local1 = (_local1 + (("[" + _local2) + "] ::\n"));
_local3 = 0;
while (_local3 < _tweenList[_local2].properties.length) {
_local1 = (_local1 + ((((" " + _tweenList[_local2].properties[_local3].name) + " -> ") + _tweenList[_local2].properties[_local3].valueComplete) + "\n"));
_local3++;
};
_local2++;
};
return (_local1);
}
public static function getVersion():String{
return ("AS3 1.26.62");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var tScope:Object;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
if (_currentTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.isCaller){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(_currentTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (_currentTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
try {
tTweening.onStart.apply(tScope, tTweening.onStartParams);
} catch(e:Error) {
handleError(tTweening, e, "onStart");
};
};
for (pName in tTweening.properties) {
pv = getPropertyValue(tScope, pName);
tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv;
};
mustUpdate = true;
tTweening.hasStarted = true;
};
if (mustUpdate){
for (pName in tTweening.properties) {
tProperty = tTweening.properties[pName];
if (isOver){
nv = tProperty.valueComplete;
} else {
if (tProperty.hasModifier){
t = (_currentTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (_currentTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
setPropertyValue(tScope, pName, nv);
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
try {
tTweening.onUpdate.apply(tScope, tTweening.onUpdateParams);
} catch(e:Error) {
handleError(tTweening, e, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
try {
tTweening.onComplete.apply(tScope, tTweening.onCompleteParams);
} catch(e:Error) {
handleError(tTweening, e, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_tweenList[_local2].timeStart = (_currentTime - (((_currentTime - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_currentTime - (((_currentTime - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_currentTime - (((_currentTime - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
try {
pTweening.onError.apply(pTweening.scope, [pTweening.scope, pError]);
} catch(metaError:Error) {
trace("## [Tweener] Error:", pTweening.scope, "raised an error while executing the 'onError' handler. Original error:\n", pError.getStackTrace(), "\nonError error:", metaError.getStackTrace());
};
} else {
if (!Boolean(pTweening.onError)){
trace("## [Tweener] Error: :", pTweening.scope, (("raised an error while executing the'" + pCallBackName) + "'handler. \n"), pError.getStackTrace());
};
};
}
private static function startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
updateTime();
}
public static function removeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:String;
var _local9:Object;
var _local10:Number;
var _local11:Number;
var _local12:Array;
var _local13:Object;
var _local14:Object;
var _local15:Function;
var _local16:Object;
var _local17:TweenListObj;
var _local18:Number;
var _local19:Array;
var _local20:Array;
var _local21:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
_local4 = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
_local9 = TweenListObj.makePropertiesChain(arguments[(arguments.length - 1)]);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local10 = (isNaN(_local9.time)) ? 0 : _local9.time;
_local11 = (isNaN(_local9.delay)) ? 0 : _local9.delay;
_local12 = new Array();
_local13 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true};
_local14 = new Object();
for (_local7 in _local9) {
if (!_local13[_local7]){
if (_specialPropertySplitterList[_local7]){
_local19 = _specialPropertySplitterList[_local7].splitValues(_local9[_local7], _specialPropertySplitterList[_local7].parameters);
_local5 = 0;
while (_local5 < _local19.length) {
_local12[_local19[_local5].name] = {valueStart:undefined, valueComplete:_local19[_local5].value};
_local5++;
};
} else {
if (_specialPropertyModifierList[_local7] != undefined){
_local20 = _specialPropertyModifierList[_local7].modifyValues(_local9[_local7]);
_local5 = 0;
while (_local5 < _local20.length) {
_local14[_local20[_local5].name] = {modifierParameters:_local20[_local5].parameters, modifierFunction:_specialPropertyModifierList[_local7].getValue};
_local5++;
};
} else {
_local12[_local7] = {valueStart:undefined, valueComplete:_local9[_local7]};
};
};
};
};
for (_local7 in _local14) {
if (_local12[_local7] != undefined){
_local12[_local7].modifierParameters = _local14[_local7].modifierParameters;
_local12[_local7].modifierFunction = _local14[_local7].modifierFunction;
};
};
if (typeof(_local9.transition) == "string"){
_local21 = _local9.transition.toLowerCase();
_local15 = _transitionList[_local21];
} else {
_local15 = _local9.transition;
};
if (!Boolean(_local15)){
_local15 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local16 = new Object();
for (_local7 in _local12) {
_local16[_local7] = new PropertyInfoObj(_local12[_local7].valueStart, _local12[_local7].valueComplete, _local12[_local7].modifierFunction, _local12[_local7].modifierParameters);
};
_local17 = new TweenListObj(_local4[_local5], (_currentTime + ((_local11 * 1000) / _timeScale)), (_currentTime + (((_local11 * 1000) + (_local10 * 1000)) / _timeScale)), (_local9.useFrames == true), _local15);
_local17.properties = _local16;
_local17.onStart = _local9.onStart;
_local17.onUpdate = _local9.onUpdate;
_local17.onComplete = _local9.onComplete;
_local17.onOverwrite = _local9.onOverwrite;
_local17.onError = _local9.onError;
_local17.onStartParams = _local9.onStartParams;
_local17.onUpdateParams = _local9.onUpdateParams;
_local17.onCompleteParams = _local9.onCompleteParams;
_local17.onOverwriteParams = _local9.onOverwriteParams;
_local17.rounded = _local9.rounded;
_local17.skipUpdates = _local9.skipUpdates;
removeTweensByTime(_local17.scope, _local17.properties, _local17.timeStart, _local17.timeComplete);
_tweenList.push(_local17);
if ((((_local10 == 0)) && ((_local11 == 0)))){
_local18 = (_tweenList.length - 1);
updateTweenByIndex(_local18);
removeTweenByIndex(_local18);
};
_local5++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
private static function setPropertyValue(_arg1:Object, _arg2:String, _arg3:Number):void{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
_specialPropertyList[_arg2].setValue(_arg1, _arg3, _specialPropertyList[_arg2].parameters);
} else {
_specialPropertyList[_arg2].setValue(_arg1, _arg3);
};
} else {
_arg1[_arg2] = _arg3;
};
}
private static function getPropertyValue(_arg1:Object, _arg2:String):Number{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
return (_specialPropertyList[_arg2].getValue(_arg1, _specialPropertyList[_arg2].parameters));
};
return (_specialPropertyList[_arg2].getValue(_arg1));
} else {
};
return (!NULL!);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = _currentTime;
_local2.isPaused = true;
return (true);
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
try {
_tweenList[i].onOverwrite.apply(_tweenList[i].scope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package caurina.transitions
Section 9
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var hasStarted:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var auxProperties:Object;
public var timeComplete:Number;
public var onStartParams:Array;
public var rounded:Boolean;
public var properties:Object;
public var onUpdateParams:Array;
public var onComplete:Function;
public var updatesSkipped:Number;
public var onStart:Function;
public var skipUpdates:Number;
public var scope:Object;
public var isCaller:Boolean;
public var timePaused:Number;
public var transition:Function;
public var onCompleteParams:Array;
public var onError:Function;
public var timesCalled:Number;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
auxProperties = new Object();
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local2:TweenListObj;
var _local3:String;
_local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return (_local2);
}
public function toString():String{
var _local1:String;
var _local2:uint;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = 0;
while (_local2 < properties.length) {
if (_local2 > 0){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local2].name));
_local1 = (_local1 + (",valueStart:" + properties[_local2].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local2].valueComplete));
_local1 = (_local1 + "]");
_local2++;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if (updatesSkipped){
_local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped)));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (Boolean(onError)){
_local1 = (_local1 + (", onError:" + String(onError)));
};
if (onStartParams){
_local1 = (_local1 + (", onStartParams:" + String(onStartParams)));
};
if (onUpdateParams){
_local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams)));
};
if (onCompleteParams){
_local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams)));
};
if (onOverwriteParams){
_local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams)));
};
if (rounded){
_local1 = (_local1 + (", rounded:" + String(rounded)));
};
if (isPaused){
_local1 = (_local1 + (", isPaused:" + String(isPaused)));
};
if (timePaused){
_local1 = (_local1 + (", timePaused:" + String(timePaused)));
};
if (isCaller){
_local1 = (_local1 + (", isCaller:" + String(isCaller)));
};
if (count){
_local1 = (_local1 + (", count:" + String(count)));
};
if (timesCalled){
_local1 = (_local1 + (", timesCalled:" + String(timesCalled)));
};
if (waitFrames){
_local1 = (_local1 + (", waitFrames:" + String(waitFrames)));
};
if (hasStarted){
_local1 = (_local1 + (", hasStarted:" + String(hasStarted)));
};
_local1 = (_local1 + "]\n");
return (_local1);
}
public static function makePropertiesChain(_arg1:Object):Object{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
_local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]);
} else {
_local5 = _local4[_local7];
};
_local3 = AuxFunctions.concatObjects(_local3, _local5);
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package caurina.transitions
Section 10
//GameScreen_19 (Dunkaroos_fla.GameScreen_19)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class GameScreen_19 extends MovieClip {
public function GameScreen_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Dunkaroos_fla
Section 11
//gfx_129 (Dunkaroos_fla.gfx_129)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class gfx_129 extends MovieClip {
public function gfx_129(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package Dunkaroos_fla
Section 12
//gfx_130 (Dunkaroos_fla.gfx_130)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class gfx_130 extends MovieClip {
public function gfx_130(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package Dunkaroos_fla
Section 13
//gfx_131 (Dunkaroos_fla.gfx_131)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class gfx_131 extends MovieClip {
public function gfx_131(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package Dunkaroos_fla
Section 14
//highScorerow_101 (Dunkaroos_fla.highScorerow_101)
package Dunkaroos_fla {
import flash.display.*;
import flash.text.*;
public dynamic class highScorerow_101 extends MovieClip {
public var score_txt:TextField;
public var name_txt:TextField;
public var rank_txt:TextField;
}
}//package Dunkaroos_fla
Section 15
//LevelIntro_88 (Dunkaroos_fla.LevelIntro_88)
package Dunkaroos_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelIntro_88 extends MovieClip {
public var levelPointsTxt:TextField;
public var levelNameTxt:TextField;
}
}//package Dunkaroos_fla
Section 16
//speed_lines_down_31 (Dunkaroos_fla.speed_lines_down_31)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class speed_lines_down_31 extends MovieClip {
public function speed_lines_down_31(){
addFrameScript(0, frame1, 56, frame57);
}
function frame1(){
stop();
}
function frame57(){
stop();
}
}
}//package Dunkaroos_fla
Section 17
//speed_lines_up_33 (Dunkaroos_fla.speed_lines_up_33)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class speed_lines_up_33 extends MovieClip {
public function speed_lines_up_33(){
addFrameScript(0, frame1, 56, frame57);
}
function frame1(){
stop();
}
function frame57(){
stop();
}
}
}//package Dunkaroos_fla
Section 18
//trick00_default_AS_47 (Dunkaroos_fla.trick00_default_AS_47)
package Dunkaroos_fla {
import flash.display.*;
public dynamic class trick00_default_AS_47 extends MovieClip {
public function trick00_default_AS_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Dunkaroos_fla
Section 19
//TrickIntro_87 (Dunkaroos_fla.TrickIntro_87)
package Dunkaroos_fla {
import flash.display.*;
import flash.text.*;
public dynamic class TrickIntro_87 extends MovieClip {
public var levelPointsTxt:TextField;
public var levelNameTxt:TextField;
}
}//package Dunkaroos_fla
Section 20
//KeyboardComplete (eaxis.ui.KeyboardComplete)
package eaxis.ui {
public class KeyboardComplete {
public static const A:int = 65;
public static const B:int = 66;
public static const C:int = 67;
public static const D:int = 68;
public static const E:int = 69;
public static const F:int = 70;
public static const G:int = 71;
public static const H:int = 72;
public static const I:int = 73;
public static const J:int = 74;
public static const K:int = 75;
public static const L:int = 76;
public static const M:int = 77;
public static const N:int = 78;
public static const O:int = 79;
public static const P:int = 80;
public static const Q:int = 81;
public static const R:int = 82;
public static const S:int = 83;
public static const T:int = 84;
public static const U:int = 85;
public static const V:int = 86;
public static const W:int = 87;
public static const X:int = 88;
public static const Y:int = 89;
public static const Z:int = 90;
public static function traceAllKeys(_arg1:int=0, _arg2:int=0x0400):void{
var _local3:int;
var _local4:String;
_local3 = _arg1;
while (_local3 < _arg2) {
_local4 = String.fromCharCode(_local3);
if (_local4){
trace((((("public static const " + _local4) + ":int = ") + _local3) + ";"));
};
_local3++;
};
}
}
}//package eaxis.ui
Section 21
//KeyComboDetector (eaxis.ui.KeyComboDetector)
package eaxis.ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.*;
import eaxis.events.*;
public class KeyComboDetector extends KeyDetector {
private var _combo:Array;
private var _validKeys:Object;
private var _combinations:Array;
public static const KEY_TIMER_COMPLETE:String = "ketTimerComplete";
public static const VALID_KEY_DOWN:String = "validKeyDown";
public static const COMBO:String = "keyCombo";
public static var MAX_COMBO_LENGTH:int = 0;
public function KeyComboDetector(_arg1:Stage, _arg2:int):void{
trace("new KeyComboDetector();");
super(_arg1, _arg2);
_combinations = new Array();
_validKeys = new Object();
}
override protected function __keyDown(_arg1:KeyboardEvent):void{
var _local2:int;
trace("KeyComboDetector.__keyDown();");
_local2 = __isValidComboKey(_arg1.keyCode);
if (_local2){
if (!_keyTimer.running){
_combo = new Array();
};
_keyTimer.reset();
_keyTimer.start();
_combo.push(_arg1.keyCode);
dispatchEvent(new DataEvent(KeyComboDetector.VALID_KEY_DOWN, false, false, String(_local2)));
};
}
private function __checkCombo():void{
var _local1:int;
var _local2:String;
var _local3:int;
trace("KeyComboDetector.__checkCombo();");
_local2 = _combo.join(",");
trace(("comboString: " + _local2));
_local1 = 0;
while (_local1 < _combinations.length) {
_local3 = _local2.indexOf(_combinations[_local1].combo);
if (_local3 > -1){
dispatchEvent(new DataEvent(KeyComboDetector.COMBO, false, false, _combinations[_local1].event));
return;
};
_local1++;
};
}
private function __sortOnComboLength(_arg1, _arg2):int{
if (_arg1.combo.length > _arg2.combo.length){
return (-1);
};
if (_arg1.combo.length < _arg2.combo.length){
return (1);
};
return (0);
}
override protected function __onKeyTimerComplete(_arg1:TimerEvent):void{
trace("KeyComboDetector.__onKeyTimerComplete();");
dispatchEvent(new Event(KeyComboDetector.KEY_TIMER_COMPLETE));
__checkCombo();
}
private function __updateValidKeys(_arg1:Array):void{
var _local2:int;
var _local3:String;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = ("Key_" + _arg1[_local2]);
if (!_validKeys[_local3]){
_validKeys[_local3] = _arg1[_local2];
};
_local2++;
};
}
public function addCombo(_arg1:String, _arg2:Array):void{
var _local3:Object;
trace("KeyComboDetector.addCombo();");
if (_arg2.length > KeyComboDetector.MAX_COMBO_LENGTH){
KeyComboDetector.MAX_COMBO_LENGTH = _arg2.length;
};
_local3 = new Object();
_local3.event = _arg1;
_local3.combo = _arg2.join(",");
_combinations.push(_local3);
_combinations.sort(__sortOnComboLength);
__updateValidKeys(_arg2);
}
private function __isValidComboKey(_arg1:int):int{
trace("KeyComboDetector.__isValidComboKey();");
return (_validKeys[("Key_" + _arg1)]);
}
}
}//package eaxis.ui
Section 22
//KeyDetector (eaxis.ui.KeyDetector)
package eaxis.ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class KeyDetector extends EventDispatcher {
protected var _keyTimer:Timer;
protected var _keyWait:int;
protected var _stage:Stage;
public function KeyDetector(_arg1:Stage, _arg2:int):void{
trace("new KeyDetector();");
_stage = _arg1;
_keyWait = _arg2;
__initKeyTimer();
}
protected function __keyDown(_arg1:KeyboardEvent):void{
trace("KeyDetector.__keyDown();");
}
private function __removeKeyboardListeners():void{
trace("KeyDetector.__removeKeyboardListeners();");
if (_stage.hasEventListener(KeyboardEvent.KEY_DOWN)){
_stage.removeEventListener(KeyboardEvent.KEY_DOWN, __onKeyDown, false);
};
}
private function __addKeyboardListeners():void{
__removeKeyboardListeners();
trace("KeyDetector.__addKeyboardListeners();");
_stage.addEventListener(KeyboardEvent.KEY_DOWN, __onKeyDown, false, 0, false);
}
protected function __onKeyTimerComplete(_arg1:TimerEvent):void{
trace("KeyDetector.__onKeyTimerComplete();");
}
public function on():void{
trace("KeyDetector.on();");
__addKeyboardListeners();
}
private function __onKeyDown(_arg1:KeyboardEvent):void{
trace("KeyDetector.__onKeyDown();");
__keyDown(_arg1);
}
public function off():void{
trace("KeyDetector.off();");
_keyTimer.stop();
__removeKeyboardListeners();
}
private function __initKeyTimer():void{
trace("KeyDetector.__initKeyTimer();");
if (_keyTimer){
if (_keyTimer.running){
_keyTimer.stop();
};
if (_keyTimer.hasEventListener(TimerEvent.TIMER_COMPLETE)){
_keyTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, __onKeyTimerComplete, false);
};
};
_keyTimer = new Timer(_keyWait, 1);
_keyTimer.addEventListener(TimerEvent.TIMER_COMPLETE, __onKeyTimerComplete, false, 0, false);
}
}
}//package eaxis.ui
Section 23
//KeyRunDetector (eaxis.ui.KeyRunDetector)
package eaxis.ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.*;
public class KeyRunDetector extends KeyDetector {
private var _pairs:Array;
private var _activePair:Object;
private var _lastPressed:int;// = -1
private var _nextExpected:int;// = -1
private var _firstKeyPress:Boolean;
public static const STOP:String = "keyStop";
public static const START:String = "keyStart";
public static const RUN:String = "keyRun";
public static const MISS:String = "keyMiss";
public function KeyRunDetector(_arg1:Stage, _arg2:int):void{
_lastPressed = -1;
_nextExpected = -1;
trace("new KeyRunDetector();");
super(_arg1, _arg2);
_pairs = new Array();
}
private function __checkForPair(_arg1:int):void{
trace("KeyRunDetector.__checkForPair();");
if (_arg1 == _nextExpected){
_nextExpected = ((_arg1)==_activePair.keyA) ? _activePair.keyB : _activePair.keyA;
dispatchEvent(new Event(KeyRunDetector.RUN));
} else {
if (_lastPressed > -1){
dispatchEvent(new Event(KeyRunDetector.MISS));
};
_lastPressed = -1;
_nextExpected = -1;
__initNewPair(_arg1);
};
}
override protected function __keyDown(_arg1:KeyboardEvent):void{
trace("KeyRunDetector.__keyDown();");
_keyTimer.reset();
_keyTimer.start();
__checkForPair(_arg1.keyCode);
}
override protected function __onKeyTimerComplete(_arg1:TimerEvent):void{
trace("KeyRunDetector.__onKeyTimerComplete();");
_lastPressed = -1;
_nextExpected = -1;
dispatchEvent(new Event(KeyRunDetector.STOP));
}
public function addPair(_arg1:int, _arg2:int):void{
var _local3:Object;
trace("KeyRunDetector.addPair();");
_local3 = new Object();
_local3.keyA = _arg1;
_local3.keyB = _arg2;
_pairs.push(_local3);
}
override public function off():void{
trace("KeyRunDetector.off();");
super.off();
_lastPressed = -1;
_nextExpected = -1;
_activePair = null;
_firstKeyPress = false;
}
private function __initNewPair(_arg1:int):void{
var _local2:int;
var _local3:Object;
trace("KeyRunDetector.__initNewPair();");
_local2 = 0;
while (_local2 < _pairs.length) {
_local3 = _pairs[_local2];
if ((((_arg1 == _local3.keyA)) || ((_arg1 == _local3.keyB)))){
_lastPressed = _arg1;
_nextExpected = ((_arg1)==_local3.keyA) ? _local3.keyB : _local3.keyA;
_activePair = _local3;
if (!_firstKeyPress){
_firstKeyPress = true;
dispatchEvent(new Event(KeyRunDetector.START));
};
return;
};
_local2++;
};
}
}
}//package eaxis.ui
Section 24
//Validation (eaxis.utils.Validation)
package eaxis.utils {
public class Validation {
public static function isBadWord(_arg1:String):Boolean{
var _local2:Array;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local2 = new Array("ASS", "FUK", "FUC", "SUK", "SUC", "JEW", "FCK", "DIK", "DIC", "COC", "COK", "SHT", "CNT", "CUM", "JIZ", "SEX", "damn", "dam", "daam", "mofo", "piss", "pis", "pys", "pyss", "arse", "ahole", "ashole", "ass", "cock", "koc", "cok", "cocksucker", "anal", "ass", "anus", "asshole", "asskiss", "asslick", "asswipe", "backside", "badass", "balls", "bastard", "bat", "bâtard", "batte", "baveux", "behind", "bestiality", "beur", "bigass", "bitch", "bite", "blôk", "bloke", "blow", "boner", "boob", "booger", "breast", "brownstar", "bum", "bush", "butt", "caca", "caker", "calice", "câlice", "câlisse", "capotte", "carossé", "carosser", "carpet muncher", "chienne", "chier", "chinetoc", "chinetok", "chintoc", "chintok", "christ", "christie", "ciphon", "ciphonner", "ciphonneuse", "ciphonneux", "clit", "clitoridien", "clitoris", "cocaine", "cocaïne", "cock", "shit", "suk", "sux", "piss", "cunt", "fuck", "cock", "dick", "tit", "suck", "backside", "behind", "hiney", "bum", "booger", "bite", "snatch", "anal", "pussy", "wad", "poop", "job", "clit", "jizz", "cum", "butt", "sex", "blow", "bitch", "kunt", "scheiss", "connard", "damn", "eatme", "pimp", "whore", "masturbate", "mofo", "jack", "boner", "penis", "penile", "vagina", "fist", "muff", "brownstar", "rod", "nutsack", "boob", "pecker", "nipple", "screw", "twat", "poontang", "breast", "crap", "dope", "erection", "dildo", "crack", "sphincter", "gang", "dead", "death", "semen", "labia", "laid", "vibrator", "dingleberry", "prick", "smegma", "balls", "schlong", "testicle", "testies", "testical", "lesbo", "lesbian", "queer", "fag", "dyke", "facial", "manlove", "deepthroat", "homo", "orgy", "bestiality", "horny", "doggiestyle", "bastard", "porn", "rape", "feces", "urine", "fecal", "slut", "jism", "nigger", "kike", "jew", "fuk", "spic", "injun", "crotch", "foutre", "niggah", "lezzie", "lezbo", "foreskin", "fart", "slit", "rapist", "cocaine", "pot", "marijuana", "heroin", "skank", "hump", "dirty", "slave", "devil", "hooker", "merde", "lips", "wop", "dago", "fux", "anus", "salope", "intercourse", "enculer", "bush", "testicular", "hung", "douche", "playerofthepinkoboe", "lovesword", "asshole", "badass", "myass", "asskiss", "asslick", "asswipe", "fatass", "cuteass", "bigass", "monsterass", "niceass", "bendi", "cocksucker", "cock-sucker", "cock sucker", "cockbite", "colisse", "côlisse", "colon", "côlon", "con", "condom", "connard", "couille", "crack", "crap", "crapais", "crapaud", "crétin ", "crisse", "cross", "crossé", "crosser", "crosseur", "crosseuse", "crotch", "cum", "cunt", "cuteass", "cyphon", "cyphonner", "cyphonneuse", "cyphonneux", "dago", "damn", "dead", "death", "deepthroat", "démon", "devil", "diable", "dick", "dildo", "dingleberry", "dirty", "doggiestyle", "dope", "douche", "dyke", "eatme", "écoeurant", "écureuil", "églantier", "égrelet", "éjaculateur précoce", "ejacule", "éjacule", "emmerdeur", "emmerdeuse", "encul", "enculer", "enfant-d'chienne", "enfant-de-chienne", "enfoiré", "enfouaré", "enfouerré", "épais", "épaisse", "épâs", "erection", "esclave", "étalon", "eurotrash", "euro-trash", "excrément", "facial", "fag", "fallus", "falus", "fart", "fatass", "fecal", "feces", "fécès", "fefi", "fesse", "fif", "fifi", "fist", "foreskin", "fourche", "fourrer", "fourreur", "fourreuse", "foutre", "frog", "fuck", "fuk", "fux", "gang", "gay", "gland", "gosse", "gouine", "greluche", "grenouille", "guedoone", "guedoune", "guedounne", "guidoone", "guidoune", "guidounne", "heroin", "heroïne", "héroine", "héroïne", "hiney", "homo", "hooker", "horny", "hostie", "hump", "hung", "injun", "intercourse", "jack", "jesus", "jew", "jism", "jizz", "job", "juif", "kalis", "kâlis", "kalisse", "kâlisse", "kike", "kolisse", "kôlisse", "kris ", "krisse", "kristi", "kunt", "labia", "laid", "léche", "lèche", "lécher", "lècher", "lécheuse", "lècheuse", "lécheux", "lècheux", "les jaunes", "lesbian", "lesbianisme", "lesbienne", "lesbo", "lesbo", "lesbos", "lezbo", "lezzie", "liche", "licher", "licheuse", "licheux", "lips", "lovesword", "maghreb", "maghrebin", "maghrébin", "maghrebine", "maghrébine", "manche", "mangeur-de-touffe", "mangeur-d'touffe", "mangeuse-de-touffe", "mangeuse-d'touffe", "mangeux", "mangeux-de-touffe", "mangeux-d'touffe", "manlove", "marijuana", "masturbate", "masturbateur", "maudi", "maudit", "maudzit", "merde", "modit", "mofo", "mohawk", "momoune", "monsterass", "moron", "môron", "morveux", "moumoune", "muff", "muff diver", "muffdiver", "muff-diver", "myass", "nazi", "nazisme", "nègre", "nègrelet", "négresse", "négro", "niceass", "niggah", "nigger", "nimpho", "nipple", "nutsack", "nympho", "organe", "orgasme", "orgie", "orgy", "ostie", "p.d.", "paki", "pakki", "pd", "peau rouge", "peau-rouge", "peaux rouges", "peaux-rouges", "pecker", "pédéraste", "pédophile", "penile", "penis", "pénis", "péripatécien", "péripatécienne", "pet", "pète", "pette", "phallus", "phalus", "pimp", "pipi", "piss", "pisseux", "pissou", "piton", "pitoune", "playerofthepinkoboe", "pointe-de-tarte", "poontang", "poop", "porc", "porn", "porno", "pornographie", "pornographique", "pornography", "pot", "poufiasse", "poule morte", "prick", "proxénète", "pubien", "pubis", "pussy", "putain", "pute", "queer", "queue", "rape", "rapist", "redneck", "rital", "rod", "chrême", "saint-chrême", "saint-crème", "sainte-crème", "salope", "salope", "sans génie", "scheiss", "schlong", "screw", "scrutum", "sein", "semen", "sex", "sexe", "sexy", "shit", "siboir", "siboire", "siphon", "siphonner", "siphonneuse", "siphonneux", "siwaire", "siwoire", "skank", "slave", "slit", "slut", "smegma", "snatch", "sodomiseur", "sodomite", "sperme", "sphincter", "spic", "spic", "st-chrême", "st-crème", "ste-crème", "stie", "suceuse", "suceux", "suck", "sucka", "sucker", "syphon", "syphonner", "syphonneuse", "syphonneux", "tabarnacle", "tabarnak", "tabernacle", "tabernak", "tapette", "tchintoc", "tchintok", "testical", "testicle", "testiculaire", "testicular", "testicule", "testies", "têtard", "tête-carrée", "tête-de-pu", "tête-de-pus", "teteux", "têteux", "teton", "têton", "ticoone", "ti-coone", "ticoune", "ti-coune", "tit", "towelhead", "towel-head", "travelo", "trou de cul", "trou de q", "trou-de-cul", "trou-de-q", "turban", "twat", "urine", "vache", "vagin ", "vagina", "vaginite", "vibrateur", "vibrator", "vulve", "wad", "wasp", "white trash", "white-trash", "whore", "wop", "motherfucker", "mother fucker", "fucker", "dickwad", "cuntwhore", "one-eyed yogurt thrower", "meat wallet", "gut locker", "ass pirate");
_local5 = _local2.length;
_local6 = _arg1.toLowerCase().split(" ");
_local3 = 0;
while (_local3 < _local6.length) {
_local4 = 0;
while (_local4 < _local5) {
if (_local6[_local3] == _local2[_local4].toLowerCase()){
return (true);
};
_local4++;
};
_local3++;
};
return (false);
}
}
}//package eaxis.utils
Section 25
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.events.*;
import flash.geom.*;
public class BaseScrollPane extends UIComponent {
protected var defaultLineScrollSize:Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var vScrollBar:Boolean;
protected var disabledOverlay:Shape;
protected var hScrollBar:Boolean;
protected var availableWidth:Number;
protected var _verticalPageScrollSize:Number;// = 0
protected var vOffset:Number;// = 0
protected var _verticalScrollBar:ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var contentWidth:Number;// = 0
protected var contentHeight:Number;// = 0
protected var _horizontalPageScrollSize:Number;// = 0
protected var background:DisplayObject;
protected var _useBitmpScrolling:Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var _horizontalScrollBar:ScrollBar;
protected var contentScrollRect:Rectangle;
protected var _horizontalScrollPolicy:String;
protected var _verticalScrollPolicy:String;
protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5};
public function BaseScrollPane(){
contentWidth = 0;
contentHeight = 0;
contentPadding = 0;
vOffset = 0;
_maxHorizontalScrollPosition = 0;
_horizontalPageScrollSize = 0;
_verticalPageScrollSize = 0;
defaultLineScrollSize = 4;
useFixedHorizontalScrolling = false;
_useBitmpScrolling = false;
super();
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(_verticalScrollBar.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (_verticalScrollBar.scrollPosition);
}
protected function drawDisabledOverlay():void{
if (enabled){
if (contains(disabledOverlay)){
removeChild(disabledOverlay);
};
} else {
disabledOverlay.x = (disabledOverlay.y = contentPadding);
disabledOverlay.width = availableWidth;
disabledOverlay.height = availableHeight;
disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number);
addChild(disabledOverlay);
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
_verticalScrollBar.scrollPosition = _arg1;
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
}
protected function setContentSize(_arg1:Number, _arg2:Number):void{
if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
contentWidth = _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (_horizontalScrollBar.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
_verticalScrollBar.enabled = _arg1;
_horizontalScrollBar.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (_verticalScrollBar.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function calculateAvailableSize():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = ScrollBar.WIDTH;
_local2 = (contentPadding = Number(getStyleValue("contentPadding")));
_local3 = ((height - (2 * _local2)) - vOffset);
vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4);
hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (hScrollBar){
_local3 = (_local3 - _local1);
};
if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
vScrollBar = true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + vOffset);
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
_horizontalScrollBar.scrollPosition = _arg1;
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalScrollBar.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
_verticalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function get useBitmapScrolling():Boolean{
return (_useBitmpScrolling);
}
protected function handleScroll(_arg1:ScrollEvent):void{
if (_arg1.target == _verticalScrollBar){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
_verticalScrollBar.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
_horizontalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){
drawLayout();
};
updateChildren();
super.draw();
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function configUI():void{
var _local1:Graphics;
super.configUI();
contentScrollRect = new Rectangle(0, 0, 85, 85);
_verticalScrollBar = new ScrollBar();
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_verticalScrollBar.visible = false;
_verticalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_verticalScrollBar);
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar = new ScrollBar();
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_horizontalScrollBar.visible = false;
_horizontalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_horizontalScrollBar);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
disabledOverlay = new Shape();
_local1 = disabledOverlay.graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function calculateContentWidth():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize);
}
protected function drawLayout():void{
calculateAvailableSize();
calculateContentWidth();
background.width = width;
background.height = height;
if (vScrollBar){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding);
_verticalScrollBar.y = contentPadding;
_verticalScrollBar.height = availableHeight;
} else {
_verticalScrollBar.visible = false;
};
_verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
if (hScrollBar){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.x = contentPadding;
_horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding);
_horizontalScrollBar.width = availableWidth;
} else {
_horizontalScrollBar.visible = false;
};
_horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
drawDisabledOverlay();
}
protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue("skin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
_horizontalScrollBar.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize);
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentWidth - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
_verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled);
_verticalScrollBar.drawNow();
_horizontalScrollBar.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
_useBitmpScrolling = _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 26
//ScrollPane (fl.containers.ScrollPane)
package fl.containers {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public class ScrollPane extends BaseScrollPane implements IFocusManagerComponent {
protected var scrollDragHPos:Number;
protected var loader:Loader;
protected var yOffset:Number;
protected var currentContent:Object;
protected var xOffset:Number;
protected var _source:Object;// = ""
protected var scrollDragVPos:Number;
protected var _scrollDrag:Boolean;// = false
protected var contentClip:Sprite;
private static var defaultStyles:Object = {upSkin:"ScrollPane_upSkin", disabledSkin:"ScrollPane_disabledSkin", focusRectSkin:null, focusRectPadding:null, contentPadding:0};
public function ScrollPane(){
_source = "";
_scrollDrag = false;
super();
}
public function get source():Object{
return (_source);
}
public function set source(_arg1:Object):void{
var _local2:*;
clearContent();
if (isLivePreview){
return;
};
_source = _arg1;
if ((((_source == "")) || ((_source == null)))){
return;
};
currentContent = getDisplayObjectInstance(_arg1);
if (currentContent != null){
_local2 = contentClip.addChild((currentContent as DisplayObject));
dispatchEvent(new Event(Event.INIT));
update();
} else {
load(new URLRequest(_source.toString()));
};
}
public function get bytesLoaded():Number{
return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesLoaded);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = (scrollDragVPos - (mouseY - yOffset));
_verticalScrollBar.setScrollPosition(_local2);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, true);
_local3 = (scrollDragHPos - (mouseX - xOffset));
_horizontalScrollBar.setScrollPosition(_local3);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, true);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = calculateAvailableHeight();
switch (_arg1.keyCode){
case Keyboard.DOWN:
verticalScrollPosition++;
break;
case Keyboard.UP:
verticalScrollPosition--;
break;
case Keyboard.RIGHT:
horizontalScrollPosition++;
break;
case Keyboard.LEFT:
horizontalScrollPosition--;
break;
case Keyboard.END:
verticalScrollPosition = maxVerticalScrollPosition;
break;
case Keyboard.HOME:
verticalScrollPosition = 0;
break;
case Keyboard.PAGE_UP:
verticalScrollPosition = (verticalScrollPosition - _local2);
break;
case Keyboard.PAGE_DOWN:
verticalScrollPosition = (verticalScrollPosition + _local2);
break;
};
}
protected function doStartDrag(_arg1:MouseEvent):void{
if (!enabled){
return;
};
xOffset = mouseX;
yOffset = mouseY;
scrollDragHPos = horizontalScrollPosition;
scrollDragVPos = verticalScrollPosition;
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
}
public function get content():DisplayObject{
var _local1:Object;
_local1 = currentContent;
if ((_local1 is URLRequest)){
_local1 = loader.content;
};
return ((_local1 as DisplayObject));
}
public function get percentLoaded():Number{
if (loader != null){
return (Math.round(((bytesLoaded / bytesTotal) * 100)));
};
return (0);
}
protected function endDrag(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
}
public function update():void{
var _local1:DisplayObject;
_local1 = contentClip.getChildAt(0);
setContentSize(_local1.width, _local1.height);
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:*;
_local3 = contentClip.scrollRect;
_local3.x = _arg1;
contentClip.scrollRect = _local3;
}
public function refreshPane():void{
if ((_source is URLRequest)){
_source = _source.url;
};
source = _source;
}
protected function passEvent(_arg1:Event):void{
dispatchEvent(_arg1);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0));
}
public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{
if (_arg2 == null){
_arg2 = new LoaderContext(false, ApplicationDomain.currentDomain);
};
clearContent();
initLoader();
currentContent = (_source = _arg1);
loader.load(_arg1, _arg2);
}
override protected function handleScroll(_arg1:ScrollEvent):void{
passEvent(_arg1);
super.handleScroll(_arg1);
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:*;
_local3 = contentClip.scrollRect;
_local3.y = _arg1;
contentClip.scrollRect = _local3;
}
protected function initLoader():void{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, passEvent, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onContentLoad, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.INIT, passEvent, false, 0, true);
contentClip.addChild(loader);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawBackground();
};
if (isInvalid(InvalidationType.STATE)){
setScrollDrag();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
contentClip = new Sprite();
addChild(contentClip);
contentClip.scrollRect = contentScrollRect;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
}
public function set scrollDrag(_arg1:Boolean):void{
_scrollDrag = _arg1;
invalidate(InvalidationType.STATE);
}
protected function clearContent():void{
if (contentClip.numChildren == 0){
return;
};
contentClip.removeChildAt(0);
currentContent = null;
if (loader != null){
try {
loader.close();
} catch(e) {
};
try {
loader.unload();
} catch(e) {
};
loader = null;
};
}
override protected function drawLayout():void{
super.drawLayout();
contentScrollRect = contentClip.scrollRect;
contentScrollRect.width = availableWidth;
contentScrollRect.height = availableHeight;
contentClip.cacheAsBitmap = useBitmapScrolling;
contentClip.scrollRect = contentScrollRect;
contentClip.x = (contentClip.y = contentPadding);
}
override protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue((enabled) ? "upSkin" : "disabledSkin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function get bytesTotal():Number{
return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesTotal);
}
protected function onContentLoad(_arg1:Event):void{
var _local2:*;
update();
_local2 = calculateAvailableHeight();
calculateAvailableSize();
horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), availableWidth);
verticalScrollBar.setScrollProperties(_local2, 0, (contentHeight - _local2), _local2);
passEvent(_arg1);
}
public function get scrollDrag():Boolean{
return (_scrollDrag);
}
protected function setScrollDrag():void{
if (_scrollDrag){
contentClip.addEventListener(MouseEvent.MOUSE_DOWN, doStartDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, endDrag, false, 0, true);
} else {
contentClip.removeEventListener(MouseEvent.MOUSE_DOWN, doStartDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, endDrag);
removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
};
contentClip.buttonMode = _scrollDrag;
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition()));
}
}
}//package fl.containers
Section 27
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.events.*;
import flash.utils.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 28
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 29
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 30
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 31
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import flash.events.*;
import fl.core.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 32
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 33
//ScrollPolicy (fl.controls.ScrollPolicy)
package fl.controls {
public class ScrollPolicy {
public static const OFF:String = "off";
public static const ON:String = "on";
public static const AUTO:String = "auto";
}
}//package fl.controls
Section 34
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 35
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 36
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.system.*;
import flash.utils.*;
import flash.text.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 37
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 38
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 39
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.core.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 40
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 41
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 42
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 43
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 44
//c1 (c1)
package {
import dunk.elements.*;
public dynamic class c1 extends AnimationWrapper {
}
}//package
Section 45
//c10 (c10)
package {
import dunk.elements.*;
public dynamic class c10 extends AnimationWrapper {
}
}//package
Section 46
//c11 (c11)
package {
import dunk.elements.*;
public dynamic class c11 extends AnimationWrapper {
}
}//package
Section 47
//c12 (c12)
package {
import dunk.elements.*;
public dynamic class c12 extends AnimationWrapper {
}
}//package
Section 48
//c13 (c13)
package {
import dunk.elements.*;
public dynamic class c13 extends AnimationWrapper {
}
}//package
Section 49
//c14 (c14)
package {
import dunk.elements.*;
public dynamic class c14 extends AnimationWrapper {
}
}//package
Section 50
//c15 (c15)
package {
import dunk.elements.*;
public dynamic class c15 extends AnimationWrapper {
}
}//package
Section 51
//c16 (c16)
package {
import dunk.elements.*;
public dynamic class c16 extends AnimationWrapper {
}
}//package
Section 52
//c17 (c17)
package {
import dunk.elements.*;
public dynamic class c17 extends AnimationWrapper {
}
}//package
Section 53
//c18 (c18)
package {
import dunk.elements.*;
public dynamic class c18 extends AnimationWrapper {
}
}//package
Section 54
//c19 (c19)
package {
import dunk.elements.*;
public dynamic class c19 extends AnimationWrapper {
}
}//package
Section 55
//c2 (c2)
package {
import dunk.elements.*;
public dynamic class c2 extends AnimationWrapper {
}
}//package
Section 56
//c20 (c20)
package {
import dunk.elements.*;
public dynamic class c20 extends AnimationWrapper {
}
}//package
Section 57
//c21 (c21)
package {
import dunk.elements.*;
public dynamic class c21 extends AnimationWrapper {
}
}//package
Section 58
//c22 (c22)
package {
import dunk.elements.*;
public dynamic class c22 extends AnimationWrapper {
}
}//package
Section 59
//c23 (c23)
package {
import dunk.elements.*;
public dynamic class c23 extends AnimationWrapper {
}
}//package
Section 60
//c3 (c3)
package {
import dunk.elements.*;
public dynamic class c3 extends AnimationWrapper {
}
}//package
Section 61
//c4 (c4)
package {
import dunk.elements.*;
public dynamic class c4 extends AnimationWrapper {
}
}//package
Section 62
//c5 (c5)
package {
import dunk.elements.*;
public dynamic class c5 extends AnimationWrapper {
}
}//package
Section 63
//c6 (c6)
package {
import dunk.elements.*;
public dynamic class c6 extends AnimationWrapper {
}
}//package
Section 64
//c7 (c7)
package {
import dunk.elements.*;
public dynamic class c7 extends AnimationWrapper {
}
}//package
Section 65
//c8 (c8)
package {
import dunk.elements.*;
public dynamic class c8 extends AnimationWrapper {
}
}//package
Section 66
//c9 (c9)
package {
import dunk.elements.*;
public dynamic class c9 extends AnimationWrapper {
}
}//package
Section 67
//dunk (dunk)
package {
import dunk.elements.*;
public dynamic class dunk extends AnimationWrapper {
}
}//package
Section 68
//AnimationWrapper (dunk.elements.AnimationWrapper)
package dunk.elements {
import flash.display.*;
import flash.events.*;
public class AnimationWrapper extends MovieClip {
public function AnimationWrapper():void{
trace("new AnimationWrapper();");
addFrameScript((totalFrames - 1), __animationDone);
}
protected function __animationDone():void{
trace("AnimationWrapper.__animationDone();");
stop();
dispatchEvent(new Event(Event.COMPLETE, true));
}
}
}//package dunk.elements
Section 69
//AudioToggle (dunk.elements.AudioToggle)
package dunk.elements {
import flash.display.*;
import flash.events.*;
public class AudioToggle extends Sprite {
private var _audioIsOn:Boolean;
public var iconOff:MovieClip;
public var iconOn:MovieClip;
public function AudioToggle(_arg1:Boolean=true):void{
trace("new AudioToggle();");
_audioIsOn = _arg1;
__updateAudio();
buttonMode = true;
mouseChildren = false;
addEventListener(MouseEvent.CLICK, __onClick, false, 0, true);
}
private function __onClick(_arg1:MouseEvent):void{
trace("AudioToggle.__onClick();");
_audioIsOn = !(_audioIsOn);
__updateAudio();
}
private function __updateAudio():void{
trace("AudioToggle.__updateAudio();");
iconOn.visible = _audioIsOn;
iconOff.visible = !(_audioIsOn);
}
}
}//package dunk.elements
Section 70
//Cloud (dunk.elements.Cloud)
package dunk.elements {
import flash.display.*;
import flash.events.*;
public class Cloud extends Sprite {
public var c1:MovieClip;
public var c2:MovieClip;
private var _speed:int;
public function Cloud():void{
addEventListener(Event.ADDED_TO_STAGE, __onAddedToStage, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, __onRemovedFromStage, false, 0, true);
cacheAsBitmap = true;
}
private function __onAddedToStage(_arg1:Event):void{
__setup();
}
private function __setup():void{
var _local1:Boolean;
_local1 = Boolean(Math.round(Math.random()));
c1.visible = _local1;
c2.visible = !(_local1);
scaleX = (scaleY = Math.min(Math.max(Math.random(), 0.2), 1));
_speed = Math.round((scaleX * 10));
x = 580;
y = (20 + (Math.random() * 350));
addEventListener(Event.ENTER_FRAME, __move, false, 0, true);
}
private function __move(_arg1:Event):void{
x = (x - _speed);
if (x < -30){
removeEventListener(Event.ENTER_FRAME, __move, false);
parent.removeChild(this);
};
}
private function __onRemovedFromStage(_arg1:Event):void{
}
}
}//package dunk.elements
Section 71
//ErrorMessage (dunk.elements.ErrorMessage)
package dunk.elements {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
public class ErrorMessage extends Sprite {
private var _hideObj:Object;
public var btnBack:MovieClip;
private var _showObj:Object;
public function ErrorMessage():void{
_showObj = {alpha:1, time:0.3, transition:"linear"};
_hideObj = {alpha:0, time:0.3, transition:"linear", onComplete:__remove};
super();
trace("new ErrorMessage();");
alpha = 0;
btnBack.buttonMode = true;
addEventListener(Event.ADDED_TO_STAGE, __onAddedToStage, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, __onRemovedFromStage, false, 0, true);
}
private function __remove():void{
trace("ErrorMessage.__remove();");
parent.removeChild(this);
}
private function __onAddedToStage(_arg1:Event):void{
trace("ErrorMessage.__onAddedToStage();");
btnBack.addEventListener(MouseEvent.CLICK, __onClickBack, false, 0, true);
Tweener.addTween(this, _showObj);
}
private function __onClickBack(_arg1:MouseEvent):void{
trace("ErrorMessage.__onClickBack();");
Tweener.addTween(this, _hideObj);
}
private function __onRemovedFromStage(_arg1:Event):void{
trace("ErrorMessage.__onRemovedFromStage();");
btnBack.removeEventListener(MouseEvent.CLICK, __onClickBack, false);
}
}
}//package dunk.elements
Section 72
//Kangaroo (dunk.elements.Kangaroo)
package dunk.elements {
import flash.display.*;
import flash.events.*;
public class Kangaroo extends MovieClip {
public var runClip:MovieClip;
public var standClip:MovieClip;
public function Kangaroo():void{
addFrameScript(0, frame1);
trace("new Kangaroo();");
}
public function miss():void{
trace("Kangaroo.miss();");
gotoAndStop("miss");
}
public function dunk():void{
trace("Kangaroo.dunk();");
gotoAndStop("dunk");
}
public function jump():void{
trace("Kangaroo.jump();");
gotoAndStop("jump");
}
public function defaultPos():void{
trace("Kangaroo.defaultPos();");
gotoAndStop("default");
}
public function trick(_arg1:String):void{
trace("Kangaroo.trick();");
gotoAndStop(_arg1);
}
function frame1(){
stop();
}
public function run():void{
trace("Kangaroo.run();");
gotoAndStop("run");
}
private function __animationDone(_arg1:Event):void{
trace("Kangaroo.__animationDone();");
}
public function stand():void{
trace("Kangaroo.stand();");
gotoAndStop("stand");
}
}
}//package dunk.elements
Section 73
//Meter (dunk.elements.Meter)
package dunk.elements {
import flash.display.*;
import flash.events.*;
import dunk.*;
public class Meter extends Sprite {
private var _power:int;
private var _scale:Number;
public var maskClip:MovieClip;
public var arrowClip:MovieClip;
public static const MIN:String = "meterMin";
public static const MAX:String = "meterMax";
public function Meter():void{
trace("new Meter();");
_scale = maskClip.height;
}
public function reset():void{
trace("Meter.reset();");
maskClip.scaleY = 0;
arrowClip.y = _scale;
}
public function off():void{
trace("Meter.off();");
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, __onEnterFrame, false);
};
}
public function down():void{
maskClip.scaleY = Math.max(0, (maskClip.scaleY - Main.METER_DECREMENT));
arrowClip.y = (_scale - maskClip.height);
if (maskClip.scaleY <= 0){
dispatchEvent(new Event(Meter.MIN));
};
}
private function __onEnterFrame(_arg1:Event):void{
down();
}
public function up():void{
maskClip.scaleY = Math.min(1, (maskClip.scaleY + Main.METER_INCREMENT));
arrowClip.y = (_scale - maskClip.height);
if (maskClip.scaleY == 1){
dispatchEvent(new Event(Meter.MAX));
};
}
public function on():void{
off();
trace("Meter.on();");
addEventListener(Event.ENTER_FRAME, __onEnterFrame, false, 0, true);
}
}
}//package dunk.elements
Section 74
//TrickListItem (dunk.elements.TrickListItem)
package dunk.elements {
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class TrickListItem extends Sprite {
public var nameTxt:TextField;
public function TrickListItem(_arg1:String, _arg2:Array, _arg3:Boolean):void{
__setup(_arg1, _arg2, _arg3);
}
private function __addKeys(_arg1:Array, _arg2:Boolean):void{
var _local3:int;
var _local4:Object;
var _local5:MovieClip;
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = getDefinitionByName(("Key_" + _arg1[_local3]));
_local5 = new (_local4);
_local5.gotoAndStop((_arg2) ? 1 : 2);
_local5.scaleX = (_local5.scaleY = 0.5);
_local5.x = ((nameTxt.width + 4) + ((_local5.width + 1) * _local3));
addChild(_local5);
_local3++;
};
}
private function __setup(_arg1:String, _arg2:Array, _arg3:Boolean):void{
nameTxt.text = _arg1.toUpperCase();
__addKeys(_arg2, _arg3);
}
}
}//package dunk.elements
Section 75
//GameOverScreen (dunk.screens.GameOverScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import eaxis.utils.*;
import dunk.*;
import flash.text.*;
public class GameOverScreen extends Screen {
public var bad:MovieClip;
private var _urlLoader:URLLoader;
public var invalidName:TextField;
public var initialsTxt:TextField;
public var scoreTxt:TextField;
private var _score:int;
public var btnSubmit:MovieClip;
public var good:MovieClip;
public var btnMenu:MovieClip;
public static const BAD:String = "stateBad";
public static const GOOD:String = "stateGood";
public function GameOverScreen():void{
trace("new GameOverScreen();");
btnSubmit.buttonMode = true;
btnMenu.buttonMode = true;
}
private function __sendScore():void{
var _local1:URLRequest;
trace("GameOverScreen.__sendScore();");
if (((!(initialsTxt.text)) || (Validation.isBadWord(initialsTxt.text)))){
invalidName.visible = true;
return;
};
_local1 = new URLRequest(((((Main.SEND_SCORE_SCRIPT + "&name=") + initialsTxt.text) + "&score=") + _score));
if (_urlLoader){
_urlLoader.removeEventListener(Event.COMPLETE, __onURLLoaderComplete, false);
_urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, Main.onIOError, false);
_urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, Main.onSecurityError, false);
};
_urlLoader = new URLLoader();
_urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
_urlLoader.addEventListener(Event.COMPLETE, __onURLLoaderComplete, false, 0, true);
_urlLoader.addEventListener(IOErrorEvent.IO_ERROR, Main.onIOError, false, 0, true);
_urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, Main.onSecurityError, false, 0, true);
_urlLoader.load(_local1);
}
public function setup(_arg1:String, _arg2:int):void{
initialsTxt.text = "";
switch (_arg1){
case GameOverScreen.GOOD:
good.visible = true;
bad.visible = false;
_score = (_arg2 + Main.ALL_STAR_BONUS);
break;
case GameOverScreen.BAD:
good.visible = false;
bad.visible = true;
_score = _arg2;
break;
};
scoreTxt.text = ("Your Score: " + _score);
}
override protected function __off():void{
trace("GameOverScreen.__off();");
btnSubmit.removeEventListener(MouseEvent.CLICK, __onClickSubmit, false);
btnSubmit.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnSubmit.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
btnMenu.removeEventListener(MouseEvent.CLICK, __onClickMenu, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
}
private function __onClickSubmit(_arg1:MouseEvent):void{
trace("GameOverScreen.__onClickSubmit();");
__sendScore();
}
override protected function __onFirstAdd():void{
trace("GameOverScreen.__onFirstAdd();");
}
private function __onURLLoaderComplete(_arg1:Event):void{
trace("GameOverScreen.__onURLLoaderComplete();");
trace(_arg1.target.data);
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_MENU));
}
override protected function __on():void{
trace("GameOverScreen.__on();");
invalidName.visible = false;
btnSubmit.addEventListener(MouseEvent.CLICK, __onClickSubmit, false, 0, true);
btnSubmit.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnSubmit.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
btnMenu.addEventListener(MouseEvent.CLICK, __onClickMenu, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
}
}
}//package dunk.screens
Section 76
//GameScreen (dunk.screens.GameScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import eaxis.ui.*;
import flash.utils.*;
import dunk.*;
import dunk.elements.*;
import flash.text.*;
import flash.ui.*;
public class GameScreen extends Screen {
private var _runHintShow;
private var _levelObj:Object;
private var _showLevelIntro:Object;
private var _hideLevelIntro:Object;
private var _firstMissCall:Boolean;
private var _trickPoints:int;
public var backdrop:MovieClip;
private var _runHintHide;
private var _gameStarted:Boolean;
private var _backDropInit:Object;
private var _level:int;
private var _firstRunCall:Boolean;
public var missedClip:MovieClip;
private var _keyContainer:Sprite;
private var _backdropsRunPos:int;
private var _nextKeyX:int;
public var trickIntro:MovieClip;
private var _runTimer:Timer;
private var _hideText:Object;
private var _kangarooInit:Object;
private var _showText:Object;
private var _dunkSplashContainer:Sprite;
public var levelIntro:MovieClip;
private var _cloudTimeout:int;
public var timeLeftTxt:TextField;
private var _jumpTweenKangaroo:Object;
private var _comboDetector:KeyComboDetector;
private var _dunkTweenKangaroo:Object;
public var meter:Meter;
private var _totalPoints:int;
public var totalPointsTxt:TextField;
public var mode:String;
public var runHint:MovieClip;
public var speedLinesUp:MovieClip;
private var _dunkSplash:MovieClip;
public var speedLinesDown:MovieClip;
public var dotricksClip:MovieClip;
private var _yourScoreContainer:Sprite;
private var _runDetector:KeyRunDetector;
public var cloudContainer:MovieClip;
private var _jumpTweenBackdrop:Object;
public var btnMenu:MovieClip;
public var kangaroo:Kangaroo;
private var _dunkTweenBackdrop:Object;
public static const DUNK_MODE:String = "dunkMode";
public static const RUN_MODE:String = "runMode";
public static const JUMP_MODE:String = "jumpMode";
public function GameScreen():void{
_jumpTweenKangaroo = {y:0x0100, time:2, transition:"easeOutQuad"};
_jumpTweenBackdrop = {y:700, time:2, transition:"easeOutQuad"};
_dunkTweenKangaroo = {time:1.4, delay:0.5, transition:"easeInQuad"};
_dunkTweenBackdrop = {time:1.4, delay:0.5, transition:"easeInQuad", onUpdate:__updateCloudContainer};
_backDropInit = {time:2, transition:"easeOutQuad"};
_kangarooInit = {time:2, transition:"easeOutQuad"};
_showLevelIntro = {alpha:1, time:0.4, delay:0.6, transition:"linear"};
_hideLevelIntro = {alpha:0, time:0.4, delay:3, transition:"linear"};
_showText = {alpha:1, time:0.4, transition:"linear"};
_hideText = {alpha:0, time:0.4, delay:1.5, transition:"linear"};
_runHintShow = {alpha:1, time:0.4, delay:3.6, transition:"linear"};
_runHintHide = {alpha:0, time:0.4, transition:"linear"};
super();
trace("new GameScreen();");
}
private function __startClouds():void{
var _local1:int;
trace("GameScreen.__startClouds();");
cloudContainer.y = 0;
_local1 = (500 + (Math.random() * 500));
_cloudTimeout = setTimeout(__addCloud, _local1);
}
private function __addCloud():void{
var _local1:Cloud;
trace("GameScreen.__addCloud();");
_local1 = new Cloud();
cloudContainer.addChild(_local1);
__startClouds();
}
public function get trickPoints():int{
return (_trickPoints);
}
private function __onKeyStart(_arg1:Event):void{
trace("GameScreen.__onKeyStart();");
_gameStarted = true;
Tweener.removeTweens(runHint);
Tweener.addTween(runHint, _runHintHide);
meter.on();
_runTimer.start();
__startBackdrop();
}
private function __introTrick(_arg1:String, _arg2:int):void{
trace("GameScreen.__introTrick();");
trickIntro.alpha = 0;
trickIntro.levelNameTxt.text = _arg1.toUpperCase();
trickIntro.levelPointsTxt.text = (String(_arg2) + " POINTS");
Tweener.addTween(trickIntro, _showText);
Tweener.addTween(trickIntro, _hideText);
}
private function __introLevel():void{
trace("GameScreen.__introLevel();");
levelIntro.alpha = 0;
levelIntro.levelNameTxt.text = _levelObj.name.toUpperCase();
levelIntro.levelPointsTxt.text = (("You need " + _levelObj.pointsRequired) + " points to qualify for the next level");
Tweener.addTween(levelIntro, _showLevelIntro);
Tweener.addTween(levelIntro, _hideLevelIntro);
}
private function __onRunTimer(_arg1:TimerEvent):void{
trace("GameScreen.__onRunTimer();");
__setTimerText((_levelObj.runningSeconds - _runTimer.currentCount));
}
public function nextRound():Boolean{
var _local1:Boolean;
trace("GameScreen.nextRound();");
_local1 = (++_level < Main.LEVELS.length);
if (_local1){
__initRound();
};
return (_local1);
}
private function __stopBackdrop():void{
trace("GameScreen.__stopBackdrop();");
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, __moveBackDrop, false);
};
}
private function __onKeyRun(_arg1:Event):void{
trace("GameScreen.__onKeyRun();");
_firstMissCall = false;
if (!_firstRunCall){
_firstRunCall = true;
kangaroo.run();
};
meter.up();
_backdropsRunPos = (_backdropsRunPos - Main.RUN_SPEED);
}
private function __onKeyStop(_arg1:Event):void{
trace("GameScreen.__onKeyStop();");
_firstRunCall = false;
_firstMissCall = false;
kangaroo.stand();
}
private function __initRound():void{
trace("GameScreen.__initRound();");
mode = GameScreen.RUN_MODE;
_levelObj = Main.LEVELS[_level];
_firstRunCall = false;
_backdropsRunPos = 0;
_nextKeyX = 0;
kangaroo.x = (backdrop.x + 92);
kangaroo.y = _kangarooInit.y;
Tweener.addTween(kangaroo, _kangarooInit);
Tweener.addTween(backdrop, _backDropInit);
backdrop.gotoAndStop(_levelObj.background);
missedClip.alpha = 0;
dotricksClip.alpha = 0;
trickIntro.alpha = 0;
runHint.alpha = 0;
if (!Main.RUN_HINT){
Main.RUN_HINT = true;
Tweener.addTween(runHint, _runHintShow);
};
__initTimers();
__introLevel();
__updateTotalPoints(_trickPoints);
__clearTrickPoints();
__setTimerText(_levelObj.runningSeconds);
kangaroo.stand();
_runDetector.on();
_comboDetector.off();
_runTimer.reset();
meter.reset();
_gameStarted = (_level > 0);
}
private function __clearTotalPoints():void{
trace("GameScreen.__clearTotalPoints();");
_totalPoints = 0;
totalPointsTxt.text = String(_totalPoints);
}
private function __startTricks():void{
trace("GameScreen.__startTricks();");
kangaroo.defaultPos();
_comboDetector.on();
meter.on();
__startClouds();
__stopBackdrop();
}
override protected function __onFirstAdd():void{
trace("GameScreen.__onFirstAdd();");
removeChild(btnMenu);
_yourScoreContainer = new Sprite();
addChild(_yourScoreContainer);
_dunkSplash = new DunkSplash();
_dunkSplashContainer = new Sprite();
addChild(_dunkSplashContainer);
_keyContainer = new Sprite();
addChild(_keyContainer);
btnMenu.buttonMode = true;
_kangarooInit.x = kangaroo.x;
_kangarooInit.y = kangaroo.y;
_backDropInit.x = backdrop.x;
_backDropInit.y = backdrop.y;
_dunkTweenKangaroo.y = kangaroo.y;
_dunkTweenBackdrop.y = backdrop.y;
btnMenu.addEventListener(MouseEvent.CLICK, __onClickMenu, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
__initKeyDetectors();
}
private function __jumpDone():void{
trace("GameScreen.__jumpDone();");
mode = GameScreen.DUNK_MODE;
_comboDetector.off();
__clearKeyDisplay();
speedLinesUp.gotoAndStop(1);
speedLinesDown.gotoAndPlay("in");
__stopClouds();
Tweener.addTween(kangaroo, _dunkTweenKangaroo);
Tweener.addTween(backdrop, _dunkTweenBackdrop);
if (kangaroo.currentLabel == "default"){
kangaroo.dunk();
} else {
kangaroo.miss();
};
}
private function __onRunTimerComplete(_arg1:TimerEvent):void{
trace("GameScreen.__onRunTimerComplete();");
__jumpStart();
timeLeftTxt.text = "";
}
private function __onComboValidKeyDown(_arg1:DataEvent):void{
trace("GameScreen.__onComboValidKeyDown();");
__addKeyToDisplay(_arg1.data);
}
private function __onComboKeyTimerComplete(_arg1:Event):void{
trace("GameScreen.__onComboKeyTimerComplete();");
__clearKeyDisplay();
}
private function __updateCloudContainer():void{
cloudContainer.y = (backdrop.y - _jumpTweenBackdrop.y);
}
private function __initKeyDetectors():void{
var _local1:int;
trace("GameScreen.__initKeyDetectors();");
_runDetector = new KeyRunDetector(stage, Main.KEY_WAIT_RUN);
_runDetector.addEventListener(KeyRunDetector.START, __onKeyStart, false, 0, true);
_runDetector.addEventListener(KeyRunDetector.RUN, __onKeyRun, false, 0, true);
_runDetector.addEventListener(KeyRunDetector.MISS, __onKeyMiss, false, 0, true);
_runDetector.addEventListener(KeyRunDetector.STOP, __onKeyStop, false, 0, true);
_runDetector.addPair(Keyboard.LEFT, Keyboard.RIGHT);
_comboDetector = new KeyComboDetector(stage, Main.KEY_WAIT_COMBO);
_comboDetector.addEventListener(KeyComboDetector.COMBO, __onKeyCombo, false, 0, true);
_comboDetector.addEventListener(KeyComboDetector.VALID_KEY_DOWN, __onComboValidKeyDown, false, 0, true);
_comboDetector.addEventListener(KeyComboDetector.KEY_TIMER_COMPLETE, __onComboKeyTimerComplete, false, 0, true);
_local1 = 0;
while (_local1 < Main.COMBOS.length) {
_comboDetector.addCombo(Main.COMBOS[_local1].event, Main.COMBOS[_local1].combo);
_local1++;
};
}
private function __initTimers():void{
trace("GameScreen.__initTimers();");
if (_runTimer){
if (_runTimer.running){
_runTimer.stop();
};
_runTimer.removeEventListener(TimerEvent.TIMER, __onRunTimer, false);
_runTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, __onRunTimerComplete, false);
};
_runTimer = new Timer(1000, _levelObj.runningSeconds);
_runTimer.addEventListener(TimerEvent.TIMER, __onRunTimer, false, 0, true);
_runTimer.addEventListener(TimerEvent.TIMER_COMPLETE, __onRunTimerComplete, false, 0, true);
}
private function __onMeterMin(_arg1:Event):void{
if (mode == GameScreen.JUMP_MODE){
__jumpDone();
};
}
private function __miss():void{
trace("GameScreen.__miss();");
__clearTrickPoints();
Tweener.addTween(missedClip, _showText);
Tweener.addTween(missedClip, _hideText);
setTimeout(__initRound, 1000);
}
private function __updateTotalPoints(_arg1:Number):void{
trace((("GameScreen.__updateTotalPoints( " + _arg1) + " );"));
_totalPoints = (_totalPoints + _arg1);
totalPointsTxt.text = String(_totalPoints);
trace(("GameScreen._totalPoints = " + _totalPoints));
}
private function __startBackdrop():void{
trace("GameScreen.__startBackdrop();");
addEventListener(Event.ENTER_FRAME, __moveBackDrop, false, 0, true);
}
private function __initGame():void{
trace("GameScreen.__initGame();");
_level = 0;
__clearTotalPoints();
__clearTrickPoints();
__initRound();
}
private function __continueGame():void{
trace("GameScreen.__continueGame();");
}
private function __dunkSplashAnimationDone():void{
trace("GameScreen.__dunkSplashAnimationDone();");
if (_dunkSplashContainer.contains(_dunkSplash)){
_dunkSplashContainer.removeChild(_dunkSplash);
__showScore();
};
}
private function __jumpStart():void{
trace("GameScreen.__jumpStart();");
mode = GameScreen.JUMP_MODE;
kangaroo.jump();
_runDetector.off();
meter.off();
Tweener.addTween(dotricksClip, _showText);
Tweener.addTween(dotricksClip, _hideText);
speedLinesUp.gotoAndPlay("in");
Tweener.addTween(kangaroo, _jumpTweenKangaroo);
Tweener.addTween(backdrop, _jumpTweenBackdrop);
}
private function __onKeyMiss(_arg1:Event):void{
trace("GameScreen.__onKeyMiss();");
_firstRunCall = false;
if (!_firstMissCall){
_firstMissCall = true;
kangaroo.stand();
};
}
public function get totalPoints():int{
return (_totalPoints);
}
private function __onKeyCombo(_arg1:DataEvent):void{
var _local2:Object;
trace("GameScreen.__onKeyCombo();");
_local2 = Main.comboHash[_arg1.data];
trace((((_local2.name + " >> ") + _local2.points) + " pts"));
Main.COMBOS[_local2.index].used = true;
__introTrick(_local2.name, _local2.points);
__updateTrickPoints(_local2.points);
_comboDetector.off();
kangaroo.trick(_arg1.data);
}
private function __animationDone(_arg1:Event):void{
trace("GameScreen.__animationDone();");
switch (_arg1.target.parent){
case kangaroo:
__kangarooAnimationDone();
break;
default:
__dunkSplashAnimationDone();
break;
};
}
private function __moveBackDrop(_arg1:Event):void{
backdrop.x = (backdrop.x + ((_backdropsRunPos - backdrop.x) / 4));
}
private function __stopClouds():void{
trace("GameScreen.__stopClouds();");
clearTimeout(_cloudTimeout);
}
private function __clearTrickPoints():void{
trace("GameScreen.__clearTrickPoints();");
_trickPoints = 0;
}
private function __kangarooAnimationDone():void{
trace("GameScreen.__kangarooAnimationDone();");
switch (kangaroo.currentLabel){
case "jump":
__startTricks();
break;
case "dunk":
__dunk();
break;
case "miss":
__miss();
break;
default:
_comboDetector.on();
kangaroo.defaultPos();
break;
};
}
override protected function __off():void{
trace("GameScreen.__off();");
if (_dunkSplash.hasEventListener(Event.COMPLETE)){
_dunkSplash.removeEventListener(Event.COMPLETE, __animationDone, false);
};
if (kangaroo.hasEventListener(Event.COMPLETE)){
kangaroo.removeEventListener(Event.COMPLETE, __animationDone, false);
};
if (meter.hasEventListener(Meter.MIN)){
meter.removeEventListener(Meter.MIN, __onMeterMin, false);
};
if (meter.hasEventListener(Meter.MAX)){
meter.removeEventListener(Meter.MAX, __onMeterMax, false);
};
if (_runTimer.running){
_runTimer.stop();
};
_runDetector.off();
_comboDetector.off();
meter.off();
kangaroo.stand();
__stopBackdrop();
__stopClouds();
}
private function __addKeyToDisplay(_arg1:String):void{
var _local2:Object;
var _local3:MovieClip;
trace("GameScreen.__addKeyToDisplay();");
_local2 = getDefinitionByName(("Key_" + _arg1));
_local3 = new (_local2);
_local3.scaleX = (_local3.scaleY = 0.75);
_local3.x = _nextKeyX;
_local3.y = 350;
_nextKeyX = (_local3.x + _local3.width);
_keyContainer.addChild(_local3);
_keyContainer.x = (275 - (_keyContainer.width / 2));
}
private function __updateTrickPoints(_arg1:Number):void{
trace((("GameScreen.__updateTrickPoints( " + _arg1) + " );"));
_trickPoints = (_trickPoints + _arg1);
trace(("GameScreen._trickPoints = " + _trickPoints));
}
private function __setTimerText(_arg1):void{
var _local2:String;
var _local3:String;
trace("GameScreen.__setTimerText();");
_local2 = "TIME TO JUMP 0:";
_local3 = String(_arg1);
timeLeftTxt.text = ((_local3.length)<2) ? ((_local2 + "0") + _local3) : (_local2 + _local3);
}
private function __showScore():void{
var _local1:String;
trace("GameScreen.__showScore();");
trace((((_totalPoints + _trickPoints) + " >= ") + _levelObj.pointsRequired));
_local1 = (((_totalPoints + _trickPoints))>=_levelObj.pointsRequired) ? Main.STATE_YOUR_SCORE_NEXT_ROUND : Main.STATE_YOUR_SCORE_GAME_OVER;
trace(("afterScoreEvent: " + _local1));
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, _local1));
}
private function __clearKeyDisplay():void{
trace("GameScreen.__addKeyToDisplay();");
_nextKeyX = 0;
while (_keyContainer.numChildren) {
_keyContainer.removeChildAt(0);
};
}
override protected function __on():void{
trace("GameScreen.__on();");
_dunkSplash.addEventListener(Event.COMPLETE, __animationDone, false, 0, true);
kangaroo.addEventListener(Event.COMPLETE, __animationDone, false, 0, true);
meter.addEventListener(Meter.MIN, __onMeterMin, false, 0, true);
meter.addEventListener(Meter.MAX, __onMeterMax, false, 0, true);
__initGame();
}
private function __dunk():void{
trace("GameScreen.__dunk();");
_dunkSplashContainer.addChild(_dunkSplash);
_dunkSplash.gotoAndPlay(1);
}
private function __onMeterMax(_arg1:Event):void{
trace("GameScreen.__onMeterMax();");
__jumpStart();
_runTimer.stop();
timeLeftTxt.text = "";
}
}
}//package dunk.screens
Section 77
//HighScoresScreen (dunk.screens.HighScoresScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import dunk.*;
import flash.text.*;
public class HighScoresScreen extends Screen {
private var _urlLoader:URLLoader;
public var score4_mc:MovieClip;
public var score7_mc:MovieClip;
public var score_txt:TextField;
public var noScores:TextField;
public var score2_mc:MovieClip;
public var score5_mc:MovieClip;
public var score8_mc:MovieClip;
public var score0_mc:MovieClip;
public var score3_mc:MovieClip;
public var score6_mc:MovieClip;
public var btnMenu:MovieClip;
public var score9_mc:MovieClip;
public var score1_mc:MovieClip;
public function HighScoresScreen():void{
trace("new HighScoresScreen();");
btnMenu.buttonMode = true;
}
public function set score(_arg1:int):void{
score_txt.text = String(_arg1);
}
private function __getScores():void{
var _local1:URLRequest;
trace("HighScoresScreen.__getScores();");
_local1 = new URLRequest(Main.GET_SCORE_SCRIPT);
if (_urlLoader){
_urlLoader.removeEventListener(Event.COMPLETE, __onURLLoaderComplete, false);
_urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, Main.onIOError, false);
_urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, Main.onSecurityError, false);
};
_urlLoader = new URLLoader();
_urlLoader.addEventListener(Event.COMPLETE, __onURLLoaderComplete, false, 0, true);
_urlLoader.addEventListener(IOErrorEvent.IO_ERROR, Main.onIOError, false, 0, true);
_urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, Main.onSecurityError, false, 0, true);
_urlLoader.load(_local1);
}
override protected function __off():void{
trace("HighScoresScreen.__off();");
btnMenu.removeEventListener(MouseEvent.CLICK, __onClickMenu, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
}
override protected function __onFirstAdd():void{
trace("HighScoresScreen.__onFirstAdd();");
}
private function __onURLLoaderComplete(_arg1:Event):void{
var _local2:int;
var _local3:MovieClip;
var _local4:*;
var _local5:URLVariables;
var _local6:String;
var _local7:String;
trace("HighScoresScreen.__onURLLoaderComplete();");
if (_arg1.target.data == ""){
noScores.visible = true;
return;
};
_local4 = ((_arg1.target.data.charAt(0))=="&") ? _arg1.target.data.substr(1) : _arg1.target.data;
_local5 = new URLVariables(_local4);
_local2 = 0;
while (_local2 < 10) {
_local6 = _local5[("name" + _local2)];
_local7 = _local5[("score" + _local2)];
if (((!(_local6)) || (!(_local7)))){
return;
};
_local3 = this[(("score" + _local2) + "_mc")];
_local3.rank_txt.text = (_local2 + 1);
_local3.name_txt.text = _local6;
_local3.score_txt.text = _local7;
_local2++;
};
}
override protected function __on():void{
trace("HighScoresScreen.__on();");
__getScores();
noScores.visible = false;
btnMenu.addEventListener(MouseEvent.CLICK, __onClickMenu, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
}
}
}//package dunk.screens
Section 78
//InstructionsScreen (dunk.screens.InstructionsScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import dunk.*;
import fl.containers.*;
public class InstructionsScreen extends Screen {
public var instructionClip:MovieClip;
public var btnTricks:MovieClip;
public var scroller:ScrollPane;
public var btnPlay:MovieClip;
public var btnMenu:MovieClip;
public function InstructionsScreen():void{
trace("new InstructionsScreen();");
btnPlay.buttonMode = true;
btnMenu.buttonMode = true;
btnTricks.buttonMode = true;
}
override protected function __off():void{
trace("InstructionsScreen.__off();");
btnPlay.removeEventListener(MouseEvent.CLICK, __onClickPlay, false);
btnPlay.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnPlay.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
btnMenu.removeEventListener(MouseEvent.CLICK, __onClickMenu, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
btnTricks.removeEventListener(MouseEvent.CLICK, __onClickTricks, false);
btnTricks.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnTricks.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
}
override protected function __onFirstAdd():void{
trace("InstructionsScreen.__onFirstAdd();");
scroller.source = instructionClip;
}
override protected function __on():void{
trace("InstructionsScreen.__on();");
btnPlay.addEventListener(MouseEvent.CLICK, __onClickPlay, false, 0, true);
btnPlay.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnPlay.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
btnMenu.addEventListener(MouseEvent.CLICK, __onClickMenu, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
btnTricks.addEventListener(MouseEvent.CLICK, __onClickTricks, false, 0, true);
btnTricks.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnTricks.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
}
private function __onClickPlay(_arg1:MouseEvent):void{
var pMouseEvent = _arg1;
trace("InstructionsScreen.__onClickPlay();");
try {
HitBox.hit("play_activity", "play_from_instructions");
} catch(e:SecurityError) {
trace("HitBox.hit Not Called");
};
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_GAME));
}
private function __onClickTricks(_arg1:MouseEvent):void{
trace("InstructionsScreen.__onClickTricks();");
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_TRICKS));
}
}
}//package dunk.screens
Section 79
//MenuScreen (dunk.screens.MenuScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import dunk.*;
public class MenuScreen extends Screen {
public var btnTricks:MovieClip;
public var btnInstructions:MovieClip;
public var btnScores:MovieClip;
public var btnPlay:MovieClip;
public function MenuScreen():void{
trace("new MenuScreen();");
btnPlay.buttonMode = true;
btnInstructions.buttonMode = true;
btnScores.buttonMode = true;
btnTricks.buttonMode = true;
}
private function __onClickInstructions(_arg1:MouseEvent):void{
var pMouseEvent = _arg1;
trace("MenuScreen.__onClickInstructions();");
try {
HitBox.hit("misc", "read_instructions");
} catch(e:SecurityError) {
trace("HitBox.hit Not Called");
};
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_INSTRUCTIONS));
}
private function __onClickScores(_arg1:MouseEvent):void{
trace("MenuScreen.__onClickScores();");
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_HIGH_SCORES));
}
override protected function __off():void{
trace("MenuScreen.__off();");
btnPlay.removeEventListener(MouseEvent.CLICK, __onClickPlay, false);
btnPlay.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnPlay.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
btnInstructions.removeEventListener(MouseEvent.CLICK, __onClickInstructions, false);
btnInstructions.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnInstructions.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
btnScores.removeEventListener(MouseEvent.CLICK, __onClickScores, false);
btnScores.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnScores.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
btnTricks.removeEventListener(MouseEvent.CLICK, __onClickTricks, false);
btnTricks.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnTricks.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
}
override protected function __onFirstAdd():void{
trace("MenuScreen.__onFirstAdd();");
}
override protected function __on():void{
trace("MenuScreen.__on();");
btnPlay.addEventListener(MouseEvent.CLICK, __onClickPlay, false, 0, true);
btnPlay.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnPlay.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
btnInstructions.addEventListener(MouseEvent.CLICK, __onClickInstructions, false, 0, true);
btnInstructions.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnInstructions.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
btnScores.addEventListener(MouseEvent.CLICK, __onClickScores, false, 0, true);
btnScores.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnScores.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
btnTricks.addEventListener(MouseEvent.CLICK, __onClickTricks, false, 0, true);
btnTricks.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnTricks.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
}
private function __onClickPlay(_arg1:MouseEvent):void{
var pMouseEvent = _arg1;
trace("MenuScreen.__onClickPlay();");
try {
HitBox.hit("play_activity", "play_from_main");
} catch(e:SecurityError) {
trace("HitBox.hit Not Called");
};
Main.FIRST_PLAY = false;
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_GAME));
}
private function __onClickTricks(_arg1:MouseEvent):void{
trace("MenuScreen.__onClickTricks();");
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_TRICKS));
}
}
}//package dunk.screens
Section 80
//Screen (dunk.screens.Screen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import dunk.*;
public class Screen extends Sprite {
protected var _firstAdd:Boolean;
private var _showObj:Object;
public function Screen():void{
_showObj = {alpha:1, transition:"linear", time:0.4, onComplete:__onShowComplete};
super();
trace("new Screen();");
addEventListener(Event.ADDED_TO_STAGE, __onAddedToStage, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, __onRemovedFromStage, false, 0, true);
}
protected function __onClickMenu(_arg1:MouseEvent):void{
trace("Screen.__onClickMenu();");
dispatchEvent(new DataEvent(Main.CHANGE_STATE, false, false, Main.STATE_MENU));
}
protected function __onAddedToStage(_arg1:Event):void{
trace("Screen.__onAddedToStage();");
if (!_firstAdd){
_firstAdd = true;
__onFirstAdd();
};
alpha = 0;
Tweener.addTween(this, _showObj);
__on();
stage.focus = stage;
}
protected function __off():void{
trace("Screen.__off();");
}
protected function __onFirstAdd():void{
trace("Screen.__onFirstAdd();");
}
protected function __onShowComplete():void{
trace("Screen.__onShowComplete();");
}
protected function __on():void{
trace("Screen.__on();");
}
protected function __onRemovedFromStage(_arg1:Event):void{
trace("Screen.__onRemovedFromStage();");
__off();
}
}
}//package dunk.screens
Section 81
//TricksScreen (dunk.screens.TricksScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import dunk.*;
import dunk.elements.*;
import fl.containers.*;
public class TricksScreen extends Screen {
public var scroller:ScrollPane;
private var _listContainer:Sprite;
public var btnMenu:MovieClip;
public function TricksScreen():void{
trace("new TricksScreen();");
btnMenu.buttonMode = true;
}
override protected function __off():void{
trace("TricksScreen.__off();");
btnMenu.removeEventListener(MouseEvent.CLICK, __onClickMenu, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false);
btnMenu.removeEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false);
}
override protected function __onFirstAdd():void{
trace("TricksScreen.__onFirstAdd();");
_listContainer = new Sprite();
addChild(_listContainer);
scroller.source = _listContainer;
}
private function __buildTrickList():void{
var _local1:int;
var _local2:TrickListItem;
var _local3:Object;
trace("TricksScreen.__buildTrickList();");
if (_listContainer){
while (_listContainer.numChildren) {
_listContainer.removeChildAt(0);
};
};
_local1 = 0;
while (_local1 < Main.COMBOS.length) {
_local3 = Main.COMBOS[_local1];
_local2 = new TrickListItem(_local3.name, _local3.combo, _local3.used);
_local2.y = ((_local2.height + 4) * _local1);
_listContainer.addChild(_local2);
_local1++;
};
scroller.refreshPane();
}
override protected function __on():void{
trace("TricksScreen.__on();");
__buildTrickList();
btnMenu.addEventListener(MouseEvent.CLICK, __onClickMenu, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
btnMenu.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
}
}
}//package dunk.screens
Section 82
//YourScoreScreen (dunk.screens.YourScoreScreen)
package dunk.screens {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import dunk.*;
import flash.text.*;
public class YourScoreScreen extends Sprite {
public var dunkTxt:TextField;
public var pTxt_0:TextField;
private var _showTweenObj:Object;
public var pTxt_1:TextField;
public var pTxt_2:TextField;
public var pTxt_3:TextField;
public var onHide:String;
private var _showTimer:Timer;
private var _hideTweenObj:Object;
public static const CLOSE:String = "yourScoreClose";
public function YourScoreScreen():void{
_showTweenObj = {alpha:1, time:0.4, transition:"linear"};
_hideTweenObj = {alpha:0, time:0.4, transition:"linear", onComplete:__remove};
super();
trace("new YourScoreScreen();");
if (_showTimer){
if (_showTimer.running){
_showTimer.stop();
};
if (_showTimer.hasEventListener(TimerEvent.TIMER_COMPLETE)){
_showTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, __onTimerComplete, false);
};
};
_showTimer = new Timer(Main.SHOW_SCORE, 1);
_showTimer.addEventListener(TimerEvent.TIMER_COMPLETE, __onTimerComplete, false, 0, true);
addEventListener(Event.ADDED_TO_STAGE, __onAddedToStage, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, __onRemovedFromStage, false, 0, true);
}
private function __onTimerComplete(_arg1:TimerEvent):void{
trace("YourScoreScreen.__onTimerComplete();");
dispatchEvent(new DataEvent(YourScoreScreen.CLOSE, false, false, onHide));
}
public function set score(_arg1:int):void{
__setScore(_arg1);
}
private function __setScore(_arg1:int):void{
var _local2:int;
var _local3:TextField;
var _local4:Array;
trace("YourScoreScreen.__setScore();");
_local4 = String(_arg1).split("").reverse();
_local2 = 0;
while (_local2 < 4) {
_local3 = this[("pTxt_" + _local2)];
_local3.text = "";
_local2++;
};
_local2 = 0;
while (_local2 < _local4.length) {
_local3 = this[("pTxt_" + _local2)];
_local3.text = _local4[_local2];
_local2++;
};
}
public function hide():void{
trace("YourScoreScreen.hide();");
Tweener.addTween(this, _hideTweenObj);
}
private function __remove():void{
trace("YourScoreScreen.__remove();");
parent.removeChild(this);
}
private function __onAddedToStage(_arg1:Event):void{
var _local2:String;
var _local3:String;
trace("YourScoreScreen.__onAddedToStage();");
alpha = 0;
_local2 = Main.COOKIES[Math.floor((Main.COOKIES.length * Math.random()))].toUpperCase();
_local3 = Main.FROSTINGS[Math.floor((Main.FROSTINGS.length * Math.random()))].toUpperCase();
dunkTxt.text = (((_local2 + " with ") + _local3) + " DUNK!");
Tweener.addTween(this, _showTweenObj);
_showTimer.reset();
_showTimer.start();
}
private function __onRemovedFromStage(_arg1:Event):void{
trace("YourScoreScreen.__onRemovedFromStage();");
}
}
}//package dunk.screens
Section 83
//HitBox (dunk.HitBox)
package dunk {
import flash.external.*;
public class HitBox {
public static function hit(_arg1:String, _arg2:String):void{
var _local3:String;
_local3 = ((("/flash/" + _arg1.toLowerCase()) + "/") + _arg2.toLowerCase());
trace((("HitBox.hit( " + _local3) + " );"));
ExternalInterface.call("_hbLink", _local3);
}
}
}//package dunk
Section 84
//Main (dunk.Main)
package dunk {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.net.*;
import flash.system.*;
import eaxis.ui.*;
import eaxis.utils.*;
import flash.media.*;
import dunk.screens.*;
import dunk.elements.*;
import flash.text.*;
import flash.ui.*;
public class Main extends Sprite {
private var _currentMusic:SoundChannel;
private var _highScoresScreen:HighScoresScreen;
private var _instructionsScreen:InstructionsScreen;
private var _audioToggle:AudioToggle;
private var _gameOverScreen:GameOverScreen;
private var _yourScoreScreen:YourScoreScreen;
private var _screenContainer:Sprite;
private var _firstAdd:Boolean;
private var _stObjOFF:Object;
private var _menuScreen:MenuScreen;
private var _audioIsOn:Boolean;
private var _currentState:String;
private var _currentScreen:Screen;
private var _menuMusic:SoundChannel;
private var _gameScreen:GameScreen;
private var _gameMusic:SoundChannel;
private var _tricksScreen:TricksScreen;
private var _stObjON:Object;
public static const STATE_GAME:String = "stateGame";
public static const GAME_OVER:String = "gameOver";
public static const GAME_ID:int = 242;
public static const BTN_OVER_TWEEN:Object = {scaleX:1.1, scaleY:1.1, time:0.8, transition:"easeOutElastic"};
public static const STATE_TRICKS:String = "stateTricks";
public static const STATE_HIGH_SCORES:String = "stateHighScores";
public static const SCRIPT_PATH:String = "http://www.ytv.com/";
public static const METER_DECREMENT:Number = 0.001;
public static const KEY_WAIT_COMBO:int = 200;
public static const KEY_WAIT_RUN:int = 200;
public static const CHANGE_STATE:String = "changeState";
public static const SHOW_SCORE:int = 5000;
public static const NEXT_ROUND:String = "nextRound";
public static const STATE_GAME_OVER:String = "stateGameOver";
public static const BTN_OUT_TWEEN:Object = {scaleX:1, scaleY:1, time:0.8, transition:"easeOutElastic"};
public static const STATE_YOUR_SCORE_NEXT_ROUND:String = "stateYourScoreNextRound";
public static const ALL_STAR_BONUS:int = 10000;
public static const RUN_SPEED:Number = 24;
public static const STATE_INSTRUCTIONS:String = "stateInstructions";
public static const STATE_MENU:String = "stateMenu";
public static const LEVELS:Array = [{name:"High School", pointsRequired:1000, runningSeconds:12, background:"highschool"}, {name:"College", pointsRequired:2000, runningSeconds:10, background:"college"}, {name:"Semi-Pro", pointsRequired:3000, runningSeconds:8, background:"semipro"}, {name:"Pro", pointsRequired:4000, runningSeconds:6, background:"pro"}, {name:"All-Star", pointsRequired:5000, runningSeconds:4, background:"allstar"}];
public static const STATE_YOUR_SCORE_GAME_OVER:String = "stateYourScoreGameOver";
public static const METER_INCREMENT:Number = 0.015;
public static const FROSTINGS:Array = ["Vanilla with Rainbow Sprinkles", "Chocolate", "Vanilla"];
public static const COOKIES:Array = ["Cinnamon Graham Cookies", "Chocolate Chip Cookies", "Chocolate Cookies"];
public static var FIRST_PLAY:Boolean = true;
public static var SEND_SCORE_SCRIPT:String;
public static var GET_SCORE_SCRIPT:String;
public static var COMBOS:Array = [{name:"Basic Raise", points:50, event:"c1", used:false, combo:[Keyboard.UP]}, {name:"Basic Lower", points:50, event:"c2", used:false, combo:[Keyboard.DOWN]}, {name:"Do it Up", points:100, event:"c3", used:false, combo:[Keyboard.UP, Keyboard.RIGHT]}, {name:"Do it Down", points:100, event:"c4", used:false, combo:[Keyboard.DOWN, Keyboard.RIGHT]}, {name:"Back Flip", points:100, event:"c5", used:false, combo:[Keyboard.DOWN, Keyboard.LEFT]}, {name:"Forward Flip", points:100, event:"c6", used:false, combo:[Keyboard.UP, Keyboard.LEFT]}, {name:"Side Spin", points:100, event:"c7", used:false, combo:[Keyboard.RIGHT, Keyboard.LEFT]}, {name:"Back Roll", points:100, event:"c8", used:false, combo:[KeyboardComplete.D, Keyboard.DOWN]}, {name:"Front Roll", points:100, event:"c9", used:false, combo:[KeyboardComplete.A, Keyboard.DOWN]}, {name:"Latitude Attitude", points:150, event:"c10", used:false, combo:[Keyboard.LEFT, Keyboard.RIGHT, Keyboard.LEFT]}, {name:"Icecap Orbit", points:150, event:"c11", used:false, combo:[Keyboard.RIGHT, Keyboard.LEFT, Keyboard.RIGHT]}, {name:"Axis Max", points:150, event:"c12", used:false, combo:[Keyboard.RIGHT, Keyboard.LEFT, Keyboard.LEFT]}, {name:"Pendulum", points:150, event:"c13", used:false, combo:[Keyboard.RIGHT, Keyboard.LEFT, Keyboard.DOWN]}, {name:"The Tornado", points:200, event:"c14", used:false, combo:[KeyboardComplete.D, Keyboard.LEFT, Keyboard.RIGHT, Keyboard.LEFT]}, {name:"Hang Ten", points:200, event:"c15", used:false, combo:[KeyboardComplete.D, Keyboard.UP, Keyboard.DOWN, Keyboard.UP]}, {name:"Boomerang", points:250, event:"c16", used:false, combo:[KeyboardComplete.A, KeyboardComplete.D, Keyboard.LEFT, Keyboard.RIGHT, Keyboard.LEFT]}, {name:"Fourth Wall", points:250, event:"c17", used:false, combo:[KeyboardComplete.A, KeyboardComplete.D, Keyboard.RIGHT, Keyboard.RIGHT, Keyboard.LEFT]}, {name:"E-Z Rider", points:250, event:"c18", used:false, combo:[KeyboardComplete.S, KeyboardComplete.D, Keyboard.LEFT, Keyboard.DOWN, Keyboard.RIGHT]}, {name:"Walk the Dog", points:250, event:"c19", used:false, combo:[KeyboardComplete.S, KeyboardComplete.D, Keyboard.RIGHT, Keyboard.DOWN, Keyboard.LEFT]}, {name:"Yipee Ki Yay", points:250, event:"c20", used:false, combo:[KeyboardComplete.S, KeyboardComplete.D, Keyboard.UP, Keyboard.RIGHT, Keyboard.LEFT]}, {name:"The Sleeper", points:300, event:"c21", used:false, combo:[KeyboardComplete.A, KeyboardComplete.S, KeyboardComplete.D, Keyboard.DOWN, Keyboard.UP, Keyboard.DOWN]}, {name:"Jetpack", points:300, event:"c22", used:false, combo:[KeyboardComplete.A, KeyboardComplete.S, KeyboardComplete.D, Keyboard.UP, Keyboard.UP, Keyboard.UP]}, {name:"Atom Smasher", points:500, event:"c23", used:false, combo:[KeyboardComplete.A, KeyboardComplete.S, KeyboardComplete.D, Keyboard.UP, Keyboard.RIGHT, Keyboard.DOWN, Keyboard.LEFT]}];
public static var comboHash:Object;
public static var errorContainer:Sprite;
public static var RUN_HINT:Boolean;
public function Main():void{
_stObjON = {_sound_volume:1, time:0.4, transition:"linear"};
_stObjOFF = {_sound_volume:0, time:0.4, transition:"linear"};
super();
trace("new Main();");
Main.SEND_SCORE_SCRIPT = ((Main.SCRIPT_PATH + "gamepad/play/games/writeGameHighScore.asp?gameID=") + Main.GAME_ID);
Main.GET_SCORE_SCRIPT = ((Main.SCRIPT_PATH + "gamepad/play/games/getGameHighScores.asp?gameID=") + Main.GAME_ID);
addEventListener(Event.ADDED_TO_STAGE, __onAddedToStage, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, __onRemovedFromStage, false, 0, true);
}
private function __toggleAudio(_arg1:MouseEvent):void{
trace("Main.__toggleAudio();");
_audioIsOn = !(_audioIsOn);
Tweener.addTween(_currentMusic, (_audioIsOn) ? _stObjON : _stObjOFF);
}
private function __setState(_arg1:String):void{
trace("Main.__setState();");
if (_arg1 == _currentState){
return;
};
switch (_arg1){
case Main.STATE_MENU:
_screenContainer.addChild(_menuScreen);
__removeCurrentScreen();
__setMusic(_arg1);
__setCurrentState(_arg1);
break;
case Main.STATE_GAME:
_screenContainer.addChild(_gameScreen);
__removeCurrentScreen();
__setMusic(_arg1);
__setCurrentState(_arg1);
break;
case Main.STATE_GAME_OVER:
_screenContainer.addChild(_gameOverScreen);
__removeCurrentScreen();
__setMusic(_arg1);
__setCurrentState(_arg1);
break;
case Main.STATE_INSTRUCTIONS:
_screenContainer.addChild(_instructionsScreen);
__removeCurrentScreen();
__setMusic(_arg1);
__setCurrentState(_arg1);
break;
case Main.STATE_HIGH_SCORES:
_highScoresScreen.score = (_gameScreen.trickPoints + _gameScreen.totalPoints);
_screenContainer.addChild(_highScoresScreen);
__removeCurrentScreen();
__setMusic(_arg1);
__setCurrentState(_arg1);
break;
case Main.STATE_TRICKS:
_screenContainer.addChild(_tricksScreen);
__removeCurrentScreen();
__setMusic(_arg1);
__setCurrentState(_arg1);
break;
case Main.STATE_YOUR_SCORE_NEXT_ROUND:
_yourScoreScreen.score = _gameScreen.trickPoints;
_yourScoreScreen.onHide = Main.NEXT_ROUND;
_screenContainer.addChild(_yourScoreScreen);
break;
case Main.STATE_YOUR_SCORE_GAME_OVER:
_yourScoreScreen.score = _gameScreen.trickPoints;
_yourScoreScreen.onHide = Main.GAME_OVER;
_screenContainer.addChild(_yourScoreScreen);
break;
};
}
private function __removeCurrentScreen():void{
trace("Main.__removeCurrentScreen();");
if (_currentScreen){
_screenContainer.removeChild(_currentScreen);
};
}
private function __setCurrentState(_arg1:String):void{
trace("Main.__setCurrentState();");
_currentScreen = (_screenContainer.getChildAt(0) as Screen);
_currentState = _arg1;
}
private function __onStateChange(_arg1:DataEvent):void{
trace("Main.__onStateChange();");
__setState(_arg1.data);
}
private function __onAddedToStage(_arg1:Event):void{
trace("Main.__onAddedToStage();");
if (!_firstAdd){
_firstAdd = true;
__onFirstAdd();
};
__setState(Main.STATE_MENU);
}
private function __initScreens():void{
trace("Main.__initScreens();");
_menuScreen = new MenuScreen();
_menuScreen.addEventListener(Main.CHANGE_STATE, __onStateChange, false, 0, true);
_gameScreen = new GameScreen();
_gameScreen.addEventListener(Main.CHANGE_STATE, __onStateChange, false, 0, true);
_gameOverScreen = new GameOverScreen();
_gameOverScreen.addEventListener(Main.CHANGE_STATE, __onStateChange, false, 0, true);
_instructionsScreen = new InstructionsScreen();
_instructionsScreen.addEventListener(Main.CHANGE_STATE, __onStateChange, false, 0, true);
_highScoresScreen = new HighScoresScreen();
_highScoresScreen.addEventListener(Main.CHANGE_STATE, __onStateChange, false, 0, true);
_tricksScreen = new TricksScreen();
_tricksScreen.addEventListener(Main.CHANGE_STATE, __onStateChange, false, 0, true);
_yourScoreScreen = new YourScoreScreen();
_yourScoreScreen.addEventListener(YourScoreScreen.CLOSE, __onCloseYourScore, false, 0, true);
}
private function __onCloseYourScore(_arg1:DataEvent):void{
trace("Main.__onCloseYourScore();");
switch (_arg1.data){
case Main.NEXT_ROUND:
if (_gameScreen.nextRound()){
_yourScoreScreen.hide();
} else {
_screenContainer.removeChild(_yourScoreScreen);
_gameOverScreen.setup(GameOverScreen.GOOD, (_gameScreen.trickPoints + _gameScreen.totalPoints));
__setState(Main.STATE_GAME_OVER);
};
break;
case Main.GAME_OVER:
_screenContainer.removeChild(_yourScoreScreen);
_gameOverScreen.setup(GameOverScreen.BAD, (_gameScreen.trickPoints + _gameScreen.totalPoints));
__setState(Main.STATE_GAME_OVER);
break;
};
}
private function __onFirstAdd():void{
var _local1:Sound;
var _local2:Sound;
trace("Main.__onFirstAdd();");
Main.errorContainer = new Sprite();
_screenContainer = new Sprite();
_audioIsOn = true;
_local1 = new Sound(new URLRequest("sounds/WOWDunkMain.mp3"));
_gameMusic = _local1.play(0, 10000, new SoundTransform(0));
_local2 = new Sound(new URLRequest("sounds/WOWDunkMini.mp3"));
_menuMusic = _local2.play(0, 10000);
_audioToggle = new AudioToggle();
_audioToggle.addEventListener(MouseEvent.CLICK, __toggleAudio, false, 0, true);
_audioToggle.addEventListener(MouseEvent.ROLL_OVER, Main.btnOver, false, 0, true);
_audioToggle.addEventListener(MouseEvent.ROLL_OUT, Main.btnOut, false, 0, true);
_audioToggle.x = 544;
_audioToggle.y = 400;
addChild(_screenContainer);
addChild(_audioToggle);
addChild(Main.errorContainer);
__initScreens();
__buildComboHash();
}
private function __setMusic(_arg1:String):void{
trace("Main.__setMusic();");
if (_arg1 == _currentState){
return;
};
switch (_arg1){
case Main.STATE_MENU:
_currentMusic = _menuMusic;
Tweener.addTween(_gameMusic, _stObjOFF);
if (_audioIsOn){
Tweener.addTween(_menuMusic, _stObjON);
};
break;
case Main.STATE_GAME:
_currentMusic = _gameMusic;
if (_audioIsOn){
Tweener.addTween(_gameMusic, _stObjON);
};
Tweener.addTween(_menuMusic, _stObjOFF);
break;
case Main.STATE_GAME_OVER:
case Main.STATE_INSTRUCTIONS:
case Main.STATE_HIGH_SCORES:
case Main.STATE_TRICKS:
case Main.STATE_YOUR_SCORE_NEXT_ROUND:
case Main.STATE_YOUR_SCORE_GAME_OVER:
_currentMusic = _menuMusic;
Tweener.addTween(_gameMusic, _stObjOFF);
if (_audioIsOn){
Tweener.addTween(_menuMusic, _stObjON);
};
break;
};
}
private function __buildComboHash():void{
var _local1:int;
var _local2:Object;
trace("Main.__buildComboHash();");
Main.comboHash = new Object();
_local1 = 0;
while (_local1 < Main.COMBOS.length) {
Main.comboHash[Main.COMBOS[_local1].event] = new Object();
_local2 = Main.comboHash[Main.COMBOS[_local1].event];
_local2.name = Main.COMBOS[_local1].name;
_local2.points = Main.COMBOS[_local1].points;
_local2.index = _local1;
_local1++;
};
}
private function __onRemovedFromStage(_arg1:Event):void{
trace("Main.__onRemovedFromStage();");
}
public static function onSecurityError(_arg1:SecurityErrorEvent):void{
var _local2:ErrorMessage;
trace("Main.onSecurityError();");
_local2 = new ErrorMessage();
Main.errorContainer.addChild(_local2);
}
public static function onIOError(_arg1:IOErrorEvent):void{
var _local2:ErrorMessage;
trace("Main.onIOError();");
_local2 = new ErrorMessage();
Main.errorContainer.addChild(_local2);
}
public static function btnOut(_arg1:MouseEvent):void{
Tweener.addTween(_arg1.target, Main.BTN_OUT_TWEEN);
}
public static function btnOver(_arg1:MouseEvent):void{
Tweener.addTween(_arg1.target, Main.BTN_OVER_TWEEN);
}
}
}//package dunk
Section 85
//DunkSplash (DunkSplash)
package {
import dunk.elements.*;
public dynamic class DunkSplash extends AnimationWrapper {
}
}//package
Section 86
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 87
//jump (jump)
package {
import dunk.elements.*;
public dynamic class jump extends AnimationWrapper {
}
}//package
Section 88
//Key_37 (Key_37)
package {
import flash.display.*;
public dynamic class Key_37 extends MovieClip {
public function Key_37(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 89
//Key_38 (Key_38)
package {
import flash.display.*;
public dynamic class Key_38 extends MovieClip {
public function Key_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 90
//Key_39 (Key_39)
package {
import flash.display.*;
public dynamic class Key_39 extends MovieClip {
public function Key_39(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 91
//Key_40 (Key_40)
package {
import flash.display.*;
public dynamic class Key_40 extends MovieClip {
public function Key_40(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 92
//Key_65 (Key_65)
package {
import flash.display.*;
public dynamic class Key_65 extends MovieClip {
public function Key_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 93
//Key_68 (Key_68)
package {
import flash.display.*;
public dynamic class Key_68 extends MovieClip {
public function Key_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 94
//Key_83 (Key_83)
package {
import flash.display.*;
public dynamic class Key_83 extends MovieClip {
public function Key_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 95
//miss (miss)
package {
import dunk.elements.*;
public dynamic class miss extends AnimationWrapper {
}
}//package
Section 96
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 97
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 98
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 99
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 100
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 101
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 102
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 103
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 104
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 105
//ScrollPane_disabledSkin (ScrollPane_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollPane_disabledSkin extends MovieClip {
}
}//package
Section 106
//ScrollPane_upSkin (ScrollPane_upSkin)
package {
import flash.display.*;
public dynamic class ScrollPane_upSkin extends MovieClip {
}
}//package
Section 107
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 108
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 109
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 110
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package