Section 1
//ColorShortcuts (caurina.transitions.properties.ColorShortcuts)
package caurina.transitions.properties {
import caurina.transitions.*;
import flash.filters.*;
import flash.geom.*;
public class ColorShortcuts {
private static var LUMINANCE_B:Number = 0.072169;
private static var LUMINANCE_G:Number = 0.71516;
private static var LUMINANCE_R:Number = 0.212671;
public function ColorShortcuts(){
trace("This is an static class and should not be instantiated.");
}
public static function _color_splitter(_arg1, _arg2:Array):Array{
var _local3:Array = new Array();
if (_arg1 == null){
_local3.push({name:"_color_redMultiplier", value:1});
_local3.push({name:"_color_redOffset", value:0});
_local3.push({name:"_color_greenMultiplier", value:1});
_local3.push({name:"_color_greenOffset", value:0});
_local3.push({name:"_color_blueMultiplier", value:1});
_local3.push({name:"_color_blueOffset", value:0});
} else {
_local3.push({name:"_color_redMultiplier", value:0});
_local3.push({name:"_color_redOffset", value:AuxFunctions.numberToR(_arg1)});
_local3.push({name:"_color_greenMultiplier", value:0});
_local3.push({name:"_color_greenOffset", value:AuxFunctions.numberToG(_arg1)});
_local3.push({name:"_color_blueMultiplier", value:0});
_local3.push({name:"_color_blueOffset", value:AuxFunctions.numberToB(_arg1)});
};
return (_local3);
}
public static function _contrast_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:Number;
var _local6:Number;
_local5 = (_arg2 + 1);
_local6 = Math.round((_arg2 * -128));
var _local7:ColorTransform = new ColorTransform(_local5, _local5, _local5, 1, _local6, _local6, _local6, 0);
_arg1.transform.colorTransform = _local7;
}
public static function _brightness_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
var _local4:Boolean = _arg2[0];
var _local5:ColorTransform = _arg1.transform.colorTransform;
var _local6:Number = (1 - (((_local5.redMultiplier + _local5.greenMultiplier) + _local5.blueMultiplier) / 3));
var _local7:Number = (((_local5.redOffset + _local5.greenOffset) + _local5.blueOffset) / 3);
if (_local4){
return (((_local7 > 0)) ? (_local7 / 0xFF) : -(_local6));
//unresolved jump
};
return ((_local7 / 100));
}
public static function _saturation_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
var _local4:Array = getObjectMatrix(_arg1);
var _local5:Boolean = _arg2[0];
var _local6:Number = (_local5) ? (1 / 3) : LUMINANCE_R;
var _local7:Number = (_local5) ? (1 / 3) : LUMINANCE_G;
var _local8:Number = (_local5) ? (1 / 3) : LUMINANCE_B;
var _local9:Number = (((((_local4[0] - _local6) / (1 - _local6)) + ((_local4[6] - _local7) / (1 - _local7))) + ((_local4[12] - _local8) / (1 - _local8))) / 3);
var _local10:Number = (1 - (((((((_local4[1] / _local7) + (_local4[2] / _local8)) + (_local4[5] / _local6)) + (_local4[7] / _local8)) + (_local4[10] / _local6)) + (_local4[11] / _local7)) / 6));
return (((_local9 + _local10) / 2));
}
public static function _oldColor_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return ((_arg1.transform.colorTransform[_arg2[0]] * 100));
}
public static function _brightness_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local6:Number;
var _local7:Number;
var _local5:Boolean = _arg3[0];
if (_local5){
_local6 = (1 - Math.abs(_arg2));
_local7 = ((_arg2 > 0)) ? Math.round((_arg2 * 0xFF)) : 0;
} else {
_local6 = 1;
_local7 = Math.round((_arg2 * 100));
};
var _local8:ColorTransform = new ColorTransform(_local6, _local6, _local6, 1, _local7, _local7, _local7, 0);
_arg1.transform.colorTransform = _local8;
}
public static function _saturation_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:Boolean = _arg3[0];
var _local6:Number = (_local5) ? (1 / 3) : LUMINANCE_R;
var _local7:Number = (_local5) ? (1 / 3) : LUMINANCE_G;
var _local8:Number = (_local5) ? (1 / 3) : LUMINANCE_B;
var _local9:Number = _arg2;
var _local10:Number = (1 - _local9);
var _local11:Number = (_local6 * _local10);
var _local12:Number = (_local7 * _local10);
var _local13:Number = (_local8 * _local10);
var _local14:Array = [(_local11 + _local9), _local12, _local13, 0, 0, _local11, (_local12 + _local9), _local13, 0, 0, _local11, _local12, (_local13 + _local9), 0, 0, 0, 0, 0, 1, 0];
setObjectMatrix(_arg1, _local14);
}
private static function getObjectMatrix(_arg1:Object):Array{
var _local2:Number = 0;
while (_local2 < _arg1.filters.length) {
if ((_arg1.filters[_local2] is ColorMatrixFilter)){
return (_arg1.filters[_local2].matrix.concat());
};
_local2++;
};
return ([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]);
}
public static function getHueDistance(_arg1:Array, _arg2:Array):Number{
return (((Math.abs((_arg1[0] - _arg2[0])) + Math.abs((_arg1[1] - _arg2[1]))) + Math.abs((_arg1[2] - _arg2[2]))));
}
public static function _hue_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
setObjectMatrix(_arg1, getHueMatrix(_arg2));
}
public static function _hue_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
var _local6:Number;
var _local8:Number;
var _local4:Array = getObjectMatrix(_arg1);
var _local5:Array = [];
_local5[0] = {angle:-179.9, matrix:getHueMatrix(-179.9)};
_local5[1] = {angle:180, matrix:getHueMatrix(180)};
_local6 = 0;
while (_local6 < _local5.length) {
_local5[_local6].distance = getHueDistance(_local4, _local5[_local6].matrix);
_local6++;
};
var _local7:Number = 15;
_local6 = 0;
while (_local6 < _local7) {
if (_local5[0].distance < _local5[1].distance){
_local8 = 1;
} else {
_local8 = 0;
};
_local5[_local8].angle = ((_local5[0].angle + _local5[1].angle) / 2);
_local5[_local8].matrix = getHueMatrix(_local5[_local8].angle);
_local5[_local8].distance = getHueDistance(_local4, _local5[_local8].matrix);
_local6++;
};
return (_local5[_local8].angle);
}
public static function getHueMatrix(_arg1:Number):Array{
var _local2:Number = ((_arg1 * Math.PI) / 180);
var _local3:Number = LUMINANCE_R;
var _local4:Number = LUMINANCE_G;
var _local5:Number = LUMINANCE_B;
var _local6:Number = Math.cos(_local2);
var _local7:Number = Math.sin(_local2);
var _local8:Array = [((_local3 + (_local6 * (1 - _local3))) + (_local7 * -(_local3))), ((_local4 + (_local6 * -(_local4))) + (_local7 * -(_local4))), ((_local5 + (_local6 * -(_local5))) + (_local7 * (1 - _local5))), 0, 0, ((_local3 + (_local6 * -(_local3))) + (_local7 * 0.143)), ((_local4 + (_local6 * (1 - _local4))) + (_local7 * 0.14)), ((_local5 + (_local6 * -(_local5))) + (_local7 * -0.283)), 0, 0, ((_local3 + (_local6 * -(_local3))) + (_local7 * -((1 - _local3)))), ((_local4 + (_local6 * -(_local4))) + (_local7 * _local4)), ((_local5 + (_local6 * (1 - _local5))) + (_local7 * _local5)), 0, 0, 0, 0, 0, 1, 0];
return (_local8);
}
public static function _color_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return (_arg1.transform.colorTransform[_arg2[0]]);
}
public static function init():void{
Tweener.registerSpecialProperty("_color_ra", _oldColor_property_get, _oldColor_property_set, ["redMultiplier"]);
Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["redOffset"]);
Tweener.registerSpecialProperty("_color_ga", _oldColor_property_get, _oldColor_property_set, ["greenMultiplier"]);
Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["greenOffset"]);
Tweener.registerSpecialProperty("_color_ba", _oldColor_property_get, _oldColor_property_set, ["blueMultiplier"]);
Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["blueOffset"]);
Tweener.registerSpecialProperty("_color_aa", _oldColor_property_get, _oldColor_property_set, ["alphaMultiplier"]);
Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["alphaOffset"]);
Tweener.registerSpecialProperty("_color_redMultiplier", _color_property_get, _color_property_set, ["redMultiplier"]);
Tweener.registerSpecialProperty("_color_redOffset", _color_property_get, _color_property_set, ["redOffset"]);
Tweener.registerSpecialProperty("_color_greenMultiplier", _color_property_get, _color_property_set, ["greenMultiplier"]);
Tweener.registerSpecialProperty("_color_greenOffset", _color_property_get, _color_property_set, ["greenOffset"]);
Tweener.registerSpecialProperty("_color_blueMultiplier", _color_property_get, _color_property_set, ["blueMultiplier"]);
Tweener.registerSpecialProperty("_color_blueOffset", _color_property_get, _color_property_set, ["blueOffset"]);
Tweener.registerSpecialProperty("_color_alphaMultiplier", _color_property_get, _color_property_set, ["alphaMultiplier"]);
Tweener.registerSpecialProperty("_color_alphaOffset", _color_property_get, _color_property_set, ["alphaOffset"]);
Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
Tweener.registerSpecialProperty("_brightness", _brightness_get, _brightness_set, [false]);
Tweener.registerSpecialProperty("_tintBrightness", _brightness_get, _brightness_set, [true]);
Tweener.registerSpecialProperty("_contrast", _contrast_get, _contrast_set);
Tweener.registerSpecialProperty("_hue", _hue_get, _hue_set);
Tweener.registerSpecialProperty("_saturation", _saturation_get, _saturation_set, [false]);
Tweener.registerSpecialProperty("_dumbSaturation", _saturation_get, _saturation_set, [true]);
}
private static function setObjectMatrix(_arg1:Object, _arg2:Array):void{
var _local6:ColorMatrixFilter;
var _local3:Array = _arg1.filters.concat();
var _local4:Boolean;
var _local5:Number = 0;
while (_local5 < _local3.length) {
if ((_local3[_local5] is ColorMatrixFilter)){
_local3[_local5].matrix = _arg2.concat();
_local4 = true;
};
_local5++;
};
if (!_local4){
_local6 = new ColorMatrixFilter(_arg2);
_local3[_local3.length] = _local6;
};
_arg1.filters = _local3;
}
public static function _color_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:ColorTransform = _arg1.transform.colorTransform;
_local5[_arg3[0]] = _arg2;
_arg1.transform.colorTransform = _local5;
}
public static function _oldColor_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:ColorTransform = _arg1.transform.colorTransform;
_local5[_arg3[0]] = (_arg2 / 100);
_arg1.transform.colorTransform = _local5;
}
public static function _contrast_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
var _local5:Number;
var _local6:Number;
var _local4:ColorTransform = _arg1.transform.colorTransform;
_local5 = ((((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3) - 1);
_local6 = ((((_local4.redOffset + _local4.greenOffset) + _local4.blueOffset) / 3) / -128);
return (((_local5 + _local6) / 2));
}
public static function _colorTransform_splitter(_arg1:Object, _arg2:Array):Array{
var _local3:Array = new Array();
if (_arg1 == null){
_local3.push({name:"_color_redMultiplier", value:1});
_local3.push({name:"_color_redOffset", value:0});
_local3.push({name:"_color_greenMultiplier", value:1});
_local3.push({name:"_color_greenOffset", value:0});
_local3.push({name:"_color_blueMultiplier", value:1});
_local3.push({name:"_color_blueOffset", 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});
};
if (_arg1.redMultiplier != undefined){
_local3.push({name:"_color_redMultiplier", value:_arg1.redMultiplier});
};
if (_arg1.redOffset != undefined){
_local3.push({name:"_color_redOffset", value:_arg1.redOffset});
};
if (_arg1.blueMultiplier != undefined){
_local3.push({name:"_color_blueMultiplier", value:_arg1.blueMultiplier});
};
if (_arg1.blueOffset != undefined){
_local3.push({name:"_color_blueOffset", value:_arg1.blueOffset});
};
if (_arg1.greenMultiplier != undefined){
_local3.push({name:"_color_greenMultiplier", value:_arg1.greenMultiplier});
};
if (_arg1.greenOffset != undefined){
_local3.push({name:"_color_greenOffset", value:_arg1.greenOffset});
};
if (_arg1.alphaMultiplier != undefined){
_local3.push({name:"_color_alphaMultiplier", value:_arg1.alphaMultiplier});
};
if (_arg1.alphaOffset != undefined){
_local3.push({name:"_color_alphaOffset", value:_arg1.alphaOffset});
};
};
return (_local3);
}
}
}//package caurina.transitions.properties
Section 2
//FilterShortcuts (caurina.transitions.properties.FilterShortcuts)
package caurina.transitions.properties {
import flash.display.*;
import caurina.transitions.*;
import flash.filters.*;
import flash.geom.*;
public class FilterShortcuts {
public function FilterShortcuts(){
trace("This is an static class and should not be instantiated.");
}
public static function init():void{
Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
Tweener.registerSpecialProperty("_Bevel_angle", _filter_property_get, _filter_property_set, [BevelFilter, "angle"]);
Tweener.registerSpecialProperty("_Bevel_blurX", _filter_property_get, _filter_property_set, [BevelFilter, "blurX"]);
Tweener.registerSpecialProperty("_Bevel_blurY", _filter_property_get, _filter_property_set, [BevelFilter, "blurY"]);
Tweener.registerSpecialProperty("_Bevel_distance", _filter_property_get, _filter_property_set, [BevelFilter, "distance"]);
Tweener.registerSpecialProperty("_Bevel_highlightAlpha", _filter_property_get, _filter_property_set, [BevelFilter, "highlightAlpha"]);
Tweener.registerSpecialPropertySplitter("_Bevel_highlightColor", _generic_color_splitter, ["_Bevel_highlightColor_r", "_Bevel_highlightColor_g", "_Bevel_highlightColor_b"]);
Tweener.registerSpecialProperty("_Bevel_highlightColor_r", _filter_property_get, _filter_property_set, [BevelFilter, "highlightColor", "color", "r"]);
Tweener.registerSpecialProperty("_Bevel_highlightColor_g", _filter_property_get, _filter_property_set, [BevelFilter, "highlightColor", "color", "g"]);
Tweener.registerSpecialProperty("_Bevel_highlightColor_b", _filter_property_get, _filter_property_set, [BevelFilter, "highlightColor", "color", "b"]);
Tweener.registerSpecialProperty("_Bevel_knockout", _filter_property_get, _filter_property_set, [BevelFilter, "knockout"]);
Tweener.registerSpecialProperty("_Bevel_quality", _filter_property_get, _filter_property_set, [BevelFilter, "quality"]);
Tweener.registerSpecialProperty("_Bevel_shadowAlpha", _filter_property_get, _filter_property_set, [BevelFilter, "shadowAlpha"]);
Tweener.registerSpecialPropertySplitter("_Bevel_shadowColor", _generic_color_splitter, ["_Bevel_shadowColor_r", "_Bevel_shadowColor_g", "_Bevel_shadowColor_b"]);
Tweener.registerSpecialProperty("_Bevel_shadowColor_r", _filter_property_get, _filter_property_set, [BevelFilter, "shadowColor", "color", "r"]);
Tweener.registerSpecialProperty("_Bevel_shadowColor_g", _filter_property_get, _filter_property_set, [BevelFilter, "shadowColor", "color", "g"]);
Tweener.registerSpecialProperty("_Bevel_shadowColor_b", _filter_property_get, _filter_property_set, [BevelFilter, "shadowColor", "color", "b"]);
Tweener.registerSpecialProperty("_Bevel_strength", _filter_property_get, _filter_property_set, [BevelFilter, "strength"]);
Tweener.registerSpecialProperty("_Bevel_type", _filter_property_get, _filter_property_set, [BevelFilter, "type"]);
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("_ColorMatrix_matrix", _generic_matrix_splitter, [[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], ["_ColorMatrix_matrix_rr", "_ColorMatrix_matrix_rg", "_ColorMatrix_matrix_rb", "_ColorMatrix_matrix_ra", "_ColorMatrix_matrix_ro", "_ColorMatrix_matrix_gr", "_ColorMatrix_matrix_gg", "_ColorMatrix_matrix_gb", "_ColorMatrix_matrix_ga", "_ColorMatrix_matrix_go", "_ColorMatrix_matrix_br", "_ColorMatrix_matrix_bg", "_ColorMatrix_matrix_bb", "_ColorMatrix_matrix_ba", "_ColorMatrix_matrix_bo", "_ColorMatrix_matrix_ar", "_ColorMatrix_matrix_ag", "_ColorMatrix_matrix_ab", "_ColorMatrix_matrix_aa", "_ColorMatrix_matrix_ao"]]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_rr", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 0]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_rg", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 1]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_rb", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 2]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ra", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 3]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ro", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 4]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_gr", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 5]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_gg", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 6]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_gb", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 7]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ga", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 8]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_go", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 9]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_br", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 10]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_bg", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 11]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_bb", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 12]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ba", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 13]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_bo", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 14]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ar", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 15]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ag", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 16]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ab", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 17]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_aa", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 18]);
Tweener.registerSpecialProperty("_ColorMatrix_matrix_ao", _filter_property_get, _filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 19]);
Tweener.registerSpecialProperty("_Convolution_alpha", _filter_property_get, _filter_property_set, [ConvolutionFilter, "alpha"]);
Tweener.registerSpecialProperty("_Convolution_bias", _filter_property_get, _filter_property_set, [ConvolutionFilter, "bias"]);
Tweener.registerSpecialProperty("_Convolution_clamp", _filter_property_get, _filter_property_set, [ConvolutionFilter, "clamp"]);
Tweener.registerSpecialPropertySplitter("_Convolution_color", _generic_color_splitter, ["_Convolution_color_r", "_Convolution_color_g", "_Convolution_color_b"]);
Tweener.registerSpecialProperty("_Convolution_color_r", _filter_property_get, _filter_property_set, [ConvolutionFilter, "color", "color", "r"]);
Tweener.registerSpecialProperty("_Convolution_color_g", _filter_property_get, _filter_property_set, [ConvolutionFilter, "color", "color", "g"]);
Tweener.registerSpecialProperty("_Convolution_color_b", _filter_property_get, _filter_property_set, [ConvolutionFilter, "color", "color", "b"]);
Tweener.registerSpecialProperty("_Convolution_divisor", _filter_property_get, _filter_property_set, [ConvolutionFilter, "divisor"]);
Tweener.registerSpecialProperty("_Convolution_matrixX", _filter_property_get, _filter_property_set, [ConvolutionFilter, "matrixX"]);
Tweener.registerSpecialProperty("_Convolution_matrixY", _filter_property_get, _filter_property_set, [ConvolutionFilter, "matrixY"]);
Tweener.registerSpecialProperty("_Convolution_preserveAlpha", _filter_property_get, _filter_property_set, [ConvolutionFilter, "preserveAlpha"]);
Tweener.registerSpecialProperty("_DisplacementMap_alpha", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "alpha"]);
Tweener.registerSpecialPropertySplitter("_DisplacementMap_color", _generic_color_splitter, ["_DisplacementMap_color_r", "_DisplacementMap_color_r", "_DisplacementMap_color_r"]);
Tweener.registerSpecialProperty("_DisplacementMap_color_r", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "color", "color", "r"]);
Tweener.registerSpecialProperty("_DisplacementMap_color_g", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "color", "color", "g"]);
Tweener.registerSpecialProperty("_DisplacementMap_color_b", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "color", "color", "b"]);
Tweener.registerSpecialProperty("_DisplacementMap_componentX", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "componentX"]);
Tweener.registerSpecialProperty("_DisplacementMap_componentY", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "componentY"]);
Tweener.registerSpecialProperty("_DisplacementMap_mapBitmap", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapBitmap"]);
Tweener.registerSpecialProperty("_DisplacementMap_mapPoint", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapPoint"]);
Tweener.registerSpecialProperty("_DisplacementMap_mode", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mode"]);
Tweener.registerSpecialProperty("_DisplacementMap_scaleX", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "scaleX"]);
Tweener.registerSpecialProperty("_DisplacementMap_scaleY", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "scaleY"]);
Tweener.registerSpecialProperty("_DropShadow_alpha", _filter_property_get, _filter_property_set, [DropShadowFilter, "alpha"]);
Tweener.registerSpecialProperty("_DropShadow_angle", _filter_property_get, _filter_property_set, [DropShadowFilter, "angle"]);
Tweener.registerSpecialProperty("_DropShadow_blurX", _filter_property_get, _filter_property_set, [DropShadowFilter, "blurX"]);
Tweener.registerSpecialProperty("_DropShadow_blurY", _filter_property_get, _filter_property_set, [DropShadowFilter, "blurY"]);
Tweener.registerSpecialPropertySplitter("_DropShadow_color", _generic_color_splitter, ["_DropShadow_color_r", "_DropShadow_color_g", "_DropShadow_color_b"]);
Tweener.registerSpecialProperty("_DropShadow_color_r", _filter_property_get, _filter_property_set, [DropShadowFilter, "color", "color", "r"]);
Tweener.registerSpecialProperty("_DropShadow_color_g", _filter_property_get, _filter_property_set, [DropShadowFilter, "color", "color", "g"]);
Tweener.registerSpecialProperty("_DropShadow_color_b", _filter_property_get, _filter_property_set, [DropShadowFilter, "color", "color", "b"]);
Tweener.registerSpecialProperty("_DropShadow_distance", _filter_property_get, _filter_property_set, [DropShadowFilter, "distance"]);
Tweener.registerSpecialProperty("_DropShadow_hideObject", _filter_property_get, _filter_property_set, [DropShadowFilter, "hideObject"]);
Tweener.registerSpecialProperty("_DropShadow_inner", _filter_property_get, _filter_property_set, [DropShadowFilter, "inner"]);
Tweener.registerSpecialProperty("_DropShadow_knockout", _filter_property_get, _filter_property_set, [DropShadowFilter, "knockout"]);
Tweener.registerSpecialProperty("_DropShadow_quality", _filter_property_get, _filter_property_set, [DropShadowFilter, "quality"]);
Tweener.registerSpecialProperty("_DropShadow_strength", _filter_property_get, _filter_property_set, [DropShadowFilter, "strength"]);
Tweener.registerSpecialProperty("_Glow_alpha", _filter_property_get, _filter_property_set, [GlowFilter, "alpha"]);
Tweener.registerSpecialProperty("_Glow_blurX", _filter_property_get, _filter_property_set, [GlowFilter, "blurX"]);
Tweener.registerSpecialProperty("_Glow_blurY", _filter_property_get, _filter_property_set, [GlowFilter, "blurY"]);
Tweener.registerSpecialPropertySplitter("_Glow_color", _generic_color_splitter, ["_Glow_color_r", "_Glow_color_g", "_Glow_color_b"]);
Tweener.registerSpecialProperty("_Glow_color_r", _filter_property_get, _filter_property_set, [GlowFilter, "color", "color", "r"]);
Tweener.registerSpecialProperty("_Glow_color_g", _filter_property_get, _filter_property_set, [GlowFilter, "color", "color", "g"]);
Tweener.registerSpecialProperty("_Glow_color_b", _filter_property_get, _filter_property_set, [GlowFilter, "color", "color", "b"]);
Tweener.registerSpecialProperty("_Glow_inner", _filter_property_get, _filter_property_set, [GlowFilter, "inner"]);
Tweener.registerSpecialProperty("_Glow_knockout", _filter_property_get, _filter_property_set, [GlowFilter, "knockout"]);
Tweener.registerSpecialProperty("_Glow_quality", _filter_property_get, _filter_property_set, [GlowFilter, "quality"]);
Tweener.registerSpecialProperty("_Glow_strength", _filter_property_get, _filter_property_set, [GlowFilter, "strength"]);
Tweener.registerSpecialProperty("_GradientBevel_angle", _filter_property_get, _filter_property_set, [GradientBevelFilter, "angle"]);
Tweener.registerSpecialProperty("_GradientBevel_blurX", _filter_property_get, _filter_property_set, [GradientBevelFilter, "blurX"]);
Tweener.registerSpecialProperty("_GradientBevel_blurY", _filter_property_get, _filter_property_set, [GradientBevelFilter, "blurY"]);
Tweener.registerSpecialProperty("_GradientBevel_distance", _filter_property_get, _filter_property_set, [GradientBevelFilter, "distance"]);
Tweener.registerSpecialProperty("_GradientBevel_quality", _filter_property_get, _filter_property_set, [GradientBevelFilter, "quality"]);
Tweener.registerSpecialProperty("_GradientBevel_strength", _filter_property_get, _filter_property_set, [GradientBevelFilter, "strength"]);
Tweener.registerSpecialProperty("_GradientBevel_type", _filter_property_get, _filter_property_set, [GradientBevelFilter, "type"]);
Tweener.registerSpecialProperty("_GradientGlow_angle", _filter_property_get, _filter_property_set, [GradientGlowFilter, "angle"]);
Tweener.registerSpecialProperty("_GradientGlow_blurX", _filter_property_get, _filter_property_set, [GradientGlowFilter, "blurX"]);
Tweener.registerSpecialProperty("_GradientGlow_blurY", _filter_property_get, _filter_property_set, [GradientGlowFilter, "blurY"]);
Tweener.registerSpecialProperty("_GradientGlow_distance", _filter_property_get, _filter_property_set, [GradientGlowFilter, "distance"]);
Tweener.registerSpecialProperty("_GradientGlow_knockout", _filter_property_get, _filter_property_set, [GradientGlowFilter, "knockout"]);
Tweener.registerSpecialProperty("_GradientGlow_quality", _filter_property_get, _filter_property_set, [GradientGlowFilter, "quality"]);
Tweener.registerSpecialProperty("_GradientGlow_strength", _filter_property_get, _filter_property_set, [GradientGlowFilter, "strength"]);
Tweener.registerSpecialProperty("_GradientGlow_type", _filter_property_get, _filter_property_set, [GradientGlowFilter, "type"]);
}
public static function _filter_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
var _local5:Number;
var _local9:Object;
var _local10:String;
var _local4:Array = _arg1.filters;
var _local6:Object = _arg2[0];
var _local7:String = _arg2[1];
var _local8:String = _arg2[2];
_local5 = 0;
while (_local5 < _local4.length) {
if ((_local4[_local5] is Class(_local6))){
if (_local8 == "color"){
_local10 = _arg2[3];
if (_local10 == "r"){
return (AuxFunctions.numberToR(_local4[_local5][_local7]));
};
if (_local10 == "g"){
return (AuxFunctions.numberToG(_local4[_local5][_local7]));
};
if (_local10 == "b"){
return (AuxFunctions.numberToB(_local4[_local5][_local7]));
};
} else {
if (_local8 == "matrix"){
return (_local4[_local5][_local7][_arg2[3]]);
};
return (_local4[_local5][_local7]);
};
};
_local5++;
};
switch (_local6){
case BevelFilter:
_local9 = {angle:NaN, blurX:0, blurY:0, distance:0, highlightAlpha:1, highlightColor:NaN, knockout:null, quality:NaN, shadowAlpha:1, shadowColor:NaN, strength:2, type:null};
break;
case BlurFilter:
_local9 = {blurX:0, blurY:0, quality:NaN};
break;
case ColorMatrixFilter:
_local9 = {matrix:[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]};
break;
case ConvolutionFilter:
_local9 = {alpha:0, bias:0, clamp:null, color:NaN, divisor:1, matrix:[1], matrixX:1, matrixY:1, preserveAlpha:null};
break;
case DisplacementMapFilter:
_local9 = {alpha:0, color:NaN, componentX:null, componentY:null, mapBitmap:null, mapPoint:null, mode:null, scaleX:0, scaleY:0};
break;
case DropShadowFilter:
_local9 = {distance:0, angle:NaN, color:NaN, alpha:1, blurX:0, blurY:0, strength:1, quality:NaN, inner:null, knockout:null, hideObject:null};
break;
case GlowFilter:
_local9 = {alpha:1, blurX:0, blurY:0, color:NaN, inner:null, knockout:null, quality:NaN, strength:2};
break;
case GradientBevelFilter:
_local9 = {alphas:null, angle:NaN, blurX:0, blurY:0, colors:null, distance:0, knockout:null, quality:NaN, ratios:NaN, strength:1, type:null};
break;
case GradientGlowFilter:
_local9 = {alphas:null, angle:NaN, blurX:0, blurY:0, colors:null, distance:0, knockout:null, quality:NaN, ratios:NaN, strength:1, type:null};
break;
};
if (_local8 == "color"){
return (NaN);
};
if (_local8 == "matrix"){
return (_local9[_local7][_arg2[3]]);
};
return (_local9[_local7]);
}
public static function _filter_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local6:Number;
var _local10:BitmapFilter;
var _local11:String;
var _local12:Array;
var _local5:Array = _arg1.filters;
var _local7:Object = _arg3[0];
var _local8:String = _arg3[1];
var _local9:String = _arg3[2];
_local6 = 0;
while (_local6 < _local5.length) {
if ((_local5[_local6] is Class(_local7))){
if (_local9 == "color"){
_local11 = _arg3[3];
if (_local11 == "r"){
_local5[_local6][_local8] = ((_local5[_local6][_local8] & 0xFFFF) | (_arg2 << 16));
};
if (_local11 == "g"){
_local5[_local6][_local8] = ((_local5[_local6][_local8] & 0xFF00FF) | (_arg2 << 8));
};
if (_local11 == "b"){
_local5[_local6][_local8] = ((_local5[_local6][_local8] & 0xFFFF00) | _arg2);
};
} else {
if (_local9 == "matrix"){
_local12 = _local5[_local6][_local8];
_local12[_arg3[3]] = _arg2;
_local5[_local6][_local8] = _local12;
} else {
_local5[_local6][_local8] = _arg2;
};
};
_arg1.filters = _local5;
return;
};
_local6++;
};
if (_local5 == null){
_local5 = new Array();
};
switch (_local7){
case BevelFilter:
_local10 = new BevelFilter(0, 45, 0xFFFFFF, 1, 0, 1, 0, 0);
break;
case BlurFilter:
_local10 = new BlurFilter(0, 0);
break;
case ColorMatrixFilter:
_local10 = new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]);
break;
case ConvolutionFilter:
_local10 = new ConvolutionFilter(1, 1, [1], 1, 0, true, true, 0, 0);
break;
case DisplacementMapFilter:
_local10 = new DisplacementMapFilter(new BitmapData(10, 10), new Point(0, 0), 0, 1, 0, 0);
break;
case DropShadowFilter:
_local10 = new DropShadowFilter(0, 45, 0, 1, 0, 0);
break;
case GlowFilter:
_local10 = new GlowFilter(0xFF0000, 1, 0, 0);
break;
case GradientBevelFilter:
_local10 = new GradientBevelFilter(0, 45, [0xFFFFFF, 0], [1, 1], [32, 223], 0, 0);
break;
case GradientGlowFilter:
_local10 = new GradientGlowFilter(0, 45, [0xFFFFFF, 0], [1, 1], [32, 223], 0, 0);
break;
};
_local5.push(_local10);
_arg1.filters = _local5;
_filter_property_set(_arg1, _arg2, _arg3);
}
public static function _generic_color_splitter(_arg1:Number, _arg2:Array):Array{
var _local3:Array = new Array();
_local3.push({name:_arg2[0], value:AuxFunctions.numberToR(_arg1)});
_local3.push({name:_arg2[1], value:AuxFunctions.numberToG(_arg1)});
_local3.push({name:_arg2[2], value:AuxFunctions.numberToB(_arg1)});
return (_local3);
}
public static function _generic_matrix_splitter(_arg1:Array, _arg2:Array):Array{
if (_arg1 == null){
_arg1 = _arg2[0].concat();
};
var _local3:Array = new Array();
var _local4:Number = 0;
while (_local4 < _arg1.length) {
_local3.push({name:_arg2[1][_local4], value:_arg1[_local4]});
_local4++;
};
return (_local3);
}
public static function _filter_splitter(_arg1:BitmapFilter, _arg2:Array, _arg3:Object=null):Array{
var _local4:Array = new Array();
if ((_arg1 is BevelFilter)){
_local4.push({name:"_Bevel_angle", value:BevelFilter(_arg1).angle});
_local4.push({name:"_Bevel_blurX", value:BevelFilter(_arg1).blurX});
_local4.push({name:"_Bevel_blurY", value:BevelFilter(_arg1).blurY});
_local4.push({name:"_Bevel_distance", value:BevelFilter(_arg1).distance});
_local4.push({name:"_Bevel_highlightAlpha", value:BevelFilter(_arg1).highlightAlpha});
_local4.push({name:"_Bevel_highlightColor", value:BevelFilter(_arg1).highlightColor});
_local4.push({name:"_Bevel_knockout", value:BevelFilter(_arg1).knockout});
_local4.push({name:"_Bevel_quality", value:BevelFilter(_arg1).quality});
_local4.push({name:"_Bevel_shadowAlpha", value:BevelFilter(_arg1).shadowAlpha});
_local4.push({name:"_Bevel_shadowColor", value:BevelFilter(_arg1).shadowColor});
_local4.push({name:"_Bevel_strength", value:BevelFilter(_arg1).strength});
_local4.push({name:"_Bevel_type", value:BevelFilter(_arg1).type});
} else {
if ((_arg1 is BlurFilter)){
_local4.push({name:"_Blur_blurX", value:BlurFilter(_arg1).blurX});
_local4.push({name:"_Blur_blurY", value:BlurFilter(_arg1).blurY});
_local4.push({name:"_Blur_quality", value:BlurFilter(_arg1).quality});
} else {
if ((_arg1 is ColorMatrixFilter)){
_local4.push({name:"_ColorMatrix_matrix", value:ColorMatrixFilter(_arg1).matrix});
} else {
if ((_arg1 is ConvolutionFilter)){
_local4.push({name:"_Convolution_alpha", value:ConvolutionFilter(_arg1).alpha});
_local4.push({name:"_Convolution_bias", value:ConvolutionFilter(_arg1).bias});
_local4.push({name:"_Convolution_clamp", value:ConvolutionFilter(_arg1).clamp});
_local4.push({name:"_Convolution_color", value:ConvolutionFilter(_arg1).color});
_local4.push({name:"_Convolution_divisor", value:ConvolutionFilter(_arg1).divisor});
_local4.push({name:"_Convolution_matrixX", value:ConvolutionFilter(_arg1).matrixX});
_local4.push({name:"_Convolution_matrixY", value:ConvolutionFilter(_arg1).matrixY});
_local4.push({name:"_Convolution_preserveAlpha", value:ConvolutionFilter(_arg1).preserveAlpha});
} else {
if ((_arg1 is DisplacementMapFilter)){
_local4.push({name:"_DisplacementMap_alpha", value:DisplacementMapFilter(_arg1).alpha});
_local4.push({name:"_DisplacementMap_color", value:DisplacementMapFilter(_arg1).color});
_local4.push({name:"_DisplacementMap_componentX", value:DisplacementMapFilter(_arg1).componentX});
_local4.push({name:"_DisplacementMap_componentY", value:DisplacementMapFilter(_arg1).componentY});
_local4.push({name:"_DisplacementMap_mapBitmap", value:DisplacementMapFilter(_arg1).mapBitmap});
_local4.push({name:"_DisplacementMap_mapPoint", value:DisplacementMapFilter(_arg1).mapPoint});
_local4.push({name:"_DisplacementMap_mode", value:DisplacementMapFilter(_arg1).mode});
_local4.push({name:"_DisplacementMap_scaleX", value:DisplacementMapFilter(_arg1).scaleX});
_local4.push({name:"_DisplacementMap_scaleY", value:DisplacementMapFilter(_arg1).scaleY});
} else {
if ((_arg1 is DropShadowFilter)){
_local4.push({name:"_DropShadow_alpha", value:DropShadowFilter(_arg1).alpha});
_local4.push({name:"_DropShadow_angle", value:DropShadowFilter(_arg1).angle});
_local4.push({name:"_DropShadow_blurX", value:DropShadowFilter(_arg1).blurX});
_local4.push({name:"_DropShadow_blurY", value:DropShadowFilter(_arg1).blurY});
_local4.push({name:"_DropShadow_color", value:DropShadowFilter(_arg1).color});
_local4.push({name:"_DropShadow_distance", value:DropShadowFilter(_arg1).distance});
_local4.push({name:"_DropShadow_hideObject", value:DropShadowFilter(_arg1).hideObject});
_local4.push({name:"_DropShadow_inner", value:DropShadowFilter(_arg1).inner});
_local4.push({name:"_DropShadow_knockout", value:DropShadowFilter(_arg1).knockout});
_local4.push({name:"_DropShadow_quality", value:DropShadowFilter(_arg1).quality});
_local4.push({name:"_DropShadow_strength", value:DropShadowFilter(_arg1).strength});
} else {
if ((_arg1 is GlowFilter)){
_local4.push({name:"_Glow_alpha", value:GlowFilter(_arg1).alpha});
_local4.push({name:"_Glow_blurX", value:GlowFilter(_arg1).blurX});
_local4.push({name:"_Glow_blurY", value:GlowFilter(_arg1).blurY});
_local4.push({name:"_Glow_color", value:GlowFilter(_arg1).color});
_local4.push({name:"_Glow_inner", value:GlowFilter(_arg1).inner});
_local4.push({name:"_Glow_knockout", value:GlowFilter(_arg1).knockout});
_local4.push({name:"_Glow_quality", value:GlowFilter(_arg1).quality});
_local4.push({name:"_Glow_strength", value:GlowFilter(_arg1).strength});
} else {
if ((_arg1 is GradientBevelFilter)){
_local4.push({name:"_GradientBevel_angle", value:GradientBevelFilter(_arg1).strength});
_local4.push({name:"_GradientBevel_blurX", value:GradientBevelFilter(_arg1).blurX});
_local4.push({name:"_GradientBevel_blurY", value:GradientBevelFilter(_arg1).blurY});
_local4.push({name:"_GradientBevel_distance", value:GradientBevelFilter(_arg1).distance});
_local4.push({name:"_GradientBevel_quality", value:GradientBevelFilter(_arg1).quality});
_local4.push({name:"_GradientBevel_strength", value:GradientBevelFilter(_arg1).strength});
_local4.push({name:"_GradientBevel_type", value:GradientBevelFilter(_arg1).type});
} else {
if ((_arg1 is GradientGlowFilter)){
_local4.push({name:"_GradientGlow_angle", value:GradientGlowFilter(_arg1).strength});
_local4.push({name:"_GradientGlow_blurX", value:GradientGlowFilter(_arg1).blurX});
_local4.push({name:"_GradientGlow_blurY", value:GradientGlowFilter(_arg1).blurY});
_local4.push({name:"_GradientGlow_distance", value:GradientGlowFilter(_arg1).distance});
_local4.push({name:"_GradientGlow_knockout", value:GradientGlowFilter(_arg1).knockout});
_local4.push({name:"_GradientGlow_quality", value:GradientGlowFilter(_arg1).quality});
_local4.push({name:"_GradientGlow_strength", value:GradientGlowFilter(_arg1).strength});
_local4.push({name:"_GradientGlow_type", value:GradientGlowFilter(_arg1).type});
} else {
trace("Tweener FilterShortcuts Error :: Unknown filter class used");
};
};
};
};
};
};
};
};
};
return (_local4);
}
}
}//package caurina.transitions.properties
Section 3
//SoundShortcuts (caurina.transitions.properties.SoundShortcuts)
package caurina.transitions.properties {
import flash.media.*;
import caurina.transitions.*;
public class SoundShortcuts {
public function SoundShortcuts(){
trace("This is an static class and should not be instantiated.");
}
public static function init():void{
Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
}
public static function _sound_pan_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:SoundTransform = _arg1.soundTransform;
_local5.pan = _arg2;
_arg1.soundTransform = _local5;
}
public static function _sound_volume_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:SoundTransform = _arg1.soundTransform;
_local5.volume = _arg2;
_arg1.soundTransform = _local5;
}
public static function _sound_pan_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return (_arg1.soundTransform.pan);
}
public static function _sound_volume_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return (_arg1.soundTransform.volume);
}
}
}//package caurina.transitions.properties
Section 4
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local3:Object;
var _local5:String;
var _local2:Object = {};
var _local4:int;
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 = _arg2.length;
var _local4:uint;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local3:String;
var _local2:uint;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package caurina.transitions
Section 5
//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, _arg5:Object=null):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:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):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:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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:Object=null):Number{
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
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, _arg5:Object=null):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:Object=null):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, _arg5:Object=null):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, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):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, _arg5:Object=null):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, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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:Object=null):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
var _local6:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
var _local8:Number = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):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, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package caurina.transitions
Section 6
//PropertyInfoObj (caurina.transitions.PropertyInfoObj)
package caurina.transitions {
public class PropertyInfoObj {
public var modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var valueComplete:Number;
public var modifierFunction:Function;
public var extra:Object;
public var valueStart:Number;
public var hasModifier:Boolean;
public var arrayIndex:Number;
public var originalValueComplete:Object;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){
valueStart = _arg1;
valueComplete = _arg2;
originalValueComplete = _arg3;
arrayIndex = _arg4;
extra = _arg5;
isSpecialProperty = _arg6;
hasModifier = Boolean(_arg7);
modifierFunction = _arg7;
modifierParameters = _arg8;
}
public function toString():String{
var _local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("arrayIndex:" + String(arrayIndex)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("extra:" + String(extra)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("hasModifier:" + String(hasModifier)));
_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 = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package caurina.transitions
Section 7
//SpecialProperty (caurina.transitions.SpecialProperty)
package caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var getValue:Function;
public var preProcess:Function;
public var setValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
preProcess = _arg4;
}
public function toString():String{
var _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 + ", ");
_local1 = (_local1 + ("preProcess:" + String(preProcess)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 8
//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 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 9
//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;
parameters = _arg2;
}
public function toString():String{
var _local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 10
//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 _currentTimeFrame:Number;
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{
if (!_inited){
init();
};
var _local4:SpecialPropertyModifier = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
if (!_inited){
init();
};
var _local6:SpecialProperty = new SpecialProperty(_arg2, _arg3, _arg4, _arg5);
_specialPropertyList[_arg1] = _local6;
}
public static function init(... _args):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
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 addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Array;
var _local8:Function;
var _local9:TweenListObj;
var _local10:Number;
var _local11:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local4 = _arg1.concat();
} else {
_local4 = [_arg1];
};
var _local5:Object = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
var _local6:Number = (isNaN(_local5.time)) ? 0 : _local5.time;
var _local7:Number = (isNaN(_local5.delay)) ? 0 : _local5.delay;
if (typeof(_local5.transition) == "string"){
_local11 = _local5.transition.toLowerCase();
_local8 = _transitionList[_local11];
} else {
_local8 = _local5.transition;
};
if (!Boolean(_local8)){
_local8 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local4.length) {
if (_local5.useFrames == true){
_local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams);
} else {
_local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams);
};
_local9.properties = null;
_local9.onStart = _local5.onStart;
_local9.onUpdate = _local5.onUpdate;
_local9.onComplete = _local5.onComplete;
_local9.onOverwrite = _local5.onOverwrite;
_local9.onStartParams = _local5.onStartParams;
_local9.onUpdateParams = _local5.onUpdateParams;
_local9.onCompleteParams = _local5.onCompleteParams;
_local9.onOverwriteParams = _local5.onOverwriteParams;
_local9.onStartScope = _local5.onStartScope;
_local9.onUpdateScope = _local5.onUpdateScope;
_local9.onCompleteScope = _local5.onCompleteScope;
_local9.onOverwriteScope = _local5.onOverwriteScope;
_local9.onErrorScope = _local5.onErrorScope;
_local9.isCaller = true;
_local9.count = _local5.count;
_local9.waitFrames = _local5.waitFrames;
_tweenList.push(_local9);
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local10 = (_tweenList.length - 1);
updateTweenByIndex(_local10);
removeTweenByIndex(_local10);
};
_local3++;
};
return (true);
}
public static function pauseAllTweens():Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local4:uint;
var _local3:Array = 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 splitTweens(_arg1:Number, _arg2:Array):uint{
var _local5:uint;
var _local6:String;
var _local7:Boolean;
var _local3:TweenListObj = _tweenList[_arg1];
var _local4:TweenListObj = _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 updateFrame():void{
_currentTimeFrame++;
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
var _local3:Number = getCurrentTweeningTime(_local2);
_local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function getVersion():String{
return ("AS3 1.31.71");
}
public static function onEnterFrame(_arg1:Event):void{
updateTime();
updateFrame();
var _local2:Boolean;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var eventScope:Object;
var tScope:Object;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
var isOver:Boolean;
var cTime:Number = getCurrentTweeningTime(tTweening);
if (cTime >= 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 (!(cTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (cTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope;
try {
tTweening.onStart.apply(eventScope, tTweening.onStartParams);
} catch(e:Error) {
handleError(tTweening, e, "onStart");
};
};
for (pName in tTweening.properties) {
if (tTweening.properties[pName].isSpecialProperty){
if (Boolean(_specialPropertyList[pName].preProcess)){
tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra);
};
pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
pv = 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 = (cTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (cTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d, tTweening.transitionParams);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
if (tProperty.isSpecialProperty){
_specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
tScope[pName] = nv;
};
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope;
try {
tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams);
} catch(e:Error) {
handleError(tTweening, e, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope;
try {
tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams);
} catch(e:Error) {
handleError(tTweening, e, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
var _local3: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) {
_local3 = getCurrentTweeningTime(_tweenList[_local2]);
_tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_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 eventScope:Object;
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope;
try {
pTweening.onError.apply(eventScope, [pTweening.scope, pError]);
} catch(metaError:Error) {
printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace()));
};
} else {
if (!Boolean(pTweening.onError)){
printError(((((String(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);
_currentTimeFrame = 0;
updateTime();
}
public static function removeAllTweens():Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_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 _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Array;
var _local13:Function;
var _local14:Object;
var _local15:TweenListObj;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local6 = _arg1.concat();
} else {
_local6 = [_arg1];
};
var _local7:Object = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
var _local8:Number = (isNaN(_local7.time)) ? 0 : _local7.time;
var _local9:Number = (isNaN(_local7.delay)) ? 0 : _local7.delay;
var _local10:Array = new Array();
var _local11:Object = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
var _local12:Object = new Object();
for (_local5 in _local7) {
if (!_local11[_local5]){
if (_specialPropertySplitterList[_local5]){
_local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters);
_local3 = 0;
while (_local3 < _local17.length) {
if (_specialPropertySplitterList[_local17[_local3].name]){
_local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters);
_local4 = 0;
while (_local4 < _local18.length) {
_local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false};
_local4++;
};
} else {
_local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false};
};
_local3++;
};
} else {
if (_specialPropertyModifierList[_local5] != undefined){
_local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]);
_local3 = 0;
while (_local3 < _local19.length) {
_local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue};
_local3++;
};
} else {
_local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]};
};
};
};
};
for (_local5 in _local10) {
if (_specialPropertyList[_local5] != undefined){
_local10[_local5].isSpecialProperty = true;
} else {
if (_local6[0][_local5] == undefined){
printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property."));
};
};
};
for (_local5 in _local12) {
if (_local10[_local5] != undefined){
_local10[_local5].modifierParameters = _local12[_local5].modifierParameters;
_local10[_local5].modifierFunction = _local12[_local5].modifierFunction;
};
};
if (typeof(_local7.transition) == "string"){
_local20 = _local7.transition.toLowerCase();
_local13 = _transitionList[_local20];
} else {
_local13 = _local7.transition;
};
if (!Boolean(_local13)){
_local13 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local6.length) {
_local14 = new Object();
for (_local5 in _local10) {
_local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters);
};
if (_local7.useFrames == true){
_local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams);
} else {
_local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams);
};
_local15.properties = _local14;
_local15.onStart = _local7.onStart;
_local15.onUpdate = _local7.onUpdate;
_local15.onComplete = _local7.onComplete;
_local15.onOverwrite = _local7.onOverwrite;
_local15.onError = _local7.onError;
_local15.onStartParams = _local7.onStartParams;
_local15.onUpdateParams = _local7.onUpdateParams;
_local15.onCompleteParams = _local7.onCompleteParams;
_local15.onOverwriteParams = _local7.onOverwriteParams;
_local15.onStartScope = _local7.onStartScope;
_local15.onUpdateScope = _local7.onUpdateScope;
_local15.onCompleteScope = _local7.onCompleteScope;
_local15.onOverwriteScope = _local7.onOverwriteScope;
_local15.onErrorScope = _local7.onErrorScope;
_local15.rounded = _local7.rounded;
_local15.skipUpdates = _local7.skipUpdates;
removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete);
_tweenList.push(_local15);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local16 = (_tweenList.length - 1);
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
};
_local3++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
public static function printError(_arg1:String):void{
trace(("## [Tweener] Error: " + _arg1));
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local4:Boolean;
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;
if (!Boolean(_tweenList)){
return ([]);
};
var _local4:Array = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
return (true);
};
_local2++;
};
return (false);
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = getCurrentTweeningTime(_local2);
_local2.isPaused = true;
return (true);
}
public static function getCurrentTweeningTime(_arg1:Object):Number{
return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
if (!Boolean(_tweenList)){
return (0);
};
var _local3:Number = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_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;
_currentTimeFrame = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removedLocally:Boolean;
var i:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
var removed:Boolean;
var tl:uint = _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)){
eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope;
try {
_tweenList[i].onOverwrite.apply(eventScope, _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{
if (!_inited){
init();
};
var _local4:SpecialPropertySplitter = 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 _local4:uint;
var _local3:Array = 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 _local4:uint;
var _local3:Array = 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 11
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var hasStarted:Boolean;
public var onUpdate:Function;
public var useFrames:Boolean;
public var count:Number;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var timeComplete:Number;
public var onStartParams:Array;
public var onUpdateScope:Object;
public var rounded:Boolean;
public var onUpdateParams:Array;
public var properties:Object;
public var onComplete:Function;
public var transitionParams:Object;
public var updatesSkipped:Number;
public var onStart:Function;
public var onOverwriteScope:Object;
public var skipUpdates:Number;
public var onStartScope:Object;
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 onErrorScope:Object;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public var onCompleteScope:Object;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
transitionParams = _arg6;
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local3:String;
var _local2:TweenListObj = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
_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.onStartScope = onStartScope;
_local2.onUpdateScope = onUpdateScope;
_local2.onCompleteScope = onCompleteScope;
_local2.onOverwriteScope = onOverwriteScope;
_local2.onErrorScope = onErrorScope;
};
_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 _local3:String;
var _local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
var _local2:Boolean;
for (_local3 in properties) {
if (!_local2){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local3].name));
_local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete));
_local1 = (_local1 + "]");
_local2 = false;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
_local1 = (_local1 + (", transitionParams:" + String(transitionParams)));
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 (onStartScope){
_local1 = (_local1 + (", onStartScope:" + String(onStartScope)));
};
if (onUpdateScope){
_local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope)));
};
if (onCompleteScope){
_local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope)));
};
if (onOverwriteScope){
_local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope)));
};
if (onErrorScope){
_local1 = (_local1 + (", onErrorScope:" + String(onErrorScope)));
};
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 _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local2:Object = _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 12
//NBCTracker (com.nbc.NBCTracker)
package com.nbc {
import flash.display.*;
import flash.events.*;
import flash.external.*;
import flash.net.*;
public class NBCTracker {
public static function callExternal(_arg1:String=null, _arg2:String=null):void{
if (!ExternalInterface.available){
return;
};
if (_arg2 != null){
ExternalInterface.call(_arg1, _arg2);
} else {
ExternalInterface.call(_arg1);
};
}
public static function getSchruteBucksStatus(_arg1:MovieClip, _arg2:Function){
var getUri:String;
var target = _arg1;
var callback = _arg2;
var flashvars:Object = LoaderInfo(target.root.loaderInfo).parameters;
if (flashvars["getUri"] != null){
getUri = flashvars["getUri"];
} else {
getUri = "test.txt";
};
var myRequest:URLRequest = new URLRequest(getUri);
var myLoader:URLLoader = new URLLoader();
myLoader.addEventListener(Event.COMPLETE, callback);
try {
myLoader.load(myRequest);
} catch(error:Error) {
trace(callback(error));
};
}
public static function addShruteBucks(_arg1:MovieClip, _arg2:Number, _arg3:Function){
var setUri:String;
var target = _arg1;
var score = _arg2;
var catchIOError = _arg3;
var flashvars:Object = LoaderInfo(target.root.loaderInfo).parameters;
if (flashvars["setUri"] != null){
setUri = flashvars["setUri"];
} else {
setUri = "/tasks/api?method=set&week=6";
};
var myRequest:URLRequest = new URLRequest(((setUri + "&data1=") + score));
var myLoader:URLLoader = new URLLoader();
myLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
try {
myLoader.load(myRequest);
} catch(error:Error) {
trace("Error recording Shrute Bucks", error.message);
};
}
public static function reportChuckPoints(_arg1:String, _arg2:Number, _arg3:String=""){
var game = _arg1;
var score = _arg2;
var description = _arg3;
var loader:URLLoader = new URLLoader();
var strUrl = "http://www.insidebuymore.com/tasks/";
strUrl = (strUrl + ((game + "/?action=complete&taskscore=") + String(score)));
strUrl = (strUrl + ("&cachebuster=" + (Math.random() * 10000)));
var request:URLRequest = new URLRequest(strUrl);
try {
loader.load(request);
} catch(error:Error) {
trace("Error recording Chuck score:", error.message);
};
}
}
}//package com.nbc
Section 13
//Animations (duel.Animations)
package duel {
import flash.display.*;
public class Animations extends MovieClip {
public var Andy:MovieClip;
public var Dwight:MovieClip;
public function Animations(){
addFrameScript(0, frame1, 23, frame24, 38, frame39, 53, frame54, 68, frame69, 83, frame84, 98, frame99, 113, frame114, 128, frame129, 143, frame144, 158, frame159, 173, frame174, 193, frame194, 208, frame209, 223, frame224, 238, frame239, 253, frame254, 269, frame270, 285, frame286);
}
function frame239(){
completeAnim();
}
function frame254(){
completeAnim();
}
function frame114(){
completeAnim();
}
function frame159(){
completeAnim();
}
function frame84(){
completeAnim();
}
private function completeAnim(){
gotoAndStop(1);
MovieClip(parent).assessDamage();
}
function frame1(){
stop();
}
function frame54(){
completeAnim();
}
function frame99(){
completeAnim();
}
function frame209(){
completeAnim();
}
function frame24(){
completeAnim();
}
function frame69(){
completeAnim();
}
function frame129(){
completeAnim();
}
function frame224(){
completeAnim();
}
function frame174(){
completeAnim();
}
function frame39(){
completeAnim();
}
function frame286(){
completeAnim();
}
function frame144(){
completeAnim();
}
function frame270(){
completeAnim();
}
function frame194(){
completeAnim();
}
}
}//package duel
Section 14
//Duel (duel.Duel)
package duel {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.filters.*;
import flash.text.*;
import makai.*;
import com.nbc.*;
import caurina.transitions.properties.*;
import flash.net.*;
import flash.system.*;
public class Duel extends MovieClip {
private var computerShouldPlay:Boolean;// = false
private var drawMode:Number;// = 0
private var dwightLoaderArray:Array;
private var moverDir:Array;
public var timerText:TextField;
private var clipDelay:Number;// = 5
private var andyLoaderArray:Array;
private var dwightTime:Array;
private var dwightDamageArray:Array;
public var offenseChooser:MovieClip;
public var txtMode:TextField;
private var swfList:Array;
private var dwightGoodsArray:Array;
private var andyDamageArray:Array;
public var leaveBut:SimpleButton;
private var andyList:Array;
private var dwightAnimationArray:Array;
private var dwightCount:Number;// = 0
private var health:Array;
private var opponent:Number;
private var andyAnimationArray:Array;
private var wonMoverDuel:Boolean;
private var dwightLoadedArray:Array;
private var bucksArray:Array;
private var andyLoadedArray:Array;
private var myChoice:Number;
private var damage:Array;
private var drawButPos:Array;
private var andyTime:Array;
private var compMove:Number;
private var dwightDamage:Number;
private var andyDamage:Number;
private var choosers:Array;
private var myMove:Number;
private var mode:Number;
public var holder:MovieClip;
private var andyCount:Number;// = 0
private var andyWon:Boolean;
var mover:Array;
private var enemyThreshold:Number;
private var andyGoodsArray:Array;
private var time:Number;
public var defenseChooser:MovieClip;
private var myLoader:Loader;
public var healthModule:MovieClip;
public var tauntChooser:MovieClip;
var gauge:Array;
public var blocker:MovieClip;
private var dwightList:Array;
static var LEFTMOVER:Number = -600;
static var ANDY:Number = 0;
static var MOVESPEED:Number = 1.2;
static var RIGHTMOVER:Number = 1200;
static var DWIGHT:Number = 1;
static var OFFENSE:Number = 0;
static var SWFTOP:Number = 0;
static var TIMED:Number = 1;
static var MAJOR:Number = 50;
static var HEALTH_FINISH:Number = 213;
static var HEALTH_START:Number = 317;
static var DEFENSE:Number = 1;
static var TOTAL:Number = 100;
static var IN:Boolean = true;
static var HEAVY:Number = 30;
static var SWFLEFT:Number = 0;
static var CASUAL:Number = 0;
static var OUT:Boolean = false;
static var MEDIUM:Number = 20;
static var LIGHT:Number = 10;
static var NONE:Number = 0;
static var CENTERMOVER:Number = 60;
static var BLUR:Number = 14;
public function Duel():void{
moverDir = [1, -1];
drawButPos = [-225, 60];
super();
FilterShortcuts.init();
NBCTracker.callExternal("newNBCPageview");
health = [100, 100];
choosers = [offenseChooser, defenseChooser];
andyList = ["NotGivingUp", "ImABiggerMan", "NeverBackDown", "YouGiveUp"];
dwightList = ["ComeOnCoward", "AllYouDoIsDressFancy", "YouCantEven", "YoureNotAMan"];
andyTime = [2, 2.5, 2, 2];
dwightTime = [7, 4.7, 4.2, 3.5];
bucksArray = [100, 110, 140, 170, 200, 230, 260, 290, 320, 350];
addListeners();
configureDamages();
configureGoodResults();
configureAnimations();
offenseChooser.visible = false;
defenseChooser.visible = false;
offenseChooser.stop();
defenseChooser.stop();
swfList = [];
mode = OFFENSE;
opponent = ((MovieClip(parent).choice == ANDY)) ? DWIGHT : ANDY;
blocker.alpha = 0;
blocker.mouseEnabled = false;
trace("from the constructor");
moveChooser(IN);
offenseChooser.health0.scaleX = (health[0] * 0.01);
offenseChooser.health1.scaleX = (health[1] * 0.01);
defenseChooser.health0.scaleX = (health[0] * 0.01);
defenseChooser.health1.scaleX = (health[1] * 0.01);
}
private function startTimer(){
timerText.text = "";
trace(MovieClip(parent).difficulty);
trace(("the difficulty is " + MovieClip(parent).difficulty));
if (MovieClip(parent).difficulty == TIMED){
time = 5;
timerText.text = String(time);
};
}
private function moveMovers(_arg1:Event):void{
var _local6:Number;
var _local2:* = [13, 12];
var _local3:* = [-206, 78];
var _local4:* = [-84, 200];
var _local5:* = [-144, 140];
var _local7:* = 0;
while (_local7 < mover.length) {
mover[_local7].x = (mover[_local7].x + (moverDir[_local7] * _local2[_local7]));
if (mover[_local7].x <= _local3[_local7]){
mover[_local7].x = _local3[_local7];
moverDir[_local7] = (moverDir[_local7] * -1);
};
if (mover[_local7].x >= _local4[_local7]){
mover[_local7].x = _local4[_local7];
moverDir[_local7] = (moverDir[_local7] * -1);
};
_local6 = Math.abs((mover[_local7].x - _local5[_local7]));
_local6 = (21 - (Math.floor((_local6 * (20 / 62))) + 1));
mover[_local7].gotoAndStop(_local6);
_local7++;
};
if (((((computerShouldPlay) && ((drawMode == 1)))) && ((Math.abs((mover[(1 - MovieClip(parent).choice)].x - _local5[(1 - MovieClip(parent).choice)])) < enemyThreshold)))){
drawMode = 0;
MovieClip(parent).playAudio("punch", 1, 0.5);
moverDir[(1 - MovieClip(parent).choice)] = 0;
if (mode == OFFENSE){
Tweener.addTween(this, {delay:0.5, onComplete:endDraw});
} else {
Tweener.addTween(this, {delay:0.5, onComplete:switchToPlayer});
};
};
}
private function switchToComputer(){
choosers[mode].drawer.sayer.text = "";
drawMode = 1;
Tweener.addTween(this, {delay:1.5, onComplete:makeComputerPlay});
gauge[0].visible = true;
mover[0].visible = true;
gauge[1].visible = true;
mover[1].visible = true;
}
private function chooseClip(_arg1:Boolean, _arg2:String, _arg3:uint):uint{
var _local7:uint;
var _local4:Boolean = _arg1;
var _local5:String = _arg2;
var _local6:uint = _arg3;
var _local8:* = new Array();
if ((((((mode == 0)) && ((MovieClip(parent).choice == 0)))) || ((((mode == 1)) && ((MovieClip(parent).choice == 1)))))){
_local5 = "ANDY";
} else {
_local5 = "DWIGHT";
};
trace(("***************Andy won? " + andyWon));
trace(("***************On Offense: " + _local5));
trace(("***************Human is playing: " + MovieClip(parent).choice));
if (_local5 == "ANDY"){
_local7 = 0;
while (_local7 < 3) {
if (MovieClip(parent).choice == ANDY){
trace("this should never come up, Andy!");
if (((andyGoodsArray[_local6][_local7]) && (andyWon))){
_local8.push(_local7);
};
if (((!(andyGoodsArray[_local6][_local7])) && (!(andyWon)))){
_local8.push(_local7);
};
} else {
trace("selecting the move for Andy on Offense");
if (((andyGoodsArray[_local7][_local6]) && (andyWon))){
_local8.push(_local7);
};
if (((!(andyGoodsArray[_local7][_local6])) && (!(andyWon)))){
_local8.push(_local7);
};
};
_local7++;
};
} else {
_local7 = 0;
while (_local7 < 3) {
if (MovieClip(parent).choice == DWIGHT){
trace("this should never come up, Dwight!");
if (((dwightGoodsArray[_local6][_local7]) && (!(andyWon)))){
_local8.push(_local7);
};
if (((!(dwightGoodsArray[_local6][_local7])) && (andyWon))){
_local8.push(_local7);
};
} else {
trace("selecting the move for Andy on Offense");
if (((dwightGoodsArray[_local7][_local6]) && (!(andyWon)))){
_local8.push(_local7);
};
if (((!(dwightGoodsArray[_local7][_local6])) && (andyWon))){
_local8.push(_local7);
};
};
_local7++;
};
};
var _local9:* = Math.floor((Math.random() * _local8.length));
return (_local8[_local9]);
}
private function configureDamages(){
andyDamageArray = [];
andyDamageArray[0] = [[LIGHT, NONE], [NONE, MEDIUM], [NONE, MAJOR]];
andyDamageArray[1] = [[NONE, MEDIUM], [LIGHT, NONE], [NONE, NONE]];
andyDamageArray[2] = [[NONE, HEAVY], [NONE, HEAVY], [NONE, NONE]];
dwightDamageArray = [];
dwightDamageArray[0] = [[MEDIUM, NONE], [NONE, NONE], [MAJOR, NONE]];
dwightDamageArray[1] = [[NONE, LIGHT], [MEDIUM, NONE], [NONE, NONE]];
dwightDamageArray[2] = [[MAJOR, NONE], [MAJOR, NONE], [NONE, NONE]];
}
private function finishAnimation(){
healthModule.y = HEALTH_START;
MovieClip(myLoader.content).gotoAndStop(1);
holder.removeChild(myLoader);
trace("from finishAnimation");
moveChooser(IN);
Tweener.addTween(blocker, {alpha:0, time:2.5});
choosers[mode].visible = true;
offenseChooser.health0.bar.scaleX = (health[0] * 0.01);
offenseChooser.health1.bar.scaleX = (health[1] * 0.01);
defenseChooser.health0.bar.scaleX = (health[0] * 0.01);
defenseChooser.health1.bar.scaleX = (health[1] * 0.01);
offenseChooser.health0.visible = true;
offenseChooser.health1.visible = true;
defenseChooser.health0.visible = true;
defenseChooser.health1.visible = true;
offenseChooser.health0.percent.x = (9 + health[0]);
offenseChooser.health0.percent.text = (Math.round(health[0]) + "%");
offenseChooser.health1.percent.x = (9 + health[1]);
offenseChooser.health1.percent.text = (Math.round(health[1]) + "%");
defenseChooser.health0.percent.x = (9 + health[0]);
defenseChooser.health0.percent.text = (Math.round(health[0]) + "%");
defenseChooser.health1.percent.x = (9 + health[1]);
defenseChooser.health1.percent.text = (Math.round(health[1]) + "%");
}
private function moveChooser(_arg1:Boolean):void{
trace(("moving the chooser: " + _arg1));
if (_arg1){
trace(((MovieClip(parent).choice == ANDY)) ? "andy" : "dwight");
choosers[0].gotoAndStop(((MovieClip(parent).choice == ANDY)) ? "andy" : "dwight");
choosers[1].gotoAndStop(((MovieClip(parent).choice == ANDY)) ? "andy" : "dwight");
choosers[mode].visible = true;
offenseChooser.health0.bar.scaleX = (health[0] * 0.01);
offenseChooser.health1.bar.scaleX = (health[1] * 0.01);
defenseChooser.health0.bar.scaleX = (health[0] * 0.01);
defenseChooser.health1.bar.scaleX = (health[1] * 0.01);
offenseChooser.health0.visible = true;
offenseChooser.health1.visible = true;
defenseChooser.health0.visible = true;
defenseChooser.health1.visible = true;
offenseChooser.health0.percent.x = (9 + health[0]);
offenseChooser.health0.percent.text = (Math.round(health[0]) + "%");
offenseChooser.health1.percent.x = (9 + health[1]);
offenseChooser.health1.percent.text = (Math.round(health[1]) + "%");
defenseChooser.health0.percent.x = (9 + health[0]);
defenseChooser.health0.percent.text = (Math.round(health[0]) + "%");
defenseChooser.health1.percent.x = (9 + health[1]);
defenseChooser.health1.percent.text = (Math.round(health[1]) + "%");
};
}
private function loadAnimation(_arg1:String){
var _local2:URLRequest;
if (swfList[_arg1] != null){
blocker.loader.visible = false;
holder.addChild(swfList[_arg1].loader);
myLoader = Loader(swfList[_arg1].loader);
MovieClip(myLoader.content).animation.gotoAndStop(1);
MovieClip(myLoader.content).shadow.gotoAndStop(1);
addEventListener(Event.ENTER_FRAME, loopAnimation);
Tweener.addTween(blocker, {alpha:0, time:1, onComplete:startAnimation});
} else {
blocker.loader.visible = false;
myLoader = new Loader();
_local2 = new URLRequest((("animations/" + _arg1) + ".swf"));
myLoader.load(_local2);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress, false, 0, true);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, showLoadResult, false, 0, true);
swfList[_arg1] = {loader:myLoader};
};
choosers[mode].visible = false;
}
private function chooseComputerMove(_arg1:Number){
var _local5:uint;
myMove = (_arg1 + 1);
var _local2:* = [-145, 139];
var _local3:uint = Math.abs((choosers[mode].drawer.mover0.x - _local2[0]));
var _local4:uint = Math.abs((choosers[mode].drawer.mover1.x - _local2[1]));
if (_local3 < _local4){
andyWon = true;
} else {
andyWon = false;
};
trace(((("Andy Dist: " + _local3) + ", Dwight Dist: ") + _local4));
if ((((((_local3 < _local4)) && ((MovieClip(parent).choice == ANDY)))) || ((((_local3 >= _local4)) && ((MovieClip(parent).choice == DWIGHT)))))){
wonMoverDuel = true;
} else {
wonMoverDuel = false;
};
trace(("Won mover duel? " + wonMoverDuel));
switch (MovieClip(parent).choice){
case ANDY:
_local5 = chooseClip(wonMoverDuel, "ANDY", _arg1);
trace(((("what's my numba? " + _arg1) + ", ") + _local5));
if (mode == OFFENSE){
compMove = _local5;
Tweener.addTween(blocker, {alpha:1, time:1, onComplete:openBlocker, onCompleteParams:[andyAnimationArray[_arg1][compMove]]});
blocker.loader.visible = false;
damage = andyDamageArray[_arg1][compMove];
} else {
compMove = _local5;
Tweener.addTween(blocker, {alpha:1, time:1, onComplete:openBlocker, onCompleteParams:[dwightAnimationArray[compMove][_arg1]]});
blocker.loader.visible = false;
damage = dwightDamageArray[compMove][_arg1];
};
break;
case DWIGHT:
_local5 = chooseClip(wonMoverDuel, "DWIGHT", _arg1);
trace(((("what's my numba? " + _arg1) + ", ") + _local5));
if (mode == OFFENSE){
compMove = _local5;
Tweener.addTween(blocker, {alpha:1, time:1, onComplete:openBlocker, onCompleteParams:[dwightAnimationArray[_arg1][compMove]]});
blocker.loader.visible = false;
damage = dwightDamageArray[_arg1][compMove];
} else {
compMove = _local5;
Tweener.addTween(blocker, {alpha:1, time:1, onComplete:openBlocker, onCompleteParams:[andyAnimationArray[compMove][_arg1]]});
blocker.loader.visible = false;
damage = andyDamageArray[compMove][_arg1];
};
break;
};
}
private function startAnimation(){
MovieClip(myLoader.content).animation.gotoAndPlay(1);
MovieClip(myLoader.content).shadow.gotoAndPlay(1);
}
private function openBlocker(_arg1:String){
loadAnimation(_arg1);
}
private function showProgress(_arg1:ProgressEvent):void{
var _local2:Number = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
blocker.loader.progress.bar.scaleX = (_local2 / 100);
blocker.loader.progress.percent.x = (9 + _local2);
blocker.loader.progress.percent.text = (Math.round(_local2) + "%");
if ((((_local2 < 1)) || ((_local2 > 99)))){
blocker.loader.visible = false;
} else {
blocker.loader.visible = true;
};
}
public function catchIOError(_arg1:IOErrorEvent){
trace(("Error caught: " + _arg1.type));
}
private function reduceHealth(_arg1:Number, _arg2:Number):void{
trace(((_arg1 + " was damaged ") + _arg2));
writtenDamage(_arg2);
var _local3:* = healthModule.getChildByName(("health" + _arg1));
health[_arg1] = (health[_arg1] - _arg2);
health[_arg1] = Math.max(health[_arg1], 0);
if (health[_arg1] <= 0){
clipDelay = 1;
} else {
if (_arg1 == 0){
dwightCount++;
if (dwightCount > 3){
dwightCount = 0;
};
trace(("ANDY LOST " + _arg2));
MovieClip(parent).playAudio(dwightList[dwightCount]);
clipDelay = dwightTime[dwightCount];
} else {
andyCount++;
if (andyCount > 3){
andyCount = 0;
};
trace(("DWIGHT LOST " + _arg2));
MovieClip(parent).playAudio(andyList[andyCount]);
clipDelay = andyTime[andyCount];
};
};
Tweener.addTween(_local3.bar, {delay:0.5, scaleX:Math.max((health[_arg1] / 100), 0), time:1});
_local3.percent.text = (health[_arg1] + "%");
Tweener.addTween(_local3.percent, {delay:0.5, x:(9 + health[_arg1]), time:1});
}
private function writtenDamage(_arg1:Number){
switch (_arg1){
case LIGHT:
healthModule.damageReport.text = "MERELY A SCRATCH";
break;
case MEDIUM:
healthModule.damageReport.text = "MERELY A SCRATCH";
break;
case HEAVY:
healthModule.damageReport.text = "A TELLING BLOW";
break;
case MAJOR:
healthModule.damageReport.text = "A TELLING BLOW";
break;
case TOTAL:
healthModule.damageReport.text = "A TELLING BLOW";
break;
};
}
private function loopAnimation(_arg1:Event){
var _local2:BitmapData = new BitmapData(100, 100);
var _local3:Bitmap = new Bitmap(_local2);
_local2.draw(holder);
if (MovieClip(myLoader.content).animation.currentFrame == MovieClip(myLoader.content).animation.totalFrames){
removeEventListener(Event.ENTER_FRAME, loopAnimation);
Tweener.addTween(this, {delay:0.05, onComplete:assessDamage});
Tweener.addTween(healthModule, {time:0.35, y:HEALTH_FINISH});
MovieClip(myLoader.content).animation.stop();
MovieClip(myLoader.content).shadow.stop();
blocker.loader.visible = false;
};
}
private function chooseMove(_arg1:Number, _arg2:Number=-1){
if (mode == DEFENSE){
if (_arg2 == -1){
compMove = Math.ceil((Math.random() * 3));
} else {
compMove = _arg2;
};
trace("COMP MOVE", compMove);
};
showDraw();
myChoice = _arg1;
}
private function chooseTaunt(_arg1:Number){
MovieClip(parent).playAudio(("taunt" + _arg1));
}
private function doDraw(_arg1:Event){
var _local3:Number;
var _local4:Number;
var _local5:Number;
MovieClip(parent).playAudio("punch", 1, 0.5);
mover[MovieClip(parent).choice].x = (mover[MovieClip(parent).choice].x + (Math.floor((Math.random() * 5)) * moverDir[MovieClip(parent).choice]));
moverDir[MovieClip(parent).choice] = 0;
choosers[mode].drawer.drawBut.removeEventListener(MouseEvent.MOUSE_DOWN, doDraw);
choosers[mode].drawer.drawBut.visible = false;
var _local2:* = [-144, 140];
if (mode == OFFENSE){
_local3 = Math.abs((mover[MovieClip(parent).choice].x - _local2[MovieClip(parent).choice]));
if (_local3 < 12){
if (MovieClip(parent).choice == 0){
MovieClip(parent).playAudio("hahaha", 1, 0.5);
} else {
MovieClip(parent).playAudio("yes", 1, 0.5);
};
};
Tweener.addTween(this, {delay:0.5, onComplete:switchToComputer});
} else {
_local4 = Math.abs((mover[MovieClip(parent).choice].x - _local2[MovieClip(parent).choice]));
_local5 = Math.abs((mover[(1 - MovieClip(parent).choice)].x - _local2[(1 - MovieClip(parent).choice)]));
if (_local4 < _local5){
if (MovieClip(parent).choice == 0){
MovieClip(parent).playAudio("hahaha", 1, 0.5);
} else {
MovieClip(parent).playAudio("yes", 1, 0.5);
};
};
Tweener.addTween(this, {delay:0.5, onComplete:endDraw});
};
}
private function addListeners(){
MovieClip(parent).playAudio("WhatIsYourWeapon");
choosers[OFFENSE].btn0.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(0);
});
choosers[OFFENSE].btn1.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(1);
});
choosers[OFFENSE].btn2.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(2);
});
choosers[OFFENSE].btn3.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(0);
});
choosers[OFFENSE].btn4.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(1);
});
choosers[OFFENSE].btn5.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(2);
});
choosers[DEFENSE].btn0.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(0);
});
choosers[DEFENSE].btn1.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(1);
});
choosers[DEFENSE].btn2.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(2);
});
choosers[DEFENSE].btn3.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(0);
});
choosers[DEFENSE].btn4.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(1);
});
choosers[DEFENSE].btn5.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseMove(2);
});
leaveBut.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
MovieClip(parent).fade("win");
});
tauntChooser.btn1.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseTaunt(1);
});
tauntChooser.btn2.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseTaunt(2);
});
tauntChooser.btn3.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseTaunt(3);
});
tauntChooser.btn4.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
chooseTaunt(4);
});
}
private function switchToPlayer(){
choosers[mode].drawer.sayer.text = "Time for the quick draw again! Click on the meter to get your bubble closest to the center to gather the most strength for your defense.";
choosers[mode].drawer.drawBut.addEventListener(MouseEvent.MOUSE_DOWN, doDraw);
choosers[mode].drawer.drawBut.visible = true;
gauge[0].visible = true;
mover[0].visible = true;
gauge[1].visible = true;
mover[1].visible = true;
}
private function configureGoodResults(){
andyGoodsArray = [];
andyGoodsArray[0] = [false, true, true];
andyGoodsArray[1] = [true, false, false];
andyGoodsArray[2] = [true, true, false];
dwightGoodsArray = [];
dwightGoodsArray[0] = [true, false, true];
dwightGoodsArray[1] = [false, true, false];
dwightGoodsArray[2] = [true, true, false];
}
private function showLoadResult(_arg1:Event):void{
myLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, showProgress);
myLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, showLoadResult);
holder.addChild(myLoader);
MovieClip(myLoader.content).animation.gotoAndStop(1);
MovieClip(myLoader.content).shadow.gotoAndStop(1);
MovieClip(myLoader.content).x = SWFLEFT;
MovieClip(myLoader.content).y = SWFTOP;
addEventListener(Event.ENTER_FRAME, loopAnimation);
Tweener.addTween(blocker, {alpha:0, time:1, onComplete:startAnimation});
}
private function endDraw(){
NBCTracker.callExternal("newNBCPageview");
removeEventListener(Event.ENTER_FRAME, moveMovers);
moveChooser(OUT);
chooseComputerMove(myChoice);
}
private function showDraw():void{
enemyThreshold = (Math.floor((Math.random() * 15)) + 6);
moverDir = [1, -1];
drawMode = mode;
computerShouldPlay = false;
addEventListener(Event.ENTER_FRAME, moveMovers);
choosers[mode].gotoAndStop("draw");
choosers[mode].drawer.drawTitle.gotoAndPlay(1);
mover = [choosers[mode].drawer.mover0, choosers[mode].drawer.mover1];
gauge = [choosers[mode].drawer.gauge0, choosers[mode].drawer.gauge1];
offenseChooser.health0.visible = false;
offenseChooser.health1.visible = false;
defenseChooser.health0.visible = false;
defenseChooser.health1.visible = false;
if (MovieClip(parent).choice == 0){
choosers[mode].drawer.name0.text = "YOU";
choosers[mode].drawer.name1.text = "ENEMY";
} else {
choosers[mode].drawer.name0.text = "ENEMY";
choosers[mode].drawer.name1.text = "YOU";
};
choosers[mode].drawer.drawBut.x = drawButPos[MovieClip(parent).choice];
if (mode == DEFENSE){
choosers[mode].drawer.sayer.text = "";
Tweener.addTween(this, {delay:1.5, onComplete:makeComputerPlay});
choosers[mode].drawer.drawBut.visible = false;
} else {
choosers[mode].drawer.sayer.text = "Time for the quick draw to determine the amount of power you possess during the attack. Click on the meter to get your bubble closest to the center for the most strength.";
choosers[mode].drawer.drawBut.addEventListener(MouseEvent.MOUSE_DOWN, doDraw);
choosers[mode].drawer.drawBut.visible = true;
};
showGauge(drawMode);
}
public function assessDamage():void{
if ((((damage[0] == 0)) && ((damage[1] == 0)))){
healthModule.damageReport.text = "NO DAMAGE";
if ((((((MovieClip(parent).choice == ANDY)) && ((mode == OFFENSE)))) || ((((MovieClip(parent).choice == DWIGHT)) && ((mode == DEFENSE)))))){
reduceHealth(ANDY, damage[0]);
} else {
reduceHealth(DWIGHT, damage[1]);
};
} else {
if (damage[0] > 0){
reduceHealth(ANDY, damage[0]);
} else {
reduceHealth(DWIGHT, damage[1]);
};
};
trace("health:", health[MovieClip(parent).choice]);
if (health[MovieClip(parent).choice] <= 0){
health[MovieClip(parent).choice] = 0;
if (MovieClip(parent).standalone){
MovieClip(parent).resultstext = (("With " + health[MovieClip(parent).choice]) + "% Energy Remaining");
} else {
MovieClip(parent).resultstext = (("With " + health[MovieClip(parent).choice]) + "% Energy Remaining");
};
if (MovieClip(parent).difficulty == 1){
try {
NBCTracker.addShruteBucks(this, 11, catchIOError);
} catch(e:Error) {
};
MovieClip(parent).resultstext = (MovieClip(parent).resultstext + "\n50 SchruteBucks Earned");
};
Tweener.addTween(this, {delay:clipDelay, onComplete:MovieClip(parent).fade, onCompleteParams:["lose"]});
return;
} else {
if (health[opponent] <= 0){
health[opponent] = 0;
if (MovieClip(parent).standalone){
MovieClip(parent).resultstext = (("With " + health[MovieClip(parent).choice]) + "% Energy Remaining");
} else {
MovieClip(parent).resultstext = (("With " + health[MovieClip(parent).choice]) + "% Energy Remaining");
};
if (MovieClip(parent).difficulty == 1){
try {
NBCTracker.addShruteBucks(this, Math.floor((health[MovieClip(parent).choice] / 10)), catchIOError);
} catch(e:Error) {
};
MovieClip(parent).resultstext = (MovieClip(parent).resultstext + (("\n" + bucksArray[(Math.floor((health[MovieClip(parent).choice] / 10)) - 1)]) + " SchruteBucks Earned"));
};
Tweener.addTween(this, {delay:clipDelay, onComplete:MovieClip(parent).fade, onCompleteParams:["win"]});
return;
} else {
Tweener.addTween(blocker, {alpha:1, delay:clipDelay, time:1, onComplete:finishAnimation});
};
};
mode = ((mode == OFFENSE)) ? DEFENSE : OFFENSE;
}
private function configureAnimations(){
andyAnimationArray = [];
andyAnimationArray[0] = [["prius_jump"], ["prius_tackle"], ["prius_duck"]];
andyAnimationArray[1] = [["fist_jump"], ["fist_tackle"], ["fist_duck"]];
andyAnimationArray[2] = [["gun_jump"], ["gun_tackle"], ["gun_duck"]];
dwightAnimationArray = [];
dwightAnimationArray[0] = [["chain_sing"], ["chain_jump"], ["chain_fetal"]];
dwightAnimationArray[1] = [["ninja_sing"], ["ninja_jump"], ["ninja_fetal"]];
dwightAnimationArray[2] = [["sickle_sing"], ["sickle_jump"], ["sickle_fetal"]];
}
private function doTime(){
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:*;
var _local6:Number;
time = (time - 1);
trace(time);
timerText.text = String(time);
if (time == 0){
timerText.text = "";
_local1 = Math.ceil((Math.random() * 3));
_local2 = 0;
_local3 = 0;
_local4 = ((MovieClip(parent).choice == ANDY)) ? dwightDamageArray : andyDamageArray;
_local5 = 0;
while (_local5 < 3) {
_local6 = ((MovieClip(parent).choice == ANDY)) ? _local4[_local5][(_local1 - 1)][MovieClip(parent).choice] : _local4[(_local1 - 1)][_local5][MovieClip(parent).choice];
if (_local6 > _local2){
_local2 = _local6;
_local3 = _local5;
};
_local5++;
};
chooseMove(_local3, _local1);
return;
};
Tweener.addTween(this, {time:1, onComplete:doTime});
}
private function showGauge(_arg1:Number):void{
if (mode == OFFENSE){
if (_arg1 == 1){
Tweener.addTween(this, {delay:1.5, onComplete:makeComputerPlay});
if ((((((mode == 0)) && ((MovieClip(parent).choice == 0)))) || ((((mode == 1)) && ((MovieClip(parent).choice == 1)))))){
gauge[0].visible = false;
mover[0].visible = false;
gauge[1].visible = true;
mover[1].visible = true;
} else {
gauge[0].visible = true;
mover[0].visible = true;
gauge[1].visible = false;
mover[1].visible = false;
};
} else {
if ((((((mode == 0)) && ((MovieClip(parent).choice == 0)))) || ((((mode == 1)) && ((MovieClip(parent).choice == 1)))))){
gauge[1].visible = false;
mover[1].visible = false;
gauge[0].visible = true;
mover[0].visible = true;
} else {
gauge[1].visible = true;
mover[1].visible = true;
gauge[0].visible = false;
mover[0].visible = false;
};
};
} else {
if (_arg1 == 0){
Tweener.addTween(this, {delay:1.5, onComplete:makeComputerPlay});
if ((((((mode == 0)) && ((MovieClip(parent).choice == 0)))) || ((((mode == 1)) && ((MovieClip(parent).choice == 1)))))){
gauge[0].visible = false;
mover[0].visible = false;
gauge[1].visible = true;
mover[1].visible = true;
} else {
gauge[0].visible = true;
mover[0].visible = true;
gauge[1].visible = false;
mover[1].visible = false;
};
} else {
if ((((((mode == 0)) && ((MovieClip(parent).choice == 0)))) || ((((mode == 1)) && ((MovieClip(parent).choice == 1)))))){
gauge[1].visible = false;
mover[1].visible = false;
gauge[0].visible = true;
mover[0].visible = true;
} else {
gauge[1].visible = true;
mover[1].visible = true;
gauge[0].visible = false;
mover[0].visible = false;
};
};
};
}
private function makeComputerPlay():void{
computerShouldPlay = true;
}
}
}//package duel
Section 15
//DuelGame (duel.DuelGame)
package duel {
import makai.*;
public class DuelGame extends MakaiGame {
public var choice:Number;// = 0
public var resultstext:String;
public var standalone:Boolean;// = true
public var game:Game;
public var muter:MuteModule;
public var difficulty:Number;
public var hasPlayedForBucks:Boolean;// = false
public function DuelGame():void{
}
override public function beginGame():void{
}
}
}//package duel
Section 16
//HelpScript (duel.HelpScript)
package duel {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import com.nbc.*;
public class HelpScript extends MovieClip {
public var dmi:MovieClip;
public var txt:MovieClip;
public var andyBtn:SimpleButton;
public var dwightBtn:SimpleButton;
public function HelpScript(){
NBCTracker.callExternal("newNBCPageview");
andyBtn.addEventListener(MouseEvent.MOUSE_DOWN, startAndyGame);
dwightBtn.addEventListener(MouseEvent.CLICK, startDwightGame);
MovieClip(parent).playAudio("LetsDoThisThing");
var _local1:* = new Timer(900, 1);
_local1.addEventListener("timer", playLoop);
_local1.start();
if (((MovieClip(parent).hasPlayedForBucks) && (!((MovieClip(parent).difficulty == 1))))){
dmi.visible = false;
};
if (MovieClip(parent).standalone){
dmi.visible = false;
};
}
public function startDwightGame(_arg1:MouseEvent){
gotoAndPlay("chooseDwight");
MovieClip(parent).choice = 1;
clearListeners();
MovieClip(parent).playAudio("GetOutAndFaceMe");
var _local2:* = new Timer(3000, 1);
_local2.addEventListener("timer", startGame);
_local2.start();
}
private function clearListeners(){
andyBtn.removeEventListener(MouseEvent.MOUSE_DOWN, startAndyGame);
dwightBtn.removeEventListener(MouseEvent.CLICK, startDwightGame);
}
public function startAndyGame(_arg1:MouseEvent){
gotoAndPlay("chooseAndy");
MovieClip(parent).choice = 0;
clearListeners();
MovieClip(parent).playAudio("WillFightYou");
var _local2:* = new Timer(2000, 1);
_local2.addEventListener("timer", startGame);
_local2.start();
}
public function playLoop(_arg1:TimerEvent):void{
MovieClip(parent).playAudio("loop", 100, 0, 0, 0.3);
}
private function startGame(_arg1:TimerEvent){
MovieClip(parent).fade("game");
}
}
}//package duel
Section 17
//LoseScript (duel.LoseScript)
package duel {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import com.nbc.*;
public class LoseScript extends MovieClip {
public var startBut2:SimpleButton;
public var startBut3:SimpleButton;
public var results:TextField;
public var startBut:SimpleButton;
public function LoseScript(){
MovieClip(parent).stopAudio("all");
startBut.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut3.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut2.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
if (MovieClip(parent).hasPlayedForBucks){
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
startBut2.enabled = false;
startBut2.alpha = 0.5;
};
gotoAndStop((MovieClip(parent).choice + 1));
if (MovieClip(parent).choice == 0){
trace("ANDY LOST");
} else {
trace("DWIGHT LOST");
};
results.text = MovieClip(parent).resultstext;
if (MovieClip(parent).standalone){
startBut2.visible = false;
startBut.visible = false;
startBut.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
} else {
startBut3.visible = false;
startBut3.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
};
}
public function gotoHelp2(_arg1:MouseEvent){
var e = _arg1;
MovieClip(parent).difficulty = 1;
MovieClip(parent).hasPlayedForBucks = true;
try {
NBCTracker.addShruteBucks(this, -1, catchIOError);
} catch(e:Error) {
};
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
MovieClip(parent).fade("help");
MovieClip(parent).stopAudio("all");
}
public function catchIOError(_arg1:IOErrorEvent){
trace(("Error caught: " + _arg1.type));
}
public function gotoHelp(_arg1:MouseEvent){
MovieClip(parent).difficulty = 0;
startBut.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut3.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
MovieClip(parent).fade("help");
MovieClip(parent).stopAudio("all");
}
}
}//package duel
Section 18
//TitleScript (duel.TitleScript)
package duel {
import flash.display.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import com.nbc.*;
public class TitleScript extends MovieClip {
public var startBut2:SimpleButton;
public var startBut3:SimpleButton;
public var startBut:SimpleButton;
public function TitleScript(){
MovieClip(parent).returnTo = "title";
startBut.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut2.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
startBut3.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
if (MovieClip(parent).standalone){
startBut.visible = false;
startBut2.visible = false;
} else {
startBut3.visible = false;
};
var _local1:* = new Timer(700, 1);
_local1.addEventListener("timer", playSound);
_local1.start();
var _local2:* = new Timer(1150, 1);
_local2.addEventListener("timer", showTitle);
_local2.start();
var _local3:* = new Timer(4000, 1);
_local3.addEventListener("timer", showButtons);
_local3.start();
startBut2.enabled = false;
}
public function playSound(_arg1:TimerEvent):void{
MovieClip(parent).playAudio("ADuel", 1, 0, 0, 1.2);
}
public function showButtons(_arg1:TimerEvent):void{
gotoAndPlay("button1");
NBCTracker.getSchruteBucksStatus(this, enableButtons);
Tweener.addTween(startBut2, {delay:0.2, y:375, time:0.5});
}
public function catchIOError(_arg1:IOErrorEvent){
trace(("Error caught: " + _arg1.type));
}
public function gotoHelp(_arg1:MouseEvent){
MovieClip(parent).difficulty = 0;
startBut.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut3.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
MovieClip(parent).fade("help");
MovieClip(parent).stopAudio("all");
}
public function gotoHelp2(_arg1:MouseEvent){
var e = _arg1;
MovieClip(parent).difficulty = 1;
MovieClip(parent).hasPlayedForBucks = true;
try {
NBCTracker.addShruteBucks(this, -1, catchIOError);
} catch(e:Error) {
};
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
MovieClip(parent).fade("help");
MovieClip(parent).stopAudio("all");
}
public function showTitle(_arg1:TimerEvent):void{
gotoAndPlay("title");
}
public function enableButtons(_arg1:Event):void{
trace("DATA!", _arg1.target.data);
startBut2.enabled = true;
if (_arg1.target.data >= 1){
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
startBut2.enabled = false;
startBut2.alpha = 0.5;
MovieClip(parent).hasPlayedForBucks = true;
};
}
}
}//package duel
Section 19
//WinScript (duel.WinScript)
package duel {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import com.nbc.*;
public class WinScript extends MovieClip {
public var startBut2:SimpleButton;
public var startBut3:SimpleButton;
public var results:TextField;
public var startBut:SimpleButton;
public function WinScript(){
MovieClip(parent).stopAudio("all");
startBut.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut2.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
startBut3.addEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
gotoAndStop((2 - MovieClip(parent).choice));
if (MovieClip(parent).hasPlayedForBucks){
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
startBut2.enabled = false;
startBut2.alpha = 0.5;
};
if (MovieClip(parent).choice == 0){
trace("ANDY WON");
} else {
trace("DWIGHT WON");
};
results.text = MovieClip(parent).resultstext;
if (MovieClip(parent).standalone){
startBut2.visible = false;
startBut.visible = false;
startBut.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
} else {
startBut3.visible = false;
startBut3.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
};
}
public function gotoHelp2(_arg1:MouseEvent){
var e = _arg1;
MovieClip(parent).difficulty = 1;
MovieClip(parent).hasPlayedForBucks = true;
try {
NBCTracker.addShruteBucks(this, -1, catchIOError);
} catch(e:Error) {
};
startBut2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp2);
MovieClip(parent).fade("help");
MovieClip(parent).stopAudio("all");
}
public function catchIOError(_arg1:IOErrorEvent){
trace(("Error caught: " + _arg1.type));
}
public function gotoHelp(_arg1:MouseEvent){
MovieClip(parent).difficulty = 0;
startBut.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
startBut3.removeEventListener(MouseEvent.MOUSE_DOWN, gotoHelp);
MovieClip(parent).fade("help");
MovieClip(parent).stopAudio("all");
}
}
}//package duel
Section 20
//caret_26 (duel_fla.caret_26)
package duel_fla {
import flash.display.*;
public dynamic class caret_26 extends MovieClip {
public function caret_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package duel_fla
Section 21
//DefenseChooser_14 (duel_fla.DefenseChooser_14)
package duel_fla {
import flash.display.*;
public dynamic class DefenseChooser_14 extends MovieClip {
public var btn5:SimpleButton;
public var drawer:MovieClip;
public var btn0:SimpleButton;
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public var btn3:SimpleButton;
public var btn4:SimpleButton;
public var health0:MovieClip;
public var health1:MovieClip;
public function DefenseChooser_14(){
addFrameScript(38, frame39);
}
function frame39(){
trace("got to the end");
}
}
}//package duel_fla
Section 22
//drawtitle_24 (duel_fla.drawtitle_24)
package duel_fla {
import flash.display.*;
public dynamic class drawtitle_24 extends MovieClip {
public function drawtitle_24(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package duel_fla
Section 23
//OffenseChooser_28 (duel_fla.OffenseChooser_28)
package duel_fla {
import flash.display.*;
public dynamic class OffenseChooser_28 extends MovieClip {
public var btn5:SimpleButton;
public var drawer:MovieClip;
public var btn0:SimpleButton;
public var btn1:SimpleButton;
public var btn2:SimpleButton;
public var btn3:SimpleButton;
public var btn4:SimpleButton;
public var health0:MovieClip;
public var health1:MovieClip;
public function OffenseChooser_28(){
addFrameScript(39, frame40);
}
function frame40(){
trace("got to the end");
}
}
}//package duel_fla
Section 24
//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 25
//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 26
//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 27
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import flash.text.*;
import fl.events.*;
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 28
//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 29
//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 30
//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 31
//TextArea (fl.controls.TextArea)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import flash.text.*;
import fl.events.*;
import flash.ui.*;
import flash.system.*;
public class TextArea extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _verticalScrollBar:UIScrollBar;
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _horizontalScrollBar:UIScrollBar;
protected var _horizontalScrollPolicy:String;// = "auto"
protected var _editable:Boolean;// = true
protected var textHasChanged:Boolean;// = false
public var textField:TextField;
protected var _wordWrap:Boolean;// = true
protected var _verticalScrollPolicy:String;// = "auto"
protected static const SCROLL_BAR_STYLES:Object = {downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", 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 = {upSkin:"TextArea_upSkin", disabledSkin:"TextArea_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextArea(){
_editable = true;
_wordWrap = true;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
_html = false;
textHasChanged = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((!(enabled)) || (!(_verticalScrollBar.visible)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * _verticalScrollBar.lineScrollSize));
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, (_arg1.delta * _verticalScrollBar.lineScrollSize), _verticalScrollBar.scrollPosition));
}
public function get verticalScrollPosition():Number{
return (textField.scrollV);
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
textField.scrollV = _arg1;
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
return;
};
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
textHasChanged = true;
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (_editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
textField.wordWrap = _wordWrap;
textField.multiline = true;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
setIMEMode(true);
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (_local2){
if (editable){
_local2.showFocusIndicator = true;
};
_local2.defaultButtonEnabled = false;
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get wordWrap():Boolean{
return (_wordWrap);
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function get horizontalScrollBar():UIScrollBar{
return (_horizontalScrollBar);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseChildren = enabled;
invalidate(InvalidationType.STATE);
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():Number{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
invalidate(InvalidationType.DATA);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function get maxVerticalScrollPosition():int{
return (textField.maxScrollV);
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
textField.scrollH = _arg1;
}
public function get textHeight():Number{
drawNow();
return (textField.textHeight);
}
public function get textWidth():Number{
drawNow();
return (textField.textWidth);
}
public function get restrict():String{
return (textField.restrict);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
invalidate(InvalidationType.STATE);
}
protected function updateScrollBars(){
_horizontalScrollBar.update();
_verticalScrollBar.update();
_verticalScrollBar.enabled = enabled;
_horizontalScrollBar.enabled = enabled;
_horizontalScrollBar.drawNow();
_verticalScrollBar.drawNow();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():Number{
return (textField.text.length);
}
public function set wordWrap(_arg1:Boolean):void{
_wordWrap = _arg1;
invalidate(InvalidationType.STATE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (IME.conversionMode);
}
protected function handleScroll(_arg1:ScrollEvent):void{
dispatchEvent(_arg1);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
_local2 = focusManager;
if (_local2){
_local2.defaultButtonEnabled = true;
};
setSelection(0, 0);
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
protected function delayedLayoutUpdate(_arg1:Event):void{
if (textHasChanged){
textHasChanged = false;
drawLayout();
return;
};
removeEventListener(Event.ENTER_FRAME, delayedLayoutUpdate);
}
public function set htmlText(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
return;
};
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
textHasChanged = true;
}
public function get text():String{
return (textField.text);
}
public function get verticalScrollBar():UIScrollBar{
return (_verticalScrollBar);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STATE)){
updateTextFieldType();
};
if (isInvalid(InvalidationType.STYLES)){
setStyles();
setEmbedFont();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
_verticalScrollBar = new UIScrollBar();
_verticalScrollBar.name = "V";
_verticalScrollBar.visible = false;
_verticalScrollBar.focusEnabled = false;
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
addChild(_verticalScrollBar);
_horizontalScrollBar = new UIScrollBar();
_horizontalScrollBar.name = "H";
_horizontalScrollBar.visible = false;
_horizontalScrollBar.focusEnabled = false;
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
addChild(_horizontalScrollBar);
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
_horizontalScrollBar.scrollTarget = textField;
_verticalScrollBar.scrollTarget = textField;
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function setTextSize(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
_local4 = (_arg1 - (_arg3 * 2));
_local5 = (_arg2 - (_arg3 * 2));
if (_local4 != textField.width){
textField.width = _local4;
};
if (_local5 != textField.height){
textField.height = _local5;
};
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
invalidate(InvalidationType.DATA);
}
protected function needVScroll():Boolean{
if (_verticalScrollPolicy == ScrollPolicy.OFF){
return (false);
};
if (_verticalScrollPolicy == ScrollPolicy.ON){
return (true);
};
return ((textField.maxScrollV > 1));
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
public function get htmlText():String{
return (textField.htmlText);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background != null){
addChildAt(background, 0);
};
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
var _local5:Boolean;
_local1 = Number(getStyleValue("textPadding"));
textField.x = (textField.y = _local1);
background.width = width;
background.height = height;
_local2 = height;
_local3 = needVScroll();
_local4 = (width - (_local3) ? _verticalScrollBar.width : 0);
_local5 = needHScroll();
if (_local5){
_local2 = (_local2 - _horizontalScrollBar.height);
};
setTextSize(_local4, _local2, _local1);
if (((((_local5) && (!(_local3)))) && (needVScroll()))){
_local3 = true;
_local4 = (_local4 - _verticalScrollBar.width);
setTextSize(_local4, _local2, _local1);
};
if (_local3){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = (width - _verticalScrollBar.width);
_verticalScrollBar.height = _local2;
_verticalScrollBar.visible = true;
_verticalScrollBar.enabled = enabled;
} else {
_verticalScrollBar.visible = false;
};
if (_local5){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.y = (height - _horizontalScrollBar.height);
_horizontalScrollBar.width = _local4;
_horizontalScrollBar.visible = true;
_horizontalScrollBar.enabled = enabled;
} else {
_horizontalScrollBar.visible = false;
};
updateScrollBars();
addEventListener(Event.ENTER_FRAME, delayedLayoutUpdate, false, 0, true);
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function needHScroll():Boolean{
if (_horizontalScrollPolicy == ScrollPolicy.OFF){
return (false);
};
if (_horizontalScrollPolicy == ScrollPolicy.ON){
return (true);
};
return ((textField.maxScrollH > 0));
}
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();
if (_html){
textField.htmlText = _savedHTML;
};
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
invalidate(InvalidationType.DATA);
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.controls
Section 32
//UIScrollBar (fl.controls.UIScrollBar)
package fl.controls {
import flash.events.*;
import fl.core.*;
import flash.text.*;
import fl.events.*;
public class UIScrollBar extends ScrollBar {
protected var inScroll:Boolean;// = false
protected var _scrollTarget:TextField;
protected var inEdit:Boolean;// = false
private static var defaultStyles:Object = {};
public function UIScrollBar(){
inEdit = false;
inScroll = false;
super();
}
protected function handleTargetScroll(_arg1:Event):void{
if (inDrag){
return;
};
if (!enabled){
return;
};
inEdit = true;
updateScrollTargetProperties();
scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV;
inEdit = false;
}
override public function set minScrollPosition(_arg1:Number):void{
super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1;
}
override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
super.setScrollPosition(_arg1, _arg2);
if (!_scrollTarget){
inScroll = false;
return;
};
updateTargetScroll();
}
override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
var _local5:Number;
var _local6:Number;
_local5 = _arg3;
_local6 = ((_arg2)<0) ? 0 : _arg2;
if (_scrollTarget != null){
if (direction == ScrollBarDirection.HORIZONTAL){
_local5 = ((_arg3)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local5;
} else {
_local5 = ((_arg3)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local5;
};
};
super.setScrollProperties(_arg1, _local6, _local5, _arg4);
}
public function get scrollTargetName():String{
return (_scrollTarget.name);
}
public function get scrollTarget():TextField{
return (_scrollTarget);
}
protected function updateScrollTargetProperties():void{
var _local1:Boolean;
var _local2:Number;
if (_scrollTarget == null){
setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize);
scrollPosition = 0;
} else {
_local1 = (direction == ScrollBarDirection.HORIZONTAL);
_local2 = (_local1) ? _scrollTarget.width : 10;
setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV, pageScrollSize);
scrollPosition = (_local1) ? _scrollTarget.scrollH : _scrollTarget.scrollV;
};
}
public function update():void{
inEdit = true;
updateScrollTargetProperties();
inEdit = false;
}
public function set scrollTargetName(_arg1:String):void{
var target = _arg1;
try {
scrollTarget = (parent.getChildByName(target) as TextField);
} catch(error:Error) {
throw (new Error("ScrollTarget not found, or is not a TextField"));
};
}
override public function set direction(_arg1:String):void{
if (isLivePreview){
return;
};
super.direction = _arg1;
updateScrollTargetProperties();
}
protected function handleTargetChange(_arg1:Event):void{
inEdit = true;
setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV, true);
updateScrollTargetProperties();
inEdit = false;
}
override public function set maxScrollPosition(_arg1:Number):void{
var _local2:Number;
_local2 = _arg1;
if (_scrollTarget != null){
if (direction == ScrollBarDirection.HORIZONTAL){
_local2 = ((_local2)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local2;
} else {
_local2 = ((_local2)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local2;
};
};
super.maxScrollPosition = _local2;
}
protected function updateTargetScroll(_arg1:ScrollEvent=null):void{
if (inEdit){
return;
};
if (direction == ScrollBarDirection.HORIZONTAL){
_scrollTarget.scrollH = scrollPosition;
} else {
_scrollTarget.scrollV = scrollPosition;
};
}
override protected function draw():void{
if (isInvalid(InvalidationType.DATA)){
updateScrollTargetProperties();
};
super.draw();
}
public function set scrollTarget(_arg1:TextField):void{
if (_scrollTarget != null){
_scrollTarget.removeEventListener(Event.CHANGE, handleTargetChange, false);
_scrollTarget.removeEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false);
_scrollTarget.removeEventListener(Event.SCROLL, handleTargetScroll, false);
removeEventListener(ScrollEvent.SCROLL, updateTargetScroll, false);
};
_scrollTarget = _arg1;
if (_scrollTarget != null){
_scrollTarget.addEventListener(Event.CHANGE, handleTargetChange, false, 0, true);
_scrollTarget.addEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false, 0, true);
_scrollTarget.addEventListener(Event.SCROLL, handleTargetScroll, false, 0, true);
addEventListener(ScrollEvent.SCROLL, updateTargetScroll, false, 0, true);
};
invalidate(InvalidationType.DATA);
}
override public function get direction():String{
return (super.direction);
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.controls
Section 33
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 34
//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 35
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import fl.events.*;
import flash.utils.*;
import flash.system.*;
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 36
//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 37
//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 38
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.core.*;
import flash.text.*;
import flash.utils.*;
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 39
//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 40
//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 41
//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 42
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
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 43
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var begin:Number;// = NAN
private var _finish:Number;// = NAN
public var change:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 44
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var position:Number;// = NAN
public var time:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 45
//MakaiAudio (makai.MakaiAudio)
package makai {
import flash.media.*;
import flash.events.*;
import caurina.transitions.*;
import flash.utils.*;
import caurina.transitions.properties.*;
public class MakaiAudio {
public var isPlaying:Boolean;// = false
public var sounds:Array;
public var muted:Boolean;// = false
public var mix:SoundMixer;
public function MakaiAudio(){
sounds = new Array();
sounds = [];
mix = new SoundMixer();
SoundShortcuts.init();
}
public function playAudio(_arg1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=1, _arg6:Number=1, _arg7:Boolean=true){
var _local8:SoundTransform;
var _local9:SoundTransform;
var _local10:SoundChannel;
var _local11:Class;
var _local12:Sound;
trace("********** This is muted!");
if (muted){
};
if ((_arg1 is Sound)){
_local12 = new (_arg1);
} else {
_local11 = (getDefinitionByName(_arg1) as Class);
_local12 = new (_local11);
};
if (!_arg7){
if (sounds[_arg1] != null){
if ((_arg1 is String)){
return;
};
};
};
_local8 = new SoundTransform(_arg5, _arg4);
_local9 = new SoundTransform(_arg5, _arg4);
_local10 = _local12.play(_arg3, _arg2, _local9);
_local10.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
sounds[_arg1] = {sound:_local12, channel:_local10, trans:_local8, targetVolume:_arg5};
}
public function soundCompleteHandler(_arg1:Event){
_arg1.target.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
sounds.splice(sounds.indexOf(_arg1.target), 1);
}
public function changeVolume(_arg1:Number){
SoundMixer.soundTransform = new SoundTransform(_arg1);
}
public function playAudio2(_arg1:Sound, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=1, _arg6:Number=1){
var _local7:SoundTransform;
var _local8:SoundTransform;
var _local9:SoundChannel;
if (muted){
_arg5 = 0;
};
_local7 = new SoundTransform(_arg5, _arg4);
_local8 = new SoundTransform((_arg5 * _arg6), _arg4);
_local9 = _arg1.play(_arg3, _arg2, _local8);
sounds[_arg1] = {sound:_arg1, channel:_local9, trans:_local7, targetVolume:_arg5};
}
public function fadeSound(_arg1:String, _arg2:Boolean){
var _local3:SoundTransform;
if (sounds[_arg1] != null){
if (_arg2){
if (sounds[_arg1].channel.soundTransform.volume == 0){
return;
};
} else {
if (sounds[_arg1].channel.soundTransform.volume > 0){
return;
};
};
trace("fade sound", _arg1);
_local3 = new SoundTransform((_arg2) ? sounds[_arg1].targetVolume : 0, sounds[_arg1].trans.pan);
sounds[_arg1].channel.soundTransform = _local3;
Tweener.addTween(sounds[_arg1].channel, {_sound_volume:(_arg2) ? 0 : sounds[_arg1].targetVolume, time:3});
};
}
public function stopAudio(_arg1:String){
var _local2:*;
if (_arg1 == "all"){
for (_local2 in sounds) {
sounds[_local2].channel.stop();
};
} else {
if (sounds[_arg1] != null){
sounds[_arg1].channel.stop();
};
};
}
public function stopAudio2(_arg1:String){
sounds[_arg1].channel.stop();
}
}
}//package makai
Section 46
//MakaiGame (makai.MakaiGame)
package makai {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import caurina.transitions.*;
import caurina.transitions.properties.*;
import fl.transitions.*;
public class MakaiGame extends MovieClip {
public var willPause:Boolean;// = false
public var fadeColor:uint;// = 0xFFFFFF
public var returnTo:String;
public var makaiAudio:MakaiAudio;
public var destination;
public var myTween:Tween;
public var muted:Boolean;// = false
public var gameState:MakaiGameState;
public function MakaiGame():void{
stop();
ColorShortcuts.init();
addEventListener(Event.ENTER_FRAME, checkLoad);
init();
}
public function playAudio(_arg1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=1, _arg6:Number=1, _arg7:Boolean=true){
makaiAudio.playAudio(_arg1, _arg2, _arg3, _arg4, _arg5, soundTransform.volume, _arg7);
}
public function loadConditionsMet():Boolean{
return (true);
}
public function init():void{
fadeColor = 0xFFFFFF;
makaiAudio = new MakaiAudio();
gameState = new MakaiGameState();
gameState.suspended = false;
muted = makaiAudio.muted;
}
public function finish():void{
Tweener.addTween(this, {_color:null, time:0.5});
}
public function checkLoad(_arg1:Event):void{
if ((((framesLoaded >= totalFrames)) && (loadConditionsMet()))){
removeEventListener(Event.ENTER_FRAME, checkLoad);
beginGame();
};
}
public function fadeSound(_arg1:String, _arg2:Boolean){
makaiAudio.fadeSound(_arg1, _arg2);
}
public function doMute():void{
var _local1:SoundTransform;
trace("do mute");
if (soundTransform.volume == 1){
_local1 = new SoundTransform(0);
} else {
_local1 = new SoundTransform(1);
};
soundTransform = _local1;
makaiAudio.changeVolume(soundTransform.volume);
}
public function stopAudio(_arg1:String){
makaiAudio.stopAudio(_arg1);
}
protected function complete(){
if ((destination is Function)){
destination();
};
if ((destination is String)){
gotoAndStop(destination);
};
if (!willPause){
finish();
};
}
public function beginGame():void{
}
public function fade(_arg1, _arg2:Boolean=false):void{
this.destination = _arg1;
this.willPause = _arg2;
Tweener.addTween(this, {_color:0, time:0.5, transition:"easeInOutCubic", onComplete:complete});
}
}
}//package makai
Section 47
//MakaiGameState (makai.MakaiGameState)
package makai {
public class MakaiGameState {
public var locationX:Number;
public var locationY:Number;
public var locationZ:Number;
public var locationKeeper:Number;
public var level:Number;
public var attempts:Number;
public var betweenLevels:Boolean;
public var suspended:Boolean;
public var location:Number;
}
}//package makai
Section 48
//MuteButton (makai.MuteButton)
package makai {
import flash.display.*;
import flash.events.*;
public class MuteButton extends MovieClip {
public function MuteButton():void{
buttonMode = true;
addEventListener(MouseEvent.MOUSE_DOWN, doPress);
}
protected function doPress(_arg1:MouseEvent):void{
if (currentFrame == 1){
gotoAndStop(2);
} else {
gotoAndStop(1);
};
MakaiGame(parent).doMute();
}
}
}//package makai
Section 49
//ADuel (ADuel)
package {
import flash.media.*;
public dynamic class ADuel extends Sound {
}
}//package
Section 50
//AllYouDoIsDressFancy (AllYouDoIsDressFancy)
package {
import flash.media.*;
public dynamic class AllYouDoIsDressFancy extends Sound {
}
}//package
Section 51
//ComeOnCoward (ComeOnCoward)
package {
import flash.media.*;
public dynamic class ComeOnCoward extends Sound {
}
}//package
Section 52
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 53
//Game (Game)
package {
import duel.*;
public dynamic class Game extends Duel {
}
}//package
Section 54
//GetOutAndFaceMe (GetOutAndFaceMe)
package {
import flash.media.*;
public dynamic class GetOutAndFaceMe extends Sound {
}
}//package
Section 55
//hahaha (hahaha)
package {
import flash.media.*;
public dynamic class hahaha extends Sound {
}
}//package
Section 56
//HelpModule (HelpModule)
package {
import duel.*;
public dynamic class HelpModule extends HelpScript {
public function HelpModule(){
addFrameScript(78, frame79, 101, frame102, 118, frame119);
}
function frame119(){
stop();
}
function frame102(){
stop();
}
function frame79(){
stop();
}
}
}//package
Section 57
//ImABiggerMan (ImABiggerMan)
package {
import flash.media.*;
public dynamic class ImABiggerMan extends Sound {
}
}//package
Section 58
//LetsDoThisThing (LetsDoThisThing)
package {
import flash.media.*;
public dynamic class LetsDoThisThing extends Sound {
}
}//package
Section 59
//loop (loop)
package {
import flash.media.*;
public dynamic class loop extends Sound {
}
}//package
Section 60
//LoseModule (LoseModule)
package {
import duel.*;
public dynamic class LoseModule extends LoseScript {
}
}//package
Section 61
//MuteModule (MuteModule)
package {
import makai.*;
public dynamic class MuteModule extends MuteButton {
public function MuteModule(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 62
//NeverBackDown (NeverBackDown)
package {
import flash.media.*;
public dynamic class NeverBackDown extends Sound {
}
}//package
Section 63
//NotGivingUp (NotGivingUp)
package {
import flash.media.*;
public dynamic class NotGivingUp extends Sound {
}
}//package
Section 64
//punch (punch)
package {
import flash.media.*;
public dynamic class punch extends Sound {
}
}//package
Section 65
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 66
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 67
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 68
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 69
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 70
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 71
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 72
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 73
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 74
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 75
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 76
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 77
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 78
//taunt0 (taunt0)
package {
import flash.media.*;
public dynamic class taunt0 extends Sound {
}
}//package
Section 79
//taunt1 (taunt1)
package {
import flash.media.*;
public dynamic class taunt1 extends Sound {
}
}//package
Section 80
//taunt2 (taunt2)
package {
import flash.media.*;
public dynamic class taunt2 extends Sound {
}
}//package
Section 81
//taunt3 (taunt3)
package {
import flash.media.*;
public dynamic class taunt3 extends Sound {
}
}//package
Section 82
//taunt4 (taunt4)
package {
import flash.media.*;
public dynamic class taunt4 extends Sound {
}
}//package
Section 83
//TextArea_disabledSkin (TextArea_disabledSkin)
package {
import flash.display.*;
public dynamic class TextArea_disabledSkin extends MovieClip {
}
}//package
Section 84
//TextArea_upSkin (TextArea_upSkin)
package {
import flash.display.*;
public dynamic class TextArea_upSkin extends MovieClip {
}
}//package
Section 85
//TitleModule (TitleModule)
package {
import duel.*;
public dynamic class TitleModule extends TitleScript {
public function TitleModule(){
addFrameScript(8, frame9, 14, frame15, 35, frame36);
}
function frame36(){
stop();
}
function frame15(){
stop();
}
function frame9(){
stop();
}
}
}//package
Section 86
//WhatIsYourWeapon (WhatIsYourWeapon)
package {
import flash.media.*;
public dynamic class WhatIsYourWeapon extends Sound {
}
}//package
Section 87
//WillFightYou (WillFightYou)
package {
import flash.media.*;
public dynamic class WillFightYou extends Sound {
}
}//package
Section 88
//WinModule (WinModule)
package {
import duel.*;
public dynamic class WinModule extends WinScript {
}
}//package
Section 89
//yes (yes)
package {
import flash.media.*;
public dynamic class yes extends Sound {
}
}//package
Section 90
//YouCantEven (YouCantEven)
package {
import flash.media.*;
public dynamic class YouCantEven extends Sound {
}
}//package
Section 91
//YouGiveUp (YouGiveUp)
package {
import flash.media.*;
public dynamic class YouGiveUp extends Sound {
}
}//package
Section 92
//YoureNotAMan (YoureNotAMan)
package {
import flash.media.*;
public dynamic class YoureNotAMan extends Sound {
}
}//package