(function (cjs, an) {

var p; // shortcut to reference prototypes
var lib={};var ss={};var img={};
lib.ssMetadata = [
		{name:"soccer2_atlas_P_", frames: [[921,522,95,95],[288,672,95,95],[629,788,95,95],[288,575,95,95],[908,157,95,95],[908,254,95,95],[921,619,95,95],[532,788,95,95],[439,0,287,287],[762,522,14,21],[923,351,14,9],[744,522,16,20],[262,737,15,17],[262,756,10,17],[908,351,13,10],[274,756,12,12],[439,289,9,16],[143,575,143,160],[744,398,256,122],[0,740,260,47],[728,0,267,155],[262,788,268,36],[0,575,141,163],[778,724,141,163],[778,522,141,200],[0,386,448,187],[0,826,463,20],[0,0,437,384],[450,289,292,256],[744,157,162,239],[450,547,162,239],[614,547,162,239]]}
];


// symbols:



(lib.BallRotation11 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation21 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation31 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(2);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation41 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(3);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation51 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(4);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation61 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(5);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation71 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(6);
}).prototype = p = new cjs.Sprite();



(lib.BallRotation81 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(7);
}).prototype = p = new cjs.Sprite();



(lib.ballPSD1 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(8);
}).prototype = p = new cjs.Sprite();



(lib.conf1 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(9);
}).prototype = p = new cjs.Sprite();



(lib.conf2 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(10);
}).prototype = p = new cjs.Sprite();



(lib.conf3 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(11);
}).prototype = p = new cjs.Sprite();



(lib.conf4 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(12);
}).prototype = p = new cjs.Sprite();



(lib.conf5 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(13);
}).prototype = p = new cjs.Sprite();



(lib.conf6 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(14);
}).prototype = p = new cjs.Sprite();



(lib.conf7 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(15);
}).prototype = p = new cjs.Sprite();



(lib.conf8 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(16);
}).prototype = p = new cjs.Sprite();



(lib.goalieCrouchCatch = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(17);
}).prototype = p = new cjs.Sprite();



(lib.goalieLeap1 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(18);
}).prototype = p = new cjs.Sprite();



(lib.goalieLeap1Shadow = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(19);
}).prototype = p = new cjs.Sprite();



(lib.goalieLeap2 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(20);
}).prototype = p = new cjs.Sprite();



(lib.goalieLeap2Shadow = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(21);
}).prototype = p = new cjs.Sprite();



(lib.goalieStand = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(22);
}).prototype = p = new cjs.Sprite();



(lib.goalieStandShadow1 = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(23);
}).prototype = p = new cjs.Sprite();



(lib.goalieStandUp = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(24);
}).prototype = p = new cjs.Sprite();



(lib.net = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(25);
}).prototype = p = new cjs.Sprite();



(lib.netShadow = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(26);
}).prototype = p = new cjs.Sprite();



(lib.superFan = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(27);
}).prototype = p = new cjs.Sprite();



(lib.superFanShadow = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(28);
}).prototype = p = new cjs.Sprite();



(lib.trophyBronzeN = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(29);
}).prototype = p = new cjs.Sprite();



(lib.trophyGoldN = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(30);
}).prototype = p = new cjs.Sprite();



(lib.trophySilverN = function() {
	this.spriteSheet = ss["soccer2_atlas_P_"];
	this.gotoAndStop(31);
}).prototype = p = new cjs.Sprite();
// helper functions:

function mc_symbol_clone() {
	var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop));
	clone.gotoAndStop(this.currentFrame);
	clone.paused = this.paused;
	clone.framerate = this.framerate;
	return clone;
}

function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) {
	var prototype = cjs.extend(symbol, cjs.MovieClip);
	prototype.clone = mc_symbol_clone;
	prototype.nominalBounds = nominalBounds;
	prototype.frameBounds = frameBounds;
	return prototype;
	}


(lib.win = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#FFFFFF").s().p("AgOMlIAAzpIjYAAIAAiUICuhhICVhrICKAAIAAZJg");
	this.shape.setTransform(289.1,253.5);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

	// +
	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("#FFFFFF").s().p("AhjH6IAAmYImUAAIAAjEIGUAAIAAmXIDHAAIAAGXIGVAAIAADEImVAAIAAGYg");
	this.shape_1.setTransform(187.8,264.3);

	this.timeline.addTween(cjs.Tween.get(this.shape_1).wait(1));

	// Layer 4
	this.shape_2 = new cjs.Shape();
	this.shape_2.graphics.f("#006491").s().p("A7VbWQrVrVAAwBQAAwALVrVQLVrVQAAAQQBAALVLVQLVLVAAQAQAAQBrVLVQrVLVwBAAQwAAArVrVg");
	this.shape_2.setTransform(247.5,247.5);

	this.timeline.addTween(cjs.Tween.get(this.shape_2).wait(1));

}).prototype = getMCSymbolPrototype(lib.win, new cjs.Rectangle(0,0,495,495), null);


(lib.trophySilver = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 2
	this.instance = new lib.trophySilverN();
	this.instance.parent = this;
	this.instance.setTransform(-24,0);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.trophySilver, new cjs.Rectangle(-24,0,162,239), null);


(lib.trophyGold = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 2
	this.instance = new lib.trophyGoldN();
	this.instance.parent = this;
	this.instance.setTransform(-24,0);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.trophyGold, new cjs.Rectangle(-24,0,162,239), null);


(lib.trophyFlash = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.rf(["rgba(255,255,255,0.698)","rgba(255,255,255,0)"],[0,1],0,-0.2,0,0,-0.2,57.3).s().p("AnAM7Qi6lWAAnlQAAnkC6lWQC6lXEGAAQEHAAC6FXQC6FWAAHkQAAHli6FWQi6FXkHAAQkGAAi6lXg");
	this.shape.setTransform(63.5,117);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.trophyFlash, new cjs.Rectangle(0,0,127,234), null);


(lib.trophyBronze = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 2
	this.instance = new lib.trophyBronzeN();
	this.instance.parent = this;
	this.instance.setTransform(-24,0);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.trophyBronze, new cjs.Rectangle(-24,0,162,239), null);


(lib.shadowTrophy = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.rf(["rgba(0,0,0,0.498)","rgba(0,0,0,0.247)","rgba(0,0,0,0)"],[0.376,0.769,1],0,0,0,0,0,46.7).s().p("AlIFJQiIiIAAjBQAAjACIiIQCIiIDAAAQDBAACICIQCICIAADAQAADBiICIQiICIjBAAQjAAAiIiIg");
	this.shape.setTransform(46.5,46.5);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.shadowTrophy, new cjs.Rectangle(0,0,93,93), null);


(lib.score_320 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		if(animLang_ar){
			this.gotoAndStop(2);//Arabic
		}else{
			this.gotoAndStop(1);
		}
	}
	this.frame_1 = function() {
		this.score.text = totalHits + "/" + totalKicks;
	}
	this.frame_2 = function() {
		this.score_ar.text = getArabicNumbers(totalHits) + "/" + getArabicNumbers(totalKicks);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1).call(this.frame_2).wait(1));

	// score
	this.score = new cjs.Text("00/000", "50px 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.score.name = "score";
	this.score.lineHeight = 53;
	this.score.lineWidth = 170;
	this.score.parent = this;
	this.score.setTransform(0,-5.9);
	this.score._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score).wait(1).to({_off:false},0).to({_off:true},1).wait(1));

	// score ar
	this.score_ar = new cjs.Text("000\n000", "40px PizzaPressFill-AR, 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.score_ar.name = "score_ar";
	this.score_ar.textAlign = "center";
	this.score_ar.lineHeight = 39;
	this.score_ar.lineWidth = 119;
	this.score_ar.parent = this;
	this.score_ar.setTransform(37.4,-37.2);
	this.score_ar._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score_ar).wait(2).to({_off:false},0).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;


(lib.score = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		if(animLang_ar){
			this.gotoAndStop(2);//Arabic
		}else{
			this.gotoAndStop(1);
		}
	}
	this.frame_1 = function() {
		this.score.text = totalHits + "/" + totalKicks;
	}
	this.frame_2 = function() {
		this.score_ar.text = getArabicNumbers(totalHits) + "/" + getArabicNumbers(totalKicks);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1).call(this.frame_2).wait(1));

	// score
	this.score = new cjs.Text("00/00", "62px 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.score.name = "score";
	this.score.textAlign = "right";
	this.score.lineHeight = 66;
	this.score.lineWidth = 185;
	this.score.parent = this;
	this.score.setTransform(187,0);
	this.score._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score).wait(1).to({_off:false},0).to({_off:true},1).wait(1));

	// score ar
	this.score_ar = new cjs.Text("000\n000", "62px PizzaPressFill-AR, 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.score_ar.name = "score_ar";
	this.score_ar.textAlign = "center";
	this.score_ar.lineHeight = 74;
	this.score_ar.lineWidth = 119;
	this.score_ar.parent = this;
	this.score_ar.setTransform(127.5,2);
	this.score_ar._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score_ar).wait(2).to({_off:false},0).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;


(lib.net_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// net bitmap
	this.instance = new lib.net();
	this.instance.parent = this;
	this.instance.setTransform(18,1);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

	// net shadow
	this.instance_1 = new lib.netShadow();
	this.instance_1.parent = this;
	this.instance_1.setTransform(10,176);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.net_1, new cjs.Rectangle(10,1,463,195), null);


(lib.myParticleEffectContainer = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

}).prototype = getMCSymbolPrototype(lib.myParticleEffectContainer, null, null);


(lib.lose = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// X
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#FFFFFF").s().p("AC9MbIi5pEIgDAAIi8JEIkSAAIE4s/Ikir2IENAAICnH4IAEAAICbn4IEQAAIkXL2IE5M/g");
	this.shape.setTransform(249,254.6);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

	// Layer 3
	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("#E31837").s().p("A7VbWQrVrVAAwBQAAwALVrVQLVrVQAAAQQBAALVLVQLVLVAAQAQAAQBrVLVQrVLVwBAAQwAAArVrVg");
	this.shape_1.setTransform(247.5,247.5);

	this.timeline.addTween(cjs.Tween.get(this.shape_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.lose, new cjs.Rectangle(0,0,495,495), null);


(lib.lightGoalie_win = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.alpha = 0;//wait for parent to turn on, off
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#6CFD30").s().p("AAADpQhfAAhFhEQhEhFAAhgQAAhfBEhFQBFhEBfAAQBgAABFBEQBEBFAABfQAABghEBFQhFBEhgAAIAAAAgAh5h5QgzAyAABHQAABIAzAyQAyAzBHAAQBIAAAygzQAzgyAAhIQAAhHgzgyQgygzhIAAQhHAAgyAzg");
	this.shape.setTransform(20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightGoalie_win, new cjs.Rectangle(-3,-3,46.6,46.6), null);


(lib.lightGoalie_on = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#E31837").s().p("AAADpQhfAAhFhEQhEhFAAhgQAAhfBEhFQBFhEBfAAQBgAABFBEQBEBFAABfQAABghEBFQhFBEhgAAIAAAAgAh5h5QgzAyAABHQAABIAzAyQAyAzBHAAQBIAAAygzQAzgyAAhIQAAhHgzgyQgygzhIAAQhHAAgyAzg");
	this.shape.setTransform(20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightGoalie_on, new cjs.Rectangle(-3,-3,46.6,46.6), null);


(lib.lightGoalie_off = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("rgba(255,255,255,0.6)").ss(6,1,1).p("ADLAAQAABUg8A7Qg7A8hUAAQhTAAg8g8Qg7g7AAhUQAAhTA7g8QA8g7BTAAQBUAAA7A7QA8A8AABTg");
	this.shape.setTransform(20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightGoalie_off, new cjs.Rectangle(-3,-3,46.6,46.6), null);


(lib.lightBall_on = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#0094D7").s().p("AhmBnQgqgrAAg8QAAg7AqgrQArgqA7AAQA8AAArAqQAqArAAA7QAAA8gqArQgrAqg8AAQg7AAgrgqg");
	this.shape.setTransform(14.5,14.5);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightBall_on, new cjs.Rectangle(0,0,29,29), null);


(lib.lightBall_off = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("rgba(255,255,255,0.6)").s().p("AhmBnQgqgrAAg8QAAg7AqgrQArgqA7AAQA8AAArAqQAqArAAA7QAAA8gqArQgrAqg8AAQg7AAgrgqg");
	this.shape.setTransform(14.5,14.5);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightBall_off, new cjs.Rectangle(0,0,29,29), null);


(lib.keyResults = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#E31837").s().p("AhkA9IAAgnIDJAAIAAAngAhkgVIAAgnIDJAAIAAAng");
	this.shape.setTransform(14,73);

	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("#0094D7").s().p("AhkA9IAAgnIDJAAIAAAngAhkgVIAAgnIDJAAIAAAng");
	this.shape_1.setTransform(14,27.5);

	this.shape_2 = new cjs.Shape();
	this.shape_2.graphics.f("#E31837").s().p("AAmCfIglh0IgBAAIglB0Ig3AAIA/imIg6iXIA2AAIAhBlIAAAAIAfhlIA3AAIg4CXIA/Cmg");
	this.shape_2.setTransform(53,72.8);

	this.shape_3 = new cjs.Shape();
	this.shape_3.graphics.f("#0094D7").s().p("AgCChIAAj7IgrAAIAAgdIAjgTIAdgWIAbAAIAAFBg");
	this.shape_3.setTransform(57.4,27.2);

	this.shape_4 = new cjs.Shape();
	this.shape_4.graphics.f("#0094D7").s().p("AgOBMIAAg9Ig8AAIAAgdIA8AAIAAg9IAdAAIAAA9IA8AAIAAAdIg8AAIAAA9g");
	this.shape_4.setTransform(41.9,22.6);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_4},{t:this.shape_3},{t:this.shape_2},{t:this.shape_1},{t:this.shape}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.keyResults, new cjs.Rectangle(0,0,70.8,101.9), null);


(lib.keyBg = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("rgba(0,0,0,0.698)").s().p("ApIIBQhkgBAAhjIAAs5QAAhjBkgBISRAAQBkABAABjIAAM5QAABjhkABg");
	this.shape.setTransform(68.5,51.3);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.keyBg, new cjs.Rectangle(0,0,137,102.5), null);


(lib.goalieStandUp_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 2
	this.instance = new lib.goalieStandUp();
	this.instance.parent = this;
	this.instance.setTransform(0,-39);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieStandUp_1, new cjs.Rectangle(0,-39,141,200), null);


(lib.goalieStandShadow = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieStandShadow1();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieStandShadow, new cjs.Rectangle(0,0,141,163), null);


(lib.goalieStand_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieStand();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieStand_1, new cjs.Rectangle(0,0,141,163), null);


(lib.goalieLeap2_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieLeap2();
	this.instance.parent = this;
	this.instance.setTransform(-5,-16);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieLeap2_1, new cjs.Rectangle(-5,-16,267,155), null);


(lib.goalieLeap1_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieLeap1();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieLeap1_1, new cjs.Rectangle(0,0,256,122), null);


(lib.goalieJumpShadow2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieLeap2Shadow();
	this.instance.parent = this;
	this.instance.setTransform(-134,-18);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-134,-18,268,36);


(lib.goalieJumpShadow1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieLeap1Shadow();
	this.instance.parent = this;
	this.instance.setTransform(-134,-18);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-134,-18,260,47);


(lib.goalieIntroGlow = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#E31837").s().p("AqbNqIAAAAQhegdAAguQgIgcAHgkIAAgCQAFgkAcgqIAZgnQAEgHAEgMIARg7IAAABQAKgoAEgfIAAAAQAGgjALgpIAAABIARhJQAJgmAKgfIAAAAQAFgSABgaQAAgsAMglIAAAAIAAgBQANgnAdgkIAAAAQAZgfAZgTQgYgsgCgjIgEgsQgFgUAMg8IAAAAQAKgzASgmIACgCQANgeANgoQAPgwAUgsIAAABQAYg3AlgbIAAABIBKg3IADgCQATgOAVgLQgHgTAAgOIAAABIgDgfIAAgBIgBgBQgGgfAXgxIAAAAQATgqAbgaIABAAQAighAegFIAAAAQAfgHAhgCQAtgEAYABIABAAQAhgBAqAbIAAAAQApAZAVA1IAAAAIAUA0IABAFQAGAbgBAaIgDAkQAfAKAcAPIAEACQAwAcAjAqQAdAjAZAlQAWAfAQAlIABAAQATAsATAuIAAAAQAHASAGAZIABAGQACAIADAGIACABQARAWAKAfIABADQAKAggJApQgHAggQAfIgCAEIgPAcIADACQAPAMAOANIAEADQAhAiASAtIAAABQAMAhAGAmIAAABQACAMAHAKIACAGQAMAUAIAWQAHAXAEAXIAAABIANBOIAAAAQAHAlAKAlIAAABQAVBRABAwQAKAVAIAIQAkASAMAfIABADIAGAHIAAAAQAPANAQAXIADAFQANAVAEAaIABAEIAAABQACAZgIAVIgCACIAAABIgDAFIgBAFIgCAFQgEAQgXATIgDACQgPAMgqAKIgCABQg4APg4gWIAAAAQgngPglgMIgBAAQg2gSgRgTIABABQgcgbgCgbQgDgUACgVIAAgBQgTgVgIgcQgJgdAGgiIACgJIABgHIAAAAIgBgDIAAAAQgKgagOgXIgBgDQgSgfgOgfIAAgBIgCgFIAAAAQgLgbgFgdIAAAAIAAgCIgNgJIAAAAQgegSgdgxIAAAAQgTgggggjIAAgBIhAhIIgBgBQgYgbgYgOIABAAQgMgHgHgCIgFAAIgEAAQgegEggAUIAAAAQgsAcgLAJIgEADIgbAWIAAAAIgBAAIgBABQgPAMgUAVIgBABQgXAXgRATIAAAAQgKANgGAYIAAABQgPA4gnAeIgBABQgMAMgFAdIAAABQgEAagKAZIgBACQgQApgKAqIAAAAQgJAfgHAeIABAAQgIAlgbAcIgBABQgHAGgBAJIAAABQgCAPgMAXQgJAVhMA2IAAAAQg7Aog2AAQgZAAgXgIg");
	this.shape.setTransform(71.6,83.2);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieIntroGlow, new cjs.Rectangle(-4.9,-5,153.2,176.5), null);


(lib.goalieCrouchCatch_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 2
	this.instance = new lib.goalieCrouchCatch();
	this.instance.parent = this;
	this.instance.setTransform(1,4,0.997,0.997);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.goalieCrouchCatch_1, new cjs.Rectangle(1,4,142.5,159.5), null);


(lib.finalHitsRed_ar = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.finalHits = new cjs.Text("000", "120px PizzaPressFill-AR, 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#E31837");
	this.finalHits.name = "finalHits";
	this.finalHits.textAlign = "center";
	this.finalHits.lineHeight = 166;
	this.finalHits.lineWidth = 197;
	this.finalHits.parent = this;
	this.finalHits.setTransform(58.5,2);

	this.timeline.addTween(cjs.Tween.get(this.finalHits).wait(1));

}).prototype = getMCSymbolPrototype(lib.finalHitsRed_ar, new cjs.Rectangle(-42,0,201.1,167.7), null);


(lib.finalHitsRed = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.finalHits = new cjs.Text("000", "120px 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#E31837");
	this.finalHits.name = "finalHits";
	this.finalHits.textAlign = "right";
	this.finalHits.lineHeight = 130;
	this.finalHits.lineWidth = 178;
	this.finalHits.parent = this;
	this.finalHits.setTransform(147,2);

	this.timeline.addTween(cjs.Tween.get(this.finalHits).wait(1));

}).prototype = getMCSymbolPrototype(lib.finalHitsRed, new cjs.Rectangle(-33,0,182,131.9), null);


(lib.finalHitsBlue_ar = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.finalHits = new cjs.Text("000", "120px PizzaPressFill-AR, 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#0094D7");
	this.finalHits.name = "finalHits";
	this.finalHits.textAlign = "center";
	this.finalHits.lineHeight = 166;
	this.finalHits.lineWidth = 197;
	this.finalHits.parent = this;
	this.finalHits.setTransform(58.5,2);

	this.timeline.addTween(cjs.Tween.get(this.finalHits).wait(1));

}).prototype = getMCSymbolPrototype(lib.finalHitsBlue_ar, new cjs.Rectangle(-42,0,201,167.7), null);


(lib.finalHitsBlue = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.finalHits = new cjs.Text("000", "120px 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#0094D7");
	this.finalHits.name = "finalHits";
	this.finalHits.textAlign = "right";
	this.finalHits.lineHeight = 130;
	this.finalHits.lineWidth = 177;
	this.finalHits.parent = this;
	this.finalHits.setTransform(147,2);

	this.timeline.addTween(cjs.Tween.get(this.finalHits).wait(1));

}).prototype = getMCSymbolPrototype(lib.finalHitsBlue, new cjs.Rectangle(-32,0,181,131.9), null);


(lib.fanEasterEgg = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// superfan
	this.instance = new lib.superFan();
	this.instance.parent = this;
	this.instance.setTransform(0,0,0.667,0.667);

	this.shape = new cjs.Shape();
	this.shape.graphics.f("#E4162A").s().p("AzHGEQjQlSCyk4QCxk5GRhVQGRhUJTB1QJUB2ExE3QEwE3n1EAQn1EBm2ARQm0ARlNAhQgdADgdAAQklAAi9k0g");
	this.shape.setTransform(155.8,259.9);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape},{t:this.instance}]}).wait(1));

	// shadow
	this.instance_1 = new lib.superFanShadow();
	this.instance_1.parent = this;
	this.instance_1.setTransform(1,0);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.fanEasterEgg, new cjs.Rectangle(0,0,293,329.5), null);


(lib.Confetti8 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf8();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti8, new cjs.Rectangle(0,0,9,16), null);


(lib.Confetti7 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf7();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti7, new cjs.Rectangle(0,0,12,12), null);


(lib.Confetti6 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf6();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti6, new cjs.Rectangle(0,0,13,10), null);


(lib.Confetti5 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf5();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti5, new cjs.Rectangle(0,0,10,17), null);


(lib.Confetti4 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf4();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti4, new cjs.Rectangle(0,0,15,17), null);


(lib.Confetti3 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf3();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti3, new cjs.Rectangle(0,0,16,20), null);


(lib.Confetti2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf2();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti2, new cjs.Rectangle(0,0,14,9), null);


(lib.Confetti1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.conf1();
	this.instance.parent = this;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.Confetti1, new cjs.Rectangle(0,0,14,21), null);


