OwlCyberSecurity - MANAGER
Edit File: dressup.js
var dressup = function(game) { } dressup.prototype = { create: function() { page = 1; naked = true; this.CheckScene(); Body = this.add.sprite(205,338,"body"); Body.anchor.setTo(0.5,0.5); Bra = this.add.sprite(185,173,"bra"); Bra.anchor.setTo(0.5,0.5); Head = this.add.sprite(185,78,"head"); Head.anchor.setTo(0.5,0.5); Eyes = this.add.sprite(176,82,"eyes"); Eyes.anchor.setTo(0.5,0.5); Blink = this.add.sprite(177,85,"blink"); Blink.anchor.setTo(0.5,0.5); Blink.alpha = 0; this.game.time.events.add(2000,function() { Eyes.alpha = 0; Blink_Tween = this.add.tween(Blink).to({alpha: 1},100,Phaser.Easing.Linear.None,true); Blink_Tween.onComplete.add(function() { var RandNum = Math.floor(Math.random()*(2 - 1 + 1)) + 1; var BlinkTimer = 0; if(RandNum == 0 || RandNum == 2){BlinkTimer = 4000;} if(RandNum == 1){BlinkTimer = 2000;} this.game.time.events.add(50,function() { Eyes.alpha = 1; Blink.alpha = 0; this.game.time.events.add(BlinkTimer,function(){Blink_Tween.start();Eyes.alpha = 0;},this); },this); },this); },this); Hair = this.add.sprite(199,105,"hair"); Hair.anchor.setTo(0.5,0.5); Tops_Color = this.add.sprite(187,210,"tops_color"); Tops_Color.anchor.setTo(0.5,0.5); Tops_Color.visible = false; Tops_Outline = this.add.sprite(Tops_Color.x+1,Tops_Color.y,"tops_outline"); Tops_Outline.anchor.setTo(0.5,0.5); Tops_Outline.visible = false; Bottoms_Color = this.add.sprite(179,373,"bottoms_color"); Bottoms_Color.anchor.setTo(0.5,0.5); Bottoms_Color.visible = false; Bottoms_Outline = this.add.sprite(Bottoms_Color.x-.5,Bottoms_Color.y,"bottoms_outline"); Bottoms_Outline.anchor.setTo(0.5,0.5); Bottoms_Outline.visible = false; Dress_Color = this.add.sprite(167,268,"dress_color"); Dress_Color.anchor.setTo(0.5,0.5); Dress_Color.visible = false; Dress_Outline = this.add.sprite(Dress_Color.x-1,Dress_Color.y,"dress_outline"); Dress_Outline.anchor.setTo(0.5,0.5); Dress_Outline.visible = false; Shoes_Color = this.add.sprite(205,544,"shoes_color"); Shoes_Color.anchor.setTo(0.5,0.5); Shoes_Color.visible = false; Shoes_Outline = this.add.sprite(Shoes_Color.x,Shoes_Color.y,"shoes_outline"); Shoes_Outline.anchor.setTo(0.5,0.5); Shoes_Outline.visible = false; Access = this.add.sprite(176,82,"access"); Access.anchor.setTo(0.5,0.5); Access.visible = false; Access_Bags = this.add.sprite(87,362,"access_bags"); Access_Bags.anchor.setTo(0.5,0.5); Access_Bags.visible = false; Access2 = this.add.sprite(190,151,"access2") Access2.anchor.setTo(0.5,0.5); Access2.visible = false; Access3 = this.add.sprite(203,42,"access3"); Access3.anchor.setTo(0.5,0.5); Access3.visible = false; Doll_Group = this.add.group(); this.SortOriginal(); //Closet Closet = this.add.sprite(571,298,"closet"); Closet.anchor.setTo(0.5,0.5); //Color_Icon Color_Icon = this.add.button(458,104,"color_icon",function() { this.Color_fnc(Colors[0]); },this); Color_Icon.anchor.setTo(0.5,0.5); /*Color_Icon.events.onInputOver.add(function() { if(Color_Icon.frame == 2){ Color_Icon.frame = 2; } else{ Color_Icon.frame = 0; } },this); Color_Icon.events.onInputDown.add(function(){ Color_Icon.frame = 2; },this); Color_Icon.events.onInputOut.add(function() { if(Color_Icon.frame == 2){ Color_Icon.frame = 2; } else{ Color_Icon.frame = 0; } },this); Color_Icon.events.onInputUp.add(function() { if(Color_Icon.frame == 2) { Color_Icon.frame = 2; Color_Icon2.frame = 0; Color_Icon3.frame = 0; Color_Icon4.frame = 0; Color_Icon5.frame = 0; Color_Icon6.frame = 0; } else{ Color_Icon.frame = 0; } },this);*/ Color_Icon2 = this.add.button(Color_Icon.x + Color_Icon.width + 12,Color_Icon.y,"color_icon2",function() { this.Color_fnc(Colors[1]); },this); Color_Icon2.anchor.setTo(0.5,0.5); /*Color_Icon2.events.onInputOver.add(function() { if(Color_Icon2.frame == 2){ Color_Icon2.frame = 2; } else{ Color_Icon2.frame = 0; } },this); Color_Icon2.events.onInputDown.add(function(){ Color_Icon2.frame = 2; },this); Color_Icon2.events.onInputOut.add(function() { if(Color_Icon2.frame == 2){ Color_Icon2.frame = 2; } else{ Color_Icon2.frame = 0; } },this); Color_Icon2.events.onInputUp.add(function() { if(Color_Icon2.frame == 2) { Color_Icon.frame = 0; Color_Icon2.frame = 2; Color_Icon3.frame = 0; Color_Icon4.frame = 0; Color_Icon5.frame = 0; Color_Icon6.frame = 0; } else{ Color_Icon2.frame = 0; } },this);*/ Color_Icon3 = this.add.button(Color_Icon2.x + Color_Icon2.width + 14,Color_Icon2.y,"color_icon3",function() { this.Color_fnc(Colors[2]); },this); Color_Icon3.anchor.setTo(0.5,0.5); Color_Icon4 = this.add.button(Color_Icon3.x + Color_Icon3.width + 14,Color_Icon3.y,"color_icon4",function() { this.Color_fnc(Colors[3]); },this); Color_Icon4.anchor.setTo(0.5,0.5); Color_Icon5 = this.add.button(Color_Icon4.x + Color_Icon4.width + 14,Color_Icon4.y,"color_icon5",function() { this.Color_fnc(Colors[4]); },this); Color_Icon5.anchor.setTo(0.5,0.5); Color_Icon6 = this.add.button(Color_Icon5.x + Color_Icon5.width + 14,Color_Icon5.y,"color_icon6",function() { this.Color_fnc(Colors[5]); },this); Color_Icon6.anchor.setTo(0.5,0.5); Color_Icon7 = this.add.button(Color_Icon.x,176,"color_icon7",function() { this.Color_fnc(Colors2[0]); },this); Color_Icon7.anchor.setTo(0.5,0.5); Color_Icon8 = this.add.button(Color_Icon2.x,Color_Icon7.y,"color_icon8",function() { this.Color_fnc(Colors2[1]); },this); Color_Icon8.anchor.setTo(0.5,0.5); Color_Icon9 = this.add.button(Color_Icon3.x,Color_Icon7.y,"color_icon9",function() { this.Color_fnc(Colors2[2]); },this); Color_Icon9.anchor.setTo(0.5,0.5); Color_Icon10 = this.add.button(Color_Icon4.x,Color_Icon7.y,"color_icon10",function() { this.Color_fnc(Colors2[3]); },this); Color_Icon10.anchor.setTo(0.5,0.5); Color_Icon11 = this.add.button(Color_Icon5.x,Color_Icon7.y,"color_icon11",function() { this.Color_fnc(Colors2[4]); },this); Color_Icon11.anchor.setTo(0.5,0.5); Color_Icon12 = this.add.button(Color_Icon6.x,Color_Icon7.y,"color_icon12",function() { this.Color_fnc(Colors2[5]); },this); Color_Icon12.anchor.setTo(0.5,0.5); Color_Group = this.add.group(); Color_Group.add(Color_Icon); Color_Group.add(Color_Icon2); Color_Group.add(Color_Icon3); Color_Group.add(Color_Icon4); Color_Group.add(Color_Icon5); Color_Group.add(Color_Icon6); Color_Group.add(Color_Icon7); Color_Group.add(Color_Icon8); Color_Group.add(Color_Icon9); Color_Group.add(Color_Icon10); Color_Group.add(Color_Icon11); Color_Group.add(Color_Icon12); //Dress_Icon Dress_Icon3 = this.add.button(657,330,"dress_icon3",function() { this.Dress_fnc(2,Colors[4]); },this); Dress_Icon3.anchor.setTo(0.5,0.5); Dress_Icon3.events.onInputOver.add(function(){ Dress_Icon3.frame = 1; },this); Dress_Icon3.events.onInputDown.add(function(){ Dress_Icon3.frame = 2; },this); Dress_Icon3.events.onInputOut.add(function() { if(Dress_Color.visible && Dress_Color.frame == 2) { Dress_Icon3.frame = 1; } else{ Dress_Icon3.frame = 0; } },this); Dress_Icon3.events.onInputUp.add(function() { if(Dress_Color.visible) { Dress_Icon.frame = 0; Dress_Icon2.frame = 0; Dress_Icon3.frame = 1; Dress_Icon4.frame = 0; Dress_Icon5.frame = 0; Dress_Icon6.frame = 0; } else{ Dress_Icon3.frame = 0; } },this); Dress_Icon2 = this.add.button(578,333,"dress_icon2",function() { this.Dress_fnc(1,Colors2[4]); },this); Dress_Icon2.anchor.setTo(0.5,0.5); Dress_Icon2.events.onInputOver.add(function(){ Dress_Icon2.frame = 1; },this); Dress_Icon2.events.onInputDown.add(function(){ Dress_Icon2.frame = 2; },this); Dress_Icon2.events.onInputOut.add(function() { if(Dress_Color.visible && Dress_Color.frame == 1) { Dress_Icon2.frame = 1; } else{ Dress_Icon2.frame = 0; } },this); Dress_Icon2.events.onInputUp.add(function() { if(Dress_Color.visible) { Dress_Icon.frame = 0; Dress_Icon2.frame = 1; Dress_Icon3.frame = 0; Dress_Icon4.frame = 0; Dress_Icon5.frame = 0; Dress_Icon6.frame = 0; } else{ Dress_Icon2.frame = 0; } },this); Dress_Icon = this.add.button(496,321,"dress_icon",function() { this.Dress_fnc(0,Colors2[2]); },this); Dress_Icon.anchor.setTo(0.5,0.5); Dress_Icon.events.onInputOver.add(function(){ Dress_Icon.frame = 1; },this); Dress_Icon.events.onInputDown.add(function(){ Dress_Icon.frame = 2; },this); Dress_Icon.events.onInputOut.add(function() { if(Dress_Color.visible && Dress_Color.frame == 0) { Dress_Icon.frame = 1; } else{ Dress_Icon.frame = 0; } },this); Dress_Icon.events.onInputUp.add(function() { if(Dress_Color.visible) { Dress_Icon.frame = 1; Dress_Icon2.frame = 0; Dress_Icon3.frame = 0; Dress_Icon4.frame = 0; Dress_Icon5.frame = 0; Dress_Icon6.frame = 0; } else{ Dress_Icon.frame = 0; } },this); Dress_Icon_Group = this.add.group(); Dress_Icon_Group.add(Dress_Icon3); Dress_Icon_Group.add(Dress_Icon2); Dress_Icon_Group.add(Dress_Icon); Dress_Icon_Group.setAll("input.pixelPerfectClick",true); Dress_Icon_Group.setAll("input.pixelPerfectOver",true) Dress_Icon6 = this.add.button(634,365,"dress_icon6",function() { this.Dress_fnc(5,Colors2[3]); },this); Dress_Icon6.anchor.setTo(0.5,0.5); Dress_Icon6.events.onInputOver.add(function(){ Dress_Icon6.frame = 1; },this); Dress_Icon6.events.onInputDown.add(function(){ Dress_Icon6.frame = 2; },this); Dress_Icon6.events.onInputOut.add(function() { if(Dress_Color.visible && Dress_Color.frame == 5) { Dress_Icon6.frame = 1; } else{ Dress_Icon6.frame = 0; } },this); Dress_Icon6.events.onInputUp.add(function() { if(Dress_Color.visible) { Dress_Icon.frame = 0; Dress_Icon2.frame = 0; Dress_Icon3.frame = 0; Dress_Icon4.frame = 0; Dress_Icon5.frame = 0; Dress_Icon6.frame = 1; } else{ Dress_Icon6.frame = 0; } },this); Dress_Icon5 = this.add.button(559,363,"dress_icon5",function() { this.Dress_fnc(4,Colors[2]); },this); Dress_Icon5.anchor.setTo(0.5,0.5); Dress_Icon5.events.onInputOver.add(function(){ Dress_Icon5.frame = 1; },this); Dress_Icon5.events.onInputDown.add(function(){ Dress_Icon5.frame = 2; },this); Dress_Icon5.events.onInputOut.add(function() { if(Dress_Color.visible && Dress_Color.frame == 4) { Dress_Icon5.frame = 1; } else{ Dress_Icon5.frame = 0; } },this); Dress_Icon5.events.onInputUp.add(function() { if(Dress_Color.visible) { Dress_Icon.frame = 0; Dress_Icon2.frame = 0; Dress_Icon3.frame = 0; Dress_Icon4.frame = 0; Dress_Icon5.frame = 1; Dress_Icon6.frame = 0; } else{ Dress_Icon5.frame = 0; } },this); Dress_Icon4 = this.add.button(474,366,"dress_icon4",function() { this.Dress_fnc(3,Colors2[4]); },this); Dress_Icon4.anchor.setTo(0.5,0.5); Dress_Icon4.events.onInputOver.add(function(){ Dress_Icon4.frame = 1; },this); Dress_Icon4.events.onInputDown.add(function(){ Dress_Icon4.frame = 2; },this); Dress_Icon4.events.onInputOut.add(function() { if(Dress_Color.visible && Dress_Color.frame == 3) { Dress_Icon4.frame = 1; } else{ Dress_Icon4.frame = 0; } },this); Dress_Icon4.events.onInputUp.add(function() { if(Dress_Color.visible) { Dress_Icon.frame = 0; Dress_Icon2.frame = 0; Dress_Icon3.frame = 0; Dress_Icon4.frame = 1; Dress_Icon5.frame = 0; Dress_Icon6.frame = 0; } else{ Dress_Icon4.frame = 0; } },this); Dress_Icon_Group2 = this.add.group(); Dress_Icon_Group2.add(Dress_Icon6); Dress_Icon_Group2.add(Dress_Icon5); Dress_Icon_Group2.add(Dress_Icon4); Dress_Icon_Group2.setAll("input.pixelPerfectClick",true); Dress_Icon_Group2.setAll("input.pixelPerfectOver",true); Dress_Icon_Group2.x = 400; //Tops_Icon Tops_Icon = this.add.button(483,298,"tops_icon",function() { this.Tops_fnc(0,Colors[0]); },this); Tops_Icon.anchor.setTo(0.5,0.5); Tops_Icon.events.onInputOver.add(function(){ Tops_Icon.frame = 1; },this); Tops_Icon.events.onInputDown.add(function(){ Tops_Icon.frame = 2; },this); Tops_Icon.events.onInputOut.add(function() { if(Tops_Color.visible && Tops_Color.frame == 0) { Tops_Icon.frame = 1; } else{ Tops_Icon.frame = 0; } },this); Tops_Icon.events.onInputUp.add(function() { if(Tops_Color.visible) { Tops_Icon.frame = 1; Tops_Icon2.frame = 0; Tops_Icon3.frame = 0; Tops_Icon4.frame = 0; Tops_Icon5.frame = 0; Tops_Icon6.frame = 0; } else{ Tops_Icon.frame = 0; } },this); Tops_Icon2 = this.add.button(556,319,"tops_icon2",function() { this.Tops_fnc(1,Colors[3]); },this); Tops_Icon2.anchor.setTo(0.5,0.5); Tops_Icon2.events.onInputOver.add(function(){ Tops_Icon2.frame = 1; },this); Tops_Icon2.events.onInputDown.add(function(){ Tops_Icon2.frame = 2; },this); Tops_Icon2.events.onInputOut.add(function() { if(Tops_Color.visible && Tops_Color.frame == 1) { Tops_Icon2.frame = 1; } else{ Tops_Icon2.frame = 0; } },this); Tops_Icon2.events.onInputUp.add(function() { if(Tops_Color.visible) { Tops_Icon.frame = 0; Tops_Icon2.frame = 1; Tops_Icon3.frame = 0; Tops_Icon4.frame = 0; Tops_Icon5.frame = 0; Tops_Icon6.frame = 0; } else{ Tops_Icon2.frame = 0; } },this); Tops_Icon3 = this.add.button(645,341,"tops_icon3",function() { this.Tops_fnc(2,Colors[4]); },this); Tops_Icon3.anchor.setTo(0.5,0.5); Tops_Icon3.events.onInputOver.add(function(){ Tops_Icon3.frame = 1; },this); Tops_Icon3.events.onInputDown.add(function(){ Tops_Icon3.frame = 2; },this); Tops_Icon3.events.onInputOut.add(function() { if(Tops_Color.visible && Tops_Color.frame == 2) { Tops_Icon3.frame = 1; } else{ Tops_Icon3.frame = 0; } },this); Tops_Icon3.events.onInputUp.add(function() { if(Tops_Color.visible) { Tops_Icon.frame = 0; Tops_Icon2.frame = 0; Tops_Icon3.frame = 1; Tops_Icon4.frame = 0; Tops_Icon5.frame = 0; Tops_Icon6.frame = 0; } else{ Tops_Icon3.frame = 0; } },this); Tops_Icon_Group = this.add.group(); Tops_Icon_Group.add(Tops_Icon); Tops_Icon_Group.add(Tops_Icon2); Tops_Icon_Group.add(Tops_Icon3); Tops_Icon_Group.setAll("input.pixelPerfectClick",true); Tops_Icon_Group.setAll("input.pixelPerfectOver",true); Tops_Icon_Group.x = 400; Tops_Icon4 = this.add.button(481,324,"tops_icon4",function() { this.Tops_fnc(3,Colors2[3]); },this); Tops_Icon4.anchor.setTo(0.5,0.5); Tops_Icon4.events.onInputOver.add(function(){ Tops_Icon4.frame = 1; },this); Tops_Icon4.events.onInputDown.add(function(){ Tops_Icon4.frame = 2; },this); Tops_Icon4.events.onInputOut.add(function() { if(Tops_Color.visible && Tops_Color.frame == 3) { Tops_Icon4.frame = 1; } else{ Tops_Icon4.frame = 0; } },this); Tops_Icon4.events.onInputUp.add(function() { if(Tops_Color.visible) { Tops_Icon.frame = 0; Tops_Icon2.frame = 0; Tops_Icon3.frame = 0; Tops_Icon4.frame = 1; Tops_Icon5.frame = 0; Tops_Icon6.frame = 0; } else{ Tops_Icon4.frame = 0; } },this); Tops_Icon5 = this.add.button(574,296,"tops_icon5",function() { this.Tops_fnc(4,Colors[1]); },this); Tops_Icon5.anchor.setTo(0.5,0.5); Tops_Icon5.events.onInputOver.add(function(){ Tops_Icon5.frame = 1; },this); Tops_Icon5.events.onInputDown.add(function(){ Tops_Icon5.frame = 2; },this); Tops_Icon5.events.onInputOut.add(function() { if(Tops_Color.visible && Tops_Color.frame == 4) { Tops_Icon5.frame = 1; } else{ Tops_Icon5.frame = 0; } },this); Tops_Icon5.events.onInputUp.add(function() { if(Tops_Color.visible) { Tops_Icon.frame = 0; Tops_Icon2.frame = 0; Tops_Icon3.frame = 0; Tops_Icon4.frame = 0; Tops_Icon5.frame = 1; Tops_Icon6.frame = 0; } else{ Tops_Icon5.frame = 0; } },this); Tops_Icon6 = this.add.button(646,346,"tops_icon6",function() { this.Tops_fnc(5,Colors[2]); },this); Tops_Icon6.anchor.setTo(0.5,0.5); Tops_Icon6.events.onInputOver.add(function(){ Tops_Icon6.frame = 1; },this); Tops_Icon6.events.onInputDown.add(function(){ Tops_Icon6.frame = 2; },this); Tops_Icon6.events.onInputOut.add(function() { if(Tops_Color.visible && Tops_Color.frame == 5) { Tops_Icon6.frame = 1; } else{ Tops_Icon6.frame = 0; } },this); Tops_Icon6.events.onInputUp.add(function() { if(Tops_Color.visible) { Tops_Icon.frame = 0; Tops_Icon2.frame = 0; Tops_Icon3.frame = 0; Tops_Icon4.frame = 0; Tops_Icon5.frame = 0; Tops_Icon6.frame = 1; } else{ Tops_Icon6.frame = 0; } },this); Tops_Icon_Group2 = this.add.group(); Tops_Icon_Group2.add(Tops_Icon4); Tops_Icon_Group2.add(Tops_Icon5); Tops_Icon_Group2.add(Tops_Icon6); Tops_Icon_Group2.setAll("input.pixelPerfectClick",true); Tops_Icon_Group2.setAll("input.pixelPerfectOver",true); Tops_Icon_Group2.x = 400; //Bottoms_Icon Bottoms_Icon = this.add.button(494,315,"bottoms_icon",function() { this.Bottoms_fnc(0,Colors2[1]); },this); Bottoms_Icon.anchor.setTo(0.5,0.5); Bottoms_Icon.events.onInputOver.add(function(){ Bottoms_Icon.frame = 1; },this); Bottoms_Icon.events.onInputDown.add(function(){ Bottoms_Icon.frame = 2; },this); Bottoms_Icon.events.onInputOut.add(function() { if(Bottoms_Color.visible && Bottoms_Color.frame == 0) { Bottoms_Icon.frame = 1; } else{ Bottoms_Icon.frame = 0; } },this); Bottoms_Icon.events.onInputUp.add(function() { if(Bottoms_Color.visible) { Bottoms_Icon.frame = 1; Bottoms_Icon2.frame = 0; Bottoms_Icon3.frame = 0; Bottoms_Icon4.frame = 0; Bottoms_Icon5.frame = 0; Bottoms_Icon6.frame = 0; } else{ Bottoms_Icon.frame = 0; } },this); Bottoms_Icon2 = this.add.button(580,340,"bottoms_icon2",function() { this.Bottoms_fnc(1,Colors[4]); },this); Bottoms_Icon2.anchor.setTo(0.5,0.5); Bottoms_Icon2.events.onInputOver.add(function(){ Bottoms_Icon2.frame = 1; },this); Bottoms_Icon2.events.onInputDown.add(function(){ Bottoms_Icon2.frame = 2; },this); Bottoms_Icon2.events.onInputOut.add(function() { if(Bottoms_Color.visible && Bottoms_Color.frame == 1) { Bottoms_Icon2.frame = 1; } else{ Bottoms_Icon2.frame = 0; } },this); Bottoms_Icon2.events.onInputUp.add(function() { if(Bottoms_Color.visible) { Bottoms_Icon.frame = 0; Bottoms_Icon2.frame = 1; Bottoms_Icon3.frame = 0; Bottoms_Icon4.frame = 0; Bottoms_Icon5.frame = 0; Bottoms_Icon6.frame = 0; } else{ Bottoms_Icon2.frame = 0; } },this); Bottoms_Icon3 = this.add.button(665,369,"bottoms_icon3",function() { this.Bottoms_fnc(2,Colors[2]); },this); Bottoms_Icon3.anchor.setTo(0.5,0.5); Bottoms_Icon3.events.onInputOver.add(function(){ Bottoms_Icon3.frame = 1; },this); Bottoms_Icon3.events.onInputDown.add(function(){ Bottoms_Icon3.frame = 2; },this); Bottoms_Icon3.events.onInputOut.add(function() { if(Bottoms_Color.visible && Bottoms_Color.frame == 2) { Bottoms_Icon3.frame = 1; } else{ Bottoms_Icon3.frame = 0; } },this); Bottoms_Icon3.events.onInputUp.add(function() { if(Bottoms_Color.visible) { Bottoms_Icon.frame = 0; Bottoms_Icon2.frame = 0; Bottoms_Icon3.frame = 1; Bottoms_Icon4.frame = 0; Bottoms_Icon5.frame = 0; Bottoms_Icon6.frame = 0; } else{ Bottoms_Icon3.frame = 0; } },this); Bottoms_Icon_Group = this.add.group(); Bottoms_Icon_Group.add(Bottoms_Icon); Bottoms_Icon_Group.add(Bottoms_Icon2); Bottoms_Icon_Group.add(Bottoms_Icon3); Bottoms_Icon_Group.setAll("input.pixelPerfectClick",true); Bottoms_Icon_Group.setAll("input.pixelPerfectOver",true); Bottoms_Icon_Group.x = 400; Bottoms_Icon4 = this.add.button(508,373,"bottoms_icon4",function() { this.Bottoms_fnc(3,Colors[2]); },this); Bottoms_Icon4.anchor.setTo(0.5,0.5); Bottoms_Icon4.events.onInputOver.add(function(){ Bottoms_Icon4.frame = 1; },this); Bottoms_Icon4.events.onInputDown.add(function(){ Bottoms_Icon4.frame = 2; },this); Bottoms_Icon4.events.onInputOut.add(function() { if(Bottoms_Color.visible && Bottoms_Color.frame == 3) { Bottoms_Icon4.frame = 1; } else{ Bottoms_Icon4.frame = 0; } },this); Bottoms_Icon4.events.onInputUp.add(function() { if(Bottoms_Color.visible) { Bottoms_Icon.frame = 0; Bottoms_Icon2.frame = 0; Bottoms_Icon3.frame = 0; Bottoms_Icon4.frame = 1; Bottoms_Icon5.frame = 0; Bottoms_Icon6.frame = 0; } else{ Bottoms_Icon4.frame = 0; } },this); Bottoms_Icon5 = this.add.button(576,284,"bottoms_icon5",function() { this.Bottoms_fnc(4,Colors[2]); },this); Bottoms_Icon5.anchor.setTo(0.5,0.5); Bottoms_Icon5.events.onInputOver.add(function(){ Bottoms_Icon5.frame = 1; },this); Bottoms_Icon5.events.onInputDown.add(function(){ Bottoms_Icon5.frame = 2; },this); Bottoms_Icon5.events.onInputOut.add(function() { if(Bottoms_Color.visible && Bottoms_Color.frame == 4) { Bottoms_Icon5.frame = 1; } else{ Bottoms_Icon5.frame = 0; } },this); Bottoms_Icon5.events.onInputUp.add(function() { if(Bottoms_Color.visible) { Bottoms_Icon.frame = 0; Bottoms_Icon2.frame = 0; Bottoms_Icon3.frame = 0; Bottoms_Icon4.frame = 0; Bottoms_Icon5.frame = 1; Bottoms_Icon6.frame = 0; } else{ Bottoms_Icon5.frame = 0; } },this); Bottoms_Icon6 = this.add.button(670,358,"bottoms_icon6",function() { this.Bottoms_fnc(5,Colors[3]); },this); Bottoms_Icon6.anchor.setTo(0.5,0.5); Bottoms_Icon6.events.onInputOver.add(function(){ Bottoms_Icon6.frame = 1; },this); Bottoms_Icon6.events.onInputDown.add(function(){ Bottoms_Icon6.frame = 2; },this); Bottoms_Icon6.events.onInputOut.add(function() { if(Bottoms_Color.visible && Bottoms_Color.frame == 5) { Bottoms_Icon6.frame = 1; } else{ Bottoms_Icon6.frame = 0; } },this); Bottoms_Icon6.events.onInputUp.add(function() { if(Bottoms_Color.visible) { Bottoms_Icon.frame = 0; Bottoms_Icon2.frame = 0; Bottoms_Icon3.frame = 0; Bottoms_Icon4.frame = 0; Bottoms_Icon5.frame = 0; Bottoms_Icon6.frame = 1; } else{ Bottoms_Icon6.frame = 0; } },this); Bottoms_Icon_Group2 = this.add.group(); Bottoms_Icon_Group2.add(Bottoms_Icon4); Bottoms_Icon_Group2.add(Bottoms_Icon5); Bottoms_Icon_Group2.add(Bottoms_Icon6); Bottoms_Icon_Group2.setAll("input.pixelPerfectClick",true); Bottoms_Icon_Group2.setAll("input.pixelPerfectOver",true); Bottoms_Icon_Group2.x = 400; //Shoes_Icon Shoes_Icon = this.add.button(477,286,"shoes_icon",function(){ this.Shoes_fnc(0,Colors2[4]);},this); Shoes_Icon.anchor.setTo(0.5,0.5); Shoes_Icon.events.onInputOver.add(function(){ Shoes_Icon.frame = 1; },this); Shoes_Icon.events.onInputDown.add(function(){ Shoes_Icon.frame = 2; },this); Shoes_Icon.events.onInputOut.add(function() { if(Shoes_Color.visible && Shoes_Color.frame == 0) { Shoes_Icon.frame = 1; } else{ Shoes_Icon.frame = 0; } },this); Shoes_Icon.events.onInputUp.add(function() { if(Shoes_Color.visible) { Shoes_Icon.frame = 1; Shoes_Icon2.frame = 0; Shoes_Icon3.frame = 0; Shoes_Icon4.frame = 0; Shoes_Icon5.frame = 0; Shoes_Icon6.frame = 0; } else{ Shoes_Icon.frame = 0; } },this); Shoes_Icon2 = this.add.button(580,283,"shoes_icon2",function(){ this.Shoes_fnc(1,Colors2[5]);},this); Shoes_Icon2.anchor.setTo(0.5,0.5); Shoes_Icon2.events.onInputOver.add(function(){ Shoes_Icon2.frame = 1; },this); Shoes_Icon2.events.onInputDown.add(function(){ Shoes_Icon2.frame = 2; },this); Shoes_Icon2.events.onInputOut.add(function() { if(Shoes_Color.visible && Shoes_Color.frame == 1) { Shoes_Icon2.frame = 1; } else{ Shoes_Icon2.frame = 0; } },this); Shoes_Icon2.events.onInputUp.add(function() { if(Shoes_Color.visible) { Shoes_Icon.frame = 0; Shoes_Icon2.frame = 1; Shoes_Icon3.frame = 0; Shoes_Icon4.frame = 0; Shoes_Icon5.frame = 0; Shoes_Icon6.frame = 0; } else{ Shoes_Icon2.frame = 0; } },this); Shoes_Icon3 = this.add.button(682,298,"shoes_icon3",function(){ this.Shoes_fnc(2,Colors[4]);},this); Shoes_Icon3.anchor.setTo(0.5,0.5); Shoes_Icon3.events.onInputOver.add(function(){ Shoes_Icon3.frame = 1; },this); Shoes_Icon3.events.onInputDown.add(function(){ Shoes_Icon3.frame = 2; },this); Shoes_Icon3.events.onInputOut.add(function() { if(Shoes_Color.visible && Shoes_Color.frame == 2) { Shoes_Icon3.frame = 1; } else{ Shoes_Icon3.frame = 0; } },this); Shoes_Icon3.events.onInputUp.add(function() { if(Shoes_Color.visible) { Shoes_Icon.frame = 0; Shoes_Icon2.frame = 0; Shoes_Icon3.frame = 1; Shoes_Icon4.frame = 0; Shoes_Icon5.frame = 0; Shoes_Icon6.frame = 0; } else{ Shoes_Icon3.frame = 0; } },this); Shoes_Icon4 = this.add.button(469,395,"shoes_icon4",function(){ this.Shoes_fnc(3,Colors[3]);},this); Shoes_Icon4.anchor.setTo(0.5,0.5); Shoes_Icon4.events.onInputOver.add(function(){ Shoes_Icon4.frame = 1; },this); Shoes_Icon4.events.onInputDown.add(function(){ Shoes_Icon4.frame = 2; },this); Shoes_Icon4.events.onInputOut.add(function() { if(Shoes_Color.visible && Shoes_Color.frame == 3) { Shoes_Icon4.frame = 1; } else{ Shoes_Icon4.frame = 0; } },this); Shoes_Icon4.events.onInputUp.add(function() { if(Shoes_Color.visible) { Shoes_Icon.frame = 0; Shoes_Icon2.frame = 0; Shoes_Icon3.frame = 0; Shoes_Icon4.frame = 1; Shoes_Icon5.frame = 0; Shoes_Icon6.frame = 0; } else{ Shoes_Icon4.frame = 0; } },this); Shoes_Icon5 = this.add.button(572,389,"shoes_icon5",function(){ this.Shoes_fnc(4,Colors2[4]);},this); Shoes_Icon5.anchor.setTo(0.5,0.5); Shoes_Icon5.events.onInputOver.add(function(){ Shoes_Icon5.frame = 1; },this); Shoes_Icon5.events.onInputDown.add(function(){ Shoes_Icon5.frame = 2; },this); Shoes_Icon5.events.onInputOut.add(function() { if(Shoes_Color.visible && Shoes_Color.frame == 4) { Shoes_Icon5.frame = 1; } else{ Shoes_Icon5.frame = 0; } },this); Shoes_Icon5.events.onInputUp.add(function() { if(Shoes_Color.visible) { Shoes_Icon.frame = 0; Shoes_Icon2.frame = 0; Shoes_Icon3.frame = 0; Shoes_Icon4.frame = 0; Shoes_Icon5.frame = 1; Shoes_Icon6.frame = 0; } else{ Shoes_Icon5.frame = 0; } },this); Shoes_Icon6 = this.add.button(676,385,"shoes_icon6",function(){ this.Shoes_fnc(5,Colors2[1]);},this); Shoes_Icon6.anchor.setTo(0.5,0.5); Shoes_Icon6.events.onInputOver.add(function(){ Shoes_Icon6.frame = 1; },this); Shoes_Icon6.events.onInputDown.add(function(){ Shoes_Icon6.frame = 2; },this); Shoes_Icon6.events.onInputOut.add(function() { if(Shoes_Color.visible && Shoes_Color.frame == 5) { Shoes_Icon6.frame = 1; } else{ Shoes_Icon6.frame = 0; } },this); Shoes_Icon6.events.onInputUp.add(function() { if(Shoes_Color.visible) { Shoes_Icon.frame = 0; Shoes_Icon2.frame = 0; Shoes_Icon3.frame = 0; Shoes_Icon4.frame = 0; Shoes_Icon5.frame = 0; Shoes_Icon6.frame = 1; } else{ Shoes_Icon6.frame = 0; } },this); Shoes_Icon_Group = this.add.group(); Shoes_Icon_Group.add(Shoes_Icon); Shoes_Icon_Group.add(Shoes_Icon2); Shoes_Icon_Group.add(Shoes_Icon3); Shoes_Icon_Group.add(Shoes_Icon4); Shoes_Icon_Group.add(Shoes_Icon5); Shoes_Icon_Group.add(Shoes_Icon6); Shoes_Icon_Group.x = 400; //Hair_Icon Hair_Icon = this.add.button(471,170,"hair_icon",function(){ this.Hair_fnc(0); },this); Hair_Icon.anchor.setTo(0.5,0.5); Hair_Icon.frame = 1; Hair_Icon.events.onInputOver.add(function(){ Hair_Icon.frame = 1; },this); Hair_Icon.events.onInputDown.add(function(){ Hair_Icon.frame = 2; },this); Hair_Icon.events.onInputOut.add(function() { if(Hair.frame == 0) { Hair_Icon.frame = 1; } else{ Hair_Icon.frame = 0; } },this); Hair_Icon.events.onInputUp.add(function() { if(Hair.frame == 0) { Hair_Icon.frame = 1; Hair_Icon2.frame = 0; Hair_Icon3.frame = 0; Hair_Icon4.frame = 0; Hair_Icon5.frame = 0; Hair_Icon6.frame = 0; } else{ Hair_Icon.frame = 0; } },this); Hair_Icon2 = this.add.button(573,168,"hair_icon2",function(){ this.Hair_fnc(1); },this); Hair_Icon2.anchor.setTo(0.5,0.5); Hair_Icon2.events.onInputOver.add(function(){ Hair_Icon2.frame = 1; },this); Hair_Icon2.events.onInputDown.add(function(){ Hair_Icon2.frame = 2; },this); Hair_Icon2.events.onInputOut.add(function() { if(Hair.frame == 1) { Hair_Icon2.frame = 1; } else{ Hair_Icon2.frame = 0; } },this); Hair_Icon2.events.onInputUp.add(function() { if(Hair.frame == 1) { Hair_Icon.frame = 0; Hair_Icon2.frame = 1; Hair_Icon3.frame = 0; Hair_Icon4.frame = 0; Hair_Icon5.frame = 0; Hair_Icon6.frame = 0; } else{ Hair_Icon2.frame = 0; } },this); Hair_Icon3 = this.add.button(670,160,"hair_icon3",function(){ this.Hair_fnc(2); },this); Hair_Icon3.anchor.setTo(0.5,0.5); Hair_Icon3.events.onInputOver.add(function(){ Hair_Icon3.frame = 1; },this); Hair_Icon3.events.onInputDown.add(function(){ Hair_Icon3.frame = 2; },this); Hair_Icon3.events.onInputOut.add(function() { if(Hair.frame == 2) { Hair_Icon3.frame = 1; } else{ Hair_Icon3.frame = 0; } },this); Hair_Icon3.events.onInputUp.add(function() { if(Hair.frame == 2) { Hair_Icon.frame = 0; Hair_Icon2.frame = 0; Hair_Icon3.frame = 1; Hair_Icon4.frame = 0; Hair_Icon5.frame = 0; Hair_Icon6.frame = 0; } else{ Hair_Icon3.frame = 0; } },this); Hair_Icon4 = this.add.button(472,348,"hair_icon4",function(){ this.Hair_fnc(3); },this); Hair_Icon4.anchor.setTo(0.5,0.5); Hair_Icon4.events.onInputOver.add(function(){ Hair_Icon4.frame = 1; },this); Hair_Icon4.events.onInputDown.add(function(){ Hair_Icon4.frame = 2; },this); Hair_Icon4.events.onInputOut.add(function() { if(Hair.frame == 3) { Hair_Icon4.frame = 1; } else{ Hair_Icon4.frame = 0; } },this); Hair_Icon4.events.onInputUp.add(function() { if(Hair.frame == 3) { Hair_Icon.frame = 0; Hair_Icon2.frame = 0; Hair_Icon3.frame = 0; Hair_Icon4.frame = 1; Hair_Icon5.frame = 0; Hair_Icon6.frame = 0; } else{ Hair_Icon4.frame = 0; } },this); Hair_Icon5 = this.add.button(572,343,"hair_icon5",function(){ this.Hair_fnc(4); },this); Hair_Icon5.anchor.setTo(0.5,0.5); Hair_Icon5.events.onInputOver.add(function(){ Hair_Icon5.frame = 1; },this); Hair_Icon5.events.onInputDown.add(function(){ Hair_Icon5.frame = 2; },this); Hair_Icon5.events.onInputOut.add(function() { if(Hair.frame == 4) { Hair_Icon5.frame = 1; } else{ Hair_Icon5.frame = 0; } },this); Hair_Icon5.events.onInputUp.add(function() { if(Hair.frame == 4) { Hair_Icon.frame = 0; Hair_Icon2.frame = 0; Hair_Icon3.frame = 0; Hair_Icon4.frame = 0; Hair_Icon5.frame = 1; Hair_Icon6.frame = 0; } else{ Hair_Icon5.frame = 0; } },this); Hair_Icon6 = this.add.button(675,359,"hair_icon6",function(){ this.Hair_fnc(5); },this); Hair_Icon6.anchor.setTo(0.5,0.5); Hair_Icon6.events.onInputOver.add(function(){ Hair_Icon6.frame = 1; },this); Hair_Icon6.events.onInputDown.add(function(){ Hair_Icon6.frame = 2; },this); Hair_Icon6.events.onInputOut.add(function() { if(Hair.frame == 5) { Hair_Icon6.frame = 1; } else{ Hair_Icon6.frame = 0; } },this); Hair_Icon6.events.onInputUp.add(function() { if(Hair.frame == 5) { Hair_Icon.frame = 0; Hair_Icon2.frame = 0; Hair_Icon3.frame = 0; Hair_Icon4.frame = 0; Hair_Icon5.frame = 0; Hair_Icon6.frame = 1; } else{ Hair_Icon6.frame = 0; } },this); Hair_Icon_Group = this.add.group(); Hair_Icon_Group.add(Hair_Icon); Hair_Icon_Group.add(Hair_Icon2); Hair_Icon_Group.add(Hair_Icon3); Hair_Icon_Group.add(Hair_Icon4); Hair_Icon_Group.add(Hair_Icon5); Hair_Icon_Group.add(Hair_Icon6); Hair_Icon_Group.x = 400; //Access_Icon Access_Icon = this.add.button(469,168,"access_icon",this.Access_fnc,this); Access_Icon.anchor.setTo(0.5,0.5); Access_Icon.events.onInputOver.add(function(){ Access_Icon.frame = 1; },this); Access_Icon.events.onInputDown.add(function(){ Access_Icon.frame = 2; },this); Access_Icon.events.onInputOut.add(function() { if(Access.visible) { Access_Icon.frame = 1; } else{ Access_Icon.frame = 0; } },this); Access_Icon.events.onInputUp.add(function() { if(Access.visible) { Access_Icon.frame = 1; } else{ Access_Icon.frame = 0; } },this); Access_Icon2 = this.add.button(570,173,"access_icon2",this.Access_fnc2,this); Access_Icon2.anchor.setTo(0.5,0.5); Access_Icon2.events.onInputOver.add(function(){ Access_Icon2.frame = 1; },this); Access_Icon2.events.onInputDown.add(function(){ Access_Icon2.frame = 2; },this); Access_Icon2.events.onInputOut.add(function() { if(Access2.visible) { Access_Icon2.frame = 1; } else{ Access_Icon2.frame = 0; } },this); Access_Icon2.events.onInputUp.add(function() { if(Access2.visible) { Access_Icon2.frame = 1; } else{ Access_Icon2.frame = 0; } },this); Access_Icon3 = this.add.button(671,167,"access_icon3",this.Access_fnc3,this); Access_Icon3.anchor.setTo(0.5,0.5); Access_Icon3.events.onInputOver.add(function(){ Access_Icon3.frame = 1; },this); Access_Icon3.events.onInputDown.add(function(){ Access_Icon3.frame = 2; },this); Access_Icon3.events.onInputOut.add(function() { if(Access3.visible) { Access_Icon3.frame = 1; } else{ Access_Icon3.frame = 0; } },this); Access_Icon3.events.onInputUp.add(function() { if(Access3.visible) { Access_Icon3.frame = 1; } else{ Access_Icon3.frame = 0; } },this); Access_Icon4 = this.add.button(475,370,"access_icon4",function() { this.AccessBags_fnc(0); },this); Access_Icon4.anchor.setTo(0.5,0.5); Access_Icon4.events.onInputOver.add(function(){ Access_Icon4.frame = 1; },this); Access_Icon4.events.onInputDown.add(function(){ Access_Icon4.frame = 2; },this); Access_Icon4.events.onInputOut.add(function() { if(Access_Bags.visible && Access_Bags.frame == 0) { Access_Icon4.frame = 1; } else{ Access_Icon4.frame = 0; } },this); Access_Icon4.events.onInputUp.add(function() { if(Access_Bags.visible) { Access_Icon4.frame = 1; Access_Icon5.frame = 0; Access_Icon6.frame = 0; } else{ Access_Icon4.frame = 0; } },this); Access_Icon5 = this.add.button(573,357,"access_icon5",function() { this.AccessBags_fnc(1); },this); Access_Icon5.anchor.setTo(0.5,0.5); Access_Icon5.events.onInputOver.add(function(){ Access_Icon5.frame = 1; },this); Access_Icon5.events.onInputDown.add(function(){ Access_Icon5.frame = 2; },this); Access_Icon5.events.onInputOut.add(function() { if(Access_Bags.visible && Access_Bags.frame == 1) { Access_Icon5.frame = 1; } else{ Access_Icon5.frame = 0; } },this); Access_Icon5.events.onInputUp.add(function() { if(Access_Bags.visible) { Access_Icon4.frame = 0; Access_Icon5.frame = 1; Access_Icon6.frame = 0; } else{ Access_Icon5.frame = 0; } },this); Access_Icon6 = this.add.button(663,360,"access_icon6",function() { this.AccessBags_fnc(2); },this); Access_Icon6.anchor.setTo(0.5,0.5); Access_Icon6.events.onInputOver.add(function(){ Access_Icon6.frame = 1; },this); Access_Icon6.events.onInputDown.add(function(){ Access_Icon6.frame = 2; },this); Access_Icon6.events.onInputOut.add(function() { if(Access_Bags.visible && Access_Bags.frame == 2) { Access_Icon6.frame = 1; } else{ Access_Icon6.frame = 0; } },this); Access_Icon6.events.onInputUp.add(function() { if(Access_Bags.visible) { Access_Icon4.frame = 0; Access_Icon5.frame = 0; Access_Icon6.frame = 1; } else{ Access_Icon6.frame = 0; } },this); Access_Icon_Group = this.add.group(); Access_Icon_Group.add(Access_Icon); Access_Icon_Group.add(Access_Icon2); Access_Icon_Group.add(Access_Icon3); Access_Icon_Group.add(Access_Icon4); Access_Icon_Group.add(Access_Icon5); Access_Icon_Group.add(Access_Icon6); Access_Icon_Group.x = 400; ClosetMask = this.game.add.graphics(0, 0); ClosetMask.beginFill(0xffffff,0.5); ClosetMask.drawRect(409,75,324,445); //ClosetMask.endFill(); Dress_Icon_Group.mask = ClosetMask; Dress_Icon_Group2.mask = ClosetMask; Tops_Icon_Group.mask = ClosetMask; Tops_Icon_Group2.mask = ClosetMask; Bottoms_Icon_Group.mask = ClosetMask; Bottoms_Icon_Group2.mask = ClosetMask; Hair_Icon_Group.mask = ClosetMask; Color_Group.mask = ClosetMask; Shoes_Icon_Group.mask = ClosetMask; Access_Icon_Group.mask = ClosetMask; Prev_Arrow = this.add.button(380,290,"arrow_btn",this.Prev_fnc,this,0,1,2); Prev_Arrow.anchor.setTo(0.5,0.5); Prev_Arrow.visible = false; Next_Arrow = this.add.button(762,290,"arrow_btn",this.Next_fnc,this,0,1,2); Next_Arrow.anchor.setTo(0.5,0.5); Next_Arrow.scale.setTo(-1,1); Logo_Btn = this.add.button(572,566,"logo_btn",function() { window.open("http://www.dressupgames.com/?utm_source=html5-24-hours-of-snow-white&utm_medium=html5-24-hours-of-snow-white&utm_campaign=24-hours-of-snow-white","_blank"); },this,0,0,1); Logo_Btn.anchor.setTo(0.5,0.5); Done_Btn = this.add.button(581,465,"done_btn",this.Done_fnc,this,0,1,2); Done_Btn.anchor.setTo(0.5,0.5); Done_Btn.visible = false; }, CheckScene: function() { if(sceneSelected == "school scene"){ BG = this.add.sprite(0,0,"school_bg"); } else if(sceneSelected == "cafe scene"){ BG = this.add.sprite(0,0,"coffee_bg"); } else if(sceneSelected == "bedtime scene"){ BG = this.add.sprite(0,0,"bedroom_bg"); } }, Next_fnc: function() { if(page < 9){page++;} if(page == 2) { Prev_Arrow.visible = true; this.add.tween(Dress_Icon_Group).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Dress_Icon_Group2).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 3) { this.add.tween(Dress_Icon_Group2).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Tops_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 4) { this.add.tween(Tops_Icon_Group).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Tops_Icon_Group2).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 5) { this.add.tween(Tops_Icon_Group2).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Bottoms_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 6) { this.add.tween(Bottoms_Icon_Group).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Bottoms_Icon_Group2).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 7) { Closet.frame = 2; this.add.tween(Bottoms_Icon_Group2).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Shoes_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 8) { Closet.frame = 1; this.add.tween(Color_Group).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Shoes_Icon_Group).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Hair_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); } if(page == 9) { Next_Arrow.visible = false; this.add.tween(Hair_Icon_Group).to({x:-400},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Access_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); } }, Prev_fnc: function() { if(page > 1){page--;} if(page == 1) { Prev_Arrow.visible = false; this.add.tween(Dress_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Dress_Icon_Group2).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 2) { this.add.tween(Dress_Icon_Group2).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Tops_Icon_Group).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 3) { this.add.tween(Tops_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Tops_Icon_Group2).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 4) { this.add.tween(Tops_Icon_Group2).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Bottoms_Icon_Group).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 5) { this.add.tween(Bottoms_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Bottoms_Icon_Group2).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 6) { Closet.frame = 0; this.add.tween(Bottoms_Icon_Group2).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Shoes_Icon_Group).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 7) { Closet.frame = 2; this.add.tween(Color_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Shoes_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Hair_Icon_Group).to({x:400},600,Phaser.Easing.Bounce.Out,true); } if(page == 8) { Next_Arrow.visible = true; this.add.tween(Hair_Icon_Group).to({x:0},600,Phaser.Easing.Bounce.Out,true); this.add.tween(Access_Icon_Group).to({x:400},600,Phaser.Easing.Bounce.Out,true); } }, Color_fnc: function(objColor) { if(page == 1 || page == 2) { Dress_Color.tint = objColor; if(sceneSelected == "school scene"){ sDressColor = objColor; } else if(sceneSelected == "cafe scene"){ cDressColor = objColor; } else if(sceneSelected == "bedtime scene"){ bDressColor = objColor; } } if(page == 3 || page == 4) { Tops_Color.tint = objColor; if(sceneSelected == "school scene"){ sTopsColor = objColor; } else if(sceneSelected == "cafe scene"){ cTopsColor = objColor; } else if(sceneSelected == "bedtime scene"){ bTopsColor = objColor; } } if(page == 5 || page == 6) { Bottoms_Color.tint = objColor; if(sceneSelected == "school scene"){ sBottomsColor = objColor; } else if(sceneSelected == "cafe scene"){ cBottomsColor = objColor; } else if(sceneSelected == "bedtime scene"){ bBottomsColor = objColor; } } if(page == 7) { Shoes_Color.tint = objColor; if(sceneSelected == "school scene"){ sShoesColor = objColor; } else if(sceneSelected == "cafe scene"){ cShoesColor = objColor; } else if(sceneSelected == "bedtime scene"){ bShoesColor = objColor; } } }, SortOriginal: function() { Doll_Group.remove(Body); Doll_Group.remove(Bra); Doll_Group.remove(Shoes_Color); Doll_Group.remove(Shoes_Outline); Doll_Group.remove(Bottoms_Color); Doll_Group.remove(Bottoms_Outline); Doll_Group.remove(Tops_Color); Doll_Group.remove(Tops_Outline); Doll_Group.remove(Dress_Color); Doll_Group.remove(Dress_Outline); Doll_Group.remove(Head); Doll_Group.remove(Eyes); Doll_Group.remove(Blink); Doll_Group.remove(Access2); Doll_Group.remove(Hair); Doll_Group.remove(Access); Doll_Group.remove(Access_Bags); Doll_Group.remove(Access3); Doll_Group.add(Body); Doll_Group.add(Bra); Doll_Group.add(Bottoms_Color); Doll_Group.add(Bottoms_Outline); Doll_Group.add(Shoes_Color); Doll_Group.add(Shoes_Outline); Doll_Group.add(Tops_Color); Doll_Group.add(Tops_Outline); Doll_Group.add(Dress_Color); Doll_Group.add(Dress_Outline); Doll_Group.add(Head); Doll_Group.add(Eyes); Doll_Group.add(Blink); Doll_Group.add(Access2); Doll_Group.add(Hair); Doll_Group.add(Access); Doll_Group.add(Access_Bags); Doll_Group.add(Access3); }, SortShoes: function() { Doll_Group.remove(Body); Doll_Group.remove(Bra); Doll_Group.remove(Shoes_Color); Doll_Group.remove(Shoes_Outline); Doll_Group.remove(Bottoms_Color); Doll_Group.remove(Bottoms_Outline); Doll_Group.remove(Tops_Color); Doll_Group.remove(Tops_Outline); Doll_Group.remove(Dress_Color); Doll_Group.remove(Dress_Outline); Doll_Group.remove(Head); Doll_Group.remove(Eyes); Doll_Group.remove(Blink); Doll_Group.remove(Access2); Doll_Group.remove(Hair); Doll_Group.remove(Access); Doll_Group.remove(Access_Bags); Doll_Group.remove(Access3); Doll_Group.add(Body); Doll_Group.add(Bra); Doll_Group.add(Shoes_Color); Doll_Group.add(Shoes_Outline); Doll_Group.add(Bottoms_Color); Doll_Group.add(Bottoms_Outline); Doll_Group.add(Tops_Color); Doll_Group.add(Tops_Outline); Doll_Group.add(Dress_Color); Doll_Group.add(Dress_Outline); Doll_Group.add(Head); Doll_Group.add(Eyes); Doll_Group.add(Blink); Doll_Group.add(Access2); Doll_Group.add(Hair); Doll_Group.add(Access); Doll_Group.add(Access_Bags); Doll_Group.add(Access3); }, Dress_fnc: function(dressFrame,dressTintDefault) { if(Dress_Color.frame == dressFrame && Dress_Color.visible) { Bra.visible = true; Dress_Color.visible = false; Dress_Outline.visible = false; if(sceneSelected == "school scene") { sDress = null; sDressVisible = false; } else if(sceneSelected == "cafe scene") { cDress = null; cDressVisible = false; } else if(sceneSelected == "bedtime scene") { bDress = null; bDressVisible = false; } } else { Bra.visible = false; Dress_Color.visible = true; Dress_Color.tint = dressTintDefault; Dress_Color.frame = dressFrame; Dress_Outline.visible = true; Dress_Outline.frame = Dress_Color.frame; if(sceneSelected == "school scene") { sDress = dressFrame; sDressColor = Dress_Color.tint; sDressVisible = true; } else if(sceneSelected == "cafe scene") { cDress = dressFrame; cDressColor = Dress_Color.tint; cDressVisible = true; } else if(sceneSelected == "bedtime scene") { bDress = dressFrame; bDressColor = Dress_Color.tint; bDressVisible = true; } if(Tops_Color.visible) { Tops_Color.visible = false; Tops_Outline.visible = false; if(sceneSelected == "school scene") { sTops = null; sTopsVisible = false; } else if(sceneSelected == "cafe scene") { cTops = null; cTopsVisible = false; } else if(sceneSelected == "bedtime scene") { bTops = null; bTopsVisible = false; } Tops_Icon.frame = 0; Tops_Icon2.frame = 0; Tops_Icon3.frame = 0; Tops_Icon4.frame = 0; Tops_Icon5.frame = 0; Tops_Icon6.frame = 0; } } if(Tops_Color.visible && Bottoms_Color.visible || Dress_Color.visible){ naked = false; } else { naked = true; } this.CheckDone(); }, Tops_fnc: function(topsFrame,topsTintDefault) { if(Tops_Color.frame == topsFrame && Tops_Color.visible) { Bra.visible = true; Tops_Color.visible = false; Tops_Outline.visible = false; if(sceneSelected == "school scene") { sTops = null; sTopsVisible = false; } else if(sceneSelected == "cafe scene") { cTops = null; cTopsVisible = false; } else if(sceneSelected == "bedtime scene") { bTops = null; bTopsVisible = false; } } else { Bra.visible = false; Tops_Color.visible = true; Tops_Color.tint = topsTintDefault; Tops_Color.frame = topsFrame; Tops_Outline.visible = true; Tops_Outline.frame = Tops_Color.frame; if(sceneSelected == "school scene") { sTops = topsFrame; sTopsColor = Tops_Color.tint; sTopsVisible = true; } else if(sceneSelected == "cafe scene") { cTops = topsFrame; cTopsColor = Tops_Color.tint; cTopsVisible = true; } else if(sceneSelected == "bedtime scene") { bTops = topsFrame; bTopsColor = Tops_Color.tint; bTopsVisible = true; } if(Dress_Color.visible) { Dress_Color.visible = false; Dress_Outline.visible = false; if(sceneSelected == "school scene") { sDress = null; sDressVisible = false; } else if(sceneSelected == "cafe scene") { cDress = null; cDressVisible = false; } else if(sceneSelected == "bedtime scene") { bDress = null; bDressVisible = false; } Dress_Icon.frame = 0; Dress_Icon2.frame = 0; Dress_Icon3.frame = 0; Dress_Icon4.frame = 0; Dress_Icon5.frame = 0; Dress_Icon6.frame = 0; } } if(Tops_Color.visible && Bottoms_Color.visible || Dress_Color.visible){ naked = false; } else { naked = true; } this.CheckDone(); }, Bottoms_fnc: function(bottomsFrame,bottomsTintDefault) { if(Bottoms_Color.frame == bottomsFrame && Bottoms_Color.visible) { Bottoms_Color.visible = false; Bottoms_Outline.visible = false; if(sceneSelected == "school scene") { sBottoms = null; sBottomsVisible = false; } else if(sceneSelected == "cafe scene") { cBottoms = null; cBottomsVisible = false; } else if(sceneSelected == "bedtime scene") { bBottoms = null; bBottomsVisible = false; } } else { Bottoms_Color.visible = true; Bottoms_Color.tint = bottomsTintDefault; Bottoms_Color.frame = bottomsFrame; Bottoms_Outline.visible = true; Bottoms_Outline.frame = Bottoms_Color.frame; if(sceneSelected == "school scene") { sBottoms = bottomsFrame; sBottomsColor = Bottoms_Color.tint; sBottomsVisible = true; } else if(sceneSelected == "cafe scene") { cBottoms = bottomsFrame; cBottomsColor = Bottoms_Color.tint; cBottomsVisible = true; } else if(sceneSelected == "bedtime scene") { bBottoms = bottomsFrame; bBottomsColor = Bottoms_Color.tint; bBottomsVisible = true; } //Sort if(Bottoms_Color.frame == 3 && Shoes_Color.frame == 0 || Bottoms_Color.frame == 3 && Shoes_Color.frame == 1 || Bottoms_Color.frame == 3 && Shoes_Color.frame == 4 || Bottoms_Color.frame == 3 && Shoes_Color.frame == 5){this.SortShoes();} else{this.SortOriginal();} } if(Tops_Color.visible && Bottoms_Color.visible || Dress_Color.visible){ naked = false; } else { naked = true; } this.CheckDone(); }, Shoes_fnc: function(shoesFrame,shoesTintDefault) { if(Shoes_Color.frame == shoesFrame && Shoes_Color.visible) { Shoes_Color.visible = false; Shoes_Outline.visible = false; if(sceneSelected == "school scene") { sShoes = null; sShoesVisible = false; } else if(sceneSelected == "cafe scene") { cShoes = null; cShoesVisible = false; } else if(sceneSelected == "bedtime scene") { bShoes = null; bShoesVisible = false; } } else { Shoes_Color.visible = true; Shoes_Color.tint = shoesTintDefault; Shoes_Color.frame = shoesFrame; Shoes_Outline.visible = true; Shoes_Outline.frame = Shoes_Color.frame; if(sceneSelected == "school scene") { sShoes = shoesFrame; sShoesColor = Shoes_Color.tint; sShoesVisible = true; } else if(sceneSelected == "cafe scene") { cShoes = shoesFrame; cShoesColor = Shoes_Color.tint; cShoesVisible = true; } else if(sceneSelected == "bedtime scene") { bShoes = shoesFrame; bShoesColor = Shoes_Color.tint; bShoesVisible = true; } //Sort if(Bottoms_Color.frame == 3 && Shoes_Color.frame == 0 || Bottoms_Color.frame == 3 && Shoes_Color.frame == 1 || Bottoms_Color.frame == 3 && Shoes_Color.frame == 4 || Bottoms_Color.frame == 3 && Shoes_Color.frame == 5){this.SortShoes();} else{this.SortOriginal();} } }, Hair_fnc: function(hairFrame) { Hair.frame = hairFrame; if(sceneSelected == "school scene"){ sHair = hairFrame; } else if(sceneSelected == "cafe scene"){ cHair = hairFrame; } else if(sceneSelected == "bedtime scene"){ bHair = hairFrame; } }, Access_fnc: function() { if(Access.visible) { Access.visible = false; if(sceneSelected == "school scene"){ sAccessVisible = Access.visible; } else if(sceneSelected == "cafe scene"){ cAccessVisible = Access.visible; } else if(sceneSelected == "bedtime scene"){ bAccessVisible = Access.visible; } } else { Access.visible = true; if(sceneSelected == "school scene"){ sAccessVisible = Access.visible; } else if(sceneSelected == "cafe scene"){ cAccessVisible = Access.visible; } else if(sceneSelected == "bedtime scene"){ bAccessVisible = Access.visible; } } }, Access_fnc2: function() { if(Access2.visible) { Access2.visible = false; if(sceneSelected == "school scene"){ sAccessVisible2 = Access2.visible; } else if(sceneSelected == "cafe scene"){ cAccessVisible2 = Access2.visible; } else if(sceneSelected == "bedtime scene"){ bAccessVisible2 = Access2.visible; } } else { Access2.visible = true; if(sceneSelected == "school scene"){ sAccessVisible2 = Access2.visible; } else if(sceneSelected == "cafe scene"){ cAccessVisible2 = Access2.visible; } else if(sceneSelected == "bedtime scene"){ bAccessVisible2 = Access2.visible; } } }, Access_fnc3: function() { if(Access3.visible) { Access3.visible = false; if(sceneSelected == "school scene"){ sAccessVisible3 = Access3.visible; } else if(sceneSelected == "cafe scene"){ cAccessVisible3 = Access3.visible; } else if(sceneSelected == "bedtime scene"){ bAccessVisible3 = Access3.visible; } } else { Access3.visible = true; if(sceneSelected == "school scene"){ sAccessVisible3 = Access3.visible; } else if(sceneSelected == "cafe scene"){ cAccessVisible3 = Access3.visible; } else if(sceneSelected == "bedtime scene"){ bAccessVisible3 = Access3.visible; } } }, AccessBags_fnc: function(bagsFrame) { if(Access_Bags.frame == bagsFrame && Access_Bags.visible) { Access_Bags.visible = false; sAccessBagsVisible = false; if(sceneSelected == "school scene"){ sAccessBagsVisible = false; } else if(sceneSelected == "cafe scene"){ cAccessBagsVisible = false; } else if(sceneSelected == "bedtime scene"){ bAccessBagsVisible = false; } } else { Access_Bags.visible = true; sAccessBagsVisible = true; Access_Bags.frame = bagsFrame; if(sceneSelected == "school scene") { sAccessBags = bagsFrame; sAccessBagsVisible = true; } else if(sceneSelected == "cafe scene") { cAccessBags = bagsFrame; cAccessBagsVisible = true; } else if(sceneSelected == "bedtime scene") { bAccessBags = bagsFrame; bAccessBagsVisible = true; } } }, CheckDone: function() { if(!naked){ Done_Btn.visible = true; } else{ Done_Btn.visible = false; } }, Done_fnc: function() { if(sceneCount == 0) { sceneCount++; schoolDone = true; this.state.start("PickScreen"); } else if(sceneCount == 1) { sceneCount++; cafeDone = true; this.state.start("PickScreen"); } else if(sceneCount == 2) { bedtimeDone = true; this.state.start("EndScreen"); } }, update: function() { } }