Section 1
//spriteButtons_2 (AdlibToolbar_fla.spriteButtons_2)
package AdlibToolbar_fla {
import flash.display.*;
public dynamic class spriteButtons_2 extends MovieClip {
public var btn_All:MovieClip;
public var btn_FX:MovieClip;
public var mc_IconHolder:MovieClip;
}
}//package AdlibToolbar_fla
Section 2
//Symbol1_5 (AdlibToolbar_fla.Symbol1_5)
package AdlibToolbar_fla {
import flash.display.*;
public dynamic class Symbol1_5 extends MovieClip {
public var mc_Icon:MovieClip;
}
}//package AdlibToolbar_fla
Section 3
//FilterShortcuts (caurina.transitions.properties.FilterShortcuts)
package caurina.transitions.properties {
import caurina.transitions.*;
import flash.geom.*;
import flash.filters.*;
import flash.display.*;
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.registerSpecialPropertySplitter("_DisplacementMap_mapPoint", _generic_point_splitter, ["_DisplacementMap_mapPoint_x", "_DisplacementMap_mapPoint_y"]);
Tweener.registerSpecialProperty("_DisplacementMap_mapPoint_x", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapPoint", "point", "x"]);
Tweener.registerSpecialProperty("_DisplacementMap_mapPoint_y", _filter_property_get, _filter_property_set, [DisplacementMapFilter, "mapPoint", "point", "y"]);
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 _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:String;
var _local8:String;
var _local9:Object;
var _local10:String;
_local4 = _arg1.filters;
_local6 = _arg2[0];
_local7 = _arg2[1];
_local8 = _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]]);
};
if (_local8 == "point"){
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]]);
};
if (_local8 == "point"){
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 _local5:Array;
var _local6:Number;
var _local7:Object;
var _local8:String;
var _local9:String;
var _local10:BitmapFilter;
var _local11:String;
var _local12:Array;
var _local13:Point;
_local5 = _arg1.filters;
_local7 = _arg3[0];
_local8 = _arg3[1];
_local9 = _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 {
if (_local9 == "point"){
_local13 = Point(_local5[_local6][_local8]);
_local13[_arg3[3]] = _arg2;
_local5[_local6][_local8] = _local13;
} 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;
_local3 = 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_point_splitter(_arg1:Point, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
_local3.push({name:_arg2[0], value:_arg1.x});
_local3.push({name:_arg2[1], value:_arg1.y});
return (_local3);
}
public static function _generic_matrix_splitter(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:Number;
if (_arg1 == null){
_arg1 = _arg2[0].concat();
};
_local3 = new Array();
_local4 = 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;
_local4 = 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 4
//AuxFunctions (caurina.transitions.AuxFunctions)
package caurina.transitions {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function isInArray(_arg1:String, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package caurina.transitions
Section 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 _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
_local8 = (((!(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;
_local6 = (((!(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;
_local6 = (((!(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;
_local6 = (((!(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 _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(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 _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(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 originalValueComplete:Object;
public var modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var hasModifier:Boolean;
public var valueComplete:Number;
public var extra:Object;
public var valueStart:Number;
public var modifierFunction:Function;
public var arrayIndex:Number;
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:String;
_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;
_local1 = 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 preProcess:Function;
public var setValue:Function;
public var getValue: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:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + ", ");
_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:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 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:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package caurina.transitions
Section 10
//Tweener (caurina.transitions.Tweener)
package caurina.transitions {
import flash.events.*;
import flash.display.*;
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{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
var _local6:SpecialProperty;
if (!_inited){
init();
};
_local6 = 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 _local5:Object;
var _local6:Number;
var _local7:Number;
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];
};
_local5 = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local6 = (isNaN(_local5.time)) ? 0 : _local5.time;
_local7 = (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 _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local3:TweenListObj;
var _local4:TweenListObj;
var _local5:uint;
var _local6:String;
var _local7:Boolean;
_local3 = _tweenList[_arg1];
_local4 = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function updateFrame():void{
_currentTimeFrame++;
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
var _local3:Number;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local3 = 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{
var _local2:Boolean;
updateTime();
updateFrame();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var eventScope:Object;
var tScope:Object;
var cTime:Number;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
cTime = 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 _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var 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 _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Array;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Object;
var _local12:Object;
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];
};
_local7 = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
_local10 = new Array();
_local11 = {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};
_local12 = 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 _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((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;
_local2 = _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;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 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 removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
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{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package caurina.transitions
Section 11
//TweenListObj (caurina.transitions.TweenListObj)
package caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var hasStarted:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var 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 transition:Function;
public var timePaused:Number;
public var onCompleteParams:Array;
public var timesCalled:Number;
public var isCaller:Boolean;
public var onError:Function;
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 _local2:TweenListObj;
var _local3:String;
_local2 = 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 _local1:String;
var _local2:Boolean;
var _local3:String;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = true;
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 _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
_local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]);
} else {
_local5 = _local4[_local7];
};
_local3 = AuxFunctions.concatObjects(_local3, _local5);
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package caurina.transitions
Section 12
//Adlib (com.tweegee.games.Adlib)
package com.tweegee.games {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
import flash.errors.*;
public class Adlib {
public static const ALL_SOUNDS:String = "all";
public static const BG_ONLY:String = "bg";
public static const FX_ONLY:String = "fx";
public static var sounds:Object = new Object();
public static var channels:Dictionary = new Dictionary(true);
public static var fxVolume:Number = 1;
public static var globalVolume:Number = 1;
public static var oldVolume:Object = {fxVolume:1, bgVolume:1};
public static var sequenceSounds:Object = new Object();
public static var sequenceCounter:uint = 0;
public static var counter:uint = 0;
public static var bgVolume:Number = 1;
public function Adlib():void{
throw (new IllegalOperationError("Adlib is an abstract class and cannot be instantiated"));
}
public static function getParams(_arg1:String):Object{
if (sounds[_arg1] == null){
trace(("Adlib Error: Could not find the sound " + _arg1));
return (null);
};
return (sounds[_arg1]);
}
private static function _removeSequenceSound(_arg1:Object):void{
delete sequenceSounds[_arg1.name];
}
public static function setParams(_arg1:String, _arg2:Object):void{
if (sounds[_arg1] == null){
trace(("Adlib Error: Could not find the sound " + _arg1));
} else {
if (_arg2.volume != null){
sounds[_arg1].volume = _arg2.volume;
};
if (_arg2.pan != null){
sounds[_arg1].pan = _arg2.pan;
};
if (_arg2.loop != null){
sounds[_arg1].loop = _arg2.loop;
};
if (_arg2.once != null){
sounds[_arg1].once = _arg2.once;
};
if (_arg2.delay != null){
sounds[_arg1].delay = _arg2.delay;
};
if (_arg2.isBG != null){
sounds[_arg1].isBG = _arg2.isBG;
};
if (_arg2.onComplete != null){
sounds[_arg1].onComplete = _arg2.onComplete;
};
if (_arg2.onCompleteParams != null){
sounds[_arg1].onCompleteParams = _arg2.onCompleteParams;
};
};
}
public static function addSequence(... _args):void{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
for each (_local5 in _args) {
if ((_local5 is Sound)){
_local2 = new Object();
_local2.volume = 1;
_local2.pan = 0;
_local2.loop = 0;
_local2.start = 0;
_local2.sound = _local5;
} else {
if ((_local5 is String)){
if (((!((sounds[_local5] == null))) && ((sounds[_local5].dispose == false)))){
_local2 = new Object();
_local2.sound = sounds[_local5].sound;
_local2.volume = sounds[_local5].volume;
_local2.pan = sounds[_local5].pan;
_local2.loop = sounds[_local5].loop;
_local2.start = sounds[_local5].start;
_local2.onComplete = sounds[_local5].onComplete;
_local2.onCompleteParams = sounds[_local5].onCompleteParams;
};
} else {
_local2 = _local5;
if (_local2.volume == null){
_local2.volume = 1;
};
if (_local2.pan == null){
_local2.pan = 0;
};
if (_local2.loop == null){
_local2.loop = 0;
};
if (_local2.start == null){
_local2.start = 0;
};
};
};
_local2.name = sequenceCounter;
var _local8 = sequenceCounter++;
sequenceSounds[_local8] = _local2;
if (_local3 != null){
_local3.nextSound = _local2;
};
_local3 = _local2;
if (_local4 == null){
_local4 = _local2;
};
};
_playSequenceSound(_local4);
}
public static function unMute(_arg1:String="fx"):void{
switch (_arg1){
case FX_ONLY:
fxVolume = oldVolume.fxVolume;
break;
case BG_ONLY:
bgVolume = oldVolume.bgVolume;
break;
case ALL_SOUNDS:
fxVolume = oldVolume.fxVolume;
bgVolume = oldVolume.bgVolume;
break;
};
_setVolume();
}
private static function _playSound(_arg1:Object):void{
_arg1.channel = _arg1.sound.play(_arg1.start, _arg1.loop, new SoundTransform((_arg1.volume * int((_arg1.isBG) ? bgVolume : fxVolume)), _arg1.pan));
if (_arg1.channel != null){
_arg1.channel.addEventListener(Event.SOUND_COMPLETE, handleSoundComplete);
channels[_arg1.channel] = _arg1.name;
};
}
private static function _setVolume():void{
var _local1:Object;
for each (_local1 in sounds) {
if (_local1.channel != null){
_local1.channel.soundTransform = new SoundTransform(((_local1.volume * _local1.isBG)) ? bgVolume : fxVolume, _local1.pan);
};
};
}
public static function getVolume(_arg1:String):Number{
switch (_arg1){
case FX_ONLY:
return (fxVolume);
case BG_ONLY:
return (bgVolume);
default:
return (NaN);
};
}
public static function mute(_arg1:String="fx"):void{
switch (_arg1){
case FX_ONLY:
fxVolume = 0;
break;
case BG_ONLY:
bgVolume = 0;
break;
case ALL_SOUNDS:
fxVolume = 0;
bgVolume = 0;
break;
};
_setVolume();
}
private static function checkAndPlay(_arg1:Object):Boolean{
if ((((_arg1.once == true)) && (isPlaying(_arg1.className)))){
return (false);
};
_playSound(_arg1);
return (true);
}
public static function setVolume(_arg1:Number, _arg2:String):void{
fxVolume = (oldVolume.fxVolume = _arg1);
bgVolume = (oldVolume.bgVolume = _arg1);
_setVolume();
}
private static function handleSequenceSoundComplete(_arg1:Event):void{
var _local2:String;
var _local3:Object;
_local2 = channels[_arg1.currentTarget];
_arg1.currentTarget.removeEventListener(Event.SOUND_COMPLETE, handleSequenceSoundComplete);
_local3 = sequenceSounds[_local2];
if (_local3.onComplete != null){
_local3.onComplete.apply(NaN, _local3.onCompleteParams);
};
delete _local3["channel"];
delete channels[_arg1.currentTarget];
if (_local3.nextSound != null){
_playSequenceSound(_local3.nextSound);
};
_removeSequenceSound(_local3);
}
public static function isMute(_arg1:String):Boolean{
switch (_arg1){
case FX_ONLY:
return ((fxVolume == 0));
case BG_ONLY:
return ((bgVolume == 0));
case ALL_SOUNDS:
return ((((fxVolume == 0)) && ((bgVolume == 0))));
};
return (false);
}
private static function isPlaying(_arg1:String):Boolean{
var _local2:Object;
for each (_local2 in sounds) {
if ((((_arg1 == _local2.className)) && (!((_local2.channel == null))))){
return (true);
};
};
return (false);
}
private static function handleSoundComplete(_arg1:Event):void{
var _local2:String;
var _local3:Object;
_local2 = channels[_arg1.currentTarget];
_arg1.currentTarget.removeEventListener(Event.SOUND_COMPLETE, handleSoundComplete);
_local3 = sounds[_local2];
if (_local3.onComplete != null){
_local3.onComplete.apply(NaN, _local3.onCompleteParams);
};
delete _local3["channel"];
delete channels[_arg1.currentTarget];
if (_local3.loop == int.MAX_VALUE){
checkAndPlay(_local3);
} else {
if (_local3.dispose){
_removeSound(_local3);
};
};
}
public static function playSound(_arg1:String):void{
var _local2:Object;
if (sounds[_arg1] == null){
trace(("Adlib Error: Could not find the sound " + _arg1));
} else {
_local2 = sounds[_arg1];
if (_local2.delay > 0){
sounds[_arg1].timeoutId = setTimeout(checkAndPlay, _local2.delay, _local2);
} else {
checkAndPlay(_local2);
};
};
}
public static function removeSound(_arg1:String, _arg2:Boolean=true):void{
if (sounds[_arg1] == null){
trace(("Adlib Error: Could not find the sound " + _arg1));
} else {
if (_arg2){
_stopSound(sounds[_arg1]);
};
_removeSound(sounds[_arg1]);
};
}
private static function _removeSound(_arg1:Object):void{
if (_arg1.timeoutId != null){
clearTimeout(_arg1.timeoutId);
};
delete sounds[_arg1.name];
}
public static function stopSound(_arg1:String):void{
if (sounds[_arg1] == null){
trace(("Adlib Error: Could not find the sound " + _arg1));
} else {
if (sounds[_arg1].channel != null){
_stopSound(sounds[_arg1]);
};
};
}
public static function addSound(_arg1:Sound, _arg2:Object=null):void{
if (_arg2 == null){
_arg2 = new Object();
};
_arg2.dispose = false;
if (_arg2.name == null){
if (_arg2.dontPlay == true){
return;
};
_arg2.name = generateName();
_arg2.dispose = true;
} else {
if (sounds[_arg2.name] != null){
_stopSound(sounds[_arg2.name]);
};
};
_arg2.sound = _arg1;
_arg2.className = getQualifiedClassName(_arg1);
if (_arg2.volume == null){
_arg2.volume = 1;
};
if (_arg2.pan == null){
_arg2.pan = 0;
};
if (_arg2.loop == null){
_arg2.loop = 0;
};
if (_arg2.once == null){
_arg2.once = false;
};
if (_arg2.delay == null){
_arg2.delay = 0;
};
if (_arg2.start == null){
_arg2.start = 0;
};
if (_arg2.isBG == null){
_arg2.isBG = false;
};
sounds[_arg2.name] = _arg2;
if (_arg2.dontPlay != true){
if (_arg2.delay > 0){
sounds[_arg2.name].timeoutId = setTimeout(checkAndPlay, _arg2.delay, _arg2);
} else {
checkAndPlay(_arg2);
};
};
}
private static function generateName():String{
return (String(counter++));
}
private static function _playSequenceSound(_arg1:Object):void{
_arg1.channel = _arg1.sound.play(_arg1.start, _arg1.loop, new SoundTransform(((_arg1.volume * _arg1.isBG)) ? bgVolume : fxVolume, _arg1.pan));
if (_arg1.channel != null){
_arg1.channel.addEventListener(Event.SOUND_COMPLETE, handleSequenceSoundComplete);
channels[_arg1.channel] = _arg1.name;
};
}
private static function _stopSound(_arg1:Object):void{
if (_arg1.channel != null){
delete channels[_arg1.channel];
_arg1.channel.removeEventListener(Event.SOUND_COMPLETE, handleSoundComplete);
_arg1.channel.stop();
_arg1.channel = null;
if (_arg1.dispose){
_removeSound(_arg1);
};
};
}
}
}//package com.tweegee.games
Section 13
//AdlibToolbar (AdlibToolbar)
package {
import flash.events.*;
import flash.filters.*;
import flash.display.*;
import flash.utils.*;
public class AdlibToolbar extends MovieClip {
private const OFF:Object;
private const ON:Object;
private var shown:Boolean;
private var _icon:String;
private var _height:Number;// = 0
private var buttons:Dictionary;
private var _position:String;
private var _animate:Boolean;
public var mc_Toolbar:MovieClip;
private var _width:Number;// = 0
private var spriteIcon:MovieClip;
public function AdlibToolbar():void{
ON = new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]);
OFF = new ColorMatrixFilter([1, 0, 0, 0, -100, 0, 1, 0, 0, -100, 0, 0, 1, 0, -100, 0, 0, 0, 1, 0, 0, 0, 0, 0]);
_width = 0;
_height = 0;
super();
addFrameScript(0, frame1, 14, frame15, 29, frame30);
buttons = new Dictionary();
initGUI();
draw();
initButton(mc_Toolbar.btn_FX);
initButton(mc_Toolbar.btn_All);
mc_Toolbar.mc_IconHolder.addEventListener(MouseEvent.ROLL_OVER, hanldeIconButtonEvent);
mc_Toolbar.mc_IconHolder.addEventListener(MouseEvent.ROLL_OUT, hanldeIconButtonEvent);
mc_Toolbar.mc_IconHolder.addEventListener(MouseEvent.CLICK, hanldeIconButtonEvent);
animate = true;
position = "top";
icon = "SpriteSoundIcon";
}
private function hanldeIconButtonEvent(_arg1:MouseEvent):void{
switch (_arg1.type){
case MouseEvent.ROLL_OVER:
if (spriteIcon != null){
spriteIcon.filters = new Array(new DropShadowFilter(0, 0, 0xFFFFFF, 1, 5, 5, 10));
};
break;
case MouseEvent.ROLL_OUT:
if (spriteIcon != null){
spriteIcon.filters = new Array(new DropShadowFilter(1, 45, 0, 1, 3, 3, 1, 3));
};
break;
case MouseEvent.CLICK:
if (shown){
hide();
} else {
show();
};
break;
};
}
private function initGUI():void{
_width = width;
_height = height;
scaleX = 1;
scaleY = 1;
}
public function get position():String{
return (_position);
}
protected function draw():void{
}
private function initButton(_arg1:MovieClip):void{
_arg1.buttonMode = true;
_arg1.addEventListener(MouseEvent.ROLL_OVER, handleButtonEvent);
_arg1.addEventListener(MouseEvent.ROLL_OUT, handleButtonEvent);
_arg1.addEventListener(MouseEvent.MOUSE_UP, handleButtonEvent);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, handleButtonEvent);
_arg1.addEventListener(MouseEvent.CLICK, handleButtonEvent);
buttons[_arg1] = true;
}
public function set position(_arg1:String):void{
_position = _arg1;
if (_position == "top"){
gotoAndStop(1);
mc_Toolbar.mc_IconHolder.y = 95;
} else {
if (_position == "bottom"){
mc_Toolbar.mc_IconHolder.y = -46;
gotoAndStop(15);
};
};
}
private function handleButtonEvent(_arg1:MouseEvent):void{
var button:MovieClip;
var Adlib:Class;
var evt = _arg1;
button = MovieClip(evt.currentTarget);
switch (evt.type){
case MouseEvent.ROLL_OVER:
buttons[button];
button.filters = new Array((buttons[button]) ? ON : OFF, new DropShadowFilter(0, 0, 0xFFFFFF, 1, 3, 3, 1, 3));
break;
case MouseEvent.ROLL_OUT:
case MouseEvent.MOUSE_UP:
button.filters = new Array((buttons[button]) ? ON : OFF, new DropShadowFilter(1, 45, 0, 1, 3, 3, 1, 3));
break;
case MouseEvent.MOUSE_DOWN:
button.filters = [(buttons[button]) ? ON : OFF, new DropShadowFilter(1, 45, 0, 1, 3, 3, 1, 3, true), new DropShadowFilter(0, 0, 0xFFFFFF, 1, 5, 5, 1.5, 3)];
break;
case MouseEvent.CLICK:
hide();
buttons[button] = !(buttons[button]);
button.filters = new Array((buttons[button]) ? ON : OFF, new DropShadowFilter(1, 45, 0, 1, 3, 3, 1, 3));
try {
Adlib = (getDefinitionByName("com.tweegee.games.Adlib") as Class);
if (button == mc_Toolbar.btn_FX){
if (Adlib["isMute"].call(NaN, Adlib.FX_ONLY)){
Adlib["unMute"].call(NaN, Adlib.FX_ONLY);
} else {
Adlib["mute"].call(NaN, Adlib.FX_ONLY);
};
} else {
if (button == mc_Toolbar.btn_All){
if (Adlib["isMute"].call(NaN, Adlib.BG_ONLY)){
Adlib["unMute"].call(NaN, Adlib.BG_ONLY);
} else {
Adlib["mute"].call(NaN, Adlib.BG_ONLY);
};
};
};
} catch(err:Error) {
};
break;
};
}
private function hide():void{
if (shown){
if (position == "top"){
gotoAndPlay(16);
} else {
if (position == "bottom"){
gotoAndPlay(2);
};
};
shown = false;
};
}
function frame1(){
stop();
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
draw();
}
function frame15(){
stop();
}
public function get icon():String{
return (_icon);
}
function frame30(){
stop();
}
public function set animate(_arg1:Boolean):void{
_animate = _arg1;
if (_animate){
mc_Toolbar.mc_IconHolder.play();
} else {
mc_Toolbar.mc_IconHolder.gotoAndStop(15);
};
}
public function get animate():Boolean{
return (_animate);
}
public function set icon(_arg1:String):void{
var iconClass:Class;
var value = _arg1;
_icon = value;
try {
iconClass = (getDefinitionByName(icon) as Class);
if (iconClass != null){
spriteIcon = (new (iconClass) as MovieClip);
spriteIcon.buttonMode = true;
mc_Toolbar.mc_IconHolder.mc_Icon.addChild(spriteIcon);
spriteIcon.filters = new Array(new DropShadowFilter(1, 45, 0, 1, 3, 3, 1, 3));
mc_Toolbar.mc_IconHolder.mc_Icon.getChildAt(0).alpha = 0;
};
} catch(err:Error) {
};
animate = animate;
}
private function show():void{
if (!shown){
if (position == "top"){
gotoAndPlay(2);
} else {
if (position == "bottom"){
gotoAndPlay(16);
};
};
shown = true;
};
}
}
}//package
Section 14
//Background (Background)
package {
import flash.display.*;
public dynamic class Background extends Sprite {
public var bgmc:MovieClip;
}
}//package
Section 15
//ClassMute2 (ClassMute2)
package {
import flash.display.*;
public dynamic class ClassMute2 extends MovieClip {
}
}//package
Section 16
//InfoBordMc (InfoBordMc)
package {
import flash.display.*;
public dynamic class InfoBordMc extends Sprite {
}
}//package
Section 17
//M1 (M1)
package {
import flash.display.*;
public dynamic class M1 extends Sprite {
}
}//package
Section 18
//M2 (M2)
package {
import flash.display.*;
public dynamic class M2 extends Sprite {
}
}//package
Section 19
//M3 (M3)
package {
import flash.display.*;
public dynamic class M3 extends Sprite {
}
}//package
Section 20
//M4 (M4)
package {
import flash.display.*;
public dynamic class M4 extends Sprite {
}
}//package
Section 21
//M5 (M5)
package {
import flash.display.*;
public dynamic class M5 extends Sprite {
}
}//package
Section 22
//M6 (M6)
package {
import flash.display.*;
public dynamic class M6 extends Sprite {
}
}//package
Section 23
//Main (Main)
package {
import flash.events.*;
import caurina.transitions.*;
import flash.filters.*;
import flash.display.*;
import com.tweegee.games.*;
import caurina.transitions.properties.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
public class Main extends MovieClip {
private var restartMc:RestartMc;
private var timeisover:Boolean;
private var scorePoints:Number;// = 40
private var startButton:StartButton;
private var gridNumber:Number;// = 8
public var btn_Mute:AdlibToolbar;
private var min:String;
private var sec:String;
private var gridMcX:Number;// = 348
private var gridMcY:Number;// = 30
var myGlowIn:GlowFilter;
private var startBg:StartBg;
private var mcArray:Array;
private var halfSplitL:Number;
private var mcNumber:Number;// = 5
private var score:Number;// = 0
private var towMcXY:Array;
private var logoMc:Sprite;
private var halfSplitR:Number;
private var timetotal:Number;// = 5
private var tempMcsArray:Array;
private var toRemoveMcsArray:Array;
private var time:Number;// = 0
private var mcHolder:Sprite;
private var towCount:Number;// = 0
private var _isLogin:String;
private var startLogo:StartLogo;
var myGlowOut:GlowFilter;
private var totalPointsMc:TotalPointsMc;
private var timeMc:TimeMc;
private var timer:Timer;
private var timeMinute:Number;
private var LOGIN:String;// = "login"
private var removefrom4R:Number;// = 0
private var removefrom4L:Number;// = 0
private var have3Array:Boolean;// = false
private var background:Background;
private var removeEndPointL:Number;// = 0
private var removeEndPointR:Number;// = 0
private var allMcsArray:Array;
private var infoBordMc:InfoBordMc;
private var LOGOUT:String;// = "logout"
private var saveScoreMc:SaveScoreMc;
private var gridMcSize:Number;// = 48
private var timeSecond:Number;
private var startZamba:StartZamba;
private var _saveScore:Function;
private var scoreMc:ScoreMc;
private var _stage:Stage;
public function Main(){
mcNumber = 5;
gridNumber = 8;
gridMcSize = 48;
gridMcX = 348;
gridMcY = 30;
mcArray = [M1, M2, M3, M4, M5, M6];
have3Array = false;
towCount = 0;
halfSplitL = Math.floor((gridNumber / 2));
halfSplitR = (gridNumber - halfSplitL);
removefrom4L = 0;
removeEndPointL = 0;
removefrom4R = 0;
removeEndPointR = 0;
myGlowIn = new GlowFilter(16711075, 1, 12, 12, 3, 1, false, false);
myGlowOut = new GlowFilter(16711075, 0, 0, 0, 3, 1, false, false);
score = 0;
scorePoints = 40;
time = 0;
timetotal = 5;
LOGIN = "login";
LOGOUT = "logout";
super();
initGame(stage, mySaveScore, "logout");
__setProp_btn_Mute_Scene1_Layer2_1();
}
private function timerFunction(_arg1:TimerEvent):void{
time++;
timeMinute = ((timetotal - Math.floor((time / 60))) - 1);
timeSecond = (60 - (time % 60));
min = timeMinute.toString();
sec = timeSecond.toString();
if (timeSecond < 10){
sec = ("0" + timeSecond);
};
if (timeSecond == 60){
sec = "00";
min = (timeMinute + 1).toString();
};
timeMc.timeTxt.text = ((min + ":") + sec);
timeMc.timeBar1.x = ((timeMc.timeBar.width - (timeMc.timeBar1.width / 2)) * (time / (60 * timetotal)));
}
private function setg():void{
var _local1:Shape;
var _local2:Sprite;
background = new Background();
background.x = -39;
background.y = -12;
addChild(background);
_local1 = new Shape();
_local1.graphics.beginFill(0xFFFFFF);
_local1.graphics.drawRect(gridMcX, gridMcY, (gridNumber * gridMcSize), (gridNumber * gridMcSize));
addChild(_local1);
_local1.alpha = 0;
mcHolder = new Sprite();
mcHolder.x = gridMcX;
mcHolder.y = gridMcY;
addChild(mcHolder);
_local2 = new Sprite();
_local2.graphics.beginFill(0xFF0000);
_local2.graphics.drawRect(0, 0, (gridNumber * gridMcSize), (gridNumber * gridMcSize));
_local2.x = gridMcX;
_local2.y = gridMcY;
addChild(_local2);
mcHolder.mask = _local2;
scoreMc = new ScoreMc();
scoreMc.x = 70;
scoreMc.y = 25;
TextField(scoreMc.scoreTxt).autoSize = TextFormatAlign.LEFT;
scoreMc.scoreTxt.text = String(score);
addChild(scoreMc);
timeMc = new TimeMc();
timeMc.x = 90;
timeMc.y = 70;
timeMc.timeTxt.text = String((timetotal + ":00"));
addChild(timeMc);
infoBordMc = new InfoBordMc();
infoBordMc.x = 386;
infoBordMc.y = 225;
totalPointsMc = new TotalPointsMc();
totalPointsMc.x = 386;
totalPointsMc.y = 200;
restartMc = new RestartMc();
restartMc.x = 400;
restartMc.y = 0xFF;
restartMc.buttonMode = true;
restartMc.addEventListener(MouseEvent.MOUSE_DOWN, tryagainFunc);
saveScoreMc = new SaveScoreMc();
saveScoreMc.x = 270;
saveScoreMc.y = 0xFF;
saveScoreMc.buttonMode = true;
saveScoreMc.addEventListener(MouseEvent.MOUSE_DOWN, saveScoreFunc);
setChildIndex(btn_Mute, (numChildren - 1));
towMcXY = new Array();
toRemoveMcsArray = new Array();
setChildIndex(logoMc, (numChildren - 1));
init();
}
function __setProp_btn_Mute_Scene1_Layer2_1(){
try {
btn_Mute["componentInspectorSetting"] = true;
} catch(e:Error) {
};
btn_Mute.animate = true;
btn_Mute.icon = "ClassMute2";
btn_Mute.position = "bottom";
try {
btn_Mute["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function startTime():void{
timer.start();
}
private function initSounds():void{
Adlib.addSound(new SoundBackground(), {volume:2, name:"BackgroundLoop", loop:int.MAX_VALUE, isBG:true});
Adlib.addSound(new SoundBell3(), {volume:1, name:"bell3", dontPlay:true});
}
private function removeAndReplace():void{
var i:Number;
var z:Number;
var q:Number;
var j:Number;
var r:Number;
var mcsprite:Sprite;
var h:Number;
i = 2;
while (i < (gridNumber + 2)) {
i = (i + 1);
};
i = 2;
while (i < (gridNumber + 2)) {
z = ((halfSplitL - 1) + 2);
while (z >= (0 + 2)) {
q = 0;
while (q < toRemoveMcsArray.length) {
if ((((i == toRemoveMcsArray[q][0])) && ((z == toRemoveMcsArray[q][1])))){
mcHolder.removeChild(allMcsArray[i][z].sprite);
allMcsArray[i][z] = null;
};
q = (q + 1);
};
z = (z - 1);
};
removefrom4L = 0;
removeEndPointL = 0;
j = 2;
while (j <= ((halfSplitL - 1) + 2)) {
if (allMcsArray[i][j] == null){
removeEndPointL = j;
if (j == 2){
removefrom4L++;
allMcsArray[i][2] = {id:Math.ceil((Math.random() * mcNumber)), toString:function ():String{
return (this.id);
}};
mcsprite = (new (mcArray[(allMcsArray[i][2].id - 1)]) as Sprite);
mcsprite.addEventListener(MouseEvent.MOUSE_DOWN, startSwap);
allMcsArray[i][2].sprite = mcsprite;
mcsprite.buttonMode = true;
mcHolder.addChild(mcsprite);
mcsprite.x = ((gridMcSize / 2) - (removefrom4L * gridMcSize));
mcsprite.y = ((gridMcSize * (i - 2)) + (gridMcSize / 2));
removeEndPointL = 2;
};
if (j > 2){
removefrom4L++;
h = j;
while (h > 2) {
allMcsArray[i][h] = allMcsArray[i][(h - 1)];
allMcsArray[i][(h - 1)] = null;
h = (h - 1);
};
allMcsArray[i][2] = {id:Math.ceil((Math.random() * mcNumber)), toString:function ():String{
return (this.id);
}};
mcsprite = (new (mcArray[(allMcsArray[i][2].id - 1)]) as Sprite);
mcsprite.addEventListener(MouseEvent.MOUSE_DOWN, startSwap);
allMcsArray[i][2].sprite = mcsprite;
mcsprite.buttonMode = true;
mcHolder.addChild(mcsprite);
mcsprite.x = ((gridMcSize / 2) - (removefrom4L * gridMcSize));
mcsprite.y = ((gridMcSize * (i - 2)) + (gridMcSize / 2));
};
};
j = (j + 1);
};
r = ((removeEndPointL + 1) - 2);
while (r > 0) {
Tweener.addTween(allMcsArray[i][removeEndPointL].sprite, {x:((gridMcSize * (removeEndPointL - 2)) + (gridMcSize / 2)), y:((gridMcSize * (i - 2)) + (gridMcSize / 2)), time:0.5, transition:"easeOutQuint"});
removeEndPointL--;
r = (r - 1);
};
z = (halfSplitL + 2);
while (z <= ((gridNumber - 1) + 2)) {
q = 0;
while (q < toRemoveMcsArray.length) {
if ((((i == toRemoveMcsArray[q][0])) && ((z == toRemoveMcsArray[q][1])))){
mcHolder.removeChild(allMcsArray[i][z].sprite);
allMcsArray[i][z] = null;
};
q = (q + 1);
};
z = (z + 1);
};
removefrom4R = 0;
removeEndPointR = 0;
j = ((gridNumber - 1) + 2);
while (j >= (halfSplitL + 2)) {
if (allMcsArray[i][j] == null){
removeEndPointR = j;
if (j == ((gridNumber + 2) - 1)){
removefrom4R++;
allMcsArray[i][((gridNumber + 2) - 1)] = {id:Math.ceil((Math.random() * mcNumber)), toString:function ():String{
return (this.id);
}};
mcsprite = (new (mcArray[(allMcsArray[i][((gridNumber + 2) - 1)].id - 1)]) as Sprite);
mcsprite.addEventListener(MouseEvent.MOUSE_DOWN, startSwap);
allMcsArray[i][((gridNumber + 2) - 1)].sprite = mcsprite;
mcsprite.buttonMode = true;
mcHolder.addChild(mcsprite);
mcsprite.x = ((((gridNumber * gridMcSize) + (gridMcSize / 2)) + (removefrom4R * gridMcSize)) - gridMcSize);
mcsprite.y = ((gridMcSize * (i - 2)) + (gridMcSize / 2));
removeEndPointR = ((gridNumber + 2) - 1);
};
if (j < ((gridNumber + 2) - 1)){
removefrom4R++;
h = j;
while (h < ((gridNumber + 2) - 1)) {
allMcsArray[i][h] = allMcsArray[i][(h + 1)];
allMcsArray[i][(h + 1)] = null;
h = (h + 1);
};
allMcsArray[i][((gridNumber + 2) - 1)] = {id:Math.ceil((Math.random() * mcNumber)), toString:function ():String{
return (this.id);
}};
mcsprite = (new (mcArray[(allMcsArray[i][((gridNumber + 2) - 1)].id - 1)]) as Sprite);
mcsprite.addEventListener(MouseEvent.MOUSE_DOWN, startSwap);
allMcsArray[i][((gridNumber + 2) - 1)].sprite = mcsprite;
mcsprite.buttonMode = true;
mcHolder.addChild(mcsprite);
mcsprite.x = ((((gridNumber * gridMcSize) + (gridMcSize / 2)) + (removefrom4R * gridMcSize)) - gridMcSize);
mcsprite.y = ((gridMcSize * (i - 2)) + (gridMcSize / 2));
};
};
j = (j - 1);
};
if (removeEndPointR > ((halfSplitL + 2) - 1)){
r = ((gridNumber + 2) - removeEndPointR);
while (r > 0) {
Tweener.addTween(allMcsArray[i][removeEndPointR].sprite, {x:((gridMcSize * (removeEndPointR - 2)) + (gridMcSize / 2)), y:((gridMcSize * (i - 2)) + (gridMcSize / 2)), time:0.5, transition:"easeOutQuint"});
removeEndPointR++;
r = (r - 1);
};
};
i = (i + 1);
};
i = 2;
while (i < (gridNumber + 2)) {
i = (i + 1);
};
Tweener.addTween(this, {time:0.5, onComplete:checkAgainFor3});
}
private function mySaveScore(_arg1:int):void{
}
private function timeEnd(_arg1:Event):void{
var _local2:Number;
trace("time end");
timeisover = true;
if (towCount < 2){
gameIsOver();
};
}
public function restartGame():void{
while (mcHolder.numChildren > 0) {
mcHolder.removeChildAt((mcHolder.numChildren - 1));
};
towCount = 0;
time = 0;
timeMc.timeBar1.x = ((timeMc.timeBar.width - timeMc.timeBar1.width) * (time / (60 * timetotal)));
score = 0;
scoreMc.scoreTxt.text = String(score);
timeMc.timeTxt.text = String((timetotal + ":00"));
allMcsArray.splice(0);
tempMcsArray.splice(0);
towMcXY.splice(0);
timeisover = false;
init();
}
private function replaceTwo():void{
Tweener.addTween(towMcXY[0][4], {x:towMcXY[1][0], y:towMcXY[1][1], time:0.5, transition:"easeOutQuint"});
Tweener.addTween(towMcXY[1][4], {x:towMcXY[0][0], y:towMcXY[0][1], time:0.5, transition:"easeOutQuint", onComplete:side2side});
}
private function tryagainFunc(_arg1:MouseEvent):void{
if ((((score > 0)) && ((_isLogin == LOGIN)))){
removeChild(saveScoreMc);
};
removeChild(restartMc);
removeChild(totalPointsMc);
removeChild(infoBordMc);
restartGame();
}
private function fadeeffect():void{
var _local1:*;
Adlib.playSound("bell3");
for each (_local1 in toRemoveMcsArray) {
Tweener.addTween(allMcsArray[_local1[0]][_local1[1]].sprite, {_filter:myGlowIn, time:0.3, transition:"easeOutQuint"});
Tweener.addTween(allMcsArray[_local1[0]][_local1[1]].sprite, {alpha:0, time:0.5, transition:"easeInQuint"});
};
score = (score + (scorePoints * toRemoveMcsArray.length));
scoreMc.scoreTxt.text = String(score);
Tweener.addTween(this, {time:0.5, onComplete:removeAndReplace});
}
private function init():void{
var i:Number;
var z:Number;
var q:Number;
var rnd:Number;
var mcsprite:Sprite;
timer = new Timer(1000, (60 * timetotal));
timer.addEventListener(TimerEvent.TIMER, timerFunction);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, timeEnd);
FilterShortcuts.init();
tempMcsArray = new Array();
q = 0;
while (q < mcNumber) {
tempMcsArray.push((q + 1));
q = (q + 1);
};
allMcsArray = new Array((gridNumber + (2 * 2)));
i = 0;
while (i < (gridNumber + (2 * 2))) {
allMcsArray[i] = new Array((gridNumber + (2 * 2)));
z = 0;
while (z < (gridNumber + (2 * 2))) {
allMcsArray[i][z] = {id:10, toString:function ():String{
return (this.id);
}};
z = (z + 1);
};
i = (i + 1);
};
i = 2;
while (i < (gridNumber + 2)) {
rnd = ((Math.random() * 0.8) + 0.2);
z = 2;
while (z < (gridNumber + 2)) {
allMcsArray[i][z] = {id:Math.ceil((Math.random() * mcNumber)), toString:function ():String{
return (this.id);
}};
if ((((((allMcsArray[i][z].id == allMcsArray[i][(z - 1)].id)) && ((allMcsArray[i][z].id == allMcsArray[i][(z - 2)].id)))) || ((((allMcsArray[i][z].id == allMcsArray[(i - 1)][z].id)) && ((allMcsArray[i][z].id == allMcsArray[(i - 2)][z].id)))))){
if (allMcsArray[i][(z - 1)].id == allMcsArray[i][(z - 2)].id){
if (allMcsArray[i][(z - 1)].id != 10){
tempMcsArray.splice(tempMcsArray.indexOf(allMcsArray[i][(z - 1)].id), 1);
};
};
if (allMcsArray[(i - 1)][z].id == allMcsArray[(i - 2)][z].id){
if (allMcsArray[(i - 1)][z].id != 10){
tempMcsArray.splice(tempMcsArray.indexOf(allMcsArray[(i - 1)][z].id), 1);
};
};
allMcsArray[i][z] = {id:tempMcsArray[Math.floor((Math.random() * tempMcsArray.length))], toString:function ():String{
return (this.id);
}};
};
tempMcsArray.splice(0);
q = 0;
while (q < mcNumber) {
tempMcsArray.push((q + 1));
q = (q + 1);
};
mcsprite = (new (mcArray[(allMcsArray[i][z].id - 1)]) as Sprite);
mcsprite.addEventListener(MouseEvent.MOUSE_DOWN, startSwap);
allMcsArray[i][z].sprite = mcsprite;
mcHolder.addChild(mcsprite);
mcsprite.x = ((((z - 2) * gridMcSize) + (gridMcSize / 2)) - (gridMcSize * gridNumber));
mcsprite.y = (((i - 2) * gridMcSize) + (gridMcSize / 2));
mcsprite.buttonMode = true;
Tweener.addTween(mcsprite, {x:(((z - 2) * gridMcSize) + (gridMcSize / 2)), time:rnd, transition:"easeOutCubic"});
z = (z + 1);
};
i = (i + 1);
};
Tweener.addTween(this, {time:1, onComplete:startTime});
}
private function startSwap(_arg1:MouseEvent):void{
if ((((timeisover == false)) && ((timer.running == true)))){
if (towCount < 2){
towMcXY[towCount] = [_arg1.target.x, _arg1.target.y, allMcsArray[(2 + ((_arg1.target.y - (gridMcSize / 2)) / gridMcSize))][(2 + ((_arg1.target.x - (gridMcSize / 2)) / gridMcSize))], allMcsArray[(2 + ((_arg1.target.y - (gridMcSize / 2)) / gridMcSize))][(2 + ((_arg1.target.x - (gridMcSize / 2)) / gridMcSize))].id, allMcsArray[(2 + ((_arg1.target.y - (gridMcSize / 2)) / gridMcSize))][(2 + ((_arg1.target.x - (gridMcSize / 2)) / gridMcSize))].sprite];
Tweener.addTween(towMcXY[towCount][4], {_filter:myGlowIn, time:0.3, transition:"easeOutQuint"});
};
towCount++;
if (towCount == 2){
replaceTwo();
};
};
}
private function infoBord():void{
addChild(totalPointsMc);
totalPointsMc.totalPointsTxt.text = String(score);
addChild(restartMc);
setChildIndex(logoMc, (numChildren - 1));
if ((((score > 0)) && ((_isLogin == LOGIN)))){
addChild(saveScoreMc);
};
}
public function initGame(_arg1:Stage, _arg2:Function, _arg3:String):void{
_stage = _arg1;
_saveScore = _arg2;
_isLogin = _arg3;
logoMc = new tweegeeLogo();
logoMc.x = 60;
logoMc.y = (_arg1.stageHeight - logoMc.height);
logoMc.addEventListener(MouseEvent.CLICK, handleLogoClick);
logoMc.buttonMode = true;
addChild(logoMc);
initSounds();
opening();
}
private function backReplaceTwo():void{
Tweener.addTween(towMcXY[0][4], {x:towMcXY[0][0], y:towMcXY[0][1], time:0.2, transition:"linear"});
Tweener.addTween(towMcXY[1][4], {x:towMcXY[1][0], y:towMcXY[1][1], time:0.2, transition:"linear"});
Tweener.addTween(this, {time:0.2, onComplete:canClick});
towMcXY.splice(0);
}
private function opening():void{
startBg = new StartBg();
startBg.x = -70;
startBg.y = -6;
addChild(startBg);
startLogo = new StartLogo();
startLogo.x = (775 / 2);
startLogo.y = (450 + 200);
addChild(startLogo);
Tweener.addTween(startLogo, {delay:0.2, y:((450 / 2) - 40), time:1, transition:"easeOutBack"});
startZamba = new StartZamba();
startZamba.x = (775 / 2);
startZamba.y = -200;
addChild(startZamba);
Tweener.addTween(startZamba, {delay:1, y:((450 - 100) - 40), time:0.6, transition:"easeOutBack"});
startButton = new StartButton();
startButton.x = (775 / 2);
startButton.y = (450 + 70);
addChild(startButton);
Tweener.addTween(startButton, {delay:1.4, y:(450 - 70), time:0.6, transition:"easeOutBack"});
setChildIndex(logoMc, (numChildren - 1));
startButton.addEventListener(MouseEvent.MOUSE_DOWN, startPlayButton);
}
private function handleLogoClick(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var e = _arg1;
url = "http://www.tweegee.com/ch/main/Affiliation.aspx?AffCamId=6c953391-991b-41b2-8e39-69bbc2751e63";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
private function saveScoreFunc(_arg1:MouseEvent):void{
_saveScore.call(this, score);
if ((((score > 0)) && ((_isLogin == LOGIN)))){
removeChild(saveScoreMc);
};
removeChild(restartMc);
removeChild(totalPointsMc);
removeChild(infoBordMc);
}
private function startPlayButton(_arg1:MouseEvent):void{
removeChild(startBg);
removeChild(startLogo);
removeChild(startZamba);
removeChild(startButton);
setg();
}
private function side2side():void{
Tweener.addTween(towMcXY[0][4], {_filter:myGlowOut, time:0.3, transition:"easeOutQuint"});
Tweener.addTween(towMcXY[1][4], {_filter:myGlowOut, time:0.3, transition:"easeOutQuint"});
if (((((((((((towMcXY[0][0] - towMcXY[1][0]) == gridMcSize)) && (((towMcXY[0][1] - towMcXY[1][1]) == 0)))) || (((((towMcXY[0][0] - towMcXY[1][0]) == (0 - gridMcSize))) && (((towMcXY[0][1] - towMcXY[1][1]) == 0)))))) || (((((towMcXY[0][1] - towMcXY[1][1]) == gridMcSize)) && (((towMcXY[0][0] - towMcXY[1][0]) == 0)))))) || (((((towMcXY[0][1] - towMcXY[1][1]) == (0 - gridMcSize))) && (((towMcXY[0][0] - towMcXY[1][0]) == 0)))))){
replaceObjectInArray();
} else {
backReplaceTwo();
};
}
private function canClick():void{
towCount = 0;
}
private function replaceObjectInArray():void{
var _local1:Number;
towMcXY[0][2].id = towMcXY[1][3];
towMcXY[0][2].sprite = towMcXY[1][4];
towMcXY[1][2].id = towMcXY[0][3];
towMcXY[1][2].sprite = towMcXY[0][4];
_local1 = 2;
while (_local1 < (gridNumber + 2)) {
_local1++;
};
checkFor3();
if (have3Array == false){
towMcXY[0][2].id = towMcXY[0][3];
towMcXY[0][2].sprite = towMcXY[0][4];
towMcXY[1][2].id = towMcXY[1][3];
towMcXY[1][2].sprite = towMcXY[1][4];
backReplaceTwo();
};
if (have3Array == true){
fadeeffect();
towMcXY.splice(0);
};
}
private function gameIsOver():void{
trace("game is over");
addChild(infoBordMc);
setChildIndex(logoMc, (numChildren - 1));
infoBordMc.scaleX = (infoBordMc.scaleY = 0.2);
Tweener.addTween(infoBordMc, {scaleX:1, scaleY:1, time:0.5, transition:"easeInQuint", onComplete:infoBord});
}
private function checkFor3():void{
var _local1:Number;
var _local2:Number;
have3Array = false;
toRemoveMcsArray.splice(0);
_local1 = 2;
while (_local1 < (gridNumber + 2)) {
_local2 = 2;
while (_local2 < (gridNumber + 2)) {
if ((((allMcsArray[_local1][_local2].id == allMcsArray[_local1][(_local2 - 1)].id)) && ((allMcsArray[_local1][_local2].id == allMcsArray[_local1][(_local2 - 2)].id)))){
have3Array = true;
toRemoveMcsArray.push([_local1, _local2], [_local1, (_local2 - 1)], [_local1, (_local2 - 2)]);
};
if ((((allMcsArray[_local1][_local2].id == allMcsArray[(_local1 - 1)][_local2].id)) && ((allMcsArray[_local1][_local2].id == allMcsArray[(_local1 - 2)][_local2].id)))){
have3Array = true;
toRemoveMcsArray.push([_local1, _local2], [(_local1 - 1), _local2], [(_local1 - 2), _local2]);
};
_local2++;
};
_local1++;
};
_local1 = 1;
while (_local1 < toRemoveMcsArray.length) {
_local2 = 0;
while (_local2 < _local1) {
if ((((toRemoveMcsArray[_local1][0] == toRemoveMcsArray[_local2][0])) && ((toRemoveMcsArray[_local1][1] == toRemoveMcsArray[_local2][1])))){
toRemoveMcsArray.splice(_local1, 1);
_local1--;
};
_local2++;
};
_local1++;
};
}
private function checkAgainFor3():void{
var _local1:Number;
checkFor3();
if (have3Array == true){
fadeeffect();
};
if (have3Array == false){
towCount = 0;
if (timeisover == true){
gameIsOver();
};
};
}
}
}//package
Section 24
//RestartMc (RestartMc)
package {
import flash.display.*;
public dynamic class RestartMc extends Sprite {
}
}//package
Section 25
//SaveScoreMc (SaveScoreMc)
package {
import flash.display.*;
public dynamic class SaveScoreMc extends Sprite {
}
}//package
Section 26
//ScoreMc (ScoreMc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ScoreMc extends Sprite {
public var scoreTxt:TextField;
}
}//package
Section 27
//SoundBackground (SoundBackground)
package {
import flash.media.*;
public dynamic class SoundBackground extends Sound {
}
}//package
Section 28
//SoundBell3 (SoundBell3)
package {
import flash.media.*;
public dynamic class SoundBell3 extends Sound {
}
}//package
Section 29
//StartBg (StartBg)
package {
import flash.display.*;
public dynamic class StartBg extends Sprite {
}
}//package
Section 30
//StartButton (StartButton)
package {
import flash.display.*;
public dynamic class StartButton extends Sprite {
}
}//package
Section 31
//StartLogo (StartLogo)
package {
import flash.display.*;
public dynamic class StartLogo extends Sprite {
}
}//package
Section 32
//StartZamba (StartZamba)
package {
import flash.display.*;
public dynamic class StartZamba extends Sprite {
}
}//package
Section 33
//TimeMc (TimeMc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TimeMc extends Sprite {
public var timeBar:MovieClip;
public var timeTxt:TextField;
public var timeBar1:MovieClip;
}
}//package
Section 34
//TotalPointsMc (TotalPointsMc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TotalPointsMc extends Sprite {
public var totalPointsTxt:TextField;
}
}//package
Section 35
//tweegeeLogo (tweegeeLogo)
package {
import flash.display.*;
public dynamic class tweegeeLogo extends MovieClip {
}
}//package