(lib.btn_ballClick = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#FF0000").s().p("AmGGHQiiiiAAjlQAAjkCiiiQCiiiDkAAQDlAACiCiQCiCiAADkQAADliiCiQiiCijlAAQjkAAiiiig");
	this.shape.setTransform(55.3,55.3);
	this.shape._off = true;

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(3).to({_off:false},0).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;


(lib.bgDarken = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#000000").s().p("EhCZAUoMAAAgpPMCEzAAAMAAAApPg");
	this.shape.setTransform(425,132);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.bgDarken, new cjs.Rectangle(0,0,850,264), null);


(lib.shadowGround = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.rf(["rgba(0,0,0,0.4)","rgba(0,0,0,0.298)","rgba(0,0,0,0)"],[0.102,0.341,1],0,0,0,0,0,46.7).s().p("AlIFJQiIiIAAjBQAAjACIiIQCIiIDAAAQDBAACICIQCICIAADAQAADBiICIQiICIjBAAQjAAAiIiIg");
	this.shape.setTransform(46.5,46.5);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.shadowGround, new cjs.Rectangle(0,0,93,93), null);


(lib.ballspin8 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation81();
	this.instance.parent = this;
	this.instance.setTransform(607.4,-106.8,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin8, new cjs.Rectangle(250.3,-106.8,487.1,487.1), null);


(lib.ballspin7 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation71();
	this.instance.parent = this;
	this.instance.setTransform(607.4,-106.8,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin7, new cjs.Rectangle(250.3,-106.8,487.1,487.1), null);


(lib.ballspin6 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation61();
	this.instance.parent = this;
	this.instance.setTransform(607.3,-106.8,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin6, new cjs.Rectangle(250.2,-106.8,487.1,487.1), null);


(lib.ballspin5 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation51();
	this.instance.parent = this;
	this.instance.setTransform(607.4,-106.8,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin5, new cjs.Rectangle(250.3,-106.8,487.1,487.1), null);


(lib.ballspin4 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation41();
	this.instance.parent = this;
	this.instance.setTransform(607.4,-106.8,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin4, new cjs.Rectangle(250.3,-106.8,487.1,487.1), null);


(lib.ballspin3 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation31();
	this.instance.parent = this;
	this.instance.setTransform(607.4,-106.8,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin3, new cjs.Rectangle(250.3,-106.8,487.1,487.1), null);


(lib.ballspin2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.BallRotation21();
	this.instance.parent = this;
	this.instance.setTransform(607.3,-106.9,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin2, new cjs.Rectangle(250.2,-106.9,487.1,487.1), null);


(lib.ballspin1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 2
	this.instance = new lib.BallRotation11();
	this.instance.parent = this;
	this.instance.setTransform(605.5,-106.6,4,4,70);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballspin1, new cjs.Rectangle(248.4,-106.6,487.1,487.1), null);


(lib.ballshading2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// highlight
	this.shape = new cjs.Shape();
	this.shape.graphics.rf(["rgba(255,255,255,0)","rgba(255,255,255,0)","rgba(255,255,255,0.22)","rgba(255,255,255,0.447)","rgba(255,255,255,0.325)","rgba(255,255,255,0.349)"],[0,0.298,0.6,1,1,1],0.4,5.4,0,0.4,5.4,55.7).s().p("Al+F/QieifAAjgQAAjfCeifQCfieDfAAQDgAACfCeQCeCfAADfQAADgieCfQifCejgAAQjfAAifieg");
	this.shape.setTransform(55.6,53.3);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

	// shading
	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.rf(["rgba(255,255,255,0.698)","rgba(240,240,240,0.2)","rgba(210,210,210,0)","rgba(149,149,149,0.149)","rgba(24,24,24,0.298)","rgba(0,0,0,0.2)"],[0,0.176,0.62,0.808,0.922,1],-6.9,-16.8,0,-6.9,-16.8,70.3).s().p("AmAGBQigifABjiQgBjhCgifQCfigDhABQDigBCfCgQCgCfAADhQAADiigCfQifCfjiABQjhgBififg");
	this.shape_1.setTransform(55.8,53.9);

	this.timeline.addTween(cjs.Tween.get(this.shape_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballshading2, new cjs.Rectangle(1.4,-0.8,108.9,109.2), null);


(lib.ballshading1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// highlight
	this.shape = new cjs.Shape();
	this.shape.graphics.rf(["rgba(255,255,255,0)","rgba(255,255,255,0)","rgba(255,255,255,0.349)","rgba(255,255,255,0.22)","rgba(255,255,255,0.349)","rgba(255,255,255,0.325)"],[0,0.855,0.984,1,1,1],0.4,5.4,0,0.4,5.4,55.7).s().p("Al+F/QieifAAjgQAAjfCeifQCfieDfAAQDgAACfCeQCeCfAADfQAADgieCfQifCejgAAQjfAAifieg");
	this.shape.setTransform(55.6,54.6);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

	// shading
	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.rf(["rgba(255,255,255,0.847)","rgba(240,240,240,0.2)","rgba(194,194,194,0)","rgba(166,166,166,0)","rgba(149,149,149,0.2)","rgba(24,24,24,0.4)","rgba(0,0,0,0.2)"],[0,0.29,0.51,0.663,0.737,0.906,1],-6.9,-16.8,0,-6.9,-16.8,70.3).s().p("AmAGBQigigABjhQgBjhCgifQCfigDhAAQDiAACfCgQCgCfAADhQAADhigCgQifCfjiAAQjhAAififg");
	this.shape_1.setTransform(55.8,55.2);

	this.timeline.addTween(cjs.Tween.get(this.shape_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballshading1, new cjs.Rectangle(1.4,0.5,108.9,109.2), null);


(lib.ballRotateR = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 3
	this.instance = new lib.ballPSD1();
	this.instance.parent = this;
	this.instance.setTransform(0,0,0.383,0.383);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,110,110);


(lib.ballBlueGlow = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#0094D7").s().p("AmrGsQixiyAAj6QAAj6CxixQCyixD5AAQD7AACxCxQCxCxAAD6QAAD6ixCyQixCxj7AAQj5AAiyixg");
	this.shape.setTransform(61,60);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballBlueGlow, new cjs.Rectangle(0.5,-0.5,121,121), null);


(lib.gameSounds = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{miss1:3,miss2:57,miss3:115,score1:165,score2:286,score3:388});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_3 = function() {
		playSound("_001082364fightgruntsmalequiet_01");
		playSound("ooo3_01");
	}
	this.frame_23 = function() {
		this.gotoAndStop(0);
	}
	this.frame_57 = function() {
		playSound("ooo4_01");
	}
	this.frame_75 = function() {
		this.gotoAndStop(0);
	}
	this.frame_115 = function() {
		playSound("_001082368fightgruntsmalequiet_06");
		playSound("crowdgroan_01");
	}
	this.frame_132 = function() {
		this.gotoAndStop(0);
	}
	this.frame_165 = function() {
		playSound("goalscoredcrowdreact2_01");
	}
	this.frame_187 = function() {
		this.gotoAndStop(0);
	}
	this.frame_286 = function() {
		playSound("goalscoredcrowdreact3_01");
	}
	this.frame_307 = function() {
		this.gotoAndStop(0);
	}
	this.frame_388 = function() {
		playSound("goalscoredcrowdreact4_01");
		playSound("_087181881woohooquietshort_01");
	}
	this.frame_410 = function() {
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(3).call(this.frame_3).wait(20).call(this.frame_23).wait(34).call(this.frame_57).wait(18).call(this.frame_75).wait(40).call(this.frame_115).wait(17).call(this.frame_132).wait(33).call(this.frame_165).wait(22).call(this.frame_187).wait(99).call(this.frame_286).wait(21).call(this.frame_307).wait(81).call(this.frame_388).wait(22).call(this.frame_410).wait(80));

	// guide
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#E31837").s().p("AhUBUQgjgiAAgyQAAgwAjgkQAkgjAwAAQAyAAAiAjQAkAkAAAwQAAAygkAiQgiAkgyAAQgwAAgkgkg");
	this.shape.setTransform(12,-154.9);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(490));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,-166.9,24,24);


(lib.arrow = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.shape = new cjs.Shape();
	this.shape.graphics.f("#0094D7").s().p("AjHAAIDjiCIAABEICsAAIAAB9IisAAIAABEg");
	this.shape.setTransform(19.1,0);

	this.timeline.addTween(cjs.Tween.get(this.shape).wait(1));

}).prototype = getMCSymbolPrototype(lib.arrow, new cjs.Rectangle(-1,-13.1,40.1,26.3), null);


(lib.winAni = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
		this.alpha = 0;
	}
	this.frame_38 = function() {
		if(animStageNum > 3){
			
		}else{
			this.parent.ballGame_kickGoalie["kick"+ ballLightFrame_new].lightGoalie_win.alpha = 0;//turn green (win) goalie light off	
		}
		this.parent.play();//game plays to go back to 'play' frame
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(38).call(this.frame_38).wait(9));

	// win msg
	this.instance = new lib.win();
	this.instance.parent = this;
	this.instance.setTransform(247.5,227.5,0.1,0.1,0,0,0,247.5,247.5);
	this.instance.alpha = 0.102;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({scaleX:1,scaleY:1,y:247.5,alpha:1},9,cjs.Ease.get(1)).wait(30).to({alpha:0},7).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(222.8,202.8,49.5,49.5);


(lib.trophyFlashAni = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(13));

	// Layer 1
	this.instance = new lib.trophyFlash();
	this.instance.parent = this;
	this.instance.setTransform(63.6,117,1.5,1.5,0,0,0,63.5,117);
	this.instance.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({scaleX:1,scaleY:1,x:63.5,alpha:1},0).to({scaleX:2,scaleY:2},6).to({scaleX:3,scaleY:3,alpha:0},5).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-31.7,-58.5,190.5,351);


(lib.trophyBtn = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.trophyBronze();
	this.instance.parent = this;
	this.instance.setTransform(57.2,119.2,1,1,0,0,0,57.2,119.2);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(3).to({_off:false},0).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;


(lib.trophyAll = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// gold
	this.gold = new lib.trophyGold();
	this.gold.parent = this;
	this.gold.setTransform(57.2,119.2,1,1,0,0,0,57.2,119.2);
	this.gold.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.gold).wait(300).to({rotation:-2.5,x:52.3,y:118.2},3,cjs.Ease.get(0.8)).to({rotation:0,x:57.2,y:119.2},3,cjs.Ease.get(-0.4)).to({rotation:2.5,x:62.3,y:117.3},3,cjs.Ease.get(0.8)).to({rotation:0,x:57.2,y:119.2},4,cjs.Ease.get(-0.4)).wait(1));

	// silver
	this.silver = new lib.trophySilver();
	this.silver.parent = this;
	this.silver.setTransform(57.2,119.2,1,1,0,0,0,57.2,119.2);
	this.silver.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.silver).wait(300).to({rotation:-2.5,x:52.3,y:118.2},3,cjs.Ease.get(0.8)).to({rotation:0,x:57.2,y:119.2},3,cjs.Ease.get(-0.4)).to({rotation:2.5,x:62.3,y:117.3},3,cjs.Ease.get(0.8)).to({rotation:0,x:57.2,y:119.2},4,cjs.Ease.get(-0.4)).wait(1));

	// bronze
	this.bronze = new lib.trophyBronze();
	this.bronze.parent = this;
	this.bronze.setTransform(57.2,119.2,1,1,0,0,0,57.2,119.2);

	this.timeline.addTween(cjs.Tween.get(this.bronze).wait(300).to({rotation:-2.5,x:52.3,y:118.2},3,cjs.Ease.get(0.8)).to({rotation:0,x:57.2,y:119.2},3,cjs.Ease.get(-0.4)).to({rotation:2.5,x:62.3,y:117.3},3,cjs.Ease.get(0.8)).to({rotation:0,x:57.2,y:119.2},4,cjs.Ease.get(-0.4)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-24,0,162,239);


(lib.loseAni = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
		this.alpha = 0;
	}
	this.frame_38 = function() {
		//var mclose = this;
		
		//if(animStageNum > 3){
			
		//}else{
			this.parent.play();//game plays to go back to 'play' frame
		//}
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(38).call(this.frame_38).wait(9));

	// lose msg
	this.instance = new lib.lose();
	this.instance.parent = this;
	this.instance.setTransform(247.5,227.5,0.1,0.1,0,0,0,247.5,247.5);
	this.instance.alpha = 0.102;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({scaleX:1,scaleY:1,y:247.5,alpha:1},9,cjs.Ease.get(1)).wait(30).to({alpha:0},7).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(222.8,202.8,49.5,49.5);


(lib.lightsGoalie_off = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.lightGoalie_off();
	this.instance.parent = this;
	this.instance.setTransform(384.3,120.3,1,1,0,0,0,20.3,20.3);

	this.instance_1 = new lib.lightGoalie_off();
	this.instance_1.parent = this;
	this.instance_1.setTransform(202.3,120.3,1,1,0,0,0,20.3,20.3);

	this.instance_2 = new lib.lightGoalie_off();
	this.instance_2.parent = this;
	this.instance_2.setTransform(20.3,120.3,1,1,0,0,0,20.3,20.3);

	this.instance_3 = new lib.lightGoalie_off();
	this.instance_3.parent = this;
	this.instance_3.setTransform(384.3,20.3,1,1,0,0,0,20.3,20.3);

	this.instance_4 = new lib.lightGoalie_off();
	this.instance_4.parent = this;
	this.instance_4.setTransform(202.3,20.3,1,1,0,0,0,20.3,20.3);

	this.instance_5 = new lib.lightGoalie_off();
	this.instance_5.parent = this;
	this.instance_5.setTransform(20.3,20.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_5},{t:this.instance_4},{t:this.instance_3},{t:this.instance_2},{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightsGoalie_off, new cjs.Rectangle(-3,-3,410.6,146.6), null);


(lib.lightsGoalie_intro = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// lightGoalie_on
	this.instance = new lib.lightGoalie_on();
	this.instance.parent = this;
	this.instance.setTransform(384.3,120.3,1,1,0,0,0,20.3,20.3);
	this.instance.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightGoalie_on
	this.instance_1 = new lib.lightGoalie_on();
	this.instance_1.parent = this;
	this.instance_1.setTransform(202.3,120.3,1,1,0,0,0,20.3,20.3);
	this.instance_1.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightGoalie_on
	this.instance_2 = new lib.lightGoalie_on();
	this.instance_2.parent = this;
	this.instance_2.setTransform(20.3,120.3,1,1,0,0,0,20.3,20.3);
	this.instance_2.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_2).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightGoalie_on
	this.instance_3 = new lib.lightGoalie_on();
	this.instance_3.parent = this;
	this.instance_3.setTransform(384.3,20.3,1,1,0,0,0,20.3,20.3);
	this.instance_3.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_3).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightGoalie_on
	this.instance_4 = new lib.lightGoalie_on();
	this.instance_4.parent = this;
	this.instance_4.setTransform(202.3,20.3,1,1,0,0,0,20.3,20.3);
	this.instance_4.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_4).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightGoalie_on
	this.instance_5 = new lib.lightGoalie_on();
	this.instance_5.parent = this;
	this.instance_5.setTransform(20.3,20.3,1,1,0,0,0,20.3,20.3);
	this.instance_5.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_5).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-3,-3,410.6,146.6);


(lib.lightsGoalie_game = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 6
	this.lightGoalie6 = new lib.lightGoalie_on();
	this.lightGoalie6.parent = this;
	this.lightGoalie6.setTransform(384.3,120.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie6).wait(1));

	// 5
	this.lightGoalie5 = new lib.lightGoalie_on();
	this.lightGoalie5.parent = this;
	this.lightGoalie5.setTransform(202.3,120.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie5).wait(1));

	// 4
	this.lightGoalie4 = new lib.lightGoalie_on();
	this.lightGoalie4.parent = this;
	this.lightGoalie4.setTransform(20.3,120.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie4).wait(1));

	// 3
	this.lightGoalie3 = new lib.lightGoalie_on();
	this.lightGoalie3.parent = this;
	this.lightGoalie3.setTransform(384.3,20.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie3).wait(1));

	// 2
	this.lightGoalie2 = new lib.lightGoalie_on();
	this.lightGoalie2.parent = this;
	this.lightGoalie2.setTransform(202.3,20.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie2).wait(1));

	// 1
	this.lightGoalie1 = new lib.lightGoalie_on();
	this.lightGoalie1.parent = this;
	this.lightGoalie1.setTransform(20.3,20.3,1,1,0,0,0,20.3,20.3);

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie1).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightsGoalie_game, new cjs.Rectangle(-3,-3,410.6,146.6), null);


(lib.lightsBall_off = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.lightBall_off();
	this.instance.parent = this;
	this.instance.setTransform(378.5,114.5,1,1,0,0,0,14.5,14.5);

	this.instance_1 = new lib.lightBall_off();
	this.instance_1.parent = this;
	this.instance_1.setTransform(196.5,114.5,1,1,0,0,0,14.5,14.5);

	this.instance_2 = new lib.lightBall_off();
	this.instance_2.parent = this;
	this.instance_2.setTransform(14.5,114.5,1,1,0,0,0,14.5,14.5);

	this.instance_3 = new lib.lightBall_off();
	this.instance_3.parent = this;
	this.instance_3.setTransform(378.5,14.5,1,1,0,0,0,14.5,14.5);

	this.instance_4 = new lib.lightBall_off();
	this.instance_4.parent = this;
	this.instance_4.setTransform(196.5,14.5,1,1,0,0,0,14.5,14.5);

	this.instance_5 = new lib.lightBall_off();
	this.instance_5.parent = this;
	this.instance_5.setTransform(14.5,14.5,1,1,0,0,0,14.5,14.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_5},{t:this.instance_4},{t:this.instance_3},{t:this.instance_2},{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.lightsBall_off, new cjs.Rectangle(0,0,393,129), null);


(lib.lightsBall_intro = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// lightBall_off
	this.instance = new lib.lightBall_on();
	this.instance.parent = this;
	this.instance.setTransform(378.5,114.5,1,1,0,0,0,14.5,14.5);
	this.instance.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightBall_off
	this.instance_1 = new lib.lightBall_on();
	this.instance_1.parent = this;
	this.instance_1.setTransform(196.5,114.5,1,1,0,0,0,14.5,14.5);
	this.instance_1.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightBall_off
	this.instance_2 = new lib.lightBall_on();
	this.instance_2.parent = this;
	this.instance_2.setTransform(14.5,114.5,1,1,0,0,0,14.5,14.5);
	this.instance_2.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_2).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightBall_off
	this.instance_3 = new lib.lightBall_on();
	this.instance_3.parent = this;
	this.instance_3.setTransform(378.5,14.5,1,1,0,0,0,14.5,14.5);
	this.instance_3.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_3).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightBall_off
	this.instance_4 = new lib.lightBall_on();
	this.instance_4.parent = this;
	this.instance_4.setTransform(196.5,14.5,1,1,0,0,0,14.5,14.5);
	this.instance_4.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_4).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// lightBall_off
	this.instance_5 = new lib.lightBall_on();
	this.instance_5.parent = this;
	this.instance_5.setTransform(14.5,14.5,1,1,0,0,0,14.5,14.5);
	this.instance_5.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance_5).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,393,129);


(lib.lightsBall_game = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(7));

	// lightBall_off
	this.instance = new lib.lightBall_on();
	this.instance.parent = this;
	this.instance.setTransform(378.5,114.5,1,1,0,0,0,14.5,14.5);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(6).to({_off:false},0).wait(1));

	// lightBall_off
	this.instance_1 = new lib.lightBall_on();
	this.instance_1.parent = this;
	this.instance_1.setTransform(196.5,114.5,1,1,0,0,0,14.5,14.5);
	this.instance_1._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(5).to({_off:false},0).to({_off:true},1).wait(1));

	// lightBall_off
	this.instance_2 = new lib.lightBall_on();
	this.instance_2.parent = this;
	this.instance_2.setTransform(14.5,114.5,1,1,0,0,0,14.5,14.5);
	this.instance_2._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(4).to({_off:false},0).to({_off:true},1).wait(2));

	// lightBall_off
	this.instance_3 = new lib.lightBall_on();
	this.instance_3.parent = this;
	this.instance_3.setTransform(378.5,14.5,1,1,0,0,0,14.5,14.5);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(3).to({_off:false},0).to({_off:true},1).wait(3));

	// lightBall_off
	this.instance_4 = new lib.lightBall_on();
	this.instance_4.parent = this;
	this.instance_4.setTransform(196.5,14.5,1,1,0,0,0,14.5,14.5);
	this.instance_4._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(2).to({_off:false},0).to({_off:true},1).wait(4));

	// lightBall_off
	this.instance_5 = new lib.lightBall_on();
	this.instance_5.parent = this;
	this.instance_5.setTransform(14.5,-272.4,1,1,0,0,0,14.5,14.5);

	this.timeline.addTween(cjs.Tween.get(this.instance_5).wait(1).to({y:14.5},0).to({_off:true},1).wait(5));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,-286.9,29,29);


(lib.key = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.lightBall_on();
	this.instance.parent = this;
	this.instance.setTransform(23.2,7.6,1,1,0,0,0,14.5,14.5);

	this.shape = new cjs.Shape();
	this.shape.graphics.f("rgba(255,255,255,0.8)").s().p("AAADpQhfAAhFhEQhEhFAAhgQAAhfBEhFQBFhEBfAAQBgAABFBEQBEBFAABfQAABghEBFQhFBEhgAAIAAAAgAh5h5QgzAyAABHQAABIAzAyQAyAzBHAAQBIAAAygzQAzgyAAhIQAAhHgzgyQgygzhIAAQhHAAgyAzg");
	this.shape.setTransform(23.3,7.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape},{t:this.instance}]}).wait(1));

	// Layer 2
	this.instance_1 = new lib.lightBall_on();
	this.instance_1.parent = this;
	this.instance_1.setTransform(23,68.7,1,1,0,0,0,14.5,14.5);

	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("#E31837").s().p("AikClQhEhFAAhgQAAhfBEhEQBFhFBfAAQBgAABFBFQBEBEAABfQAABghEBFQhFBEhgAAQhfAAhFhEgAh5h5QgzAzAABGQAABIAzAyQAzAzBGAAQBHAAAzgzQAzgyAAhIQAAhGgzgzQgzgzhHAAQhGAAgzAzg");
	this.shape_1.setTransform(23.3,68.7);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_1},{t:this.instance_1}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.key, new cjs.Rectangle(0,-15.7,46.6,107.8), null);


(lib.goalieJump6 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// goalie
	this.instance = new lib.goalieLeap1_1();
	this.instance.parent = this;
	this.instance.setTransform(22.1,54.2,1,1,21.7,0,0,127.9,61);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({_off:false},0).to({regY:61.1,scaleX:0.96,scaleY:0.96,rotation:-19.5,x:-142,y:71},8,cjs.Ease.get(1)).wait(1));

	// goalie
	this.instance_1 = new lib.goalieStand_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.6,163.2,1,1.002,0,-3.2,0,71.5,163.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},1).wait(9));

	// shadow
	this.instance_2 = new lib.goalieStandShadow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(70.5,79.2,1,1,0,0,0,70.5,81.2);

	this.instance_3 = new lib.goalieJumpShadow1("synched",0);
	this.instance_3.parent = this;
	this.instance_3.setTransform(-9,132.8);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_2}]}).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_3}]},8).wait(1));
	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(1).to({_off:false},0).to({x:-133.8,y:128},8,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-8.9,-2,150,165);


(lib.goalieJump5 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// goalie
	this.instance = new lib.goalieCrouchCatch_1();
	this.instance.parent = this;
	this.instance.setTransform(71.5,163.2,1,1,0,0,0,71.5,163.2);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(2).to({_off:false},0).to({x:93,y:153.6},7,cjs.Ease.get(1)).wait(1));

	// goalie
	this.instance_1 = new lib.goalieStand_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.5,163.2,1,1,0,0,0,71.5,163.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},2).wait(8));

	// shadow
	this.instance_2 = new lib.goalieStandShadow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(70.5,153.1,1,1,0,0,0,70.5,155.1);

	this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(2).to({scaleY:1.12,skewX:26.3,x:70.6},0).to({x:92.1,y:143.5},7,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,-2,141,165);


(lib.goalieJump4 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// goalie
	this.instance = new lib.goalieLeap1_1();
	this.instance.parent = this;
	this.instance.setTransform(22.1,54.2,1,1,21.7,0,0,127.9,61);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({_off:false},0).to({regY:61.1,scaleX:0.96,scaleY:0.96,rotation:-19.2,x:-60,y:71},8,cjs.Ease.get(1)).wait(1));

	// goalie
	this.instance_1 = new lib.goalieStand_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.6,163.2,1,1.002,0,-3.2,0,71.5,163.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},1).wait(9));

	// shadow
	this.instance_2 = new lib.goalieStandShadow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(70.5,79.2,1,1,0,0,0,70.5,81.2);

	this.instance_3 = new lib.goalieJumpShadow1("synched",0);
	this.instance_3.parent = this;
	this.instance_3.setTransform(-9,132.8);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_2}]}).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_3}]},8).wait(1));
	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(1).to({_off:false},0).to({x:-66.8,y:128},8,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-8.9,-2,150,165);


(lib.goalieJump3 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// goalie
	this.instance = new lib.goalieLeap2_1();
	this.instance.parent = this;
	this.instance.setTransform(22.1,54.2,1,1,30.2,0,0,128,61);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({_off:false},0).to({regX:127.9,regY:60.9,scaleX:0.96,scaleY:0.96,rotation:0.6,x:-136.8,y:-18.6},8,cjs.Ease.get(1)).wait(1));

	// goalie
	this.instance_1 = new lib.goalieStand_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.6,163.2,1,1.002,0,-3.2,0,71.5,163.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},1).wait(9));

	// shadow
	this.instance_2 = new lib.goalieStandShadow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(70.5,79.2,1,1,0,0,0,70.5,81.2);

	this.instance_3 = new lib.goalieJumpShadow2("synched",0);
	this.instance_3.parent = this;
	this.instance_3.setTransform(-9,147.8);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_2}]}).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_3}]},8).wait(1));
	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(1).to({_off:false},0).to({x:-143.6,y:128},8,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-8.9,-2,150,165);


(lib.goalieJump2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// goalie
	this.instance = new lib.goalieLeap1_1();
	this.instance.parent = this;
	this.instance.setTransform(90.4,20.2,0.804,0.9,78.6,0,0,127.8,60.8);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(4).to({_off:false},0).to({regX:127.9,regY:60.9,scaleX:0.85,scaleY:0.85,rotation:90.3,x:83.1,y:3.5},5).wait(1));

	// goalie
	this.instance_1 = new lib.goalieStand_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.5,163.2,1,1,0,0,0,71.5,163.2);

	this.instance_2 = new lib.goalieStandUp_1();
	this.instance_2.parent = this;
	this.instance_2.setTransform(71.5,163.2,1,1,0,0,0,71.5,163.2);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1}]}).to({state:[{t:this.instance_2}]},1).to({state:[]},3).wait(6));

	// shadow
	this.instance_3 = new lib.goalieStandShadow();
	this.instance_3.parent = this;
	this.instance_3.setTransform(72,157.7,1,1,0,0,0,72,159.7);

	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(4).to({regX:73,regY:159.8,scaleX:0.36,scaleY:0.7,rotation:4,x:81.9,y:152.7,alpha:0.602},0).to({regX:72.7,regY:159.7,scaleX:0.28,scaleY:0.58,x:55.5,y:150.5,alpha:0.289},5).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,-2,141,165);


(lib.goalieJump1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// goalie
	this.instance = new lib.goalieLeap2_1();
	this.instance.parent = this;
	this.instance.setTransform(22.1,54.2,1,1,30.2,0,0,128,61);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({_off:false},0).to({regY:60.9,scaleX:0.96,scaleY:0.96,rotation:5.1,x:-60.1,y:-11.3},8,cjs.Ease.get(1)).wait(1));

	// goalie
	this.instance_1 = new lib.goalieStand_1();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.6,163.2,1,1.002,0,-3.2,0,71.5,163.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},1).wait(9));

	// shadow
	this.instance_2 = new lib.goalieStandShadow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(70.5,79.2,1,1,0,0,0,70.5,81.2);

	this.instance_3 = new lib.goalieJumpShadow2("synched",0);
	this.instance_3.parent = this;
	this.instance_3.setTransform(-9,147.8);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_2}]}).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_3}]},8).wait(1));
	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(1).to({_off:false},0).to({x:-74.1,y:128},8,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-8.9,-2,150,165);


(lib.goalieIntroGlow_intro = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.goalieIntroGlow();
	this.instance.parent = this;
	this.instance.setTransform(71.6,83.2,1,1,0,0,0,71.6,83.2);
	this.instance.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({alpha:1},5).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(1).to({alpha:0.5},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// Layer 2
	this.instance_1 = new lib.goalieIntroGlow();
	this.instance_1.parent = this;
	this.instance_1.setTransform(71.6,83.2,1,1,0,0,0,71.6,83.2);
	this.instance_1.alpha = 0.602;
	this.instance_1.filters = [new cjs.ColorFilter(0, 0, 0, 1, 255, 255, 255, 0)];
	this.instance_1.cache(-7,-7,157,181);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},54).wait(6));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-4.9,-5,153.2,176.5);


(lib.goalieGameJump = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.gotoAndStop(goalieLightFrame_new);
		//console.log("goalieLightFrame_new", goalieLightFrame_new);
	}
	this.frame_1 = function() {
		this.jump1.gotoAndPlay(0);
	}
	this.frame_2 = function() {
		this.jump2.gotoAndPlay(0);
	}
	this.frame_3 = function() {
		this.jump3.gotoAndPlay(0);
	}
	this.frame_4 = function() {
		this.jump4.gotoAndPlay(0);
	}
	this.frame_5 = function() {
		this.jump5.gotoAndPlay(0);
	}
	this.frame_6 = function() {
		this.jump6.gotoAndPlay(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1).call(this.frame_2).wait(1).call(this.frame_3).wait(1).call(this.frame_4).wait(1).call(this.frame_5).wait(1).call(this.frame_6).wait(1));

	// goalieAni
	this.instance = new lib.goalieStand_1();
	this.instance.parent = this;
	this.instance.setTransform(70.5,81.2,1,1,0,0,0,70.5,81.2);

	this.jump1 = new lib.goalieJump1();
	this.jump1.parent = this;
	this.jump1.setTransform(70.5,81.2,1,1,0,0,0,70.5,81.2);

	this.jump2 = new lib.goalieJump2();
	this.jump2.parent = this;
	this.jump2.setTransform(70.5,81.2,1,1,0,0,0,70.5,81.2);

	this.jump3 = new lib.goalieJump3();
	this.jump3.parent = this;
	this.jump3.setTransform(70.5,81.2,1,1,0,0,180,70.5,81.2);

	this.jump4 = new lib.goalieJump4();
	this.jump4.parent = this;
	this.jump4.setTransform(70.5,81.2,1,1,0,0,0,70.5,81.2);

	this.jump5 = new lib.goalieJump5();
	this.jump5.parent = this;
	this.jump5.setTransform(70.5,81.2,1,1,0,0,0,70.5,81.2);

	this.jump6 = new lib.goalieJump6();
	this.jump6.parent = this;
	this.jump6.setTransform(70.5,81.2,1,1,0,0,180,70.5,81.2);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.jump1}]},1).to({state:[{t:this.jump2}]},1).to({state:[{t:this.jump3}]},1).to({state:[{t:this.jump4}]},1).to({state:[{t:this.jump5}]},1).to({state:[{t:this.jump6}]},1).wait(1));

	// shadow
	this.instance_1 = new lib.goalieStandShadow();
	this.instance_1.parent = this;
	this.instance_1.setTransform(70.5,82.2,1,1,0,0,0,70.5,81.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({_off:true},1).wait(6));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,141,164);


(lib.finalHitsAni_ar = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_14 = function() {
		loopcount = loopcount + 1;
		//console.log("loopcount = ", loopcount);
		
		if(loopcount>=5){
			this.stop();
			this.parent.parent.trophyFlash.gotoAndPlay(1);
		}
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(14).call(this.frame_14).wait(1));

	// blue
	this.blue = new lib.finalHitsBlue_ar();
	this.blue.parent = this;
	this.blue.setTransform(74.5,65.9,1,1,0,0,0,74.5,65.9);

	this.timeline.addTween(cjs.Tween.get(this.blue).to({alpha:0},7).to({alpha:1},7).wait(1));

	// red
	this.red = new lib.finalHitsRed_ar();
	this.red.parent = this;
	this.red.setTransform(74.5,65.9,1,1,0,0,0,74.5,65.9);

	this.timeline.addTween(cjs.Tween.get(this.red).wait(15));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-42,0,201.1,167.7);


(lib.finalHitsAni = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_14 = function() {
		loopcount = loopcount + 1;
		//console.log("loopcount = ", loopcount);
		
		if(loopcount>=5){
			this.stop();
			this.parent.parent.trophyFlash.gotoAndPlay(1);
		}
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(14).call(this.frame_14).wait(1));

	// blue
	this.blue = new lib.finalHitsBlue();
	this.blue.parent = this;
	this.blue.setTransform(74.5,65.9,1,1,0,0,0,74.5,65.9);

	this.timeline.addTween(cjs.Tween.get(this.blue).to({alpha:0},7).to({alpha:1},7).wait(1));

	// red
	this.red = new lib.finalHitsRed();
	this.red.parent = this;
	this.red.setTransform(74.5,65.9,1,1,0,0,0,74.5,65.9);

	this.timeline.addTween(cjs.Tween.get(this.red).wait(15));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-33,0,182,131.9);


(lib.fanEasterEggAni320 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_3 = function() {
		playSound("_001096720cheeryeahmale_03");
	}
	this.frame_58 = function() {
		this.stop();
	}
	this.frame_60 = function() {
		playSound("_001096722cheeryeahmale_01");
	}
	this.frame_101 = function() {
		this.stop();
	}
	this.frame_104 = function() {
		playSound("_001096726cheeryeahmale_04");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(3).call(this.frame_3).wait(55).call(this.frame_58).wait(2).call(this.frame_60).wait(41).call(this.frame_101).wait(3).call(this.frame_104).wait(39));

	// fan
	this.instance = new lib.fanEasterEgg();
	this.instance.parent = this;
	this.instance.setTransform(235.8,158,1.25,1.25,0,0,0,145.8,128);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({_off:false},0).to({regY:127.9,scaleX:1.25,scaleY:1.25,rotation:20.3,x:205.8,y:-111.4},9,cjs.Ease.get(1)).wait(34).to({regY:128,y:-111.3},0).to({scaleX:1.25,scaleY:1.25,rotation:0,x:235.8,y:158},11,cjs.Ease.get(-1)).to({_off:true},1).wait(3).to({_off:false,regX:145.9,regY:127.9,skewY:180,x:-305.2,y:-54.9},0).to({regX:145.8,skewX:25.2,skewY:205.2,x:-61.3,y:-184.6},9,cjs.Ease.get(1)).wait(22).to({regX:145.9,skewX:0,skewY:180,x:-305.2,y:-54.9},9,cjs.Ease.get(-1)).to({_off:true},1).wait(2).to({_off:false,regX:145.8,regY:128,scaleX:1.88,scaleY:1.88,skewY:0,x:945.6,y:-88.7},0).to({x:410.9,y:-165.7},14,cjs.Ease.get(1)).wait(15).to({x:217.4,y:253.2},11,cjs.Ease.get(-1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;


(lib.fanEasterEggAni = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_3 = function() {
		playSound("_001096720cheeryeahmale_03");
	}
	this.frame_58 = function() {
		this.stop();
	}
	this.frame_60 = function() {
		playSound("_001096722cheeryeahmale_01");
	}
	this.frame_101 = function() {
		this.stop();
	}
	this.frame_104 = function() {
		playSound("_001096726cheeryeahmale_04");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(3).call(this.frame_3).wait(55).call(this.frame_58).wait(2).call(this.frame_60).wait(41).call(this.frame_101).wait(3).call(this.frame_104).wait(35));

	// fan
	this.instance = new lib.fanEasterEgg();
	this.instance.parent = this;
	this.instance.setTransform(235.8,158,1,1,0,0,0,145.8,128);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({_off:false},0).to({rotation:20.2,x:205.8,y:-120.9},9,cjs.Ease.get(1)).wait(34).to({rotation:0,x:235.8,y:158},11,cjs.Ease.get(-1)).to({_off:true},2).wait(2).to({_off:false,regX:145.9,skewY:180,x:-305.2,y:-54.9},0).to({regX:145.8,skewX:25.2,skewY:205.2,x:-61.3,y:-136.8},9,cjs.Ease.get(1)).wait(22).to({regX:145.9,skewX:0,skewY:180,x:-305.2,y:-54.9},9,cjs.Ease.get(-1)).to({_off:true},1).wait(2).to({_off:false,regX:145.8,scaleX:1.5,scaleY:1.5,skewY:0,x:921.8,y:-64.9},0).to({x:434.7,y:-141.9},10,cjs.Ease.get(1)).wait(15).to({x:312.7,y:215.1},11,cjs.Ease.get(-1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = null;


(lib.bgDarken_ani = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{fadein:1,fadeout:11});

	// timeline functions:
	this.frame_0 = function() {
		if(animStageNum != 3){
			this.stop(0);//put on main level for responsive versions, only darken if playing the game
		}else{
			this.play();
		}
	}
	this.frame_10 = function() {
		this.stop();
	}
	this.frame_20 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(10).call(this.frame_10).wait(10).call(this.frame_20).wait(1));

	// Layer 1
	this.instance = new lib.bgDarken();
	this.instance.parent = this;
	this.instance.setTransform(425,132,1,1,0,0,0,425,132);
	this.instance.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({alpha:0.5},10).to({alpha:0},9).to({_off:true},1).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,850,264);


(lib.ballSpin = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// spin
	this.ballspin1 = new lib.ballspin1();
	this.ballspin1.parent = this;
	this.ballspin1.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin2 = new lib.ballspin2();
	this.ballspin2.parent = this;
	this.ballspin2.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin3 = new lib.ballspin3();
	this.ballspin3.parent = this;
	this.ballspin3.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin4 = new lib.ballspin4();
	this.ballspin4.parent = this;
	this.ballspin4.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin5 = new lib.ballspin5();
	this.ballspin5.parent = this;
	this.ballspin5.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin6 = new lib.ballspin6();
	this.ballspin6.parent = this;
	this.ballspin6.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin6_1 = new lib.ballspin7();
	this.ballspin6_1.parent = this;
	this.ballspin6_1.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.ballspin6_2 = new lib.ballspin8();
	this.ballspin6_2.parent = this;
	this.ballspin6_2.setTransform(93.5,168.5,1,1,0,0,0,368.5,368.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.ballspin1}]}).to({state:[{t:this.ballspin2}]},1).to({state:[{t:this.ballspin3}]},1).to({state:[{t:this.ballspin4}]},1).to({state:[{t:this.ballspin5}]},1).to({state:[{t:this.ballspin6}]},1).to({state:[{t:this.ballspin6_1}]},1).to({state:[{t:this.ballspin6_2}]},1).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-26.6,-306.6,487.1,487.1);


(lib.ballRollSlowRt2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_70 = function() {
		this.gotoAndPlay(1);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(70).call(this.frame_70).wait(1));

	// shading
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(54.1,55.3,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(71));

	// ball
	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({rotation:360},69).wait(2));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,110,110);


(lib.ballRollSlowRt = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{explode:71});

	// timeline functions:
	this.frame_0 = function() {
		this.ballClick.addEventListener("click", ballClickHandler);
		
		var mc = this;
		
		function ballClickHandler(event){
			mc.gotoAndPlay("explode");	
		}
	}
	this.frame_70 = function() {
		this.gotoAndPlay(1);
		
		//console.log("Ball End");
	}
	this.frame_71 = function() {
		//this.parent.parent.stop();
		this.parent.stop();
		this.parent.shadowGround.alpha = 0;
		
		//console.log("Confetti Start");
		
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 150;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		for (var i = 0; i < INTENSITY; i++) { 
			var confettiType = Math.floor(Math.random() * 8) + 1;
		    create_particles(confettiType);  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * .5) + .5;
			//var startingX = 57;
			//var startingY = 54;
			var angleX = getNonZeroRandomNumber(100, 100)/100;//Math.floor(Math.random() * 180) + 1;	
			var angleY = getNonZeroRandomNumber(100, 100)/100;
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = angleX * ((Math.random() * 60)+60);
		    confetti.vy = angleY * ((Math.random() * 60)+60);
			
			if (Math.abs(confetti.vx) < 10 && Math.abs(confetti.vy) < 10){
				confetti.vx = 40;
				confetti.vy = 40;
			}
			
		    confetti.x = confetti.x;
		    confetti.y = confetti.y;
			//console.log("confetti.y = "+confetti.y);
			//console.log("angle = ", angleX, angleY, confetti.vx, confetti.vy);
		    //confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    //confetti.color = 'rgba(255,255,255,1)';
			//confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function getNonZeroRandomNumber(pos, neg){
			var result;
		
			result = Math.floor(Math.random() * (pos + neg)) - neg;
			return result = result < 0 ? result : result + 1;
		}
		  
		function animconfetti(event) {  
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy;
		
			//console.log("particle = ", particle.vx, particle.vy, particle.x, particle.y);
			
			//particle.rotation += particle.rotateAmt;
		
				if (particle.y > 300 || particle.y < -300 || particle.x > 300 || particle.x < -300) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
		playSound("_045670189balloonburst004wav");
	}
	this.frame_136 = function() {
		this.stop();
		this.parent.gotoAndPlay("timer");
		
		//console.log("parent play timer");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(70).call(this.frame_70).wait(1).call(this.frame_71).wait(65).call(this.frame_136).wait(1));

	// btn
	this.ballClick = new lib.btn_ballClick();
	this.ballClick.parent = this;
	this.ballClick.setTransform(54.6,55,1.25,1.25,0,0,0,55.2,55.2);
	new cjs.ButtonHelper(this.ballClick, 0, 1, 2, false, new lib.btn_ballClick(), 3);

	this.timeline.addTween(cjs.Tween.get(this.ballClick).to({_off:true},71).wait(66));

	// shading
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(54.1,55.3,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({_off:true},71).wait(66));

	// ball
	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({rotation:360},69).to({_off:true},2).wait(66));

	// confetti particles
	this.myParticleEffectContainer8 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer8.parent = this;
	this.myParticleEffectContainer8.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer7 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer7.parent = this;
	this.myParticleEffectContainer7.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer6 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer6.parent = this;
	this.myParticleEffectContainer6.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer5 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer5.parent = this;
	this.myParticleEffectContainer5.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer4 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer4.parent = this;
	this.myParticleEffectContainer4.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer3 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer3.parent = this;
	this.myParticleEffectContainer3.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer2 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer2.parent = this;
	this.myParticleEffectContainer2.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer.parent = this;
	this.myParticleEffectContainer.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.myParticleEffectContainer},{t:this.myParticleEffectContainer2},{t:this.myParticleEffectContainer3},{t:this.myParticleEffectContainer4},{t:this.myParticleEffectContainer5},{t:this.myParticleEffectContainer6},{t:this.myParticleEffectContainer7},{t:this.myParticleEffectContainer8}]},71).wait(66));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-14.4,-14,138.2,138.2);


(lib.ballRollGame = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_69 = function() {
		this.gotoAndPlay(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(69).call(this.frame_69).wait(1));

	// shading
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(54.1,55.3,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(70));

	// ball
	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({rotation:360},69).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,110,110);


(lib.ballMain_start = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{timer:60});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		this.ballRoll.gotoAndPlay(1);
		playSound("_001082364fightgruntsmalequiet_01");
	}
	this.frame_7 = function() {
		playSound("_079377898sportsrugbyballkickloud_01");
	}
	this.frame_8 = function() {
		shakeShakeTracker();
	}
	this.frame_15 = function() {
		playSound("_053014706kickball2_01");
	}
	this.frame_29 = function() {
		playSound("_053014706kickball2_light");
	}
	this.frame_39 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_49 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_57 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_60 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_61 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(6).call(this.frame_7).wait(1).call(this.frame_8).wait(7).call(this.frame_15).wait(14).call(this.frame_29).wait(10).call(this.frame_39).wait(10).call(this.frame_49).wait(8).call(this.frame_57).wait(3).call(this.frame_60).wait(1).call(this.frame_61).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(-119.9,-80.6,0.9,0.9,0,0,0,55.1,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(-119.1,-80.9,0.9,0.9,0,0,0,55,55);

	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(-13.3,-119,3,3,0,0,0,54.6,55.1);
	this.ballRoll._off = true;

	this.instance_2 = new lib.ballRollSlowRt();
	this.instance_2.parent = this;
	this.instance_2.setTransform(220.4,-80.8,0.9,0.9,0,0,0,54.5,55.1);
	this.instance_2._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.ballRoll}]},1).to({state:[{t:this.instance_2}]},7).to({state:[{t:this.instance_2}]},3).to({state:[{t:this.instance_2}]},4).to({state:[{t:this.instance_2}]},7).to({state:[{t:this.instance_2}]},7).to({state:[{t:this.instance_2}]},5).to({state:[{t:this.instance_2}]},5).to({state:[{t:this.instance_2}]},5).to({state:[{t:this.instance_2}]},5).to({state:[{t:this.instance_2}]},4).to({state:[{t:this.instance_2}]},4).to({state:[]},1).wait(4));
	this.timeline.addTween(cjs.Tween.get(this.ballRoll).wait(1).to({_off:false},0).to({_off:true,regX:54.5,scaleX:0.9,scaleY:0.9,x:220.4,y:-80.8},7).wait(54));
	this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(1).to({_off:false},7).to({x:276.4,y:-146.8},3).to({regX:51.6,regY:60.1,scaleX:1,scaleY:0.96,x:358.7,y:21.3},4).to({regX:54.6,regY:55.1,scaleY:1,guide:{path:[358.7,21.2,368.7,-39.6,399.1,-72.1,429.9,-105.2,468.4,-107.4,469.5,-107.5,470.7,-107.5]}},7,cjs.Ease.get(0.3)).to({scaleY:0.9,guide:{path:[470.7,-107.6,507.8,-108.4,536.2,-64.9,564.8,-21.4,578.7,20]}},7,cjs.Ease.get(-0.3)).to({scaleY:1,guide:{path:[578.7,20.1,579,21.1,579.4,22.1,588.3,-25.4,630.4,-46.9,647.8,-55.8,663.2,-55.7]}},5,cjs.Ease.get(0.2)).to({scaleY:0.93,guide:{path:[663.2,-55.8,684.8,-55.6,702.4,-37.3,731.9,-6.8,739.9,18.2]}},5,cjs.Ease.get(-0.2)).to({scaleY:1,guide:{path:[739.9,18.3,740.1,18.7,740.2,19.2,768.5,-20.4,814.4,-18.2]}},5,cjs.Ease.get(0.15)).to({guide:{path:[814.4,-18.2,819.1,-17.9,824,-17.3,860.1,-13.1,889.8,13.2]}},5,cjs.Ease.get(-0.15)).to({guide:{path:[889.8,13.2,890.3,13.6,890.8,14.1,921.8,-2,961.6,-1.1]}},4,cjs.Ease.get(0.1)).to({guide:{path:[961.6,-1.1,994.9,-0.3,1034.3,12.2]}},4,cjs.Ease.get(-0.1)).to({_off:true},1).wait(4));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(160.2,98.1,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).wait(62));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-168.6,-130.4,375.2,236);


(lib.ballMain_loopOnce = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":36});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 1);//behind tracker
		this.ballRoll.gotoAndPlay(0);
		playSound("_079377898sportsrugbyballkick_01");
	}
	this.frame_8 = function() {
		gotoZ("animation_container", 200);//in front of tracker
	}
	this.frame_15 = function() {
		gotoZ("animation_container", 1);//behind tracker
	}
	this.frame_22 = function() {
		gotoZ("animation_container", 200);//in front of tracker
	}
	this.frame_36 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_37 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(7).call(this.frame_8).wait(7).call(this.frame_15).wait(7).call(this.frame_22).wait(14).call(this.frame_36).wait(1).call(this.frame_37).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(4.8,78,0.6,0.6,90,0,0,55.1,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(5,78.6,0.6,0.6,90,0,0,55,55);

	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(5,78.7,0.6,0.6,90,0,0,55.2,55.1);
	this.ballRoll._off = true;

	this.spin = new lib.ballRollSlowRt();
	this.spin.parent = this;
	this.spin.setTransform(437.8,256,1.2,1.2,90,0,0,55.2,55.1);
	this.spin._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.ballRoll}]},1).to({state:[{t:this.spin}]},11).to({state:[{t:this.spin}]},5).to({state:[{t:this.spin}]},10).to({state:[]},1).wait(10));
	this.timeline.addTween(cjs.Tween.get(this.ballRoll).wait(1).to({_off:false},0).to({_off:true,scaleX:1.2,scaleY:1.2,guide:{path:[5,78.8,9.6,124.8,26.4,168.2,47.8,223.4,86.5,267.9,125.4,312.6,179.9,335.7,230.7,357.2,271.8,360,344.4,364.5,387.4,326.1,432,293.7,437.7,256.1]}},11).wait(26));
	this.timeline.addTween(cjs.Tween.get(this.spin).wait(1).to({_off:false},11).to({regX:55.4,regY:55,scaleX:0.8,scaleY:0.8,guide:{path:[437.7,256.1,439.7,242.5,436.8,228.3,425.5,174.5,393.2,176.7,360.8,178.9,348.6,215.1,346,222.8,344.8,230.3]}},5).to({regX:55.2,regY:55.1,scaleX:1.5,scaleY:1.5,guide:{path:[345,230.2,340.7,258,356.6,283,376.8,314.8,387.5,326,449.3,373.7,567.1,365.3,684.9,356.8,718.3,344.3,747.4,333.3,880.9,254.8]}},10).to({_off:true},1).wait(10));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(11.1,401.2,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;
	this.shadowGround._off = true;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).wait(1).to({_off:false},0).to({_off:true},27).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-28,45.6,66,66);


(lib.ballMain_hitScreen = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":26});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		this.ballRoll.gotoAndPlay(1);
		playSound("_079378321soccerballkickground_01");
	}
	this.frame_9 = function() {
		playSound("_001082364fightgruntsmalequiet_01");
		playSound("_079377898sportsrugbyballkick_01");
	}
	this.frame_10 = function() {
		shakeShakeAll();
	}
	this.frame_25 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_26 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_27 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(8).call(this.frame_9).wait(1).call(this.frame_10).wait(15).call(this.frame_25).wait(1).call(this.frame_26).wait(1).call(this.frame_27).wait(1));

	// ball
	this.instance = new lib.ballRotateR("synched",0);
	this.instance.parent = this;
	this.instance.setTransform(17.2,124.8,0.2,0.2,0,0,0,54.8,55);

	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(45.4,227,0.1,0.1,0,0,0,54.5,55);
	this.ballRoll._off = true;

	this.instance_1 = new lib.ballRollSlowRt();
	this.instance_1.parent = this;
	this.instance_1.setTransform(232.4,237,6,6,0,0,0,54.5,55);
	this.instance_1._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.ballRoll}]},1).to({state:[{t:this.instance_1}]},9).to({state:[{t:this.instance_1}]},14).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.ballRoll).wait(1).to({_off:false},0).to({_off:true,scaleX:6,scaleY:6,x:232.4,y:237},9,cjs.Ease.get(-1)).wait(18));
	this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(1).to({_off:false},9,cjs.Ease.get(-1)).to({regX:54.6,scaleX:0.4,scaleY:0.4,guide:{path:[232.5,236.9,486.5,85.6,827.8,208.4]}},14,cjs.Ease.get(1)).to({_off:true},1).wait(3));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(-0.8,445,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).to({_off:true},25).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-47.4,113.8,93,338.8);


(lib.ballMain_flyOver2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":29});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		this.ballRoll.gotoAndPlay(1);
		playSound("_079378321soccerballkickground_01");
	}
	this.frame_12 = function() {
		gotoZ("animation_container", 1);//behind tracker
	}
	this.frame_29 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_30 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(11).call(this.frame_12).wait(17).call(this.frame_29).wait(1).call(this.frame_30).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(56.8,53.3,1.5,1.5,0,0,0,55,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(58.2,52.9,1.5,1.5,0,0,0,55,55);

	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(57.5,53.1,1.5,1.5,0,0,0,54.5,55.1);
	this.ballRoll._off = true;

	this.instance_2 = new lib.ballRollSlowRt();
	this.instance_2.parent = this;
	this.instance_2.setTransform(1053.4,-47.8,0.5,0.5,0,0,0,54.7,55.1);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.ballRoll}]},1).to({state:[{t:this.instance_2}]},26).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.ballRoll).wait(1).to({_off:false},0).to({_off:true,regX:54.7,scaleX:0.5,scaleY:0.5,guide:{path:[57.5,53,511.9,-455.3,1053.7,-48.4]}},26,cjs.Ease.get(0.7)).wait(4));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(196.1,0.1,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).to({_off:true},28).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-24.3,-29.6,266.9,165);


(lib.ballMain_flyOver = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":29});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		this.ballRoll.gotoAndPlay(1);
		playSound("_079378321soccerballkickground_01");
	}
	this.frame_12 = function() {
		gotoZ("animation_container", 1);//behind tracker
	}
	this.frame_29 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_30 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(11).call(this.frame_12).wait(17).call(this.frame_29).wait(1).call(this.frame_30).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(56.8,53.3,1.5,1.5,0,0,0,55,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(58.2,52.9,1.5,1.5,0,0,0,55,55);

	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(57.5,53.1,1.5,1.5,0,0,0,54.5,55.1);
	this.ballRoll._off = true;

	this.instance_2 = new lib.ballRollSlowRt();
	this.instance_2.parent = this;
	this.instance_2.setTransform(1053.4,-47.8,0.5,0.5,0,0,0,54.7,55.1);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.ballRoll}]},1).to({state:[{t:this.instance_2}]},26).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.ballRoll).wait(1).to({_off:false},0).to({_off:true,regX:54.7,scaleX:0.5,scaleY:0.5,guide:{path:[57.5,53,511.9,-455.3,1053.7,-48.4]}},26,cjs.Ease.get(0.7)).wait(4));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(196.1,0.1,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).to({_off:true},28).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-24.3,-29.6,266.9,165);


(lib.ballMain_end = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		//gotoZ("animation_container", 200);//in front of tracker - should already be above
		this.ballRoll.gotoAndPlay(1);
	}
	this.frame_8 = function() {
		this.parent.play();//score and trophy knocked offstage
		playSound("_079377898sportsrugbyballkickloud_01");
	}
	this.frame_12 = function() {
		shakeShakeTracker();
	}
	this.frame_59 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(8).call(this.frame_8).wait(4).call(this.frame_12).wait(47).call(this.frame_59).wait(1));

	// ball
	this.ballRoll = new lib.ballRollSlowRt2();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(-13.3,-55,3,3,0,0,0,54.6,55.1);

	this.instance = new lib.ballRollSlowRt2();
	this.instance.parent = this;
	this.instance.setTransform(370.4,-61.8,1.4,1.4,0,0,0,54.9,54.7);
	this.instance._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballRoll).to({_off:true,regX:54.9,regY:54.7,scaleX:1.4,scaleY:1.4,x:370.4,y:-61.8},8).wait(52));
	this.timeline.addTween(cjs.Tween.get(this.instance).to({_off:false},8).to({regX:54.5,regY:55.1,scaleX:0.9,scaleY:0.9,x:359.4,y:-51.8},4).to({regX:51.6,regY:60.1,scaleX:1,scaleY:0.96,x:358.7,y:21.3},4).to({regX:54.6,regY:55.1,scaleY:1,guide:{path:[358.7,21.2,368.7,-39.6,399.1,-72.1,429.9,-105.2,468.4,-107.4,469.5,-107.5,470.7,-107.5]}},7,cjs.Ease.get(0.3)).to({scaleY:0.9,guide:{path:[470.7,-107.6,507.8,-108.4,536.2,-64.9,564.8,-21.4,578.7,20]}},7,cjs.Ease.get(-0.3)).to({scaleY:1,guide:{path:[578.7,20.1,579,21.1,579.4,22.1,588.3,-25.4,630.4,-46.9,647.8,-55.8,663.2,-55.7]}},5,cjs.Ease.get(0.2)).to({scaleY:0.93,guide:{path:[663.2,-55.8,684.8,-55.6,702.4,-37.3,731.9,-6.8,739.9,18.2]}},5,cjs.Ease.get(-0.2)).to({scaleY:1,guide:{path:[739.9,18.3,740.1,18.7,740.2,19.2,768.5,-20.4,814.4,-18.2]}},5,cjs.Ease.get(0.15)).to({guide:{path:[814.4,-18.2,819.1,-17.9,824,-17.3,860.1,-13.1,889.8,13.2]}},5,cjs.Ease.get(-0.15)).to({guide:{path:[889.8,13.2,890.3,13.6,890.8,14.1,921.8,-2,961.6,-1.1]}},4,cjs.Ease.get(0.1)).to({guide:{path:[961.6,-1.1,994.9,-0.3,1034.3,12.2]}},4,cjs.Ease.get(-0.1)).to({_off:true},1).wait(1));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(160.2,98.1,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).wait(60));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-177.1,-220.3,383.7,330);


(lib.ballMain_boomerang = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":94});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 1);//behind tracker
		this.shadowGround.alpha = 1;
		this.ballRoll.gotoAndPlay(1);
		playSound("_079378321soccerballkickground_01");
	}
	this.frame_28 = function() {
		gotoZ("animation_container", 200);//in front of tracker
	}
	this.frame_94 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_95 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(27).call(this.frame_28).wait(66).call(this.frame_94).wait(1).call(this.frame_95).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(55,64.7,1,0.882,0,0,0,55,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(56,64.4,1,0.882,0,0,0,55,55);

	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(21,57.2,0.5,0.5,0,0,180,54.8,55.3);
	this.ballRoll._off = true;

	this.instance_2 = new lib.ballRollSlowRt();
	this.instance_2.parent = this;
	this.instance_2.setTransform(-752.2,110.5,0.6,0.6,0,0,180,54.9,55.4);
	this.instance_2._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.ballRoll}]},1).to({state:[{t:this.instance_2}]},23).to({state:[{t:this.instance_2}]},4).to({state:[{t:this.instance_2}]},1).to({state:[{t:this.instance_2}]},3).to({state:[{t:this.instance_2}]},60).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.ballRoll).wait(1).to({_off:false},0).to({_off:true,regX:54.9,regY:55.4,scaleX:0.6,scaleY:0.6,guide:{path:[21,57.2,-529.1,85.7,-752,110.5]}},23).wait(72));
	this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(1).to({_off:false},23).to({regY:55.3,scaleX:0.8,scaleY:0.8,guide:{path:[-752,110.5,-874.2,124.1,-898.1,136.6]}},4).wait(1).to({regY:55.4,scaleX:0.85,scaleY:0.85,skewY:0,x:-876.4,y:155.4},0).to({regX:55,scaleX:1,scaleY:1,guide:{path:[-876.2,155.3,-834.8,164.6,-731.3,173.1]}},3).to({regX:54.8,regY:55.3,scaleX:1.1,scaleY:1.1,guide:{path:[-731.4,173.2,-495.2,192.7,64.1,208.7]}},60,cjs.Ease.get(1)).to({_off:true},1).wait(3));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(21.1,57.2,0.5,0.102,0,0,0,40.6,-411.2);
	this.shadowGround._off = true;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).wait(1).to({_off:false},0).to({regY:-410.9,scaleX:0.6,scaleY:0.12,guide:{path:[21.1,57.2,-526.3,85.5,-749.8,110.3]}},23).to({guide:{path:[-749.9,110.2,-835.8,119.8,-873.8,128.7]}},3).wait(1).to({regX:47.5,regY:-175.7,scaleX:0.8,scaleY:0.16,x:-899.7,y:147.7},0).to({regY:-175.5,scaleX:1.2,scaleY:0.25,guide:{path:[-899.7,147.7,-876.8,161.1,-731.7,173.1]}},4).to({regY:-175.3,scaleX:1.3,scaleY:0.27,guide:{path:[-731.7,173.1,-495.6,192.7,64,208.7]}},60,cjs.Ease.get(1)).to({_off:true},1).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(1,15.9,110,97);


(lib.ballKickG6 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
		
		var mcLight = this;
		
		if(roundAlert == "win"){
			mcLight.lightGoalie_win.alpha = 1;
		}
		
		//console.log("roundAlert ",roundAlert);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// ball
	this.instance = new lib.ballRollGame("synched",0,false);
	this.instance.parent = this;
	this.instance.setTransform(63.1,38.5,0.9,0.9,0,0,0,53.5,54.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:53.6,regY:54.8,scaleX:0.22,scaleY:0.22,guide:{path:[63.1,38.4,173.6,-59.3,236.8,-32.1]},mode:"single",startPosition:9},9,cjs.Ease.get(1)).wait(1));

	// green - win
	this.lightGoalie_win = new lib.lightGoalie_win();
	this.lightGoalie_win.parent = this;
	this.lightGoalie_win.setTransform(236.5,-32.2,1,1,0,0,0,20.3,20.3);
	this.lightGoalie_win.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie_win).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(14.9,-55.5,244.9,144);


(lib.ballKickG5 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
		
		var mcLight = this;
		
		if(roundAlert == "win"){
			mcLight.lightGoalie_win.alpha = 1;
		}
		
		//console.log("roundAlert ",roundAlert);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// Layer 2
	this.instance = new lib.ballRollGame("synched",0,false);
	this.instance.parent = this;
	this.instance.setTransform(53.6,34.6,0.9,0.9,0,0,0,53.6,54.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:53.9,regY:54.8,scaleX:0.22,scaleY:0.22,x:54.5,y:-31.5,mode:"single",startPosition:9},9,cjs.Ease.get(1)).wait(1));

	// green - win
	this.lightGoalie_win = new lib.lightGoalie_win();
	this.lightGoalie_win.parent = this;
	this.lightGoalie_win.setTransform(54.5,-32.2,1,1,0,0,0,20.3,20.3);
	this.lightGoalie_win.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie_win).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(5.4,-55.5,99,140.1);


(lib.ballKickG4 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
		
		var mcLight = this;
		
		if(roundAlert == "win"){
			mcLight.lightGoalie_win.alpha = 1;
		}
		
		//console.log("roundAlert ",roundAlert);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// ball
	this.instance = new lib.ballRollGame("synched",0,false);
	this.instance.parent = this;
	this.instance.setTransform(45,36.3,0.9,0.9,0,0,180,53.4,54.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:53.6,regY:54.8,scaleX:0.22,scaleY:0.22,guide:{path:[44.9,36.3,-64.8,-59.9,-127.5,-31.6]},mode:"single",startPosition:9},9,cjs.Ease.get(1)).wait(1));

	// green - win
	this.lightGoalie_win = new lib.lightGoalie_win();
	this.lightGoalie_win.parent = this;
	this.lightGoalie_win.setTransform(-127.5,-32.2,1,1,0,0,0,20.3,20.3);
	this.lightGoalie_win.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie_win).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150.8,-55.5,243.8,141.8);


(lib.ballKickG3 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
		
		var mcLight = this;
		
		if(roundAlert == "win"){
			mcLight.lightGoalie_win.alpha = 1;
		}
		
		//console.log("roundAlert ",roundAlert);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// ball
	this.instance = new lib.ballRollGame("synched",0,false);
	this.instance.parent = this;
	this.instance.setTransform(62.3,37.6,0.9,0.9,0,0,0,53.5,54.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:53.6,regY:54.8,scaleX:0.22,scaleY:0.22,guide:{path:[62.3,37.6,123.9,-123.7,236.4,-132.6]},mode:"single",startPosition:9},9,cjs.Ease.get(1)).wait(1));

	// green - win
	this.lightGoalie_win = new lib.lightGoalie_win();
	this.lightGoalie_win.parent = this;
	this.lightGoalie_win.setTransform(236.5,-132.2,1,1,0,0,0,20.3,20.3);
	this.lightGoalie_win.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie_win).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(14.2,-155.5,245.7,243.1);


(lib.ballKickG2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
		
		var mcLight = this;
		
		if(roundAlert == "win"){
			mcLight.lightGoalie_win.alpha = 1;
		}
		
		//console.log("roundAlert ",roundAlert);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// Layer 1
	this.instance = new lib.ballRollGame("synched",0,false);
	this.instance.parent = this;
	this.instance.setTransform(53.6,34.6,0.9,0.9,0,0,0,53.6,54.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:53.9,regY:54.8,scaleX:0.22,scaleY:0.22,x:54.5,y:-131.5,mode:"single",startPosition:9},9,cjs.Ease.get(1)).wait(1));

	// green - win
	this.lightGoalie_win = new lib.lightGoalie_win();
	this.lightGoalie_win.parent = this;
	this.lightGoalie_win.setTransform(54.5,-132.2,1,1,0,0,0,20.3,20.3);
	this.lightGoalie_win.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie_win).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(5.4,-155.5,99,240.1);


(lib.ballKickG1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_9 = function() {
		this.stop();
		
		var mcLight = this;
		
		if(roundAlert == "win"){
			mcLight.lightGoalie_win.alpha = 1;
		}
		
		//console.log("roundAlert ",roundAlert);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).wait(9).call(this.frame_9).wait(1));

	// ball
	this.instance = new lib.ballRollGame("synched",0,false);
	this.instance.parent = this;
	this.instance.setTransform(43.1,38.2,0.9,0.9,0,0,180,53.4,54.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:53.6,regY:54.8,scaleX:0.22,scaleY:0.22,guide:{path:[43,38.2,-21.7,-102.7,-127,-132.6]},mode:"single",startPosition:9},9,cjs.Ease.get(1)).wait(1));

	// green - win
	this.lightGoalie_win = new lib.lightGoalie_win();
	this.lightGoalie_win.parent = this;
	this.lightGoalie_win.setTransform(-127.5,-132.2,1,1,0,0,0,20.3,20.3);
	this.lightGoalie_win.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.lightGoalie_win).wait(10));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-150.8,-155.5,241.9,243.7);


(lib.ballGameWait = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// shading
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

	// ball
	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(55.1,55,1,1,0,0,0,55.1,55);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballGameWait, new cjs.Rectangle(0,0,110.3,110), null);


(lib.ballGameKickedGoalie = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.gotoAndStop(ballLightFrame_new);
	}
	this.frame_1 = function() {
		this.kick1.gotoAndPlay(0);
	}
	this.frame_2 = function() {
		this.kick2.gotoAndPlay(0);
	}
	this.frame_3 = function() {
		this.kick3.gotoAndPlay(0);
	}
	this.frame_4 = function() {
		this.kick4.gotoAndPlay(0);
	}
	this.frame_5 = function() {
		this.kick5.gotoAndPlay(0);
	}
	this.frame_6 = function() {
		this.kick6.gotoAndPlay(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1).call(this.frame_2).wait(1).call(this.frame_3).wait(1).call(this.frame_4).wait(1).call(this.frame_5).wait(1).call(this.frame_6).wait(1));

	// Layer 1
	this.instance = new lib.ballRollGame();
	this.instance.parent = this;
	this.instance.setTransform(53.5,54.5,1,1,0,0,0,53.5,54.5);

	this.kick1 = new lib.ballKickG1();
	this.kick1.parent = this;
	this.kick1.setTransform(55,55,1,1,0,0,0,55,55);

	this.kick2 = new lib.ballKickG2();
	this.kick2.parent = this;
	this.kick2.setTransform(55,55,1,1,0,0,0,55,55);

	this.kick3 = new lib.ballKickG3();
	this.kick3.parent = this;
	this.kick3.setTransform(55,55,1,1,0,0,0,55,55);

	this.kick4 = new lib.ballKickG4();
	this.kick4.parent = this;
	this.kick4.setTransform(55,55,1,1,0,0,0,55,55);

	this.kick5 = new lib.ballKickG5();
	this.kick5.parent = this;
	this.kick5.setTransform(55,55,1,1,0,0,0,55,55);

	this.kick6 = new lib.ballKickG6();
	this.kick6.parent = this;
	this.kick6.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.kick1}]},1).to({state:[{t:this.kick2}]},1).to({state:[{t:this.kick3}]},1).to({state:[{t:this.kick4}]},1).to({state:[{t:this.kick5}]},1).to({state:[{t:this.kick6}]},1).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,110,110);


(lib.ballEndBounce = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(54.1,55.3,1,1,0,0,0,55,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.ballEndBounce, new cjs.Rectangle(0,0,110,110), null);


(lib.ballBounceOnTracker = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":99});

	// timeline functions:
	this.frame_0 = function() {
		this.ballRoll2.gotoAndPlay(0);
	}
	this.frame_16 = function() {
		playSound("_053014706kickball2_01");
	}
	this.frame_31 = function() {
		playSound("_053014706kickball2_01");
	}
	this.frame_44 = function() {
		playSound("_053014706kickball2_light");
	}
	this.frame_57 = function() {
		playSound("_053014706kickball2_light");
	}
	this.frame_68 = function() {
		playSound("_053014706kickball2_light");
	}
	this.frame_79 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_90 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_99 = function() {
		this.parent.gotoAndPlay("timer");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(16).call(this.frame_16).wait(15).call(this.frame_31).wait(13).call(this.frame_44).wait(13).call(this.frame_57).wait(11).call(this.frame_68).wait(11).call(this.frame_79).wait(11).call(this.frame_90).wait(9).call(this.frame_99).wait(1));

	// ball
	this.ballRoll2 = new lib.ballRollSlowRt();
	this.ballRoll2.parent = this;
	this.ballRoll2.setTransform(56,61.7,1,0.882,0,0,0,55,55.1);

	this.timeline.addTween(cjs.Tween.get(this.ballRoll2).to({regY:54.9,scaleY:1.02,y:-5},8,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},8,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:1.1},7,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},7,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:7.3},6,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},6,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:13.4},6,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},6,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:19.6},5,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},5,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:25.7},5,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},5,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:36},5,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},5,cjs.Ease.get(-0.8)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:46.2},4,cjs.Ease.get(0.8)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},4,cjs.Ease.get(-0.8)).wait(1));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(160.2,512.1,1,0.161,0,0,0,46.6,46.5);
	this.shadowGround.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).wait(100));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-13.5,0.8,220.1,518.8);


(lib.ballBounce = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":115});

	// timeline functions:
	this.frame_0 = function() {
		this.shadowGround.alpha = 1;
		playSound("_053014706kickball2_01");
	}
	this.frame_34 = function() {
		playSound("_053014706kickball2_01");
	}
	this.frame_65 = function() {
		playSound("_053014706kickball2_light");
	}
	this.frame_92 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_115 = function() {
		this.parent.gotoAndPlay("timer");//this mc has 2 levels, so had to go up twice
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(34).call(this.frame_34).wait(31).call(this.frame_65).wait(27).call(this.frame_92).wait(23).call(this.frame_115).wait(1));

	// ball
	this.ballRoll = new lib.ballRollSlowRt();
	this.ballRoll.parent = this;
	this.ballRoll.setTransform(56,61.7,1,0.882,0,0,0,55,55.1);

	this.timeline.addTween(cjs.Tween.get(this.ballRoll).to({regY:54.9,scaleY:1.02,y:-65},17,cjs.Ease.get(0.99)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},17,cjs.Ease.get(-1)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:-55},15,cjs.Ease.get(0.99)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},15,cjs.Ease.get(-1)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:-45},13,cjs.Ease.get(0.99)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},13,cjs.Ease.get(-1)).wait(1).to({regX:55,regY:55.1,scaleY:0.88,x:56,y:61.7},0).to({regY:54.9,scaleY:1.02,y:-35},11,cjs.Ease.get(0.99)).to({regX:55.1,regY:55.3,scaleY:1,x:56.1,y:55.4},11,cjs.Ease.get(-1)).wait(1));

	// shadow
	this.shadowGround = new lib.shadowGround();
	this.shadowGround.parent = this;
	this.shadowGround.setTransform(56.5,108.8,1,0.204,0,0,0,46.5,46.5);

	this.timeline.addTween(cjs.Tween.get(this.shadowGround).to({regX:46.6,scaleX:0.5,scaleY:0.1,y:98.8,alpha:0.5},17,cjs.Ease.get(1)).to({regX:46.5,scaleX:1,scaleY:0.2,y:108.8,alpha:1},17,cjs.Ease.get(-1)).wait(1).to({regX:46.6,scaleX:0.5,scaleY:0.1,y:98.8,alpha:0.5},15,cjs.Ease.get(1)).to({regX:46.5,scaleX:1,scaleY:0.2,y:108.8,alpha:1},15,cjs.Ease.get(-1)).wait(1).to({regX:46.6,regY:46.4,scaleX:0.57,scaleY:0.12,y:98.8,alpha:0.5},13,cjs.Ease.get(1)).to({regX:46.5,regY:46.5,scaleX:1,scaleY:0.2,y:108.8,alpha:1},13,cjs.Ease.get(-1)).wait(1).to({regX:46.6,regY:46.6,scaleX:0.63,scaleY:0.13,y:98.8,alpha:0.5},11,cjs.Ease.get(1)).to({regX:46.5,regY:46.5,scaleX:1,scaleY:0.2,y:108.8,alpha:1},11,cjs.Ease.get(-1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-13.5,0.8,124.5,117.6);


(lib.ballBlueGlow_intro = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.ballBlueGlow();
	this.instance.parent = this;
	this.instance.setTransform(67.6,68.5,1,1,0,0,0,68,68);
	this.instance.alpha = 0.25;

	this.timeline.addTween(cjs.Tween.get(this.instance).to({alpha:1},5).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(1).to({alpha:0.75},4).to({alpha:1},4).wait(21).to({alpha:0},6).wait(1));

	// Layer 2
	this.shape = new cjs.Shape();
	this.shape.graphics.f("rgba(255,255,255,0.6)").s().p("AmrGsQixixAAj7QAAj5CxiyQCyixD5AAQD7AACxCxQCxCyAAD5QAAD7ixCxQixCxj7AAQj5AAiyixg");
	this.shape.setTransform(60.5,60.5);

	this.timeline.addTween(cjs.Tween.get(this.shape).to({_off:true},54).wait(6));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,121,121);


(lib.arrow_ani = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.arrow();
	this.instance.parent = this;
	this.instance.setTransform(1.5,19.7,1.5,1.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({scaleX:1.47,x:-8.5,y:19.6},4,cjs.Ease.get(-1)).to({scaleX:1.5,x:-16.5,y:19.7},4,cjs.Ease.get(1)).to({scaleX:1.47,x:-8.5,y:19.6},4,cjs.Ease.get(-1)).to({scaleX:1.5,x:1.5,y:19.7},4,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,60.2,39.4);


(lib.trophyAni320 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.trophyAll[trophyLevel].alpha = 1;
		this.stop();//wait for final step to play
	}
	this.frame_19 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(19).call(this.frame_19).wait(1));

	// trophyAll
	this.trophyAll = new lib.trophyAll();
	this.trophyAll.parent = this;
	this.trophyAll.setTransform(56.9,119.3,1,1,0,0,0,57.2,119.2);

	this.timeline.addTween(cjs.Tween.get(this.trophyAll).to({scaleX:0.75,scaleY:0.75,rotation:360,guide:{path:[57,119.3,129.5,-153.2,570.1,-229.2]}},19,cjs.Ease.get(1)).wait(1));

	// shadow
	this.instance = new lib.shadowTrophy();
	this.instance.parent = this;
	this.instance.setTransform(56.8,226,1.625,0.25,0,0,0,46.1,46.8);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({scaleX:1.8,x:81,y:225.9,alpha:0.801},0).to({regX:46.2,regY:46.6,scaleX:1.22,x:572.3,y:141.9,alpha:0},18,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-24.3,0.1,162,239);


(lib.trophyAni = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.trophyAll[trophyLevel].alpha = 1;
		this.stop();//wait for final step to play
	}
	this.frame_19 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(19).call(this.frame_19).wait(1));

	// trophyAll
	this.trophyAll = new lib.trophyAll();
	this.trophyAll.parent = this;
	this.trophyAll.setTransform(57.3,119.4,1,1,0,0,0,57.2,119.2);

	this.timeline.addTween(cjs.Tween.get(this.trophyAll).to({scaleX:0.75,scaleY:0.75,rotation:360,x:546.3,y:54.6},19,cjs.Ease.get(1)).wait(1));

	// shadow
	this.instance = new lib.shadowTrophy();
	this.instance.parent = this;
	this.instance.setTransform(59.9,228,1.625,0.269,0,0,0,46.2,46.6);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1).to({regY:46.9,scaleX:1.8,x:81.1,y:230.3,alpha:0.801},0).to({regY:46.6,scaleX:1.22,scaleY:0.25,x:546,y:134.7},18,cjs.Ease.get(1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-23.9,0.2,162,240.3);


(lib.keyCircles = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.key();
	this.instance.parent = this;
	this.instance.setTransform(17.6,45.9,0.75,0.75,0,0,0,23.4,45.4);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.keyCircles, new cjs.Rectangle(0,0,35,80.8), null);


(lib.finalScoreBoard = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		if(totalKicks == 0){
			this.alpha = 0;//don't show if no score
			this.stop();
		}else if(animLang_ar){
			this.gotoAndStop(2);//Arabic
		}else{
			this.gotoAndStop(1);
		}
	}
	this.frame_1 = function() {
		this.finalHitsAni.red.finalHits.text = totalHits;// fill with total Hits/score
		this.finalHitsAni.blue.finalHits.text = totalHits;
		this.finalKicks.text = totalKicks;
		
		this.stop();
	}
	this.frame_2 = function() {
		this.finalHitsAni_ar.red.finalHits.text = getArabicNumbers(totalHits);// fill with total Hits/score
		this.finalHitsAni_ar.blue.finalHits.text = getArabicNumbers(totalHits);
		this.finalKicks_ar.text = getArabicNumbers(totalKicks);
		
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1).call(this.frame_2).wait(1));

	// /
	this.text = new cjs.Text("/", "96px 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.text.textAlign = "center";
	this.text.lineHeight = 104;
	this.text.lineWidth = 65;
	this.text.parent = this;
	this.text.setTransform(160.5,43.9);

	this.shape = new cjs.Shape();
	this.shape.graphics.f().s("#FFFFFF").ss(8,2,0,3).p("ApwAAIThAA");
	this.shape.setTransform(146.5,113);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.text}]},1).to({state:[{t:this.shape}]},1).wait(1));

	// totalHits
	this.finalHitsAni = new lib.finalHitsAni();
	this.finalHitsAni.parent = this;
	this.finalHitsAni.setTransform(70.5,93.8,1,1,0,0,0,74.5,65.9);

	this.finalHitsAni_ar = new lib.finalHitsAni_ar();
	this.finalHitsAni_ar.parent = this;
	this.finalHitsAni_ar.setTransform(163.5,38.9,1,1,0,0,0,74.5,65.9);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.finalHitsAni}]},1).to({state:[{t:this.finalHitsAni_ar}]},1).wait(1));

	// totalKicksAR
	this.finalKicks_ar = new cjs.Text("000", "96px PizzaPressFill-AR, 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.finalKicks_ar.name = "finalKicks_ar";
	this.finalKicks_ar.textAlign = "center";
	this.finalKicks_ar.lineHeight = 133;
	this.finalKicks_ar.lineWidth = 198;
	this.finalKicks_ar.parent = this;
	this.finalKicks_ar.setTransform(147,113);
	this.finalKicks_ar._off = true;

	this.timeline.addTween(cjs.Tween.get(this.finalKicks_ar).wait(2).to({_off:false},0).wait(1));

	// totalKicks
	this.finalKicks = new cjs.Text("000", "96px 'One Dot Condensed Bold', 'Arial Narrow', Arial, Helvetica, sans-serif", "#FFFFFF");
	this.finalKicks.name = "finalKicks";
	this.finalKicks.lineHeight = 104;
	this.finalKicks.lineWidth = 178;
	this.finalKicks.parent = this;
	this.finalKicks.setTransform(179,43.9);
	this.finalKicks._off = true;

	this.timeline.addTween(cjs.Tween.get(this.finalKicks).wait(1).to({_off:false},0).to({_off:true},1).wait(1));

	// board
	this.shape_1 = new cjs.Shape();
	this.shape_1.graphics.f("rgba(0,0,0,0.008)").s().p("AzqTqQoJoJAArhQAArhIJoJQIKoJLgAAQLhAAIKIJQIJIJAALhQAALhoJIJQoKIKrhAAQrgAAoKoKg");
	this.shape_1.setTransform(147,105);

	this.shape_2 = new cjs.Shape();
	this.shape_2.graphics.f("rgba(0,0,0,0.698)").s().p("AzqTqQmBmBhln3QgjiyAAjAQAAlcB1ktQCClOESkTQIKoJLgAAQLhAAIKIJQESETCCFOQB1EtAAFcQAADAgjCyQhlH3mBGBQoKIKrhAAQrgAAoKoKg");
	this.shape_2.setTransform(147,105);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_1}]}).to({state:[{t:this.shape_2}]},1).wait(2));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-31,-73,356,356);


(lib.ballSpin_wShading = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"explode":10});

	// timeline functions:
	this.frame_0 = function() {
		this.ballClick.addEventListener("click", ballClickHandler);
		
		var mc = this;
		
		function ballClickHandler(event){
			mc.gotoAndPlay("explode");	
		}
	}
	this.frame_9 = function() {
		this.gotoAndPlay(1);//so doesn't define btn again
	}
	this.frame_10 = function() {
		//this.parent.parent.stop();
		this.parent.stop();
		//this.parent.shadowGround.alpha = 0;
		
		//console.log("Confetti Start");
		
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 150;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		for (var i = 0; i < INTENSITY; i++) { 
			var confettiType = Math.floor(Math.random() * 8) + 1;
		    create_particles(confettiType);  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * .5) + .5;
			//var startingX = 57;
			//var startingY = 54;
			var angleX = getNonZeroRandomNumber(100, 100)/100;//Math.floor(Math.random() * 180) + 1;	
			var angleY = getNonZeroRandomNumber(100, 100)/100;
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = angleX * ((Math.random() * 60)+60);
		    confetti.vy = angleY * ((Math.random() * 60)+60);
			
			if (Math.abs(confetti.vx) < 10 && Math.abs(confetti.vy) < 10){
				confetti.vx = 40;
				confetti.vy = 40;
			}
			
		    confetti.x = confetti.x;
		    confetti.y = confetti.y;
			//console.log("confetti.y = "+confetti.y);
			//console.log("angle = ", angleX, angleY, confetti.vx, confetti.vy);
		    //confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    //confetti.color = 'rgba(255,255,255,1)';
			//confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function getNonZeroRandomNumber(pos, neg){
			var result;
		
			result = Math.floor(Math.random() * (pos + neg)) - neg;
			return result = result < 0 ? result : result + 1;
		}
		  
		function animconfetti(event) {  
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy;
			//console.log("particle = ", particle.vx, particle.vy, particle.x, particle.y);
			
			//particle.rotation += particle.rotateAmt;
		
				if (particle.y > 300 || particle.y < -300 || particle.x > 300 || particle.x < -300) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
		playSound("_045670189balloonburst004wav");
	}
	this.frame_74 = function() {
		this.stop();
		this.parent.gotoAndPlay("timer");
		
		//console.log("parent play timer");
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(9).call(this.frame_9).wait(1).call(this.frame_10).wait(64).call(this.frame_74).wait(1));

	// btn
	this.ballClick = new lib.btn_ballClick();
	this.ballClick.parent = this;
	this.ballClick.setTransform(54.6,55,1.25,1.25,0,0,0,55.2,55.2);
	new cjs.ButtonHelper(this.ballClick, 0, 1, 2, false, new lib.btn_ballClick(), 3);

	this.timeline.addTween(cjs.Tween.get(this.ballClick).to({_off:true},10).wait(65));

	// shading
	this.instance = new lib.ballshading2();
	this.instance.parent = this;
	this.instance.setTransform(56,58.7,1.049,1.049,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({_off:true},10).wait(65));

	// ball spin
	this.ballSpinAll = new lib.ballSpin();
	this.ballSpinAll.parent = this;
	this.ballSpinAll.setTransform(19.3,126.9,0.3,0.3,0,0,0,93.7,168.7);

	this.timeline.addTween(cjs.Tween.get(this.ballSpinAll).to({_off:true},10).wait(65));

	// confetti particles
	this.myParticleEffectContainer8 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer8.parent = this;
	this.myParticleEffectContainer8.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer7 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer7.parent = this;
	this.myParticleEffectContainer7.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer6 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer6.parent = this;
	this.myParticleEffectContainer6.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer5 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer5.parent = this;
	this.myParticleEffectContainer5.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer4 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer4.parent = this;
	this.myParticleEffectContainer4.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer3 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer3.parent = this;
	this.myParticleEffectContainer3.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer2 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer2.parent = this;
	this.myParticleEffectContainer2.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer.parent = this;
	this.myParticleEffectContainer.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.myParticleEffectContainer},{t:this.myParticleEffectContainer2},{t:this.myParticleEffectContainer3},{t:this.myParticleEffectContainer4},{t:this.myParticleEffectContainer5},{t:this.myParticleEffectContainer6},{t:this.myParticleEffectContainer7},{t:this.myParticleEffectContainer8}]},10).wait(65));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-16.8,-15.7,146.1,146.2);


(lib.ballMain_spin2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":57});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		this.spin.gotoAndPlay(1);
	}
	this.frame_8 = function() {
		playSound("_001096722cheeryeahmale_01");
	}
	this.frame_57 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_58 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(7).call(this.frame_8).wait(49).call(this.frame_57).wait(1).call(this.frame_58).wait(1));

	// Layer 1
	this.instance = new lib.ballspin1();
	this.instance.parent = this;
	this.instance.setTransform(56.2,55.3,0.15,0.15,0,0,0,368.4,368.4);

	this.spin = new lib.ballSpin_wShading();
	this.spin.parent = this;
	this.spin.setTransform(56.2,25.3,0.85,0.85,0,0,0,55.2,55.2);
	this.spin._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.spin}]},1).to({state:[{t:this.spin}]},7).to({state:[{t:this.spin}]},40).to({state:[{t:this.spin}]},7).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.spin).wait(1).to({_off:false},0).to({regY:55.3,x:211.2,y:66.3},7).to({regX:55.3,x:891.2},40).to({regY:55.2,x:1034.2,y:25.3},7).to({_off:true},1).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(38.2,-16,73.1,73.1);


(lib.ballMain_spin = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":57});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		this.spin.gotoAndPlay(1);
	}
	this.frame_8 = function() {
		playSound("_087181881woohooquietshort_01");
	}
	this.frame_57 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_58 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(7).call(this.frame_8).wait(49).call(this.frame_57).wait(1).call(this.frame_58).wait(1));

	// Layer 1
	this.instance = new lib.ballspin1();
	this.instance.parent = this;
	this.instance.setTransform(56.2,55.3,0.15,0.15,0,0,0,368.4,368.4);

	this.spin = new lib.ballSpin_wShading();
	this.spin.parent = this;
	this.spin.setTransform(56.2,25.3,0.85,0.85,0,0,0,55.2,55.2);
	this.spin._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.spin}]},1).to({state:[{t:this.spin}]},7).to({state:[{t:this.spin}]},40).to({state:[{t:this.spin}]},7).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.spin).wait(1).to({_off:false},0).to({regY:55.3,x:211.2,y:66.3},7).to({regX:55.3,x:891.2},40).to({regY:55.2,x:1034.2,y:25.3},7).to({_off:true},1).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(38.2,-16,73.1,73.1);


(lib.ballMain_bounceTracker = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":101});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 1);//behind tracker
	}
	this.frame_99 = function() {
		playSound("_053014706kickball2_light2");
	}
	this.frame_101 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_102 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(98).call(this.frame_99).wait(2).call(this.frame_101).wait(1).call(this.frame_102).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(55,64.7,1,0.882,0,0,0,55,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(56,64.4,1,0.882,0,0,0,55,55);

	this.instance_2 = new lib.ballBounceOnTracker();
	this.instance_2.parent = this;
	this.instance_2.setTransform(21.1,57.3,0.7,0.7,0,0,180,54.6,55.4);
	this.instance_2._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.instance_2}]},1).to({state:[{t:this.instance_2}]},16).to({state:[{t:this.instance_2}]},64).to({state:[{t:this.instance_2}]},12).to({state:[]},2).wait(8));
	this.timeline.addTween(cjs.Tween.get(this.instance_2).wait(1).to({_off:false},0).to({regY:55.5,x:-88.9,y:170.3},16).to({x:-777.9},64).to({regX:54.7,x:-894,y:210.3},12).to({_off:true},2).wait(8));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(1,15.9,110,97);


(lib.ballMain_bounce = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"timer":112});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();
		
		//console.log("Ball Main Bounce Start 0");
	}
	this.frame_1 = function() {
		gotoZ("animation_container", 200);//in front of tracker
		
		this.ballBounce.ballRoll.gotoAndPlay(1);
		this.ballBounce.gotoAndPlay(1);
		
		//console.log("Ball Main Bounce Start");
	}
	this.frame_112 = function() {
		this.stop();
		
		var wait = this;
		stB = setTimeout(function(){
			clearTimeout(stB);
			wait.play();	
		}, aniPauseTime);
	}
	this.frame_113 = function() {
		checkLevelOne("ballMain_" + ballPlayNum);
		
		this.gotoAndStop(0);
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(111).call(this.frame_112).wait(1).call(this.frame_113).wait(1));

	// ball
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(55,64.7,1,0.882,0,0,0,55,55);

	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(56,64.4,1,0.882,0,0,0,55,55);

	this.ballBounce = new lib.ballBounce();
	this.ballBounce.parent = this;
	this.ballBounce.setTransform(55.5,57.9,1,1,0,0,0,55.5,55.1);
	this.ballBounce._off = true;

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).to({state:[{t:this.ballBounce}]},1).to({state:[{t:this.ballBounce}]},109).to({state:[]},1).wait(3));
	this.timeline.addTween(cjs.Tween.get(this.ballBounce).wait(1).to({_off:false},0).to({x:1025.5},109).to({_off:true},1).wait(3));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(1,15.9,110,97);


(lib.ballEndBounce_ani = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// Layer 1
	this.instance = new lib.ballEndBounce();
	this.instance.parent = this;
	this.instance.setTransform(55.1,109.3,1.02,0.98,0,0,0,54.9,109.4);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({regX:55,regY:109.2,scaleX:1,scaleY:1,x:55,y:102.1},7,cjs.Ease.get(1)).to({y:109.2},7,cjs.Ease.get(-1)).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-0.9,2.1,112.2,107.8);


(lib.ballEND = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{wait:70,bounce:72,"explode":84});

	// timeline functions:
	this.frame_0 = function() {
		this.stop();//wait for parent to tell to play
		
		stage.enableMouseOver();
	}
	this.frame_70 = function() {
		this.stop();//wait for click
		
		this.ballClick.addEventListener("mouseover", ballEndOver);
		this.ballClick.addEventListener("mouseout", ballEndOut);
		this.ballClick.addEventListener("click", ballEndClickHandler);
		
		var mc2 = this;
		
		function ballEndClickHandler(event){
			mc2.ballClick.removeEventListener("mouseover", ballEndOver);
			mc2.ballClick.removeEventListener("mouseout", ballEndOut);
			mc2.ballClick.removeEventListener("click", ballEndClickHandler);
			mc2.gotoAndPlay("explode");
		}
		
		
		var mc = this;
		
		function ballEndOver(event){
			mc.ballClick.removeEventListener("mouseover", ballEndOver);
			mc.gotoAndStop("bounce");
			//console.log('ctaOver');
		}
		
		function ballEndOut(event){
			mc.ballClick.removeEventListener("mouseout", ballEndOut);
			mc.gotoAndStop("wait");
			//console.log('ctaOut');
		}
	}
	this.frame_84 = function() {
		//this.parent.parent.stop();
		//this.parent.stop();
		//this.parent.shadowGround.alpha = 0;
		
		//console.log("Confetti Start");
		
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 150;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		for (var i = 0; i < INTENSITY; i++) { 
			var confettiType = Math.floor(Math.random() * 8) + 1;
		    create_particles(confettiType);  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * .5) + .5;
			//var startingX = 57;
			//var startingY = 54;
			var angleX = getNonZeroRandomNumber(100, 100)/100;//Math.floor(Math.random() * 180) + 1;	
			var angleY = getNonZeroRandomNumber(100, 100)/100;
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = angleX * ((Math.random() * 60)+60);
		    confetti.vy = angleY * ((Math.random() * 60)+60);
			
			if (Math.abs(confetti.vx) < 10 && Math.abs(confetti.vy) < 10){
				confetti.vx = 40;
				confetti.vy = 40;
			}
			
		    confetti.x = confetti.x;
		    confetti.y = confetti.y;
			//console.log("confetti.y = "+confetti.y);
			//console.log("angle = ", angleX, angleY, confetti.vx, confetti.vy);
		    //confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    //confetti.color = 'rgba(255,255,255,1)';
			//confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function getNonZeroRandomNumber(pos, neg){
			var result;
		
			result = Math.floor(Math.random() * (pos + neg)) - neg;
			return result = result < 0 ? result : result + 1;
		}
		  
		function animconfetti(event) {  
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy;
		
			//console.log("particle = ", particle.vx, particle.vy, particle.x, particle.y);
			
			//particle.rotation += particle.rotateAmt;
		
				if (particle.y > 300 || particle.y < -300 || particle.x > 300 || particle.x < -300) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
		playSound("_045670189balloonburst004wav");
	}
	this.frame_102 = function() {
		this.parent.gotoAndPlay("endconfetti");
	}
	this.frame_174 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(70).call(this.frame_70).wait(14).call(this.frame_84).wait(18).call(this.frame_102).wait(72).call(this.frame_174).wait(1));

	// btn
	this.ballClick = new lib.btn_ballClick();
	this.ballClick.parent = this;
	this.ballClick.setTransform(54.5,55.1,1.1,1.1,0,0,0,55.1,55.1);
	this.ballClick._off = true;
	new cjs.ButtonHelper(this.ballClick, 0, 1, 2, false, new lib.btn_ballClick(), 3);

	this.timeline.addTween(cjs.Tween.get(this.ballClick).wait(70).to({_off:false},0).to({_off:true},14).wait(91));

	// shading
	this.instance = new lib.ballshading1();
	this.instance.parent = this;
	this.instance.setTransform(54.1,55.3,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({_off:true},72).wait(103));

	// ball
	this.instance_1 = new lib.ballRotateR("synched",0);
	this.instance_1.parent = this;
	this.instance_1.setTransform(55,55,1,1,0,0,0,55,55);

	this.instance_2 = new lib.ballEndBounce_ani();
	this.instance_2.parent = this;
	this.instance_2.setTransform(55,55,1,1,0,0,0,55,55);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1}]}).to({state:[{t:this.instance_1}]},70).to({state:[{t:this.instance_2}]},2).to({state:[]},12).wait(91));
	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({rotation:360},70,cjs.Ease.get(1)).to({_off:true},2).wait(103));

	// confetti particles
	this.myParticleEffectContainer8 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer8.parent = this;
	this.myParticleEffectContainer8.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer7 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer7.parent = this;
	this.myParticleEffectContainer7.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer6 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer6.parent = this;
	this.myParticleEffectContainer6.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer5 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer5.parent = this;
	this.myParticleEffectContainer5.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer4 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer4.parent = this;
	this.myParticleEffectContainer4.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer3 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer3.parent = this;
	this.myParticleEffectContainer3.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer2 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer2.parent = this;
	this.myParticleEffectContainer2.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer.parent = this;
	this.myParticleEffectContainer.setTransform(65.9,64.5,1,1,0,0,0,10,9.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.myParticleEffectContainer},{t:this.myParticleEffectContainer2},{t:this.myParticleEffectContainer3},{t:this.myParticleEffectContainer4},{t:this.myParticleEffectContainer5},{t:this.myParticleEffectContainer6},{t:this.myParticleEffectContainer7},{t:this.myParticleEffectContainer8}]},84).wait(91));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,110,110);


(lib.legend = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		if(false){
			this.alpha = 0;//don't show if Arabic
		}
		
		this.stop();
	}
	this.frame_6 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(6).call(this.frame_6).wait(1));

	// key - results
	this.instance = new lib.keyResults();
	this.instance.parent = this;
	this.instance.setTransform(48.4,48,1,1,0,0,0,35.4,51);

	this.timeline.addTween(cjs.Tween.get(this.instance).to({alpha:0},6).wait(1));

	// key - circles
	this.instance_1 = new lib.keyCircles();
	this.instance_1.parent = this;
	this.instance_1.setTransform(-19.3,46.9,1,1,0,0,0,17.4,40.4);

	this.timeline.addTween(cjs.Tween.get(this.instance_1).to({alpha:0},6).wait(1));

	// bg
	this.instance_2 = new lib.keyBg();
	this.instance_2.parent = this;
	this.instance_2.setTransform(19.9,46.8,1,1,0,0,0,68.5,51.2);

	this.timeline.addTween(cjs.Tween.get(this.instance_2).to({alpha:0},6).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-48.6,-4.4,137,103.3);


(lib.game850 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{intro:1,play:176,kick:185,score:216,"final":227,trophy:236,superFan:263,knockoff:321});

	// timeline functions:
	this.frame_0 = function() {
		gotoZ("animation_container", 200);//above tracker
		
		//console.log("---game 850");
		
		firstTime = 0; //so arrow will show on first kick
		
		score = ""; //display of hitTotal/tryTotal
		totalHits = 0;
		totalKicks = 0;
		difficultyLevel = 2;
		waitTime = 1000; //msecs to wait before lights move
		
		//random ball and goalie lights vars
		ballLightFrame_prev = 0;
		ballLightFrame_new = 0;
		goalieLightFrame_prev1 = 0;
		goalieLightFrame_new1 = 0;
		goalieLightFrame_prev2 = 0;
		goalieLightFrame_new2 = 0;
		soundScore = 0;//which sound to jump to
		soundMiss = 0;
		trophyLevel = "bronze";
		
		ballKicked = false;
		
		this.score.text = totalHits + "/" + totalKicks;
		
		
		//***** check animStage to see if should skip the game *****
		if(animStageNum > 3){
			this.gotoAndPlay("trophy");
		}
	}
	this.frame_177 = function() {
		//console.log("play");
		
		this.stop();
		var mc = this;
		
		var goalieLightsArray = [];
		var siCycle = setInterval(cycleLights, waitTime); 
		
		chooseBallLightFrame();
		chooseGoalieLightFrame1();
		
		
		//***** check animStage to see if should move on *****
		//if (st == null){
			clearTimeout(st);
			
			function stCheckStage(){		
				//console.log("stCheckStage");
				if (animStageNum > 3){
					//console.log("stCheckStage if:1", st);
					clearTimeout(st);
					clearInterval(siCycle);
					mc.ballKick.removeEventListener("touchstart", playKick);
					mc.ballKick.removeEventListener("mousedown", playKick);
					mc.gotoAndPlay("final");
				}else{
					//console.log("stCheckStage else");
					st = setTimeout(stCheckStage, 10000);	
				}
			}
			stCheckStage();
		//}
		
		
		function cycleLights() {
			//console.log("cycleLights");
			chooseBallLightFrame();
			chooseGoalieLightFrame1();
		}
		
		function chooseBallLightFrame(){
			ballLightFrame_new = Math.floor((Math.random() * 6) + 1);
			ballLightFrame_prev = ballLightFrame_new;
			//console.log("ballLightFrame_new = ", ballLightFrame_new);
			mc.lightsBall_game.gotoAndStop(ballLightFrame_new);	
		}
		
		function chooseGoalieLightFrame1(){
			//console.log("chooseGoalieLightFrame1");
			goalieLightsArray = [false,false,false,false,false,false];
			goalieLightsTrueNum = 0;
			while(goalieLightsTrueNum < difficultyLevel){
				findRandomNum = Math.floor((Math.random() * 6));
				if (goalieLightsArray[findRandomNum] == false){
					goalieLightsArray[findRandomNum] = true;
					goalieLightsTrueNum++;
				}
			}
			
			//console.log("goalieLightsArray", goalieLightsArray);
			
			for (var i=0; i < goalieLightsArray.length; i++){
				if(goalieLightsArray[i] == true){
					mc.lightsGoalie_game["lightGoalie"+ (i+1)].alpha = 1;	
				}else{
					mc.lightsGoalie_game["lightGoalie"+ (i+1)].alpha = 0;
				}		
			}
		}
		
		//ball kick
		this.ballKick.addEventListener("touchstart", playKick);
		this.ballKick.addEventListener("mousedown", playKick);
		
		function playKick(event){
			//console.log("------------");
			clearInterval(siCycle);
			mc.ballKick.removeEventListener("touchstart", playKick);
			mc.ballKick.removeEventListener("mousedown", playKick);
			
			if(goalieLightsArray[ballLightFrame_new-1] == true){
				roundAlert = "lose";
				//console.log("roundAlert", roundAlert);
				goalieLightFrame_new = ballLightFrame_new;
				//console.log("goalieLightFrame_new source lose", goalieLightFrame_new);
			}else{	
				totalHits = totalHits + 1;//increment score
				roundAlert = "win";
				//console.log("roundAlert", roundAlert);
				//console.log("goalieLightsArray.length", goalieLightsArray.length);
				
				var goalieLightsTrueArray = [];
				for (var i=0; i < goalieLightsArray.length; i++){
					//console.log(i, goalieLightsArray[i]);
					if (goalieLightsArray[i] == true){
						//console.log("added", i, goalieLightsArray[i]);
						goalieLightsTrueArray.push(i+1);
					}
				}
				
				//console.log("goalieLightsTrueArray", goalieLightsTrueArray, goalieLightsTrueArray.length, Math.floor(Math.random()*goalieLightsTrueArray.length));
				
				goalieLightFrame_new = goalieLightsTrueArray[Math.floor(Math.random()*goalieLightsTrueArray.length)];
				//console.log("goalieLightFrame_new source win", goalieLightFrame_new);
				
			}
			
			ballKicked = true;
			if(firstTime == 0){
				firstTime = 1;	
				mc.arrow.alpha = 0;
				mc.arrow.stop();
			}
			totalKicks = totalKicks + 1;//increment total times kicked
			//console.log("totalHits ",totalHits);
			//console.log("totalKicks ",totalKicks);
			
			mc.gotoAndPlay("kick");//ball and goalie animations
		}
	}
	this.frame_185 = function() {
		playSound("_079377898sportsrugbyballkick_01");
	}
	this.frame_192 = function() {
		if(roundAlert == "win"){
			soundScore++;//inits at 0, can be 1-3
			if(soundScore == 4){
				soundScore = 1;
			}
			this.gameSounds.gotoAndPlay("score" + soundScore);
		}else{
			soundMiss++;//inits at 0, can be 1-3
			if(soundMiss == 4){
				soundMiss = 1;
			}
			this.gameSounds.gotoAndPlay("miss" + soundMiss);
		}
	}
	this.frame_216 = function() {
		if(animLang_ar){
			this.play;//don't show score alerts if Arabic
			this.ballGame_kickGoalie["kick"+ ballLightFrame_new].lightGoalie_win.alpha = 0;//turn green (win) goalie light off
		}else{
			this.stop();//alert mc will tell when to play again
			var mc2 = this;
		
			if(roundAlert == "win"){
				mc2.winRoundAlert.alpha = 1;
				mc2.winRoundAlert.gotoAndPlay(1);
			}else{
				mc2.loseRoundAlert.alpha = 1;
				mc2.loseRoundAlert.gotoAndPlay(1);
			}
		}
	}
	this.frame_217 = function() {
		//this.score.text = totalHits + "/" + totalKicks; //put into score mcs
		this.score.gotoAndPlay(0);
		
		if(totalHits == 5){
			waitTime = 900;	
			if(animLang_ar == false){
				this.gameLegend.gotoAndPlay(1);//fades out
			}
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 10){
			difficultyLevel = 3;
			waitTime = 800;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 15){
			waitTime = 700;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 20){
			waitTime = 600;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 30){
			difficultyLevel = 4;
			waitTime = 500;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 40){
			waitTime = 400;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 50){
			difficultyLevel = 5;
			waitTime = 300;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}
		
		ballKicked = false;
		
		//***** check animStage to see if should move to next level *****
		
		if(animStageNum > 3){
			clearTimeout(st);
			this.gotoAndPlay("final");
		}else{
			this.gotoAndPlay("play");
		}
	}
	this.frame_227 = function() {
		if(totalHits >= 41){
			trophyLevel = "gold";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}else if(totalHits >= 21 && totalHits < 41){
			trophyLevel = "silver";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}else{
			trophyLevel = "bronze";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}
		
		loopcount = 0;//used for flashing totalHits
	}
	this.frame_236 = function() {
		playSound("_066812876sportscrowdarenacheererupt3_01");
	}
	this.frame_263 = function() {
		stage.enableMouseOver();
		this.stop();
		this.parent.gotoAndStop("gameconfetti" + targetWidth);
		//console.log("---gameconfetti 850 targetWidth", targetWidth);
		
		this.trophyBtn.addEventListener("click", playFan);
		this.trophyBtn.addEventListener("mouseover", trophyOver);
			
		mcFan = this;
		
		function playFan(event){
			mcFan.fanEasterEgg.play();//fan pops up
			mcFan.trophy.trophyAll.gotoAndStop(0);//won't jiggle anymore
		}
		
		function trophyOver(event){
			mcFan.trophyFlash.gotoAndPlay(1);//play flash	
		}
		
		//***** check animStage to see if should move on *****
		stCheckStage2();
		clearTimeout(st);
		
		var st2;
		function stCheckStage2(){
			//console.log("stCheckStage2");
			clearTimeout(st2);
			
			if (animStageNum > 4){
				//console.log("stCheckStage2 if");
				mcFan.trophyBtn.removeEventListener("click", playFan);
				mcFan.trophyBtn.removeEventListener("mouseover", trophyOver);
				mcFan.gotoAndPlay("knockoff");
			}else{
				//console.log("stCheckStage2 else");
				st2 = setTimeout(stCheckStage2, 500);	
			}
		}
		
		
		//console.log("trophyLevel", trophyLevel);
	}
	this.frame_321 = function() {
		this.stop();//ball ani will tell to play
	}
	this.frame_322 = function() {
		this.trophy.trophyAll.gotoAndStop(0);//won't jiggle, in case was never clicked in stage 4
		this.trophy.gotoAndPlay(1);//gets knocked off screen
	}
	this.frame_368 = function() {
		waveOn = false; //init as false, so wave will know to play. gets set true in endconfetti frame, and false in wave mc
		this.parent.gotoAndPlay("endconfetti");
		this.stop();//main animation goes back to Scene1, to do confetti and call the wave ani
	}
	this.frame_369 = function() {
		this.stop();//just in case something crazy tells it to play
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(177).call(this.frame_177).wait(8).call(this.frame_185).wait(7).call(this.frame_192).wait(24).call(this.frame_216).wait(1).call(this.frame_217).wait(10).call(this.frame_227).wait(9).call(this.frame_236).wait(27).call(this.frame_263).wait(58).call(this.frame_321).wait(1).call(this.frame_322).wait(46).call(this.frame_368).wait(1).call(this.frame_369).wait(1));

	// audio mc game
	this.gameSounds = new lib.gameSounds();
	this.gameSounds.parent = this;
	this.gameSounds.setTransform(126.8,-70.5,1,1,0,0,0,12,12);
	this.gameSounds._off = true;

	this.timeline.addTween(cjs.Tween.get(this.gameSounds).wait(191).to({_off:false},0).to({_off:true},72).wait(107));

	// ball knock score/trophy
	this.ballMain_end = new lib.ballMain_end();
	this.ballMain_end.parent = this;
	this.ballMain_end.setTransform(-29.9,225.1,1,1,0,0,0,66.4,40.9);
	this.ballMain_end._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballMain_end).wait(321).to({_off:false},0).wait(49));

	// fanEasterEgg
	this.fanEasterEgg = new lib.fanEasterEggAni();
	this.fanEasterEgg.parent = this;
	this.fanEasterEgg.setTransform(97.8,380,1,1,0,0,0,145.8,128);
	this.fanEasterEgg._off = true;

	this.timeline.addTween(cjs.Tween.get(this.fanEasterEgg).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// trophyBtn
	this.trophyBtn = new lib.trophyBtn();
	this.trophyBtn.parent = this;
	this.trophyBtn.setTransform(372.2,123.2,1,1,0,0,0,57.2,119.2);
	this.trophyBtn._off = true;
	new cjs.ButtonHelper(this.trophyBtn, 0, 1, 2, false, new lib.trophyBtn(), 3);

	this.timeline.addTween(cjs.Tween.get(this.trophyBtn).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// fnal trophy
	this.trophy = new lib.trophyAni();
	this.trophy.parent = this;
	this.trophy.setTransform(708.2,123.2,1,1,0,0,0,57.2,119.2);
	this.trophy._off = true;

	this.timeline.addTween(cjs.Tween.get(this.trophy).wait(250).to({_off:false},0).to({x:372.2},13,cjs.Ease.get(1)).to({_off:true},106).wait(1));

	// trophyFlash
	this.trophyFlash = new lib.trophyFlashAni();
	this.trophyFlash.parent = this;
	this.trophyFlash.setTransform(372.3,123.5,1,1,0,0,0,63.5,117);
	this.trophyFlash._off = true;

	this.timeline.addTween(cjs.Tween.get(this.trophyFlash).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// final scoreboard
	this.finalScore_ani = new lib.finalScoreBoard();
	this.finalScore_ani.parent = this;
	this.finalScore_ani.setTransform(224.1,150.4,0.025,1,0,0,0,144,133.9);
	this.finalScore_ani._off = true;

	this.timeline.addTween(cjs.Tween.get(this.finalScore_ani).wait(236).to({_off:false},0).to({regX:143,scaleX:1,x:221.8},8).wait(6).to({x:63.8},13,cjs.Ease.get(1)).wait(58).to({regX:144.6,scaleX:0.03,x:3.8},3).wait(1).to({regX:142.2,scaleX:0.05,skewY:180,x:-6.2},0).to({regX:143,scaleX:1,x:-96.2},3).to({regX:142.8,scaleX:0.03,x:-166.2},3).wait(1).to({regX:142.6,scaleX:0.05,skewY:0,x:-176.2},0).to({regX:143,scaleX:1,x:-246.2},3).to({regX:143.5,scaleX:0.03,x:-266.2},3).to({_off:true},1).wait(31));

	// score
	this.score = new lib.score();
	this.score.parent = this;
	this.score.setTransform(548.5,93.6,1,1,0,0,0,94.5,35.6);
	this.score._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// arrow
	this.arrow = new lib.arrow_ani();
	this.arrow.parent = this;
	this.arrow.setTransform(335.6,228.1,1,1,0,0,0,30.1,19.7);
	this.arrow._off = true;

	this.timeline.addTween(cjs.Tween.get(this.arrow).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// lose X alert
	this.loseRoundAlert = new lib.loseAni();
	this.loseRoundAlert.parent = this;
	this.loseRoundAlert.setTransform(225.3,114,1,1,0,0,0,247.5,247.5);
	this.loseRoundAlert.alpha = 0;
	this.loseRoundAlert._off = true;

	this.timeline.addTween(cjs.Tween.get(this.loseRoundAlert).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// win +1 alert
	this.winRoundAlert = new lib.winAni();
	this.winRoundAlert.parent = this;
	this.winRoundAlert.setTransform(225.3,114,1,1,0,0,0,247.5,247.5);
	this.winRoundAlert.alpha = 0;
	this.winRoundAlert._off = true;

	this.timeline.addTween(cjs.Tween.get(this.winRoundAlert).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// ballKicked
	this.ballGame_kickGoalie = new lib.ballGameKickedGoalie();
	this.ballGame_kickGoalie.parent = this;
	this.ballGame_kickGoalie.setTransform(225.8,234.3,1,1,0,0,0,55,55);
	this.ballGame_kickGoalie._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballGame_kickGoalie).wait(185).to({_off:false},0).to({_off:true},32).wait(153));

	// ballBtn
	this.ballKick = new lib.btn_ballClick();
	this.ballKick.parent = this;
	this.ballKick.setTransform(170.8,178.3);
	this.ballKick._off = true;
	new cjs.ButtonHelper(this.ballKick, 0, 1, 2, false, new lib.btn_ballClick(), 3);

	this.timeline.addTween(cjs.Tween.get(this.ballKick).wait(176).to({_off:false},0).to({_off:true},2).wait(192));

	// ballWait
	this.instance = new lib.ballGameWait();
	this.instance.parent = this;
	this.instance.setTransform(223.3,519.8,1,1,0,0,0,60.5,60.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(7).to({y:579.8},0).to({x:231.3,y:239.8},10,cjs.Ease.get(1)).wait(159).to({_off:true},9).wait(185));

	// ballIntroGlow
	this.instance_1 = new lib.ballBlueGlow_intro("synched",0,false);
	this.instance_1.parent = this;
	this.instance_1.setTransform(224.7,233.5,1,1,0,0,0,60.5,60.5);

	this.instance_2 = new lib.ballBlueGlow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(231.8,241.5,1,1,0,0,0,68,68);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_1}]},33).to({state:[]},70).to({state:[{t:this.instance_2}]},73).to({state:[]},9).wait(185));

	// goalieJump
	this.goalieGame_jump = new lib.goalieGameJump();
	this.goalieGame_jump.parent = this;
	this.goalieGame_jump.setTransform(197.8,152.9,0.65,0.65,0,0,0,70.5,81.3);
	this.goalieGame_jump._off = true;

	this.timeline.addTween(cjs.Tween.get(this.goalieGame_jump).wait(185).to({_off:false},0).to({_off:true},32).wait(153));

	// goalieStand
	this.instance_3 = new lib.goalieStand_1();
	this.instance_3.parent = this;
	this.instance_3.setTransform(212.5,441.2,1,1,0,0,0,70.5,81.2);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(5).to({_off:false},0).to({regY:81.3,scaleX:0.65,scaleY:0.65,x:197.8,y:152.9},10,cjs.Ease.get(1)).to({_off:true},170).wait(185));

	// goalieIntroGlow
	this.instance_4 = new lib.goalieIntroGlow_intro("synched",0,false);
	this.instance_4.parent = this;
	this.instance_4.setTransform(197.5,152.2,0.65,0.65,0,0,0,71.6,83.2);
	this.instance_4._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(103).to({_off:false},0).to({_off:true},73).wait(194));

	// goalieshadow
	this.instance_5 = new lib.goalieStandShadow();
	this.instance_5.parent = this;
	this.instance_5.setTransform(212.5,441.2,1,1,0,0,0,70.5,81.2);
	this.instance_5._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_5).wait(5).to({_off:false},0).to({regY:81.3,scaleX:0.65,scaleY:0.65,x:196.5,y:152.9},10,cjs.Ease.get(1)).to({_off:true},170).wait(185));

	// lightsGoalie
	this.instance_6 = new lib.lightsGoalie_intro("synched",0,false);
	this.instance_6.parent = this;
	this.instance_6.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);

	this.lightsGoalie_game = new lib.lightsGoalie_game();
	this.lightsGoalie_game.parent = this;
	this.lightsGoalie_game.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_6}]},103).to({state:[]},72).to({state:[{t:this.lightsGoalie_game}]},1).to({state:[]},51).wait(143));

	// lightsBall
	this.instance_7 = new lib.lightsBall_intro("synched",0,false);
	this.instance_7.parent = this;
	this.instance_7.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);

	this.lightsBall_game = new lib.lightsBall_game();
	this.lightsBall_game.parent = this;
	this.lightsBall_game.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_7}]},33).to({state:[]},70).to({state:[{t:this.lightsBall_game}]},73).to({state:[]},51).wait(143));

	// lightsGoalie_off
	this.instance_8 = new lib.lightsGoalie_off();
	this.instance_8.parent = this;
	this.instance_8.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);
	this.instance_8.alpha = 0.25;
	this.instance_8._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_8).wait(11).to({_off:false},0).to({alpha:1},6).to({_off:true},210).wait(143));

	// lightsBall_off
	this.instance_9 = new lib.lightsBall_off();
	this.instance_9.parent = this;
	this.instance_9.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);
	this.instance_9.alpha = 0.25;
	this.instance_9._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_9).wait(11).to({_off:false},0).to({alpha:1},6).to({_off:true},210).wait(143));

	// net
	this.instance_10 = new lib.net_1();
	this.instance_10.parent = this;
	this.instance_10.setTransform(189.2,327.9,1,1,0,0,0,207.2,74);

	this.timeline.addTween(cjs.Tween.get(this.instance_10).wait(1).to({y:77.9},10,cjs.Ease.get(1)).wait(216).to({regX:207,scaleX:0.08,x:220.3},8,cjs.Ease.get(-1)).to({_off:true},1).wait(134));

	// legend
	this.gameLegend = new lib.legend();
	this.gameLegend.parent = this;
	this.gameLegend.setTransform(725.3,160.3,1,1,0,0,0,20.3,20.3);
	this.gameLegend._off = true;

	this.timeline.addTween(cjs.Tween.get(this.gameLegend).wait(26).to({_off:false},0).to({x:570.3},7,cjs.Ease.get(1)).wait(194).to({x:730.3},8,cjs.Ease.get(-1)).to({_off:true},1).wait(134));

	// bg darken
	this.bgDarken = new lib.bgDarken();
	this.bgDarken.parent = this;
	this.bgDarken.setTransform(227,121,1,1,0,0,0,425,132);
	this.bgDarken.alpha = 0;

	this.timeline.addTween(cjs.Tween.get(this.bgDarken).to({alpha:0.5},11).wait(216).to({alpha:0},8).to({_off:true},1).wait(134));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-198,-11,850,580.3);


(lib.game640 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"intro":1,"play":176,"kick":185,"score":216,"final":227,"trophy":236,"superFan":263,"knockoff":321});

	// timeline functions:
	this.frame_0 = function() {
		gotoZ("animation_container", 200);//above tracker
		
		//console.log("---game 640");
		
		firstTime = 0; //so arrow will show on first kick
		
		score = ""; //display of hitTotal/tryTotal
		totalHits = 0;
		totalKicks = 0;
		difficultyLevel = 2;
		waitTime = 1000; //msecs to wait before lights move
		
		//random ball and goalie lights vars
		ballLightFrame_prev = 0;
		ballLightFrame_new = 0;
		goalieLightFrame_prev1 = 0;
		goalieLightFrame_new1 = 0;
		goalieLightFrame_prev2 = 0;
		goalieLightFrame_new2 = 0;
		soundScore = 0;//which sound to jump to
		soundMiss = 0;
		trophyLevel = "bronze";
		
		ballKicked = false;
		
		this.score.text = totalHits + "/" + totalKicks;
		
		
		//***** check animStage to see if should skip the game *****
		if(animStageNum > 3){
			this.gotoAndPlay("trophy");
		}
	}
	this.frame_177 = function() {
		//console.log("play");
		
		this.stop();
		var mc = this;
		
		var goalieLightsArray = [];
		var siCycle = setInterval(cycleLights, waitTime); 
		
		chooseBallLightFrame();
		chooseGoalieLightFrame1();
		
		
		//***** check animStage to see if should move on *****
		//if (st == null){
			clearTimeout(st);
			
			function stCheckStage(){		
				//console.log("stCheckStage");
				if (animStageNum > 3){
					//console.log("stCheckStage if:1", st);
					clearTimeout(st);
					clearInterval(siCycle);
					mc.ballKick.removeEventListener("touchstart", playKick);
					mc.ballKick.removeEventListener("mousedown", playKick);
					mc.gotoAndPlay("final");
				}else{
					//console.log("stCheckStage else");
					st = setTimeout(stCheckStage, 10000);	
				}
			}
			stCheckStage();
		//}
		
		
		function cycleLights() {
			//console.log("cycleLights");
			chooseBallLightFrame();
			chooseGoalieLightFrame1();
		}
		
		function chooseBallLightFrame(){
			ballLightFrame_new = Math.floor((Math.random() * 6) + 1);
			ballLightFrame_prev = ballLightFrame_new;
			//console.log("ballLightFrame_new = ", ballLightFrame_new);
			mc.lightsBall_game.gotoAndStop(ballLightFrame_new);	
		}
		
		function chooseGoalieLightFrame1(){
			//console.log("chooseGoalieLightFrame1");
			goalieLightsArray = [false,false,false,false,false,false];
			goalieLightsTrueNum = 0;
			while(goalieLightsTrueNum < difficultyLevel){
				findRandomNum = Math.floor((Math.random() * 6));
				if (goalieLightsArray[findRandomNum] == false){
					goalieLightsArray[findRandomNum] = true;
					goalieLightsTrueNum++;
				}
			}
			
			//console.log("goalieLightsArray", goalieLightsArray);
			
			for (var i=0; i < goalieLightsArray.length; i++){
				if(goalieLightsArray[i] == true){
					mc.lightsGoalie_game["lightGoalie"+ (i+1)].alpha = 1;	
				}else{
					mc.lightsGoalie_game["lightGoalie"+ (i+1)].alpha = 0;
				}		
			}
		}
		
		//ball kick
		this.ballKick.addEventListener("touchstart", playKick);
		this.ballKick.addEventListener("mousedown", playKick);
		
		function playKick(event){
			//console.log("------------");
			clearInterval(siCycle);
			mc.ballKick.removeEventListener("touchstart", playKick);
			mc.ballKick.removeEventListener("mousedown", playKick);
			
			if(goalieLightsArray[ballLightFrame_new-1] == true){
				roundAlert = "lose";
				//console.log("roundAlert", roundAlert);
				goalieLightFrame_new = ballLightFrame_new;
				//console.log("goalieLightFrame_new source lose", goalieLightFrame_new);
			}else{	
				totalHits = totalHits + 1;//increment score
				roundAlert = "win";
				//console.log("roundAlert", roundAlert);
				//console.log("goalieLightsArray.length", goalieLightsArray.length);
				
				var goalieLightsTrueArray = [];
				for (var i=0; i < goalieLightsArray.length; i++){
					//console.log(i, goalieLightsArray[i]);
					if (goalieLightsArray[i] == true){
						//console.log("added", i, goalieLightsArray[i]);
						goalieLightsTrueArray.push(i+1);
					}
				}
				
				//console.log("goalieLightsTrueArray", goalieLightsTrueArray, goalieLightsTrueArray.length, Math.floor(Math.random()*goalieLightsTrueArray.length));
				
				goalieLightFrame_new = goalieLightsTrueArray[Math.floor(Math.random()*goalieLightsTrueArray.length)];
				//console.log("goalieLightFrame_new source win", goalieLightFrame_new);
				
			}
			
			ballKicked = true;
			if(firstTime == 0){
				firstTime = 1;	
				mc.arrow.alpha = 0;
				mc.arrow.stop();
			}
			totalKicks = totalKicks + 1;//increment total times kicked
			//console.log("totalHits ",totalHits);
			//console.log("totalKicks ",totalKicks);
			
			mc.gotoAndPlay("kick");//ball and goalie animations
		}
	}
	this.frame_185 = function() {
		playSound("_079377898sportsrugbyballkick_01");
	}
	this.frame_192 = function() {
		if(roundAlert == "win"){
			soundScore++;//inits at 0, can be 1-3
			if(soundScore == 4){
				soundScore = 1;
			}
			this.gameSounds.gotoAndPlay("score" + soundScore);
		}else{
			soundMiss++;//inits at 0, can be 1-3
			if(soundMiss == 4){
				soundMiss = 1;
			}
			this.gameSounds.gotoAndPlay("miss" + soundMiss);
		}
	}
	this.frame_216 = function() {
		if(animLang_ar){
			this.play;//don't show score alerts if Arabic
			this.ballGame_kickGoalie["kick"+ ballLightFrame_new].lightGoalie_win.alpha = 0;//turn green (win) goalie light off
		}else{
			this.stop();//alert mc will tell when to play again
			var mc2 = this;
		
			if(roundAlert == "win"){
				mc2.winRoundAlert.alpha = 1;
				mc2.winRoundAlert.gotoAndPlay(1);
			}else{
				mc2.loseRoundAlert.alpha = 1;
				mc2.loseRoundAlert.gotoAndPlay(1);
			}
		}
	}
	this.frame_217 = function() {
		//this.score.text = totalHits + "/" + totalKicks; //put into score mcs
		this.score.gotoAndPlay(0);
		
		if(totalHits == 5){
			waitTime = 900;	
			if(animLang_ar == false){
				this.gameLegend.gotoAndPlay(1);//fades out
			}
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 10){
			difficultyLevel = 3;
			waitTime = 800;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 15){
			waitTime = 700;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 20){
			waitTime = 600;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 30){
			difficultyLevel = 4;
			waitTime = 500;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 40){
			waitTime = 400;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 50){
			difficultyLevel = 5;
			waitTime = 300;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}
		
		ballKicked = false;
		
		//***** check animStage to see if should move to next level *****
		if(animStageNum > 3){
			clearTimeout(st);
			this.gotoAndPlay("final");
		}else{
			this.gotoAndPlay("play");
		}
	}
	this.frame_227 = function() {
		if(totalHits >= 41){
			trophyLevel = "gold";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}else if(totalHits >= 21 && totalHits < 41){
			trophyLevel = "silver";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}else{
			trophyLevel = "bronze";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}
		
		loopcount = 0;//used for flashing totalHits
		
		this.parent.bgDarken_ani.gotoAndPlay("fadeout");//put on main level for responsive versions
	}
	this.frame_236 = function() {
		playSound("_066812876sportscrowdarenacheererupt3_01");
	}
	this.frame_263 = function() {
		stage.enableMouseOver();
		this.stop();
		this.parent.gotoAndStop("gameconfetti" + targetWidth);
		//console.log("---gameconfetti 640 targetWidth", targetWidth);
		
		this.trophyBtn.addEventListener("click", playFan);
		this.trophyBtn.addEventListener("mouseover", trophyOver);
			
		mcFan = this;
		
		function playFan(event){
			mcFan.fanEasterEgg.play();//fan pops up
			mcFan.trophy.trophyAll.gotoAndStop(0);//won't jiggle anymore
		}
		
		function trophyOver(event){
			mcFan.trophyFlash.gotoAndPlay(1);//play flash	
		}
		
		//***** check animStage to see if should move on *****
		stCheckStage2();
		clearTimeout(st);
		
		var st2;
		function stCheckStage2(){
			//console.log("stCheckStage2");
			clearTimeout(st2);
			
			if (animStageNum > 4){
				mcFan.trophyBtn.removeEventListener("click", playFan);
				mcFan.trophyBtn.removeEventListener("mouseover", trophyOver);
				mcFan.gotoAndPlay("knockoff");
			}else{
				//console.log("stCheckStage2 else");
				st2 = setTimeout(stCheckStage2, 500);	
			}
		}
	}
	this.frame_321 = function() {
		this.stop();//ball ani will tell to play
	}
	this.frame_322 = function() {
		this.trophy.trophyAll.gotoAndStop(0);//won't jiggle, in case not clicked in stage 4
		this.trophy.gotoAndPlay(1);//gets knocked off screen
	}
	this.frame_368 = function() {
		waveOn = false; //init as false, so wave will know to play. gets set true in endconfetti frame, and false in wave mc
		this.parent.gotoAndPlay("endconfetti");
		this.stop();//main animation goes back to Scene1, to do confetti and call the wave ani
	}
	this.frame_369 = function() {
		this.stop();//just in case something crazy tells it to play
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(177).call(this.frame_177).wait(8).call(this.frame_185).wait(7).call(this.frame_192).wait(24).call(this.frame_216).wait(1).call(this.frame_217).wait(10).call(this.frame_227).wait(9).call(this.frame_236).wait(27).call(this.frame_263).wait(58).call(this.frame_321).wait(1).call(this.frame_322).wait(46).call(this.frame_368).wait(1).call(this.frame_369).wait(1));

	// audio mc game
	this.gameSounds = new lib.gameSounds();
	this.gameSounds.parent = this;
	this.gameSounds.setTransform(126.8,-70.5,1,1,0,0,0,12,12);
	this.gameSounds._off = true;

	this.timeline.addTween(cjs.Tween.get(this.gameSounds).wait(191).to({_off:false},0).to({_off:true},72).wait(107));

	// ball knock score/trophy
	this.ballMain_end = new lib.ballMain_end();
	this.ballMain_end.parent = this;
	this.ballMain_end.setTransform(110.1,225.1,1,1,0,0,0,66.4,40.9);
	this.ballMain_end._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballMain_end).wait(321).to({_off:false},0).wait(49));

	// fanEasterEgg
	this.fanEasterEgg = new lib.fanEasterEggAni();
	this.fanEasterEgg.parent = this;
	this.fanEasterEgg.setTransform(237.8,380,1,1,0,0,0,145.8,128);
	this.fanEasterEgg._off = true;

	this.timeline.addTween(cjs.Tween.get(this.fanEasterEgg).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// trophyBtn
	this.trophyBtn = new lib.trophyBtn();
	this.trophyBtn.parent = this;
	this.trophyBtn.setTransform(502.2,123.2,1,1,0,0,0,57.2,119.2);
	this.trophyBtn._off = true;
	new cjs.ButtonHelper(this.trophyBtn, 0, 1, 2, false, new lib.trophyBtn(), 3);

	this.timeline.addTween(cjs.Tween.get(this.trophyBtn).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// fnal trophy
	this.trophy = new lib.trophyAni();
	this.trophy.parent = this;
	this.trophy.setTransform(708.2,123.2,1,1,0,0,0,57.2,119.2);
	this.trophy._off = true;

	this.timeline.addTween(cjs.Tween.get(this.trophy).wait(250).to({_off:false},0).to({x:502.2},13,cjs.Ease.get(1)).to({_off:true},106).wait(1));

	// trophyFlash
	this.trophyFlash = new lib.trophyFlashAni();
	this.trophyFlash.parent = this;
	this.trophyFlash.setTransform(502.3,123.5,1,1,0,0,0,63.5,117);
	this.trophyFlash._off = true;

	this.timeline.addTween(cjs.Tween.get(this.trophyFlash).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// final scoreboard
	this.finalScore_ani = new lib.finalScoreBoard();
	this.finalScore_ani.parent = this;
	this.finalScore_ani.setTransform(224.1,150.4,0.025,1,0,0,0,144,133.9);
	this.finalScore_ani._off = true;

	this.timeline.addTween(cjs.Tween.get(this.finalScore_ani).wait(236).to({_off:false},0).to({regX:143,scaleX:1,x:223.8},8).wait(77).to({regX:144.6,scaleX:0.03,x:123.8},3).wait(1).to({regX:142.2,scaleX:0.05,skewY:180,x:113.8},0).to({regX:143,scaleX:1,x:23.8},3).to({regX:142.8,scaleX:0.03,x:-46.2},3).wait(1).to({regX:142.6,scaleX:0.05,skewY:0,x:-56.2},0).to({regX:143,scaleX:1,x:-126.2},3).to({regX:143.5,scaleX:0.03,x:-146.2},3).to({_off:true},1).wait(31));

	// score
	this.score = new lib.score();
	this.score.parent = this;
	this.score.setTransform(539.5,90.6,0.9,0.9,0,0,0,94.5,35.6);
	this.score._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// arrow
	this.arrow = new lib.arrow_ani();
	this.arrow.parent = this;
	this.arrow.setTransform(335.6,228.1,1,1,0,0,0,30.1,19.7);
	this.arrow._off = true;

	this.timeline.addTween(cjs.Tween.get(this.arrow).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// lose X alert
	this.loseRoundAlert = new lib.loseAni();
	this.loseRoundAlert.parent = this;
	this.loseRoundAlert.setTransform(225.3,114,1,1,0,0,0,247.5,247.5);
	this.loseRoundAlert.alpha = 0;
	this.loseRoundAlert._off = true;

	this.timeline.addTween(cjs.Tween.get(this.loseRoundAlert).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// win +1 alert
	this.winRoundAlert = new lib.winAni();
	this.winRoundAlert.parent = this;
	this.winRoundAlert.setTransform(225.3,114,1,1,0,0,0,247.5,247.5);
	this.winRoundAlert.alpha = 0;
	this.winRoundAlert._off = true;

	this.timeline.addTween(cjs.Tween.get(this.winRoundAlert).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// ballKicked
	this.ballGame_kickGoalie = new lib.ballGameKickedGoalie();
	this.ballGame_kickGoalie.parent = this;
	this.ballGame_kickGoalie.setTransform(225.8,234.3,1,1,0,0,0,55,55);
	this.ballGame_kickGoalie._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballGame_kickGoalie).wait(185).to({_off:false},0).to({_off:true},32).wait(153));

	// ballBtn
	this.ballKick = new lib.btn_ballClick();
	this.ballKick.parent = this;
	this.ballKick.setTransform(170.8,178.3);
	this.ballKick._off = true;
	new cjs.ButtonHelper(this.ballKick, 0, 1, 2, false, new lib.btn_ballClick(), 3);

	this.timeline.addTween(cjs.Tween.get(this.ballKick).wait(176).to({_off:false},0).to({_off:true},2).wait(192));

	// ballWait
	this.instance = new lib.ballGameWait();
	this.instance.parent = this;
	this.instance.setTransform(223.3,519.8,1,1,0,0,0,60.5,60.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(7).to({y:579.8},0).to({x:231.3,y:239.8},10,cjs.Ease.get(1)).wait(159).to({_off:true},9).wait(185));

	// ballIntroGlow
	this.instance_1 = new lib.ballBlueGlow_intro("synched",0,false);
	this.instance_1.parent = this;
	this.instance_1.setTransform(224.7,233.5,1,1,0,0,0,60.5,60.5);

	this.instance_2 = new lib.ballBlueGlow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(231.8,241.5,1,1,0,0,0,68,68);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_1}]},33).to({state:[]},70).to({state:[{t:this.instance_2}]},73).to({state:[]},9).wait(185));

	// goalieJump
	this.goalieGame_jump = new lib.goalieGameJump();
	this.goalieGame_jump.parent = this;
	this.goalieGame_jump.setTransform(197.8,152.9,0.65,0.65,0,0,0,70.5,81.3);
	this.goalieGame_jump._off = true;

	this.timeline.addTween(cjs.Tween.get(this.goalieGame_jump).wait(185).to({_off:false},0).to({_off:true},32).wait(153));

	// goalieStand
	this.instance_3 = new lib.goalieStand_1();
	this.instance_3.parent = this;
	this.instance_3.setTransform(212.5,441.2,1,1,0,0,0,70.5,81.2);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(5).to({_off:false},0).to({regY:81.3,scaleX:0.65,scaleY:0.65,x:197.8,y:152.9},10,cjs.Ease.get(1)).to({_off:true},170).wait(185));

	// goalieIntroGlow
	this.instance_4 = new lib.goalieIntroGlow_intro("synched",0,false);
	this.instance_4.parent = this;
	this.instance_4.setTransform(197.5,152.2,0.65,0.65,0,0,0,71.6,83.2);
	this.instance_4._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(103).to({_off:false},0).to({_off:true},73).wait(194));

	// goalieshadow
	this.instance_5 = new lib.goalieStandShadow();
	this.instance_5.parent = this;
	this.instance_5.setTransform(212.5,441.2,1,1,0,0,0,70.5,81.2);
	this.instance_5._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_5).wait(5).to({_off:false},0).to({regY:81.3,scaleX:0.65,scaleY:0.65,x:196.5,y:152.9},10,cjs.Ease.get(1)).to({_off:true},170).wait(185));

	// lightsGoalie
	this.instance_6 = new lib.lightsGoalie_intro("synched",0,false);
	this.instance_6.parent = this;
	this.instance_6.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);

	this.lightsGoalie_game = new lib.lightsGoalie_game();
	this.lightsGoalie_game.parent = this;
	this.lightsGoalie_game.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_6}]},103).to({state:[]},72).to({state:[{t:this.lightsGoalie_game}]},1).to({state:[]},51).wait(143));

	// lightsBall
	this.instance_7 = new lib.lightsBall_intro("synched",0,false);
	this.instance_7.parent = this;
	this.instance_7.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);

	this.lightsBall_game = new lib.lightsBall_game();
	this.lightsBall_game.parent = this;
	this.lightsBall_game.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_7}]},33).to({state:[]},70).to({state:[{t:this.lightsBall_game}]},73).to({state:[]},51).wait(143));

	// lightsGoalie_off
	this.instance_8 = new lib.lightsGoalie_off();
	this.instance_8.parent = this;
	this.instance_8.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);
	this.instance_8.alpha = 0.25;
	this.instance_8._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_8).wait(11).to({_off:false},0).to({alpha:1},6).to({_off:true},210).wait(143));

	// lightsBall_off
	this.instance_9 = new lib.lightsBall_off();
	this.instance_9.parent = this;
	this.instance_9.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);
	this.instance_9.alpha = 0.25;
	this.instance_9._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_9).wait(11).to({_off:false},0).to({alpha:1},6).to({_off:true},210).wait(143));

	// net
	this.instance_10 = new lib.net_1();
	this.instance_10.parent = this;
	this.instance_10.setTransform(189.2,327.9,1,1,0,0,0,207.2,74);

	this.timeline.addTween(cjs.Tween.get(this.instance_10).wait(1).to({y:77.9},10,cjs.Ease.get(1)).wait(216).to({regX:207,scaleX:0.08,x:220.3},8,cjs.Ease.get(-1)).to({_off:true},1).wait(134));

	// legend
	this.gameLegend = new lib.legend();
	this.gameLegend.parent = this;
	this.gameLegend.setTransform(715.3,160.3,1,1,0,0,0,20.3,20.3);
	this.gameLegend._off = true;

	this.timeline.addTween(cjs.Tween.get(this.gameLegend).wait(26).to({_off:false},0).to({x:550.3},7,cjs.Ease.get(1)).wait(194).to({x:710.3},8,cjs.Ease.get(-1)).to({_off:true},1).wait(134));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-198,-11,850,580.3);


(lib.game320 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{"intro":1,"play":176,"kick":185,"score":216,"final":227,"trophy":236,"superFan":263,"knockoff":321});

	// timeline functions:
	this.frame_0 = function() {
		gotoZ("animation_container", 200);//above tracker
		
		
		
		firstTime = 0; //so arrow will show on first kick
		
		score = ""; //display of hitTotal/tryTotal
		totalHits = 0;
		totalKicks = 0;
		difficultyLevel = 2;
		waitTime = 1000; //msecs to wait before lights move
		
		//random ball and goalie lights vars
		ballLightFrame_prev = 0;
		ballLightFrame_new = 0;
		goalieLightFrame_prev1 = 0;
		goalieLightFrame_new1 = 0;
		goalieLightFrame_prev2 = 0;
		goalieLightFrame_new2 = 0;
		soundScore = 0;//which sound to jump to
		soundMiss = 0;
		trophyLevel = "bronze";
		
		ballKicked = false;
		
		this.score.text = totalHits + "/" + totalKicks;
		
		
		//***** check animStage to see if should skip the game *****
		if(animStageNum > 3){
			this.gotoAndPlay("trophy");
		}
	}
	this.frame_177 = function() {
		//console.log("play");
		
		this.stop();
		var mc = this;
		
		var goalieLightsArray = [];
		var siCycle = setInterval(cycleLights, waitTime); 
		
		chooseBallLightFrame();
		chooseGoalieLightFrame1();
		
		
		//***** check animStage to see if should move on *****
		//if (st == null){
			clearTimeout(st);
			
			function stCheckStage(){		
				//console.log("stCheckStage");
				if (animStageNum > 3){
					//console.log("stCheckStage if:1", st);
					clearTimeout(st);
					clearInterval(siCycle);
					mc.ballKick.removeEventListener("touchstart", playKick);
					mc.ballKick.removeEventListener("mousedown", playKick);
					mc.gotoAndPlay("final");
				}else{
					//console.log("stCheckStage else");
					st = setTimeout(stCheckStage, 10000);	
				}
			}
			stCheckStage();
		//}
		
		
		function cycleLights() {
			//console.log("cycleLights");
			chooseBallLightFrame();
			chooseGoalieLightFrame1();
		}
		
		function chooseBallLightFrame(){
			ballLightFrame_new = Math.floor((Math.random() * 6) + 1);
			ballLightFrame_prev = ballLightFrame_new;
			//console.log("ballLightFrame_new = ", ballLightFrame_new);
			mc.lightsBall_game.gotoAndStop(ballLightFrame_new);	
		}
		
		function chooseGoalieLightFrame1(){
			//console.log("chooseGoalieLightFrame1");
			goalieLightsArray = [false,false,false,false,false,false];
			goalieLightsTrueNum = 0;
			while(goalieLightsTrueNum < difficultyLevel){
				findRandomNum = Math.floor((Math.random() * 6));
				if (goalieLightsArray[findRandomNum] == false){
					goalieLightsArray[findRandomNum] = true;
					goalieLightsTrueNum++;
				}
			}
			
			//console.log("goalieLightsArray", goalieLightsArray);
			
			for (var i=0; i < goalieLightsArray.length; i++){
				if(goalieLightsArray[i] == true){
					mc.lightsGoalie_game["lightGoalie"+ (i+1)].alpha = 1;	
				}else{
					mc.lightsGoalie_game["lightGoalie"+ (i+1)].alpha = 0;
				}		
			}
		}
		
		//ball kick
		this.ballKick.addEventListener("touchstart", playKick);
		this.ballKick.addEventListener("mousedown", playKick);
		
		function playKick(event){
			//console.log("------------");
			clearInterval(siCycle);
			mc.ballKick.removeEventListener("touchstart", playKick);
			mc.ballKick.removeEventListener("mousedown", playKick);
			
			if(goalieLightsArray[ballLightFrame_new-1] == true){
				roundAlert = "lose";
				//console.log("roundAlert", roundAlert);
				goalieLightFrame_new = ballLightFrame_new;
				//console.log("goalieLightFrame_new source lose", goalieLightFrame_new);
			}else{	
				totalHits = totalHits + 1;//increment score
				roundAlert = "win";
				//console.log("roundAlert", roundAlert);
				//console.log("goalieLightsArray.length", goalieLightsArray.length);
				
				var goalieLightsTrueArray = [];
				for (var i=0; i < goalieLightsArray.length; i++){
					//console.log(i, goalieLightsArray[i]);
					if (goalieLightsArray[i] == true){
						//console.log("added", i, goalieLightsArray[i]);
						goalieLightsTrueArray.push(i+1);
					}
				}
				
				//console.log("goalieLightsTrueArray", goalieLightsTrueArray, goalieLightsTrueArray.length, Math.floor(Math.random()*goalieLightsTrueArray.length));
				
				goalieLightFrame_new = goalieLightsTrueArray[Math.floor(Math.random()*goalieLightsTrueArray.length)];
				//console.log("goalieLightFrame_new source win", goalieLightFrame_new);
				
			}
			
			ballKicked = true;
			if(firstTime == 0){
				firstTime = 1;	
				mc.arrow.alpha = 0;
				mc.arrow.stop();
			}
			totalKicks = totalKicks + 1;//increment total times kicked
			//console.log("totalHits ",totalHits);
			//console.log("totalKicks ",totalKicks);
			
			mc.gotoAndPlay("kick");//ball and goalie animations
		}
	}
	this.frame_185 = function() {
		playSound("_079377898sportsrugbyballkick_01");
	}
	this.frame_192 = function() {
		if(roundAlert == "win"){
			soundScore++;//inits at 0, can be 1-3
			if(soundScore == 4){
				soundScore = 1;
			}
			this.gameSounds.gotoAndPlay("score" + soundScore);
		}else{
			soundMiss++;//inits at 0, can be 1-3
			if(soundMiss == 4){
				soundMiss = 1;
			}
			this.gameSounds.gotoAndPlay("miss" + soundMiss);
		}
	}
	this.frame_216 = function() {
		if(animLang_ar){
			this.play;//don't show score alerts if Arabic
			this.ballGame_kickGoalie["kick"+ ballLightFrame_new].lightGoalie_win.alpha = 0;//turn green (win) goalie light off
		}else{
			this.stop();//alert mc will tell when to play again
			var mc2 = this;
		
			if(roundAlert == "win"){
				mc2.winRoundAlert.alpha = 1;
				mc2.winRoundAlert.gotoAndPlay(1);
			}else{
				mc2.loseRoundAlert.alpha = 1;
				mc2.loseRoundAlert.gotoAndPlay(1);
			}
		}
	}
	this.frame_217 = function() {
		//this.score.text = totalHits + "/" + totalKicks; //put into score mcs
		this.score.gotoAndPlay(0);
		
		if(totalHits == 5){
			waitTime = 900;	
			if(animLang_ar == false){
				this.gameLegend.gotoAndPlay(1);//fades out
			}
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 10){
			difficultyLevel = 3;
			waitTime = 800;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 15){
			waitTime = 700;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 20){
			waitTime = 600;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 30){
			difficultyLevel = 4;
			waitTime = 500;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 40){
			waitTime = 400;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}else if(totalHits == 50){
			difficultyLevel = 5;
			waitTime = 300;
			//console.log("totalHits ",totalHits,", difficultyLevel",difficultyLevel,", waitTime ",waitTime);
		}
		
		ballKicked = false;
		
		//***** check animStage to see if should move to next level *****
		if(animStageNum > 3){
			clearTimeout(st);
			this.gotoAndPlay("final");
		}else{
			this.gotoAndPlay("play");
		}
	}
	this.frame_227 = function() {
		if(totalHits >= 41){
			trophyLevel = "gold";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}else if(totalHits >= 21 && totalHits < 41){
			trophyLevel = "silver";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}else{
			trophyLevel = "bronze";
			//console.log("trophyLevel ",trophyLevel,", totalHits",totalHits);
		}
		
		loopcount = 0;//used for flashing totalHits
		
		this.parent.bgDarken_ani.gotoAndPlay("fadeout");//put on main level for responsive versions
	}
	this.frame_236 = function() {
		playSound("_066812876sportscrowdarenacheererupt3_01");
	}
	this.frame_263 = function() {
		stage.enableMouseOver();
		this.stop();
		this.parent.gotoAndStop("gameconfetti" + targetWidth);
		
		this.trophyBtn.addEventListener("click", playFan);
		this.trophyBtn.addEventListener("mouseover", trophyOver);
			
		mcFan = this;
		
		function playFan(event){
			mcFan.fanEasterEgg.play();//fan pops up
			mcFan.trophy.trophyAll.gotoAndStop(0);//won't jiggle anymore	
		}
		
		function trophyOver(event){
			mcFan.trophyFlash.gotoAndPlay(1);//play flash	
		}
		
		//***** check animStage to see if should move on *****
		stCheckStage2();
		clearTimeout(st);
		
		var st2;
		function stCheckStage2(){
			//console.log("stCheckStage2");
			clearTimeout(st2);
			
			if (animStageNum > 4){
				mcFan.trophyBtn.removeEventListener("click", playFan);
				mcFan.trophyBtn.removeEventListener("mouseover", trophyOver);
				mcFan.gotoAndPlay("knockoff");
			}else{
				//console.log("stCheckStage2 else");
				st2 = setTimeout(stCheckStage2, 500);	
			}
		}
	}
	this.frame_321 = function() {
		this.stop();//ball ani will tell to play
	}
	this.frame_322 = function() {
		this.trophy.trophyAll.gotoAndStop(0);//won't jiggle, in case not clicked in stage 4
		this.trophy.gotoAndPlay(1);//gets knocked off screen
	}
	this.frame_368 = function() {
		waveOn = false; //init as false, so wave will know to play. gets set true in endconfetti frame, and false in wave mc
		this.parent.gotoAndPlay("endconfetti");
		this.stop();//main animation goes back to Scene1, to do confetti and call the wave ani
	}
	this.frame_369 = function() {
		this.stop();//just in case something crazy tells it to play
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(177).call(this.frame_177).wait(8).call(this.frame_185).wait(7).call(this.frame_192).wait(24).call(this.frame_216).wait(1).call(this.frame_217).wait(10).call(this.frame_227).wait(9).call(this.frame_236).wait(27).call(this.frame_263).wait(58).call(this.frame_321).wait(1).call(this.frame_322).wait(46).call(this.frame_368).wait(1).call(this.frame_369).wait(1));

	// audio mc game
	this.gameSounds = new lib.gameSounds();
	this.gameSounds.parent = this;
	this.gameSounds.setTransform(126.8,-70.5,1,1,0,0,0,12,12);
	this.gameSounds._off = true;

	this.timeline.addTween(cjs.Tween.get(this.gameSounds).wait(191).to({_off:false},0).to({_off:true},72).wait(107));

	// ball knock score/trophy
	this.ballMain_end = new lib.ballMain_end();
	this.ballMain_end.parent = this;
	this.ballMain_end.setTransform(33.9,244.1,1,1,0,0,0,66.4,40.9);
	this.ballMain_end._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballMain_end).wait(321).to({_off:false},0).wait(49));

	// fanEasterEgg
	this.fanEasterEgg = new lib.fanEasterEggAni320();
	this.fanEasterEgg.parent = this;
	this.fanEasterEgg.setTransform(237.8,375.2,1,1,0,0,0,145.8,128);
	this.fanEasterEgg._off = true;

	this.timeline.addTween(cjs.Tween.get(this.fanEasterEgg).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// trophyBtn
	this.trophyBtn = new lib.trophyBtn();
	this.trophyBtn.parent = this;
	this.trophyBtn.setTransform(387.6,118.4,1,1,0,0,0,57.2,119.2);
	this.trophyBtn._off = true;
	new cjs.ButtonHelper(this.trophyBtn, 0, 1, 2, false, new lib.trophyBtn(), 3);

	this.timeline.addTween(cjs.Tween.get(this.trophyBtn).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// fnal trophy
	this.trophy = new lib.trophyAni320();
	this.trophy.parent = this;
	this.trophy.setTransform(387.6,399.8,1,1,0,0,0,57.2,119.2);
	this.trophy._off = true;

	this.timeline.addTween(cjs.Tween.get(this.trophy).wait(250).to({_off:false},0).to({y:118.4},13,cjs.Ease.get(1)).to({_off:true},106).wait(1));

	// trophyFlash
	this.trophyFlash = new lib.trophyFlashAni();
	this.trophyFlash.parent = this;
	this.trophyFlash.setTransform(394.9,123.5,1,1,0,0,0,63.5,117);
	this.trophyFlash._off = true;

	this.timeline.addTween(cjs.Tween.get(this.trophyFlash).wait(263).to({_off:false},0).to({_off:true},58).wait(49));

	// final scoreboard
	this.finalScore_ani = new lib.finalScoreBoard();
	this.finalScore_ani.parent = this;
	this.finalScore_ani.setTransform(224.1,97.9,0.025,1,0,0,0,144,133.9);
	this.finalScore_ani._off = true;

	this.timeline.addTween(cjs.Tween.get(this.finalScore_ani).wait(236).to({_off:false},0).to({regX:143,scaleX:1,x:223.8},8).wait(6).to({x:140,y:97.1},13,cjs.Ease.get(1)).wait(58).to({x:140.4,y:97.9},0).to({regX:144.6,scaleX:0.03,x:40.4},3).wait(1).to({regX:142.2,scaleX:0.05,skewY:180,x:30.4},0).to({regX:143,scaleX:1,x:-71.6},3).to({regX:142.8,scaleX:0.03,x:-141.6},3).wait(1).to({regX:142.6,scaleX:0.05,skewY:0,x:-151.6},0).to({regX:143,scaleX:1,x:-221.6},3).to({regX:143.5,scaleX:0.03,x:-241.6},3).to({_off:true},1).wait(31));

	// arrow
	this.arrow = new lib.arrow_ani();
	this.arrow.parent = this;
	this.arrow.setTransform(335.6,228.1,1,1,0,0,0,30.1,19.7);
	this.arrow._off = true;

	this.timeline.addTween(cjs.Tween.get(this.arrow).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// lose X alert
	this.loseRoundAlert = new lib.loseAni();
	this.loseRoundAlert.parent = this;
	this.loseRoundAlert.setTransform(223,48.7,1.15,1.15,0,0,0,247.5,227.5);
	this.loseRoundAlert.alpha = 0;
	this.loseRoundAlert._off = true;

	this.timeline.addTween(cjs.Tween.get(this.loseRoundAlert).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// win +1 alert
	this.winRoundAlert = new lib.winAni();
	this.winRoundAlert.parent = this;
	this.winRoundAlert.setTransform(223,48.7,1.15,1.15,0,0,0,247.5,227.5);
	this.winRoundAlert.alpha = 0;
	this.winRoundAlert._off = true;

	this.timeline.addTween(cjs.Tween.get(this.winRoundAlert).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// score
	this.score = new lib.score_320();
	this.score.parent = this;
	this.score.setTransform(100.2,-9.5,1.1,1.1,0,0,0,94.7,35.6);
	this.score._off = true;

	this.timeline.addTween(cjs.Tween.get(this.score).wait(176).to({_off:false},0).to({_off:true},51).wait(143));

	// ballKicked
	this.ballGame_kickGoalie = new lib.ballGameKickedGoalie();
	this.ballGame_kickGoalie.parent = this;
	this.ballGame_kickGoalie.setTransform(225.8,234.3,1,1,0,0,0,55,55);
	this.ballGame_kickGoalie._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballGame_kickGoalie).wait(185).to({_off:false},0).to({_off:true},32).wait(153));

	// ballBtn
	this.ballKick = new lib.btn_ballClick();
	this.ballKick.parent = this;
	this.ballKick.setTransform(170.8,178.3);
	this.ballKick._off = true;
	new cjs.ButtonHelper(this.ballKick, 0, 1, 2, false, new lib.btn_ballClick(), 3);

	this.timeline.addTween(cjs.Tween.get(this.ballKick).wait(176).to({_off:false},0).to({_off:true},2).wait(192));

	// ballWait
	this.instance = new lib.ballGameWait();
	this.instance.parent = this;
	this.instance.setTransform(223.3,519.8,1,1,0,0,0,60.5,60.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(7).to({y:579.8},0).to({x:231.3,y:239.8},10,cjs.Ease.get(1)).wait(159).to({_off:true},9).wait(185));

	// ballIntroGlow
	this.instance_1 = new lib.ballBlueGlow_intro("synched",0,false);
	this.instance_1.parent = this;
	this.instance_1.setTransform(224.7,233.5,1,1,0,0,0,60.5,60.5);

	this.instance_2 = new lib.ballBlueGlow();
	this.instance_2.parent = this;
	this.instance_2.setTransform(231.8,241.5,1,1,0,0,0,68,68);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_1}]},33).to({state:[]},70).to({state:[{t:this.instance_2}]},73).to({state:[]},9).wait(185));

	// goalieJump
	this.goalieGame_jump = new lib.goalieGameJump();
	this.goalieGame_jump.parent = this;
	this.goalieGame_jump.setTransform(197.8,152.9,0.65,0.65,0,0,0,70.5,81.3);
	this.goalieGame_jump._off = true;

	this.timeline.addTween(cjs.Tween.get(this.goalieGame_jump).wait(185).to({_off:false},0).to({_off:true},32).wait(153));

	// goalieStand
	this.instance_3 = new lib.goalieStand_1();
	this.instance_3.parent = this;
	this.instance_3.setTransform(212.5,441.2,1,1,0,0,0,70.5,81.2);
	this.instance_3._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_3).wait(5).to({_off:false},0).to({regY:81.3,scaleX:0.65,scaleY:0.65,x:197.8,y:152.9},10,cjs.Ease.get(1)).to({_off:true},170).wait(185));

	// goalieIntroGlow
	this.instance_4 = new lib.goalieIntroGlow_intro("synched",0,false);
	this.instance_4.parent = this;
	this.instance_4.setTransform(197.5,152.2,0.65,0.65,0,0,0,71.6,83.2);
	this.instance_4._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(103).to({_off:false},0).to({_off:true},73).wait(194));

	// goalieshadow
	this.instance_5 = new lib.goalieStandShadow();
	this.instance_5.parent = this;
	this.instance_5.setTransform(212.5,441.2,1,1,0,0,0,70.5,81.2);
	this.instance_5._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_5).wait(5).to({_off:false},0).to({regY:81.3,scaleX:0.65,scaleY:0.65,x:196.5,y:152.9},10,cjs.Ease.get(1)).to({_off:true},170).wait(185));

	// lightsGoalie
	this.instance_6 = new lib.lightsGoalie_intro("synched",0,false);
	this.instance_6.parent = this;
	this.instance_6.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);

	this.lightsGoalie_game = new lib.lightsGoalie_game();
	this.lightsGoalie_game.parent = this;
	this.lightsGoalie_game.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_6}]},103).to({state:[]},72).to({state:[{t:this.lightsGoalie_game}]},1).to({state:[]},51).wait(143));

	// lightsBall
	this.instance_7 = new lib.lightsBall_intro("synched",0,false);
	this.instance_7.parent = this;
	this.instance_7.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);

	this.lightsBall_game = new lib.lightsBall_game();
	this.lightsBall_game.parent = this;
	this.lightsBall_game.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.instance_7}]},33).to({state:[]},70).to({state:[{t:this.lightsBall_game}]},73).to({state:[]},51).wait(143));

	// lightsGoalie_off
	this.instance_8 = new lib.lightsGoalie_off();
	this.instance_8.parent = this;
	this.instance_8.setTransform(225.3,97,1,1,0,0,0,202.3,70.3);
	this.instance_8.alpha = 0.25;
	this.instance_8._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_8).wait(11).to({_off:false},0).to({alpha:1},6).to({_off:true},210).wait(143));

	// lightsBall_off
	this.instance_9 = new lib.lightsBall_off();
	this.instance_9.parent = this;
	this.instance_9.setTransform(225.3,97,1,1,0,0,0,196.5,64.5);
	this.instance_9.alpha = 0.25;
	this.instance_9._off = true;

	this.timeline.addTween(cjs.Tween.get(this.instance_9).wait(11).to({_off:false},0).to({alpha:1},6).to({_off:true},210).wait(143));

	// net
	this.instance_10 = new lib.net_1();
	this.instance_10.parent = this;
	this.instance_10.setTransform(189.2,327.9,1,1,0,0,0,207.2,74);

	this.timeline.addTween(cjs.Tween.get(this.instance_10).wait(1).to({y:77.9},10,cjs.Ease.get(1)).wait(216).to({regX:207,scaleX:0.08,x:220.3},8,cjs.Ease.get(-1)).to({_off:true},1).wait(134));

	// legend
	this.gameLegend = new lib.legend();
	this.gameLegend.parent = this;
	this.gameLegend.setTransform(98,305.9,0.7,0.7,0,0,0,40,39.6);
	this.gameLegend._off = true;

	this.timeline.addTween(cjs.Tween.get(this.gameLegend).wait(25).to({_off:false},0).to({regX:20.4,regY:20.4,x:84.3,y:218.5},8,cjs.Ease.get(1)).wait(194).to({regY:20.3,y:218.4},0).to({y:292.4},8,cjs.Ease.get(-1)).to({_off:true},1).wait(134));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(-198,-110,850,679.3);


// stage content:
(lib.soccer_01 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{game850:19,gameconfetti850:29,game640:58,gameconfetti640:68,game320:98,gameconfetti320:108,endconfetti:141});

	// timeline functions:
	this.frame_0 = function() {
		ballPlayNum = 0;
		ballPlayTotal = 9;
		aniPauseTime = 3000;
		loopcount = 0;
		trophyLevel = "bronze";//starts at this level, goes up with scores
		st = null;
		stB = null;
		_main = this;
		firstBall = true;//if true, runs function loadAll in next frame, load 2nd manifest
		
		/*try {
			if(Number.isInteger(animStageNum)){
		
			}
		}
		catch(err) {
			animStageNum = 2;
		}*/
		
		//console.log("animStageNum",animStageNum);
		
		checkLevelOne = function(whichBall){	
			//console.log("whichBall ",whichBall);
			if(animStageNum > 2){
				if(animStageWidth < 640){
					targetWidth = 320;
				}else if(animStageWidth >= 640 && animStageWidth < 845){
					targetWidth = 640;
				}else{
					targetWidth = 850;
				}
				_main.gotoAndStop("game" + targetWidth);
				//console.log("animStageWidth ",animStageWidth,"targetWidth ",targetWidth);
			}else{
				ballPlayNum++;
				if(ballPlayNum > ballPlayTotal){
					ballPlayNum = 0;
				}
			}
			_main["ballMain_" + ballPlayNum].gotoAndPlay(1);
		}
	}
	this.frame_1 = function() {
		this.stop(); 
		
		if(firstBall){
			firstBall = false;
			loadAll();//load 2nd manifest
		}
		
		this.ballMain_0.gotoAndPlay(1); //1st ball hits the tracker
	}
	this.frame_19 = function() {
		gotoZ("animation_container", 200);//above tracker
		this.stop();
	}
	this.frame_29 = function() {
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 250;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		
		//this.thisFPS.text = "FPS:" + createjs.Ticker.getMeasuredFPS();
		if (createjs.Ticker.getMeasuredFPS() > 15){
			for (var i = 0; i < INTENSITY; i++) { 
				var confettiType = Math.floor(Math.random() * 8) + 1;
				create_particles(confettiType);  
			}  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * 1) + 0.25;
			var startingY = Math.random() * H/2 - H/2;
			var angle = Math.floor(Math.random() * 10) - 5;	
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = ((Math.random() - 0.5) * 5);
		    confetti.vy = (Math.random() * 8) + 3;
		    confetti.x = Math.floor((Math.random() * W));
		    confetti.y = startingY;
		    confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    confetti.color = 'rgba(255,255,255,1)';
			confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function animconfetti(event) {  
		/*    event.target.y += event.target.vy;  
		    event.target.x += vx;  
		    if (event.target.y > 260 || event.target.x > 345 || event.target.x < -30) {  
		        event.target.y = -20;  
		        event.target.x = Math.random() * W;  
		    } */ 
			
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy + 1;
			particle.rotation += particle.rotateAmt;
		
				if (particle.y > (H + 40) || particle.x > (W+30) || particle.x < -30) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
	}
	this.frame_58 = function() {
		gotoZ("animation_container", 200);//above tracker
		
		//if(animStageNum != 3){
		//	this.bgDarken_ani1.gotoAndStop(0);//put on main level for responsive versions, only darken if playing the game
		//	console.log("don't darken", animStageNum);
		//}
		
		
		this.stop();
	}
	this.frame_68 = function() {
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 250;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		
		//this.thisFPS.text = "FPS:" + createjs.Ticker.getMeasuredFPS();
		if (createjs.Ticker.getMeasuredFPS() > 15){
			for (var i = 0; i < INTENSITY; i++) { 
				var confettiType = Math.floor(Math.random() * 8) + 1;
				create_particles(confettiType);  
			}  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * 1) + 0.25;
			var startingY = Math.random() * H/2 - H/2;
			var angle = Math.floor(Math.random() * 10) - 5;	
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = ((Math.random() - 0.5) * 5);
		    confetti.vy = (Math.random() * 8) + 3;
		    confetti.x = Math.floor((Math.random() * W));
		    confetti.y = startingY;
		    confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    confetti.color = 'rgba(255,255,255,1)';
			confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function animconfetti(event) {  
		/*    event.target.y += event.target.vy;  
		    event.target.x += vx;  
		    if (event.target.y > 260 || event.target.x > 345 || event.target.x < -30) {  
		        event.target.y = -20;  
		        event.target.x = Math.random() * W;  
		    } */ 
			
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy + 1;
			particle.rotation += particle.rotateAmt;
		
				if (particle.y > (H + 40) || particle.x > (W+30) || particle.x < -30) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
	}
	this.frame_98 = function() {
		gotoZ("animation_container", 200);//above tracker
		
		this.game320.x = (animStageWidth/2) - 10;
		//console.log("this.game320.x", this.game320.x);
		//console.log("animStageWidth/2", animStageWidth/2);
		
		//if(animStageNum == 3){
		//	this.bgDarken_ani2.gotoAndPlay("fadein");//put on main level for responsive versions, only darken if playing the game
		//}
		
		this.stop();
	}
	this.frame_108 = function() {
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 250;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		
		//this.thisFPS.text = "FPS:" + createjs.Ticker.getMeasuredFPS();
		if (createjs.Ticker.getMeasuredFPS() > 15){
			for (var i = 0; i < INTENSITY; i++) { 
				var confettiType = Math.floor(Math.random() * 8) + 1;
				create_particles(confettiType);  
			}  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * 1) + 0.25;
			var startingY = Math.random() * H/2 - H/2;
			var angle = Math.floor(Math.random() * 10) - 5;	
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = ((Math.random() - 0.5) * 5);
		    confetti.vy = (Math.random() * 8) + 3;
		    confetti.x = Math.floor((Math.random() * W));
		    confetti.y = startingY;
		    confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    confetti.color = 'rgba(255,255,255,1)';
			confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function animconfetti(event) {  
		/*    event.target.y += event.target.vy;  
		    event.target.x += vx;  
		    if (event.target.y > 260 || event.target.x > 345 || event.target.x < -30) {  
		        event.target.y = -20;  
		        event.target.x = Math.random() * W;  
		    } */ 
			
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy + 1;
			particle.rotation += particle.rotateAmt;
		
				if (particle.y > (H + 40) || particle.x > (W+30) || particle.x < -30) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
	}
	this.frame_141 = function() {
		playSound("_066812876sportscrowdarenacheererupt3_01");
		playSound("_000862379vuvuzelaslight_01");
		//get targetWidth, so correct wave version will play
		if(animStageWidth < 640){
			targetWidth = 320;
		}else if(animStageWidth >= 640 && animStageWidth < 845){
			targetWidth = 640;
		}else{
			targetWidth = 850;
		}
		
		if(waveOn == false){
			waveON = true;//set to false at end of wavePeople mc... that way it doesn't restart if btn hit twice quickly
			startWave("wave" + targetWidth);//html function - tells "wave" to play
		}
		
		var W = canvas.width;
		var H = canvas.height; 
		var INTENSITY = 250;
		//var vx = Math.random() * -2 + 1;  
		var container = this.myParticleEffectContainer;  
		
		//this.thisFPS.text = "FPS:" + createjs.Ticker.getMeasuredFPS();
		if (createjs.Ticker.getMeasuredFPS() > 15){
			for (var i = 0; i < INTENSITY; i++) { 
				var confettiType = Math.floor(Math.random() * 8) + 1;
				create_particles(confettiType);  
			}  
		}  
		  
		function create_particles(confettiType) { 
			if(confettiType==1){
				confetti = new lib.Confetti1;
			}else if(confettiType==2){
				confetti = new lib.Confetti2;
			}else if(confettiType==3){
				confetti = new lib.Confetti3;
			}else if(confettiType==4){
				confetti = new lib.Confetti4;
			}else if(confettiType==5){
				confetti = new lib.Confetti5;
			}else if(confettiType==6){
				confetti = new lib.Confetti6;
			}else if(confettiType==7){
				confetti = new lib.Confetti7;
			}else{
				confetti = new lib.Confetti8;
			}
			
			
		    //confetti.x = Math.random() * W;  
		    //confetti.y = Math.random() * H;  
		    //confetti.scaleX = confetti.scaleY = Math.random() * .8 - .5;  
		    //confetti.vy = Math.random() * 1 + 2;  
			
			var scaling = (Math.random() * 1) + 0.25;
			var startingY = Math.random() * H/2 - H/2;
			var angle = Math.floor(Math.random() * 10) - 5;	
			/*if (spawnType == "repeat"){
				startingY = -50;
			}*/
			
			confetti.vx = ((Math.random() - 0.5) * 5);
		    confetti.vy = (Math.random() * 8) + 3;
		    confetti.x = Math.floor((Math.random() * W));
		    confetti.y = startingY;
		    confetti.alpha = (Math.random() * 1) + 0.25;
		    confetti.scaleX = scaling;
			confetti.scaleY = scaling;
		    confetti.color = 'rgba(255,255,255,1)';
			confetti.rotateAmt = angle;	
			
		    container.addChild(confetti);  
		    confetti.addEventListener("tick", animconfetti);  
			
		}
		
		function animconfetti(event) {  
		/*    event.target.y += event.target.vy;  
		    event.target.x += vx;  
		    if (event.target.y > 260 || event.target.x > 345 || event.target.x < -30) {  
		        event.target.y = -20;  
		        event.target.x = Math.random() * W;  
		    } */ 
			
		
			var particle = event.target;
			particle.x += particle.vx;
			particle.y += particle.vy + 1;
			particle.rotation += particle.rotateAmt;
		
				if (particle.y > (H + 40) || particle.x > (W+30) || particle.x < -30) {  
					//create_particles("repeat");
					//particle.y = 20;  
					//particle.x = 100;//Math.random() * W;  
					//console.log(">");
					container.removeChild(particle);
				}
		}
	}
	this.frame_220 = function() {
		this.ballEnd.gotoAndPlay(1);//roll...don't replay 0 since stage.enableMouseOver doesn't need to be done again
	}
	this.frame_290 = function() {
		this.stop();//wait to be told to go play confetti and wave again
	}
	this.frame_299 = function() {
		this.stop();
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(18).call(this.frame_19).wait(10).call(this.frame_29).wait(29).call(this.frame_58).wait(10).call(this.frame_68).wait(30).call(this.frame_98).wait(10).call(this.frame_108).wait(33).call(this.frame_141).wait(79).call(this.frame_220).wait(70).call(this.frame_290).wait(9).call(this.frame_299).wait(1));

	// confetti particles
	this.myParticleEffectContainer8 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer8.parent = this;
	this.myParticleEffectContainer8.setTransform(-49.1,26.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer7 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer7.parent = this;
	this.myParticleEffectContainer7.setTransform(-79.1,26.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer6 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer6.parent = this;
	this.myParticleEffectContainer6.setTransform(-109.1,26.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer5 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer5.parent = this;
	this.myParticleEffectContainer5.setTransform(-19.1,46.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer4 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer4.parent = this;
	this.myParticleEffectContainer4.setTransform(-49.1,46.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer3 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer3.parent = this;
	this.myParticleEffectContainer3.setTransform(-79.1,46.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer2 = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer2.parent = this;
	this.myParticleEffectContainer2.setTransform(-109.1,46.5,1,1,0,0,0,10,9.5);

	this.myParticleEffectContainer = new lib.myParticleEffectContainer();
	this.myParticleEffectContainer.parent = this;
	this.myParticleEffectContainer.setTransform(-19.1,26.5,1,1,0,0,0,10,9.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.myParticleEffectContainer},{t:this.myParticleEffectContainer2},{t:this.myParticleEffectContainer3},{t:this.myParticleEffectContainer4},{t:this.myParticleEffectContainer5},{t:this.myParticleEffectContainer6},{t:this.myParticleEffectContainer7},{t:this.myParticleEffectContainer8}]},29).wait(271));

	// END ball btn
	this.ballEnd = new lib.ballEND();
	this.ballEnd.parent = this;
	this.ballEnd.setTransform(-108.2,199,1.2,1.2,0,0,0,54.6,55.1);
	this.ballEnd._off = true;

	this.timeline.addTween(cjs.Tween.get(this.ballEnd).wait(141).to({_off:false},0).wait(78).to({x:-78.2},0).to({x:161.8},70,cjs.Ease.get(1)).wait(11));

	// GAME
	this.game850 = new lib.game850();
	this.game850.parent = this;
	this.game850.setTransform(405.2,99.3,1,1,0,0,0,206.9,87.7);

	this.game640 = new lib.game640();
	this.game640.parent = this;
	this.game640.setTransform(216.2,99.3,1,1,0,0,0,206.9,87.7);

	this.game320 = new lib.game320();
	this.game320.parent = this;
	this.game320.setTransform(148.6,144.2,0.65,0.65,0,0,0,207,87.7);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.game850}]},19).to({state:[]},37).to({state:[{t:this.game640}]},2).to({state:[]},38).to({state:[{t:this.game320}]},2).to({state:[]},43).wait(159));

	// darken, for responsive
	this.bgDarken_ani = new lib.bgDarken_ani();
	this.bgDarken_ani.parent = this;
	this.bgDarken_ani.setTransform(425,132,1,1,0,0,0,425,132);
	this.bgDarken_ani._off = true;

	this.timeline.addTween(cjs.Tween.get(this.bgDarken_ani).wait(58).to({_off:false},0).to({_off:true},10).wait(30).to({_off:false},0).to({_off:true},10).wait(192));

	// 0 ball start
	this.ballMain_0 = new lib.ballMain_start();
	this.ballMain_0.parent = this;
	this.ballMain_0.setTransform(-71.9,252,1,1,0,0,0,55.5,55.1);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_0).wait(19).to({alpha:0},0).wait(281));

	// 2 ball bounce rt in front
	this.ballMain_2 = new lib.ballMain_bounce();
	this.ballMain_2.parent = this;
	this.ballMain_2.setTransform(-58.4,183.6,1,1,0,0,0,55.5,60.6);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_2).wait(19).to({alpha:0},0).wait(281));

	// 4 hit screen
	this.ballMain_4 = new lib.ballMain_hitScreen();
	this.ballMain_4.parent = this;
	this.ballMain_4.setTransform(105.3,-98.8,1,1,0,0,0,55.5,55.1);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_4).wait(19).to({alpha:0},0).wait(281));

	// 6 fly over
	this.ballMain_6 = new lib.ballMain_flyOver();
	this.ballMain_6.parent = this;
	this.ballMain_6.setTransform(-103.8,341.1,1,1,0,0,0,55.5,55.1);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_6).wait(19).to({alpha:0},0).wait(281));

	// 8 ball spin back rt
	this.ballMain_8 = new lib.ballMain_spin();
	this.ballMain_8.parent = this;
	this.ballMain_8.setTransform(-63.1,58.2,1,1,0,0,0,55.8,55.2);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_8).wait(19).to({alpha:0},0).wait(281));

	// 1 fly over
	this.ballMain_1 = new lib.ballMain_flyOver2();
	this.ballMain_1.parent = this;
	this.ballMain_1.setTransform(962.1,341.1,1,1,0,0,180,55.5,55.1);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_1).wait(19).to({alpha:0},0).wait(281));

	// 3 ball spin back left - large
	this.ballMain_3 = new lib.ballMain_spin2();
	this.ballMain_3.parent = this;
	this.ballMain_3.setTransform(1025.6,177.1,1.5,1.5,0,0,180,55.8,55.2);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_3).wait(19).to({alpha:0},0).wait(281));

	// 5 bounce on tracker
	this.ballMain_5 = new lib.ballMain_bounceTracker();
	this.ballMain_5.parent = this;
	this.ballMain_5.setTransform(905.5,-30.8,1,1,0,0,0,55.5,60.6);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_5).wait(19).to({alpha:0},0).wait(281));

	// 7 loop tracker once
	this.ballMain_7 = new lib.ballMain_loopOnce();
	this.ballMain_7.parent = this;
	this.ballMain_7.setTransform(755.7,-65.8,1,1,0,0,180,55.7,55.3);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_7).wait(19).to({alpha:0},0).wait(281));

	// 9 boomerang tracker
	this.ballMain_9 = new lib.ballMain_boomerang();
	this.ballMain_9.parent = this;
	this.ballMain_9.setTransform(916.5,69.2,1,1,0,0,0,55.5,60.6);

	this.timeline.addTween(cjs.Tween.get(this.ballMain_9).wait(19).to({alpha:0},0).wait(281));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(129,56.5,1348.1,496.9);
// library properties:
lib.properties = {
	id: '3D2435C332984441BA72F7AA7916907E',
	width: 850,
	height: 264,
	fps: 30,
	color: "#FFFFFF",
	opacity: 1.00,
	manifest: [
		{src:"images/soccer2_atlas_P_.png?1526257545277", id:"soccer2_atlas_P_"},
		{src:"sounds/_001082364fightgruntsmalequiet_01.mp3?1526163143035", id:"_001082364fightgruntsmalequiet_01"},
		{src:"sounds/_001096722cheeryeahmale_01.mp3?1526163143035", id:"_001096722cheeryeahmale_01"},
		{src:"sounds/_045670189balloonburst004wav.mp3?1526163143035", id:"_045670189balloonburst004wav"},
		{src:"sounds/_053014706kickball2_01.mp3?1526163143035", id:"_053014706kickball2_01"},
		{src:"sounds/_053014706kickball2_light.mp3?1526163143035", id:"_053014706kickball2_light"},
		{src:"sounds/_053014706kickball2_light2.mp3?1526163143035", id:"_053014706kickball2_light2"},
		{src:"sounds/_079377898sportsrugbyballkickloud_01.mp3?1526163143035", id:"_079377898sportsrugbyballkickloud_01"},
		{src:"sounds/_079377898sportsrugbyballkick_01.mp3?1526163143035", id:"_079377898sportsrugbyballkick_01"},
		{src:"sounds/_079378321soccerballkickground_01.mp3?1526163143035", id:"_079378321soccerballkickground_01"},
		{src:"sounds/_087181881woohooquietshort_01.mp3?1526163143035", id:"_087181881woohooquietshort_01"}
	],
	preloads: []
};



// bootstrap callback support:

(lib.Stage = function(canvas) {
	createjs.Stage.call(this, canvas);
}).prototype = p = new createjs.Stage();

p.setAutoPlay = function(autoPlay) {
	this.tickEnabled = autoPlay;
}
p.play = function() { this.tickEnabled = true; this.getChildAt(0).gotoAndPlay(this.getTimelinePosition()) }
p.stop = function(ms) { if(ms) this.seek(ms); this.tickEnabled = false; }
p.seek = function(ms) { this.tickEnabled = true; this.getChildAt(0).gotoAndStop(lib.properties.fps * ms / 1000); }
p.getDuration = function() { return this.getChildAt(0).totalFrames / lib.properties.fps * 1000; }

p.getTimelinePosition = function() { return this.getChildAt(0).currentFrame / lib.properties.fps * 1000; }

an.bootcompsLoaded = an.bootcompsLoaded || [];
if(!an.bootstrapListeners) {
	an.bootstrapListeners=[];
}

an.bootstrapCallback=function(fnCallback) {
	an.bootstrapListeners.push(fnCallback);
	if(an.bootcompsLoaded.length > 0) {
		for(var i=0; i<an.bootcompsLoaded.length; ++i) {
			fnCallback(an.bootcompsLoaded[i]);
		}
	}
};

an.compositions = an.compositions || {};
an.compositions['3D2435C332984441BA72F7AA7916907E'] = {
	getStage: function() { return exportRoot.getStage(); },
	getLibrary: function() { return lib; },
	getSpriteSheet: function() { return ss; },
	getImages: function() { return img; }
};

an.compositionLoaded = function(id) {
	an.bootcompsLoaded.push(id);
	for(var j=0; j<an.bootstrapListeners.length; j++) {
		an.bootstrapListeners[j](id);
	}
}

an.getComposition = function(id) {
	return an.compositions[id];
}



})(createjs = createjs||{}, AdobeAn = AdobeAn||{});
var createjs, AdobeAn;