OwlCyberSecurity - MANAGER
Edit File: dressup.js
var dressup = function(game) { } dressup.prototype = { create: function() { CenterX = this.world.centerX; CenterY = this.world.centerY; hairColor = 8; hlColor = 0; lipsColor = 8; bodyColor = 0; hlVisible = true; openedMenu = 1; openedMenuPage = 1; BG = this.add.sprite(0,0,"background"); Body = this.add.sprite(241,435,"body"); Body.anchor.setTo(0.5,0.5); Bra = this.add.sprite(229,266,"bra"); Bra.anchor.setTo(0.5,0.5); Head = this.add.sprite(254,159,"head"); Head.anchor.setTo(0.5,0.5); Panties = this.add.sprite(229,349,"panties"); Panties.anchor.setTo(0.5,0.5); SocksX = 254; SocksY = 491; SocksX2 = 254; SocksY2 = 491; SocksX3 = 255; SocksY3 = 552; SocksX4 = 255; SocksY4 = 557; SocksX5 = 254; SocksY5 = 592; SocksX6 = 255; SocksY6 = 524; Socks = this.add.sprite(SocksX2,SocksY2,"socks2"); Socks.anchor.setTo(0.5,0.5); BottomsX = 237; BottomsY = 355; BottomsX2 = 236; BottomsY2 = 361; BottomsX3 = 237; BottomsY3 = 448; BottomsX4 = 237; BottomsY4 = 371; BottomsX5 = 236; BottomsY5 = 406; BottomsX6 = 237; BottomsY6 = 363; Bottoms = this.add.sprite(BottomsX,BottomsY,"bottoms"); Bottoms.anchor.setTo(0.5,0.5); TopsX = 226; TopsY = 305; TopsX2 = 237; TopsY2 = 278; TopsX3 = 238; TopsY3 = 285; TopsX4 = 239; TopsY4 = 279; TopsX5 = 235; TopsY5 = 294; TopsX6 = 238; TopsY6 = 281; DressX = 222; DressY = 389; DressX2 = 224; DressY2 = 304; DressX3 = 217; DressY3 = 331; DressX4 = 234; DressY4 = 331; DressX5 = 223; DressY5 = 312; DressX6 = 235; DressY6 = 334; Clothes = this.add.sprite(TopsX,TopsY,"tops"); Clothes.anchor.setTo(0.5,0.5); Eye_Shadow = this.add.sprite(257,164,"eye_shadow"); Eye_Shadow.anchor.setTo(0.5,0.5); Eye_Shadow.visible = false; Eyes_White = this.add.sprite(231,147,"eyes_white"); Eyes_White.anchor.setTo(0.5,0.5); Eyes = this.add.sprite(254,175,"eyes"); Eyes.anchor.setTo(0.5,0.5); Eyes.frame = 10; Face_Details = this.add.sprite(229,149,"face_details"); Face_Details.anchor.setTo(0.5,0.5); LipsX = 236; LipsY = 191; LipsX2 = 237; LipsY2 = 193; LipsX3 = 236; LipsY3 = 197; LipsX4 = 236; LipsY4 = 193; LipsX5 = 236; LipsY5 = 192; LipsX6 = 235; LipsY6 = 190; Lips = this.add.sprite(LipsX,LipsY,"lips"); Lips.anchor.setTo(0.5,0.5); Lips.frame = 8; TeethX = 236; TeethY = 196; TeethX2 = 236; TeethY2 = 196; TeethX3 = 236; TeethY3 = 196; TeethX4 = 236; TeethY4 = 196; TeethX5 = 236; TeethY5 = 200; TeethX6 = 236; TeethY6 = 196; Teeth = this.add.sprite(TeethX,TeethY,"teeth"); Teeth.anchor.setTo(0.5,0.5); Teeth.frame = 0; HairX = 236; HairY = 143; HairX2 = 235; HairY2 = 163; HairX3 = 237; HairY3 = 36; HairX4 = 237; HairY4 = 254; HairX5 = 237; HairY5 = 196; HairX6 = 241; HairY6 = 36; Hair = this.add.sprite(HairX,HairY,"hair"); Hair.anchor.setTo(0.5,0.5); Hair.frame = 8; Hair_HlX = 237; Hair_HlY = 143; Hair_HlX2 = 235; Hair_HlY2 = 163; Hair_HlX3 = 237; Hair_HlY3 = 10; Hair_HlX4 = 237; Hair_HlY4 = 261; Hair_HlX5 = 237; Hair_HlY5 = 196; Hair_HlX6 = 240; Hair_HlY6 = 36; Hair_Hl = this.add.sprite(Hair_HlX,Hair_HlY,"hair_hl"); Hair_Hl.anchor.setTo(0.5,0.5); Hair_Hl.frame = 0; BangsX = 237; BangsY = 146; BangsX2 = 237; BangsY2 = 95; BangsX3 = 237; BangsY3 = 160; BangsX4 = 237; BangsY4 = 98; BangsX5 = 237; BangsY5 = 96; BangsX6 = 235; BangsY6 = 140; Bangs = this.add.sprite(BangsX,BangsY,"bangs"); Bangs.anchor.setTo(0.5,0.5); Bangs.frame = 8; Bang_HlX = 237; Bang_HlY = 153; Bang_HlX2 = 237; Bang_HlY2 = 81; Bang_HlX3 = 237; Bang_HlY3 = 160; Bang_HlX4 = 238; Bang_HlY4 = 109; Bang_HlX5 = 236; Bang_HlY5 = 100; Bang_HlX6 = 237; Bang_HlY6 = 145; Bang_Hl = this.add.sprite(Bang_HlX,Bang_HlY,"bang_hl"); Bang_Hl.anchor.setTo(0.5,0.5); Extra = this.add.sprite(426,230,"bat"); Extra.anchor.setTo(0.5,0.5); Extra2 = this.add.sprite(445,241,"hammer"); Extra2.anchor.setTo(0.5,0.5); Extra2.visible = false; Extra3 = this.add.sprite(399,354,"gun"); Extra3.anchor.setTo(0.5,0.5); Extra3.visible = false; Extra4 = this.add.sprite(236,151,"masks"); Extra4.anchor.setTo(0.5,0.5); Extra4.visible = false; Extra5 = this.add.sprite(237,57,"hat"); Extra5.anchor.setTo(0.5,0.5); Extra5.visible = false; Extra6 = this.add.sprite(238,233,"necklace"); Extra6.anchor.setTo(0.5,0.5); ShoesX = 254; ShoesY = 573; ShoesX2 = 254; ShoesY2 = 553; ShoesX3 = 254; ShoesY3 = 573; ShoesX4 = 255; ShoesY4 = 585; ShoesX5 = 254; ShoesY5 = 617; ShoesX6 = 254; ShoesY6 = 566; Shoes = this.add.sprite(ShoesX,ShoesY,"shoes"); Shoes.anchor.setTo(0.5,0.5); Doll_Group = this.add.group(); this.SortMainGroup_fnc(); //Doll_Group.setAll("smoothed",false); Doll_Group.scale.setTo(0.92,0.92); Doll_Group.x = 45; Doll_Group.y = 46; //dressup Border = this.add.sprite(713,283,"border"); Border.anchor.setTo(0.5,0.5); //Hair_Menu Bang01_Icon = this.add.button(Border.x + 7,130,"bang_icon",function() { this.Bang_fnc("bangs","Bang01",BangsX,BangsY); this.checkBangsColor(); },this,1,0,0); Bang01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang01_Icon); this.buttonDown_fnc(Bang01_Icon);}; Bang02_Icon = this.add.button(Border.x + 7,Bang01_Icon.y + Bang01_Icon.height + 10,"bang_icon2",function() { this.Bang_fnc("bangs2","Bang02",BangsX2,BangsY2); this.checkBangsColor(); },this,1,0,0); Bang02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang02_Icon); this.buttonDown_fnc(Bang02_Icon);}; Bang03_Icon = this.add.button(Border.x + 7,Bang02_Icon.y + Bang02_Icon.height + 10,"bang_icon3",function() { this.Bang_fnc("bangs3","Bang03",BangsX3,BangsY3); this.checkBangsColor(); },this,1,0,0); Bang03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang03_Icon); this.buttonDown_fnc(Bang03_Icon);}; Bang04_Icon = this.add.button(Border.x + 7,Bang01_Icon.y,"bang_icon4",function() { this.Bang_fnc("bangs4","Bang04",BangsX4,BangsY4); this.checkBangsColor(); },this,1,0,0); Bang04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang04_Icon); this.buttonDown_fnc(Bang04_Icon);}; Bang04_Icon.visible = false; Bang05_Icon = this.add.button(Border.x + 7,Bang04_Icon.y + Bang04_Icon.height + 10,"bang_icon5",function() { this.Bang_fnc("bangs5","Bang05",BangsX5,BangsY5); this.checkBangsColor(); },this,1,0,0); Bang05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang05_Icon); this.buttonDown_fnc(Bang05_Icon);}; Bang05_Icon.visible = false; Bang06_Icon = this.add.button(Border.x + 7,Bang05_Icon.y + Bang05_Icon.height + 10,"bang_icon6",function() { this.Bang_fnc("bangs6","Bang06",BangsX6,BangsY6); this.checkBangsColor(); },this,1,0,0); Bang06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bang06_Icon); this.buttonDown_fnc(Bang06_Icon);}; Bang06_Icon.visible = false; Hair01_Icon = this.add.button(Border.x + 7,Bang01_Icon.y,"hair01_icon",function() { this.Hair_fnc("hair","Hair01",HairX,HairY); this.checkHairColor(); },this,1,0,0); Hair01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair01_Icon); this.buttonDown_fnc(Hair01_Icon);}; Hair01_Icon.visible = false; Hair02_Icon = this.add.button(Border.x + 7,Hair01_Icon.y + Hair01_Icon.height + 10,"hair02_icon",function() { this.Hair_fnc("hair2","Hair02",HairX2,HairY2); this.checkHairColor(); },this,1,0,0); Hair02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair02_Icon); this.buttonDown_fnc(Hair02_Icon);}; Hair02_Icon.visible = false; Hair03_Icon = this.add.button(Border.x + 7,Hair02_Icon.y + Hair02_Icon.height + 10,"hair03_icon",function() { this.Hair_fnc("hair3","Hair03",HairX3,HairY3); this.checkHairColor(); },this,1,0,0); Hair03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair03_Icon); this.buttonDown_fnc(Hair03_Icon);}; Hair03_Icon.visible = false; Hair04_Icon = this.add.button(Border.x + 7,Bang01_Icon.y,"hair04_icon",function() { this.Hair_fnc("hair4","Hair04",HairX4,HairY4); this.checkHairColor(); },this,1,0,0); Hair04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair04_Icon); this.buttonDown_fnc(Hair04_Icon);}; Hair04_Icon.visible = false; Hair05_Icon = this.add.button(Border.x + 7,Hair04_Icon.y + Hair04_Icon.height + 10,"hair05_icon",function() { this.Hair_fnc("hair5","Hair05",HairX5,HairY5); this.checkHairColor(); },this,1,0,0); Hair05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair05_Icon); this.buttonDown_fnc(Hair05_Icon);}; Hair05_Icon.visible = false; Hair06_Icon = this.add.button(Border.x + 7,Hair05_Icon.y + Hair05_Icon.height + 10,"hair06_icon",function() { this.Hair_fnc("hair6","Hair06",HairX6,HairY6); this.checkHairColor(); },this,1,0,0); Hair06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hair06_Icon); this.buttonDown_fnc(Hair06_Icon);}; Hair06_Icon.visible = false; Hair_Menu_Group = this.add.group(); Hair_Menu_Group.add(Bang01_Icon); Hair_Menu_Group.add(Bang02_Icon); Hair_Menu_Group.add(Bang03_Icon); Hair_Menu_Group.add(Bang04_Icon); Hair_Menu_Group.add(Bang05_Icon); Hair_Menu_Group.add(Bang06_Icon); Hair_Menu_Group.add(Hair01_Icon); Hair_Menu_Group.add(Hair02_Icon); Hair_Menu_Group.add(Hair03_Icon); Hair_Menu_Group.add(Hair04_Icon); Hair_Menu_Group.add(Hair05_Icon); Hair_Menu_Group.add(Hair06_Icon); Hair_Menu_Group.setAll("input.pixelPerfectClick",true); Hair_Menu_Group.setAll("input.pixelPerfectOver",true); //Hl_Menu Hl_Color01_Icon = this.add.button(639,98,"hl_color01_icon",function() { hlColor = 0; Bang_Hl.frame = 0; Hair_Hl.frame = 0; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color01_Icon); this.buttonDown_fnc(Hl_Color01_Icon);}; Hl_Color02_Icon = this.add.button(Hl_Color01_Icon.x + Hl_Color01_Icon.width - 12,Hl_Color01_Icon.y,"hl_color02_icon",function() { hlColor = 1; Bang_Hl.frame = 1; Hair_Hl.frame = 1; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color02_Icon); this.buttonDown_fnc(Hl_Color02_Icon);}; Hl_Color03_Icon = this.add.button(Hl_Color02_Icon.x + Hl_Color02_Icon.width - 12,Hl_Color01_Icon.y,"hl_color03_icon",function() { hlColor = 2; Bang_Hl.frame = 2; Hair_Hl.frame = 2; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color03_Icon); this.buttonDown_fnc(Hl_Color03_Icon);}; Hl_Color04_Icon = this.add.button(Hl_Color01_Icon.x,Hl_Color01_Icon.y + Hl_Color01_Icon.height + 20,"hl_color04_icon",function() { hlColor = 3; Bang_Hl.frame = 3; Hair_Hl.frame = 3; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color04_Icon); this.buttonDown_fnc(Hl_Color04_Icon);}; Hl_Color05_Icon = this.add.button(Hl_Color04_Icon.x + Hl_Color04_Icon.width - 12,Hl_Color04_Icon.y,"hl_color05_icon",function() { hlColor = 4; Bang_Hl.frame = 4; Hair_Hl.frame = 4; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color05_Icon); this.buttonDown_fnc(Hl_Color05_Icon);}; Hl_Color06_Icon = this.add.button(Hl_Color05_Icon.x + Hl_Color05_Icon.width - 12,Hl_Color05_Icon.y,"hl_color06_icon",function() { hlColor = 5; Bang_Hl.frame = 5; Hair_Hl.frame = 5; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color06_Icon); this.buttonDown_fnc(Hl_Color06_Icon);}; Hl_Color07_Icon = this.add.button(Hl_Color04_Icon.x,Hl_Color04_Icon.y + Hl_Color04_Icon.height + 20,"hl_color07_icon",function() { hlColor = 6; Bang_Hl.frame = 6; Hair_Hl.frame = 6; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color07_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color07_Icon); this.buttonDown_fnc(Hl_Color07_Icon);}; Hl_Color08_Icon = this.add.button(Hl_Color07_Icon.x + Hl_Color07_Icon.width - 12,Hl_Color07_Icon.y,"hl_color08_icon",function() { hlColor = 7; Bang_Hl.frame = 7; Hair_Hl.frame = 7; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color08_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color08_Icon); this.buttonDown_fnc(Hl_Color08_Icon);}; Hl_Color09_Icon = this.add.button(Hl_Color08_Icon.x + Hl_Color08_Icon.width - 12,Hl_Color08_Icon.y,"hl_color09_icon",function() { hlColor = 8; Bang_Hl.frame = 8; Hair_Hl.frame = 8; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color09_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color09_Icon); this.buttonDown_fnc(Hl_Color09_Icon);}; Hl_Color10_Icon = this.add.button(Hl_Color07_Icon.x,Hl_Color07_Icon.y + Hl_Color07_Icon.height + 20,"hl_color10_icon",function() { hlColor = 9; Bang_Hl.frame = 9; Hair_Hl.frame = 9; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color10_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color10_Icon); this.buttonDown_fnc(Hl_Color10_Icon);}; Hl_Color11_Icon = this.add.button(Hl_Color10_Icon.x + Hl_Color10_Icon.width - 12,Hl_Color10_Icon.y,"hl_color11_icon",function() { hlColor = 10; Bang_Hl.frame = 10; Hair_Hl.frame = 10; Bang_Hl.visible = true; Hair_Hl.visible = true; hlVisible = true; },this,1,0,0); Hl_Color11_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color11_Icon); this.buttonDown_fnc(Hl_Color11_Icon);}; Hl_Color12_Icon = this.add.button(Hl_Color11_Icon.x + Hl_Color11_Icon.width - 12,Hl_Color11_Icon.y,"hl_color12_icon",function() { hlColor = 11; Bang_Hl.frame = 11; Hair_Hl.frame = 11; Bang_Hl.visible = true; Hair_Hl.visible = true; },this,1,0,0); Hl_Color12_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Hl_Color12_Icon); this.buttonDown_fnc(Hl_Color12_Icon);}; Hl_Color_Group = this.add.group(); Hl_Color_Group.add(Hl_Color01_Icon); Hl_Color_Group.add(Hl_Color02_Icon); Hl_Color_Group.add(Hl_Color03_Icon); Hl_Color_Group.add(Hl_Color04_Icon); Hl_Color_Group.add(Hl_Color05_Icon); Hl_Color_Group.add(Hl_Color06_Icon); Hl_Color_Group.add(Hl_Color07_Icon); Hl_Color_Group.add(Hl_Color08_Icon); Hl_Color_Group.add(Hl_Color09_Icon); Hl_Color_Group.add(Hl_Color10_Icon); Hl_Color_Group.add(Hl_Color11_Icon); Hl_Color_Group.add(Hl_Color12_Icon); Hl_Color_Group.visible = false; //Color_Icon Color01_Icon = this.add.button(639,98,"color01_icon",function() { if(openedMenu == 1) { hairColor = 0; Hair.frame = 0; Bangs.frame = 0; } else if(openedMenu == 3) { Eyes.frame = 0; } else if(openedMenu == 4) { Eye_Shadow.frame = 0; Eye_Shadow.visible = true; } },this,1,0,0); Color01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color01_Icon); this.buttonDown_fnc(Color01_Icon);}; Color02_Icon = this.add.button(Color01_Icon.x + Color01_Icon.width - 12,Color01_Icon.y,"color02_icon",function() { if(openedMenu == 1) { hairColor = 1; Hair.frame = 1; Bangs.frame = 1; } else if(openedMenu == 3) { Eyes.frame = 1; } else if(openedMenu == 4) { Eye_Shadow.frame = 1; Eye_Shadow.visible = true; } },this,1,0,0); Color02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color02_Icon); this.buttonDown_fnc(Color02_Icon);}; Color03_Icon = this.add.button(Color02_Icon.x + Color02_Icon.width - 12,Color02_Icon.y,"color03_icon",function() { if(openedMenu == 1) { hairColor = 2; Hair.frame = 2; Bangs.frame = 2; } else if(openedMenu == 3) { Eyes.frame = 2; } else if(openedMenu == 4) { Eye_Shadow.frame = 2; Eye_Shadow.visible = true; } },this,1,0,0); Color03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color03_Icon); this.buttonDown_fnc(Color03_Icon);}; Color04_Icon = this.add.button(Color01_Icon.x,Color01_Icon.y + Color01_Icon.height + 20,"color04_icon",function() { if(openedMenu == 1) { hairColor = 3; Hair.frame = 3; Bangs.frame = 3; } else if(openedMenu == 3) { Eyes.frame = 3; } else if(openedMenu == 4) { Eye_Shadow.frame = 3; Eye_Shadow.visible = true; } },this,1,0,0); Color04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color04_Icon); this.buttonDown_fnc(Color04_Icon);}; Color05_Icon = this.add.button(Color04_Icon.x + Color04_Icon.width - 12,Color04_Icon.y,"color05_icon",function() { if(openedMenu == 1) { hairColor = 4; Hair.frame = 4; Bangs.frame = 4; } else if(openedMenu == 3) { Eyes.frame = 4; } else if(openedMenu == 4) { Eye_Shadow.frame = 4; Eye_Shadow.visible = true; } },this,1,0,0); Color05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color05_Icon); this.buttonDown_fnc(Color05_Icon);}; Color06_Icon = this.add.button(Color05_Icon.x + Color05_Icon.width - 12,Color05_Icon.y,"color06_icon",function() { if(openedMenu == 1) { hairColor = 5; Hair.frame = 5; Bangs.frame = 5; } else if(openedMenu == 3) { Eyes.frame = 5; } else if(openedMenu == 4) { Eye_Shadow.frame = 5; Eye_Shadow.visible = true; } },this,1,0,0); Color06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color06_Icon); this.buttonDown_fnc(Color06_Icon);}; Color07_Icon = this.add.button(Color04_Icon.x,Color04_Icon.y + Color04_Icon.height + 20,"color07_icon",function() { if(openedMenu == 1) { hairColor = 6; Hair.frame = 6; Bangs.frame = 6; } else if(openedMenu == 3) { Eyes.frame = 6; } else if(openedMenu == 4) { Eye_Shadow.frame = 6; Eye_Shadow.visible = true; } },this,1,0,0); Color07_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color07_Icon); this.buttonDown_fnc(Color07_Icon);}; Color08_Icon = this.add.button(Color07_Icon.x + Color07_Icon.width - 12,Color07_Icon.y,"color08_icon",function() { if(openedMenu == 1) { hairColor = 7; Hair.frame = 7; Bangs.frame = 7; } },this,1,0,0); Color08_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color08_Icon); this.buttonDown_fnc(Color08_Icon);}; Color08_Icon2 = this.add.button(Color07_Icon.x + Color07_Icon.width - 12,Color07_Icon.y,"color08_icon2",function() { if(openedMenu == 3) { Eyes.frame = 7; } else if(openedMenu == 4) { Eye_Shadow.frame = 7; Eye_Shadow.visible = true; } },this,1,0,0); Color08_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color08_Icon2); this.buttonDown_fnc(Color08_Icon2);}; Color09_Icon = this.add.button(Color08_Icon.x + Color08_Icon.width - 12,Color08_Icon.y,"color09_icon",function() { if(openedMenu == 1) { hairColor = 8; Hair.frame = 8; Bangs.frame = 8; } },this,1,0,0); Color09_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color09_Icon); this.buttonDown_fnc(Color09_Icon);}; Color09_Icon2 = this.add.button(Color08_Icon.x + Color08_Icon.width - 12,Color08_Icon.y,"color09_icon2",function() { if(openedMenu == 3) { Eyes.frame = 8; } else if(openedMenu == 4) { Eye_Shadow.frame = 8; Eye_Shadow.visible = true; } },this,1,0,0); Color09_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color09_Icon2); this.buttonDown_fnc(Color09_Icon2);}; Color10_Icon = this.add.button(Color07_Icon.x,Color07_Icon.y + Color07_Icon.height + 20,"color10_icon",function() { if(openedMenu == 1) { hairColor = 9; Hair.frame = 9; Bangs.frame = 9; } else if(openedMenu == 3) { Eyes.frame = 9; } else if(openedMenu == 4) { Eye_Shadow.frame = 9; Eye_Shadow.visible = true; } },this,1,0,0); Color10_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color10_Icon); this.buttonDown_fnc(Color10_Icon);}; Color11_Icon = this.add.button(Color10_Icon.x + Color10_Icon.width - 12,Color10_Icon.y,"color11_icon",function() { if(openedMenu == 1) { hairColor = 10; Hair.frame = 10; Bangs.frame = 10; } else if(openedMenu == 3) { Eyes.frame = 10; } else if(openedMenu == 4) { Eye_Shadow.frame = 10; Eye_Shadow.visible = true; } },this,1,0,0); Color11_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color11_Icon); this.buttonDown_fnc(Color11_Icon);}; Color12_Icon = this.add.button(Color11_Icon.x + Color11_Icon.width - 12,Color11_Icon.y,"color12_icon",function() { if(openedMenu == 1) { hairColor = 11; Hair.frame = 11; Bangs.frame = 11; } else if(openedMenu == 3) { Eyes.frame = 11; } else if(openedMenu == 4) { Eye_Shadow.frame = 11; Eye_Shadow.visible = true; } },this,1,0,0); Color12_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color12_Icon); this.buttonDown_fnc(Color12_Icon);}; //Lips_Icon Lips01_Icon = this.add.button(Border.x + 7,130,"lips01_icon",function() { this.Lips_fnc("lips","Lips01",LipsX,LipsY); Teeth.frame = 0; Teeth.x = TeethX; Teeth.y = TeethY; if(lipsColor == 0){Lips.frame = 0;} if(lipsColor == 1){Lips.frame = 1;} if(lipsColor == 2){Lips.frame = 2;} if(lipsColor == 3){Lips.frame = 3;} if(lipsColor == 4){Lips.frame = 4;} if(lipsColor == 5){Lips.frame = 5;} if(lipsColor == 6){Lips.frame = 6;} if(lipsColor == 7){Lips.frame = 7;} if(lipsColor == 8){Lips.frame = 8;} if(lipsColor == 9){Lips.frame = 9;} if(lipsColor == 10){Lips.frame = 10;} if(lipsColor == 11){Lips.frame = 11;} },this,1,0,0); Lips01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips01_Icon); this.buttonDown_fnc(Lips01_Icon);}; Lips02_Icon = this.add.button(Border.x + 7,Lips01_Icon.y + Lips01_Icon.height + 10,"lips02_icon",function() { this.Lips_fnc("lips2","Lips02",LipsX2,LipsY2); Teeth.frame = 1; Teeth.x = TeethX2; Teeth.y = TeethY2; if(lipsColor == 0){Lips.frame = 0;} if(lipsColor == 1){Lips.frame = 1;} if(lipsColor == 2){Lips.frame = 2;} if(lipsColor == 3){Lips.frame = 3;} if(lipsColor == 4){Lips.frame = 4;} if(lipsColor == 5){Lips.frame = 5;} if(lipsColor == 6){Lips.frame = 6;} if(lipsColor == 7){Lips.frame = 7;} if(lipsColor == 8){Lips.frame = 8;} if(lipsColor == 9){Lips.frame = 9;} if(lipsColor == 10){Lips.frame = 10;} if(lipsColor == 11){Lips.frame = 11;} },this,1,0,0); Lips02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips02_Icon); this.buttonDown_fnc(Lips02_Icon);}; Lips03_Icon = this.add.button(Border.x + 7,Lips02_Icon.y + Lips02_Icon.height + 10,"lips03_icon",function() { this.Lips_fnc("lips3","Lips03",LipsX3,LipsY3); Teeth.frame = 2; Teeth.x = TeethX3; Teeth.y = TeethY3; if(lipsColor == 0){Lips.frame = 0;} if(lipsColor == 1){Lips.frame = 1;} if(lipsColor == 2){Lips.frame = 2;} if(lipsColor == 3){Lips.frame = 3;} if(lipsColor == 4){Lips.frame = 4;} if(lipsColor == 5){Lips.frame = 5;} if(lipsColor == 6){Lips.frame = 6;} if(lipsColor == 7){Lips.frame = 7;} if(lipsColor == 8){Lips.frame = 8;} if(lipsColor == 9){Lips.frame = 9;} if(lipsColor == 10){Lips.frame = 10;} if(lipsColor == 11){Lips.frame = 11;} },this,1,0,0); Lips03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips03_Icon); this.buttonDown_fnc(Lips03_Icon);}; Lips04_Icon = this.add.button(Border.x + 7,130,"lips04_icon",function() { this.Lips_fnc("lips4","Lips04",LipsX4,LipsY4); Teeth.frame = 3; Teeth.x = TeethX4; Teeth.y = TeethY4; if(lipsColor == 0){Lips.frame = 0;} if(lipsColor == 1){Lips.frame = 1;} if(lipsColor == 2){Lips.frame = 2;} if(lipsColor == 3){Lips.frame = 3;} if(lipsColor == 4){Lips.frame = 4;} if(lipsColor == 5){Lips.frame = 5;} if(lipsColor == 6){Lips.frame = 6;} if(lipsColor == 7){Lips.frame = 7;} if(lipsColor == 8){Lips.frame = 8;} if(lipsColor == 9){Lips.frame = 9;} if(lipsColor == 10){Lips.frame = 10;} if(lipsColor == 11){Lips.frame = 11;} },this,1,0,0); Lips04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips04_Icon); this.buttonDown_fnc(Lips04_Icon);}; Lips04_Icon.visible = false; Lips05_Icon = this.add.button(Border.x + 7,Lips04_Icon.y + Lips04_Icon.height + 10,"lips05_icon",function() { this.Lips_fnc("lips5","Lips05",LipsX5,LipsY5); Teeth.frame = 4; Teeth.x = TeethX5; Teeth.y = TeethY5; if(lipsColor == 0){Lips.frame = 0;} if(lipsColor == 1){Lips.frame = 1;} if(lipsColor == 2){Lips.frame = 2;} if(lipsColor == 3){Lips.frame = 3;} if(lipsColor == 4){Lips.frame = 4;} if(lipsColor == 5){Lips.frame = 5;} if(lipsColor == 6){Lips.frame = 6;} if(lipsColor == 7){Lips.frame = 7;} if(lipsColor == 8){Lips.frame = 8;} if(lipsColor == 9){Lips.frame = 9;} if(lipsColor == 10){Lips.frame = 10;} if(lipsColor == 11){Lips.frame = 11;} },this,1,0,0); Lips05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips05_Icon); this.buttonDown_fnc(Lips05_Icon);}; Lips05_Icon.visible = false; Lips06_Icon = this.add.button(Border.x + 7,Lips05_Icon.y + Lips05_Icon.height + 10,"lips06_icon",function() { this.Lips_fnc("lips6","Lips06",LipsX6,LipsY6); Teeth.frame = 5; Teeth.x = TeethX6; Teeth.y = TeethY6; if(lipsColor == 0){Lips.frame = 0;} if(lipsColor == 1){Lips.frame = 1;} if(lipsColor == 2){Lips.frame = 2;} if(lipsColor == 3){Lips.frame = 3;} if(lipsColor == 4){Lips.frame = 4;} if(lipsColor == 5){Lips.frame = 5;} if(lipsColor == 6){Lips.frame = 6;} if(lipsColor == 7){Lips.frame = 7;} if(lipsColor == 8){Lips.frame = 8;} if(lipsColor == 9){Lips.frame = 9;} if(lipsColor == 10){Lips.frame = 10;} if(lipsColor == 11){Lips.frame = 11;} },this,1,0,0); Lips06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips06_Icon); this.buttonDown_fnc(Lips06_Icon);}; Lips06_Icon.visible = false; Lips_Menu_Group = this.add.group(); Lips_Menu_Group.add(Lips01_Icon); Lips_Menu_Group.add(Lips02_Icon); Lips_Menu_Group.add(Lips03_Icon); Lips_Menu_Group.add(Lips04_Icon); Lips_Menu_Group.add(Lips05_Icon); Lips_Menu_Group.add(Lips06_Icon); Lips_Menu_Group.setAll("input.pixelPerfectClick",true); Lips_Menu_Group.setAll("input.pixelPerfectOver",true); Lips_Menu_Group.visible = false; //Lips_Color Lips_Color01 = this.add.button(639,98,"lips_color01",function() { lipsColor = 0; Lips.frame = 0; },this,1,0,0); Lips_Color01.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color01); this.buttonDown_fnc(Lips_Color01);}; Lips_Color02 = this.add.button(Lips_Color01.x + Lips_Color01.width - 12,Lips_Color01.y,"lips_color02",function() { lipsColor = 1; Lips.frame = 1; },this,1,0,0); Lips_Color02.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color02); this.buttonDown_fnc(Lips_Color02);}; Lips_Color03 = this.add.button(Lips_Color02.x + Lips_Color02.width - 12,Lips_Color02.y,"lips_color03",function() { lipsColor = 2; Lips.frame = 2; },this,1,0,0); Lips_Color03.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color03); this.buttonDown_fnc(Lips_Color03);}; Lips_Color04 = this.add.button(Lips_Color01.x,Lips_Color01.y + Lips_Color01.height + 20,"lips_color04",function() { lipsColor = 3; Lips.frame = 3; },this,1,0,0); Lips_Color04.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color04); this.buttonDown_fnc(Lips_Color04);}; Lips_Color05 = this.add.button(Lips_Color04.x + Lips_Color04.width - 12,Lips_Color04.y,"lips_color05",function() { lipsColor = 4; Lips.frame = 4; },this,1,0,0); Lips_Color05.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color05); this.buttonDown_fnc(Lips_Color05);}; Lips_Color06 = this.add.button(Lips_Color05.x + Lips_Color05.width - 12,Lips_Color05.y,"lips_color06",function() { lipsColor = 5; Lips.frame = 5; },this,1,0,0); Lips_Color06.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color06); this.buttonDown_fnc(Lips_Color06);}; Lips_Color07 = this.add.button(Lips_Color04.x,Lips_Color04.y + Lips_Color04.height + 20,"lips_color07",function() { lipsColor = 6; Lips.frame = 6; },this,1,0,0); Lips_Color07.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color07); this.buttonDown_fnc(Lips_Color07);}; Lips_Color08 = this.add.button(Lips_Color07.x + Lips_Color07.width - 12,Lips_Color07.y,"lips_color08",function() { lipsColor = 7; Lips.frame = 7; },this,1,0,0); Lips_Color08.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color08); this.buttonDown_fnc(Lips_Color08);}; Lips_Color09 = this.add.button(Lips_Color08.x + Lips_Color08.width - 12,Lips_Color08.y,"lips_color09",function() { lipsColor = 8; Lips.frame = 8; },this,1,0,0); Lips_Color09.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color09); this.buttonDown_fnc(Lips_Color09);}; Lips_Color10 = this.add.button(Lips_Color07.x,Lips_Color07.y + Lips_Color07.height + 20,"lips_color10",function() { lipsColor = 9; Lips.frame = 9; },this,1,0,0); Lips_Color10.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color10); this.buttonDown_fnc(Lips_Color10);}; Lips_Color11 = this.add.button(Lips_Color10.x + Lips_Color10.width - 12,Lips_Color10.y,"lips_color11",function() { lipsColor = 10; Lips.frame = 10; },this,1,0,0); Lips_Color11.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color11); this.buttonDown_fnc(Lips_Color11);}; Lips_Color12 = this.add.button(Lips_Color11.x + Lips_Color11.width - 12,Lips_Color11.y,"lips_color12",function() { lipsColor = 11; Lips.frame = 11; },this,1,0,0); Lips_Color12.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Lips_Color12); this.buttonDown_fnc(Lips_Color12);}; Lips_Color_Back = this.add.button(Lips_Color11.x,Lips_Color11.y + Lips_Color11.height + 7,"back_btn",function() { Lips_Color_Group.visible = false; Lips_Menu_Group.visible = true; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; },this,1,0,2); Lips_Color_Back.anchor.setTo(0.5,0.5); Lips_Color_Group = this.add.group(); Lips_Color_Group.add(Lips_Color01); Lips_Color_Group.add(Lips_Color02); Lips_Color_Group.add(Lips_Color03); Lips_Color_Group.add(Lips_Color04); Lips_Color_Group.add(Lips_Color05); Lips_Color_Group.add(Lips_Color06); Lips_Color_Group.add(Lips_Color07); Lips_Color_Group.add(Lips_Color08); Lips_Color_Group.add(Lips_Color09); Lips_Color_Group.add(Lips_Color10); Lips_Color_Group.add(Lips_Color11); Lips_Color_Group.add(Lips_Color12); Lips_Color_Group.add(Lips_Color_Back); Lips_Color_Group.visible = false; //SkinColor_Icon SkinColor01_Icon = this.add.button(639,98,"skincolor01_icon",function() { bodyColor = 0; Body.frame = 0; Head.frame = 0; },this,1,0,0); SkinColor01_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor01_Icon); this.buttonDown_fnc(SkinColor01_Icon);}; SkinColor02_Icon = this.add.button(SkinColor01_Icon.x + SkinColor01_Icon.width - 12,SkinColor01_Icon.y,"skincolor02_icon",function() { bodyColor = 1; Body.frame = 1; Head.frame = 1; },this,1,0,0); SkinColor02_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor02_Icon); this.buttonDown_fnc(SkinColor02_Icon);}; SkinColor03_Icon = this.add.button(SkinColor02_Icon.x + SkinColor02_Icon.width - 12,SkinColor02_Icon.y,"skincolor03_icon",function() { bodyColor = 2; Body.frame = 2; Head.frame = 2; },this,1,0,0); SkinColor03_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor03_Icon); this.buttonDown_fnc(SkinColor03_Icon);}; SkinColor04_Icon = this.add.button(SkinColor01_Icon.x,SkinColor01_Icon.y + SkinColor01_Icon.height + 20,"skincolor04_icon",function() { bodyColor = 3; Body.frame = 3; Head.frame = 3; },this,1,0,0); SkinColor04_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor04_Icon); this.buttonDown_fnc(SkinColor04_Icon);}; SkinColor05_Icon = this.add.button(SkinColor04_Icon.x + SkinColor04_Icon.width - 12,SkinColor04_Icon.y,"skincolor05_icon",function() { bodyColor = 4; Body.frame = 4; Head.frame = 4; },this,1,0,0); SkinColor05_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor05_Icon); this.buttonDown_fnc(SkinColor05_Icon);}; SkinColor06_Icon = this.add.button(SkinColor05_Icon.x + SkinColor05_Icon.width - 12,SkinColor05_Icon.y,"skincolor06_icon",function() { bodyColor = 5; Body.frame = 5; Head.frame = 5; },this,1,0,0); SkinColor06_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor06_Icon); this.buttonDown_fnc(SkinColor06_Icon);}; SkinColor07_Icon = this.add.button(SkinColor04_Icon.x,SkinColor04_Icon.y + SkinColor04_Icon.height + 20,"skincolor07_icon",function() { bodyColor = 6; Body.frame = 6; Head.frame = 6; },this,1,0,0); SkinColor07_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor07_Icon); this.buttonDown_fnc(SkinColor07_Icon);}; SkinColor08_Icon = this.add.button(SkinColor07_Icon.x + SkinColor07_Icon.width - 12,SkinColor07_Icon.y,"skincolor08_icon",function() { bodyColor = 7; Body.frame = 7; Head.frame = 7; },this,1,0,0); SkinColor08_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor08_Icon); this.buttonDown_fnc(SkinColor08_Icon);}; SkinColor09_Icon = this.add.button(SkinColor08_Icon.x + SkinColor08_Icon.width - 12,SkinColor08_Icon.y,"skincolor09_icon",function() { bodyColor = 8; Body.frame = 8; Head.frame = 8; },this,1,0,0); SkinColor09_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor09_Icon); this.buttonDown_fnc(SkinColor09_Icon);}; SkinColor10_Icon = this.add.button(SkinColor07_Icon.x,SkinColor07_Icon.y + SkinColor07_Icon.height + 20,"skincolor10_icon",function() { bodyColor = 9; Body.frame = 9; Head.frame = 9; },this,1,0,0); SkinColor10_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor10_Icon); this.buttonDown_fnc(SkinColor10_Icon);}; SkinColor11_Icon = this.add.button(SkinColor10_Icon.x + SkinColor10_Icon.width - 12,SkinColor10_Icon.y,"skincolor11_icon",function() { bodyColor = 10; Body.frame = 10; Head.frame = 10; },this,1,0,0); SkinColor11_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor11_Icon); this.buttonDown_fnc(SkinColor11_Icon);}; SkinColor12_Icon = this.add.button(SkinColor11_Icon.x + SkinColor11_Icon.width - 12,SkinColor11_Icon.y,"skincolor12_icon",function() { bodyColor = 11; Body.frame = 11; Head.frame = 11; },this,1,0,0); SkinColor12_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(SkinColor12_Icon); this.buttonDown_fnc(SkinColor12_Icon);}; SkinColor_Menu_Group = this.add.group(); SkinColor_Menu_Group.add(SkinColor01_Icon); SkinColor_Menu_Group.add(SkinColor02_Icon); SkinColor_Menu_Group.add(SkinColor03_Icon); SkinColor_Menu_Group.add(SkinColor04_Icon); SkinColor_Menu_Group.add(SkinColor05_Icon); SkinColor_Menu_Group.add(SkinColor06_Icon); SkinColor_Menu_Group.add(SkinColor07_Icon); SkinColor_Menu_Group.add(SkinColor08_Icon); SkinColor_Menu_Group.add(SkinColor09_Icon); SkinColor_Menu_Group.add(SkinColor10_Icon); SkinColor_Menu_Group.add(SkinColor11_Icon); SkinColor_Menu_Group.add(SkinColor12_Icon); SkinColor_Menu_Group.visible = false; //Tops_Icon Tops_Icon = this.add.button(Border.x + 7,130,"tops_icon",function() { this.Clothes_fnc("tops","Top01",TopsX,TopsY); },this,1,0,0); Tops_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon); this.buttonDown_fnc(Tops_Icon);}; Tops_Icon2 = this.add.button(Border.x + 7,Tops_Icon.y + Tops_Icon.height + 10,"tops_icon2",function() { this.Clothes_fnc("tops2","Top02",TopsX2,TopsY2); },this,1,0,0); Tops_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon2); this.buttonDown_fnc(Tops_Icon2);}; Tops_Icon3 = this.add.button(Border.x + 7,Tops_Icon2.y + Tops_Icon2.height + 10,"tops_icon3",function() { this.Clothes_fnc("tops3","Top03",TopsX3,TopsY3); },this,1,0,0); Tops_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon3); this.buttonDown_fnc(Tops_Icon3);}; Tops_Icon4 = this.add.button(Border.x + 7,Tops_Icon.y,"tops_icon4",function() { this.Clothes_fnc("tops4","Top04",TopsX4,TopsY4); },this,1,0,0); Tops_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon4); this.buttonDown_fnc(Tops_Icon4);}; Tops_Icon4.visible = false; Tops_Icon5 = this.add.button(Border.x + 7,Tops_Icon4.y + Tops_Icon4.height + 10,"tops_icon5",function() { this.Clothes_fnc("tops5","Top05",TopsX5,TopsY5); },this,1,0,0); Tops_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon5); this.buttonDown_fnc(Tops_Icon5);}; Tops_Icon5.visible = false; Tops_Icon6 = this.add.button(Border.x + 7,Tops_Icon5.y + Tops_Icon5.height + 10,"tops_icon6",function() { this.Clothes_fnc("tops6","Top06",TopsX6,TopsY6); },this,1,0,0); Tops_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Tops_Icon6); this.buttonDown_fnc(Tops_Icon6);}; Tops_Icon6.visible = false; Tops_Menu_Group = this.add.group(); Tops_Menu_Group.add(Tops_Icon); Tops_Menu_Group.add(Tops_Icon2); Tops_Menu_Group.add(Tops_Icon3); Tops_Menu_Group.add(Tops_Icon4); Tops_Menu_Group.add(Tops_Icon5); Tops_Menu_Group.add(Tops_Icon6); Tops_Menu_Group.setAll("input.pixelPerfectClick",true); Tops_Menu_Group.setAll("input.pixelPerfectOver",true); Tops_Menu_Group.visible = false; //Bottoms_Icon Bottoms_Icon = this.add.button(Border.x + 7,130,"bottoms_icon",function() { this.Bottoms_fnc("bottoms","Bottoms01",BottomsX,BottomsY); },this,1,0,0); Bottoms_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon); this.buttonDown_fnc(Bottoms_Icon);}; Bottoms_Icon2 = this.add.button(Border.x + 7,Bottoms_Icon.y + Bottoms_Icon.height + 10,"bottoms_icon2",function() { this.Bottoms_fnc("bottoms2","Bottoms02",BottomsX2,BottomsY2); },this,1,0,0); Bottoms_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon2); this.buttonDown_fnc(Bottoms_Icon2);}; Bottoms_Icon3 = this.add.button(Border.x + 7,Bottoms_Icon2.y + Bottoms_Icon2.height + 10,"bottoms_icon3",function() { this.Bottoms_fnc("bottoms3","Bottoms03",BottomsX3,BottomsY3); },this,1,0,0); Bottoms_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon3); this.buttonDown_fnc(Bottoms_Icon3);}; Bottoms_Icon4 = this.add.button(Border.x + 7,Bottoms_Icon.y,"bottoms_icon4",function() { this.Bottoms_fnc("bottoms4","Bottoms04",BottomsX4,BottomsY4); },this,1,0,0); Bottoms_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon4); this.buttonDown_fnc(Bottoms_Icon4);}; Bottoms_Icon4.visible = false; Bottoms_Icon5 = this.add.button(Border.x + 7,Bottoms_Icon4.y + Bottoms_Icon4.height + 10,"bottoms_icon5",function() { this.Bottoms_fnc("bottoms5","Bottoms05",BottomsX5,BottomsY5); },this,1,0,0); Bottoms_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon5); this.buttonDown_fnc(Bottoms_Icon5);}; Bottoms_Icon5.visible = false; Bottoms_Icon6 = this.add.button(Border.x + 7,Bottoms_Icon5.y + Bottoms_Icon5.height + 10,"bottoms_icon6",function() { this.Bottoms_fnc("bottoms6","Bottoms06",BottomsX6,BottomsY6); },this,1,0,0); Bottoms_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Bottoms_Icon6); this.buttonDown_fnc(Bottoms_Icon6);}; Bottoms_Icon6.visible = false; Bottoms_Menu_Group = this.add.group(); Bottoms_Menu_Group.add(Bottoms_Icon); Bottoms_Menu_Group.add(Bottoms_Icon2); Bottoms_Menu_Group.add(Bottoms_Icon3); Bottoms_Menu_Group.add(Bottoms_Icon4); Bottoms_Menu_Group.add(Bottoms_Icon5); Bottoms_Menu_Group.add(Bottoms_Icon6); Bottoms_Menu_Group.visible = false; //Dress_Icon Dress_Icon = this.add.button(Border.x + 7,130,"dress_icon",function() { this.Clothes_fnc("dress","Dress01",DressX,DressY); Bottoms.visible = false; },this,1,0,0); Dress_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon); this.buttonDown_fnc(Dress_Icon);}; Dress_Icon2 = this.add.button(Border.x + 7,Dress_Icon.y + Dress_Icon.height + 10,"dress_icon2",function() { this.Clothes_fnc("dress2","Dress02",DressX2,DressY2); Bottoms.visible = false; },this,1,0,0); Dress_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon2); this.buttonDown_fnc(Dress_Icon2);}; Dress_Icon3 = this.add.button(Border.x + 7,Dress_Icon2.y + Dress_Icon2.height + 10,"dress_icon3",function() { this.Clothes_fnc("dress3","Dress03",DressX3,DressY3); Bottoms.visible = false; },this,1,0,0); Dress_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon3); this.buttonDown_fnc(Dress_Icon3);}; Dress_Icon4 = this.add.button(Border.x + 7,Dress_Icon.y,"dress_icon4",function() { this.Clothes_fnc("dress4","Dress04",DressX4,DressY4); Bottoms.visible = false; },this,1,0,0); Dress_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon4); this.buttonDown_fnc(Dress_Icon4);}; Dress_Icon4.visible = false; Dress_Icon5 = this.add.button(Border.x + 7,Dress_Icon4.y + Dress_Icon4.height + 10,"dress_icon5",function() { this.Clothes_fnc("dress5","Dress05",DressX5,DressY5); Bottoms.visible = false; },this,1,0,0); Dress_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon5); this.buttonDown_fnc(Dress_Icon5);}; Dress_Icon5.visible = false; Dress_Icon6 = this.add.button(Border.x + 7,Dress_Icon5.y + Dress_Icon5.height + 10,"dress_icon6",function() { this.Clothes_fnc("dress6","Dress06",DressX6,DressY6); Bottoms.visible = false; },this,1,0,0); Dress_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Dress_Icon6); this.buttonDown_fnc(Dress_Icon6);}; Dress_Icon6.visible = false; Dress_Menu_Group = this.add.group(); Dress_Menu_Group.add(Dress_Icon); Dress_Menu_Group.add(Dress_Icon2); Dress_Menu_Group.add(Dress_Icon3); Dress_Menu_Group.add(Dress_Icon4); Dress_Menu_Group.add(Dress_Icon5); Dress_Menu_Group.add(Dress_Icon6); Dress_Menu_Group.visible = false; //Shoes_Icon Shoes_Icon = this.add.button(Border.x + 7,130,"shoes_icon",function() { this.Shoes_fnc("shoes","Shoes01",ShoesX,ShoesY); },this,1,0,0); Shoes_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon); this.buttonDown_fnc(Shoes_Icon);}; Shoes_Icon2 = this.add.button(Border.x + 7,Shoes_Icon.y + Shoes_Icon.height + 10,"shoes_icon2",function() { this.Shoes_fnc("shoes2","Shoes02",ShoesX2,ShoesY2); },this,1,0,0); Shoes_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon2); this.buttonDown_fnc(Shoes_Icon2);}; Shoes_Icon3 = this.add.button(Border.x + 7,Shoes_Icon2.y + Shoes_Icon2.height + 10,"shoes_icon3",function() { this.Shoes_fnc("shoes3","Shoes03",ShoesX3,ShoesY3); },this,1,0,0); Shoes_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon3); this.buttonDown_fnc(Shoes_Icon3);}; Shoes_Icon4 = this.add.button(Border.x + 7,Shoes_Icon.y,"shoes_icon4",function() { this.Shoes_fnc("shoes4","Shoes04",ShoesX4,ShoesY4); },this,1,0,0); Shoes_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon4); this.buttonDown_fnc(Shoes_Icon4);}; Shoes_Icon4.visible = false; Shoes_Icon5 = this.add.button(Border.x + 7,Shoes_Icon4.y + Shoes_Icon4.height + 10,"shoes_icon5",function() { this.Shoes_fnc("shoes5","Shoes05",ShoesX5,ShoesY5); },this,1,0,0); Shoes_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon5); this.buttonDown_fnc(Shoes_Icon5);}; Shoes_Icon5.visible = false; Shoes_Icon6 = this.add.button(Border.x + 7,Shoes_Icon5.y + Shoes_Icon5.height + 10,"shoes_icon6",function() { this.Shoes_fnc("shoes6","Shoes06",ShoesX6,ShoesY6); },this,1,0,0); Shoes_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Shoes_Icon6); this.buttonDown_fnc(Shoes_Icon6);}; Shoes_Icon6.visible = false; Shoes_Menu_Group = this.add.group(); Shoes_Menu_Group.add(Shoes_Icon); Shoes_Menu_Group.add(Shoes_Icon2); Shoes_Menu_Group.add(Shoes_Icon3); Shoes_Menu_Group.add(Shoes_Icon4); Shoes_Menu_Group.add(Shoes_Icon5); Shoes_Menu_Group.add(Shoes_Icon6); Shoes_Menu_Group.visible = false; //Socks_Icon Socks_Icon = this.add.button(Border.x + 7,130,"socks_icon",function() { this.Socks_fnc("socks","Socks01",SocksX,SocksY); },this,1,0,0); Socks_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon); this.buttonDown_fnc(Socks_Icon);}; Socks_Icon2 = this.add.button(Border.x + 7,Socks_Icon.y + Socks_Icon.height + 10,"socks_icon2",function() { this.Socks_fnc("socks2","Socks02",SocksX2,SocksY2); },this,1,0,0); Socks_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon2); this.buttonDown_fnc(Socks_Icon2);}; Socks_Icon3 = this.add.button(Border.x + 7,Socks_Icon2.y + Socks_Icon2.height + 10,"socks_icon3",function() { this.Socks_fnc("socks3","Socks03",SocksX3,SocksY3); },this,1,0,0); Socks_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon3); this.buttonDown_fnc(Socks_Icon3);}; Socks_Icon4 = this.add.button(Border.x + 7,Socks_Icon.y,"socks_icon4",function() { this.Socks_fnc("socks4","Socks04",SocksX4,SocksY4); },this,1,0,0); Socks_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon4); this.buttonDown_fnc(Socks_Icon4);}; Socks_Icon4.visible = false; Socks_Icon5 = this.add.button(Border.x + 7,Socks_Icon4.y + Socks_Icon4.height + 10,"socks_icon5",function() { this.Socks_fnc("socks5","Socks05",SocksX5,SocksY5); },this,1,0,0); Socks_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon5); this.buttonDown_fnc(Socks_Icon5);}; Socks_Icon5.visible = false; Socks_Icon6 = this.add.button(Border.x + 7,Socks_Icon5.y + Socks_Icon5.height + 10,"socks_icon6",function() { this.Socks_fnc("socks6","Socks06",SocksX6,SocksY6); },this,1,0,0); Socks_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Socks_Icon6); this.buttonDown_fnc(Socks_Icon6);}; Socks_Icon6.visible = false; Socks_Menu_Group = this.add.group(); Socks_Menu_Group.add(Socks_Icon); Socks_Menu_Group.add(Socks_Icon2); Socks_Menu_Group.add(Socks_Icon3); Socks_Menu_Group.add(Socks_Icon4); Socks_Menu_Group.add(Socks_Icon5); Socks_Menu_Group.add(Socks_Icon6); Socks_Menu_Group.visible = false; //Extra_Icon Extra_Icon = this.add.button(Border.x + 7,130,"extra_icon",function() { Extra.visible = true; Extra.frame = 0; Extra2.visible = false; Extra3.visible = false; },this,1,0,0); Extra_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon); this.buttonDown_fnc(Extra_Icon);}; Extra_Icon2 = this.add.button(Border.x + 7,Extra_Icon.y + Extra_Icon.height + 10,"extra_icon2",function() { Extra.visible = false; Extra2.visible = true; Extra2.frame = 0; Extra3.visible = false; },this,1,0,0); Extra_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon2); this.buttonDown_fnc(Extra_Icon2);}; Extra_Icon3 = this.add.button(Border.x + 7,Extra_Icon2.y + Extra_Icon2.height + 10,"extra_icon3",function() { Extra.visible = false; Extra2.visible = false; Extra3.visible = true; Extra3.frame = 0; },this,1,0,0); Extra_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon3); this.buttonDown_fnc(Extra_Icon3);}; Extra_Icon4 = this.add.button(Border.x + 7,Extra_Icon.y,"extra_icon4",function() { Extra4.visible = true; Extra4.frame = 0; },this,1,0,0); Extra_Icon4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon4); this.buttonDown_fnc(Extra_Icon4);}; Extra_Icon4.visible = false; Extra_Icon5 = this.add.button(Border.x + 7,Extra_Icon4.y + Extra_Icon4.height + 10,"extra_icon5",function() { Extra5.visible = true; Extra5.frame = 0; },this,1,0,0); Extra_Icon5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon5); this.buttonDown_fnc(Extra_Icon5);}; Extra_Icon5.visible = false; Extra_Icon6 = this.add.button(Border.x + 7,Extra_Icon5.y + Extra_Icon5.height + 10,"extra_icon6",function() { Extra6.visible = true; Extra6.frame = 0; },this,1,0,0); Extra_Icon6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Extra_Icon6); this.buttonDown_fnc(Extra_Icon6);}; Extra_Icon6.visible = false; Extra_Menu_Group = this.add.group(); Extra_Menu_Group.add(Extra_Icon); Extra_Menu_Group.add(Extra_Icon2); Extra_Menu_Group.add(Extra_Icon3); Extra_Menu_Group.add(Extra_Icon4); Extra_Menu_Group.add(Extra_Icon5); Extra_Menu_Group.add(Extra_Icon6); Extra_Menu_Group.visible = false; //Color_Number Color_Number = this.add.button(639,98,"color_number",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 0;} else if(openedMenu == 8){Bottoms.frame = 0;} else if(openedMenu == 10){Shoes.frame = 0;} else if(openedMenu == 11){Socks.frame = 0;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 0;} if(Extra2.visible){Extra2.frame = 0;} if(Extra3.visible){Extra3.frame = 0;} if(Extra4.visible){Extra4.frame = 0;} if(Extra5.visible){Extra5.frame = 0;} if(Extra6.visible){Extra6.frame = 0;} } },this,1,0,0); Color_Number.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number); this.buttonDown_fnc(Color_Number);}; Color_Number2 = this.add.button(Color_Number.x + Color_Number.width - 12,Color_Number.y,"color_number2",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 1;} else if(openedMenu == 8){Bottoms.frame = 1;} else if(openedMenu == 10){Shoes.frame = 1;} else if(openedMenu == 11){Socks.frame = 1;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 1;} if(Extra2.visible){Extra2.frame = 1;} if(Extra3.visible){Extra3.frame = 1;} if(Extra4.visible){Extra4.frame = 1;} if(Extra5.visible){Extra5.frame = 1;} if(Extra6.visible){Extra6.frame = 1;} } },this,1,0,0); Color_Number2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number2); this.buttonDown_fnc(Color_Number2);}; Color_Number3 = this.add.button(Color_Number2.x + Color_Number2.width - 12,Color_Number2.y,"color_number3",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 2;} else if(openedMenu == 8){Bottoms.frame = 2;} else if(openedMenu == 10){Shoes.frame = 2;} else if(openedMenu == 11){Socks.frame = 2;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 2;} if(Extra2.visible){Extra2.frame = 2;} if(Extra3.visible){Extra3.frame = 2;} if(Extra4.visible){Extra4.frame = 2;} if(Extra5.visible){Extra5.frame = 2;} if(Extra6.visible){Extra6.frame = 2;} } },this,1,0,0); Color_Number3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number3); this.buttonDown_fnc(Color_Number3);}; Color_Number4 = this.add.button(Color_Number.x,Color_Number.y + Color_Number.height + 20,"color_number4",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 3;} else if(openedMenu == 8){Bottoms.frame = 3;} else if(openedMenu == 10){Shoes.frame = 3;} else if(openedMenu == 11){Socks.frame = 3;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 3;} if(Extra2.visible){Extra2.frame = 3;} if(Extra3.visible){Extra3.frame = 3;} if(Extra4.visible){Extra4.frame = 3;} if(Extra5.visible){Extra5.frame = 3;} if(Extra6.visible){Extra6.frame = 3;} } },this,1,0,0); Color_Number4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number4); this.buttonDown_fnc(Color_Number4);}; Color_Number5 = this.add.button(Color_Number4.x + Color_Number4.width - 12,Color_Number4.y,"color_number5",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 4;} else if(openedMenu == 8){Bottoms.frame = 4;} else if(openedMenu == 10){Shoes.frame = 4;} else if(openedMenu == 11){Socks.frame = 4;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 4;} if(Extra2.visible){Extra2.frame = 4;} if(Extra3.visible){Extra3.frame = 4;} if(Extra4.visible){Extra4.frame = 4;} if(Extra5.visible){Extra5.frame = 4;} if(Extra6.visible){Extra6.frame = 4;} } },this,1,0,0); Color_Number5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number5); this.buttonDown_fnc(Color_Number5);}; Color_Number6 = this.add.button(Color_Number5.x + Color_Number5.width - 12,Color_Number5.y,"color_number6",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 5;} else if(openedMenu == 8){Bottoms.frame = 5;} else if(openedMenu == 10){Shoes.frame = 5;} else if(openedMenu == 11){Socks.frame = 5;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 5;} if(Extra2.visible){Extra2.frame = 5;} if(Extra3.visible){Extra3.frame = 5;} if(Extra4.visible){Extra4.frame = 5;} if(Extra5.visible){Extra5.frame = 5;} if(Extra6.visible){Extra6.frame = 5;} } },this,1,0,0); Color_Number6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number6); this.buttonDown_fnc(Color_Number6);}; Color_Number7 = this.add.button(Color_Number4.x,Color_Number4.y + Color_Number4.height + 20,"color_number7",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 6;} else if(openedMenu == 8){Bottoms.frame = 6;} else if(openedMenu == 10){Shoes.frame = 6;} else if(openedMenu == 11){Socks.frame = 6;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 6;} if(Extra2.visible){Extra2.frame = 6;} if(Extra3.visible){Extra3.frame = 6;} if(Extra4.visible){Extra4.frame = 6;} if(Extra5.visible){Extra5.frame = 6;} if(Extra6.visible){Extra6.frame = 6;} } },this,1,0,0); Color_Number7.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number7); this.buttonDown_fnc(Color_Number7);}; Color_Number8 = this.add.button(Color_Number7.x + Color_Number7.width - 12,Color_Number7.y,"color_number8",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 7;} else if(openedMenu == 8){Bottoms.frame = 7;} else if(openedMenu == 10){Shoes.frame = 7;} else if(openedMenu == 11){Socks.frame = 7;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 7;} if(Extra2.visible){Extra2.frame = 7;} if(Extra3.visible){Extra3.frame = 7;} if(Extra4.visible){Extra4.frame = 7;} if(Extra5.visible){Extra5.frame = 7;} if(Extra6.visible){Extra6.frame = 7;} } },this,1,0,0); Color_Number8.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number8); this.buttonDown_fnc(Color_Number8);}; Color_Number9 = this.add.button(Color_Number8.x + Color_Number8.width - 12,Color_Number8.y,"color_number9",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 8;} else if(openedMenu == 8){Bottoms.frame = 8;} else if(openedMenu == 10){Shoes.frame = 8;} else if(openedMenu == 11){Socks.frame = 8;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 8;} if(Extra2.visible){Extra2.frame = 8;} if(Extra3.visible){Extra3.frame = 8;} if(Extra4.visible){Extra4.frame = 8;} if(Extra5.visible){Extra5.frame = 8;} if(Extra6.visible){Extra6.frame = 8;} } },this,1,0,0); Color_Number9.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number9); this.buttonDown_fnc(Color_Number9);}; Color_Number10 = this.add.button(Color_Number7.x,Color_Number7.y + Color_Number7.height + 20,"color_number10",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 9;} else if(openedMenu == 8){Bottoms.frame = 9;} else if(openedMenu == 10){Shoes.frame = 9;} else if(openedMenu == 11){Socks.frame = 9;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 9;} if(Extra2.visible){Extra2.frame = 9;} if(Extra3.visible){Extra3.frame = 9;} if(Extra4.visible){Extra4.frame = 9;} if(Extra5.visible){Extra5.frame = 9;} if(Extra6.visible){Extra6.frame = 9;} } },this,1,0,0); Color_Number10.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number10); this.buttonDown_fnc(Color_Number10);}; Color_Number11 = this.add.button(Color_Number10.x + Color_Number10.width - 12,Color_Number10.y,"color_number11",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 10;} else if(openedMenu == 8){Bottoms.frame = 10;} else if(openedMenu == 10){Shoes.frame = 10;} else if(openedMenu == 11){Socks.frame = 10;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 10;} if(Extra2.visible){Extra2.frame = 10;} if(Extra3.visible){Extra3.frame = 10;} if(Extra4.visible){Extra4.frame = 10;} if(Extra5.visible){Extra5.frame = 10;} if(Extra6.visible){Extra6.frame = 10;} } },this,1,0,0); Color_Number11.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number11); this.buttonDown_fnc(Color_Number11);}; Color_Number12 = this.add.button(Color_Number11.x + Color_Number11.width - 12,Color_Number11.y,"color_number12",function() { if(openedMenu == 7 || openedMenu == 9){Clothes.frame = 11;} else if(openedMenu == 8){Bottoms.frame = 11;} else if(openedMenu == 10){Shoes.frame = 11;} else if(openedMenu == 11){Socks.frame = 11;} else if(openedMenu == 12) { if(Extra.visible){Extra.frame = 11;} if(Extra2.visible){Extra2.frame = 11;} if(Extra3.visible){Extra3.frame = 11;} if(Extra4.visible){Extra4.frame = 11;} if(Extra5.visible){Extra5.frame = 11;} if(Extra6.visible){Extra6.frame = 11;} } },this,1,0,0); Color_Number12.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Color_Number12); this.buttonDown_fnc(Color_Number12);}; Color_Number_Back = this.add.button(Color_Number11.x,Color_Number11.y + Color_Number11.height + 7,"back_btn",function() { Color_Btn.visible = true; Color_Number_Back.visible = false; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Number_Group.visible = false; if(openedMenu == 7){Tops_Menu_Group.visible = true;} if(openedMenu == 8){Bottoms_Menu_Group.visible = true;} if(openedMenu == 9){Dress_Menu_Group.visible = true;} if(openedMenu == 10){Shoes_Menu_Group.visible = true;} if(openedMenu == 11){Socks_Menu_Group.visible = true;} if(openedMenu == 12){Extra_Menu_Group.visible = true;} },this,1,0,2); Color_Number_Back.anchor.setTo(0.5,0.5); Color_Number_Group = this.add.group(); Color_Number_Group.add(Color_Number); Color_Number_Group.add(Color_Number2); Color_Number_Group.add(Color_Number3); Color_Number_Group.add(Color_Number4); Color_Number_Group.add(Color_Number5); Color_Number_Group.add(Color_Number6); Color_Number_Group.add(Color_Number7); Color_Number_Group.add(Color_Number8); Color_Number_Group.add(Color_Number9); Color_Number_Group.add(Color_Number10); Color_Number_Group.add(Color_Number11); Color_Number_Group.add(Color_Number12); Color_Number_Group.add(Color_Number_Back); Color_Number_Group.visible = false; Color_Back_Btn = this.add.button(Color11_Icon.x,Color11_Icon.y + Color11_Icon.height + 7,"back_btn",function() { Color_Btn.visible = true; Color_Back_Btn.visible = false; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Group.visible = false; Hair_Menu_Group.visible = true; },this,1,0,2); Color_Back_Btn.anchor.setTo(0.5,0.5); Color_Group = this.add.group(); Color_Group.add(Color01_Icon); Color_Group.add(Color02_Icon); Color_Group.add(Color03_Icon); Color_Group.add(Color04_Icon); Color_Group.add(Color05_Icon); Color_Group.add(Color06_Icon); Color_Group.add(Color07_Icon); Color_Group.add(Color08_Icon); Color_Group.add(Color08_Icon2); Color_Group.add(Color09_Icon); Color_Group.add(Color09_Icon2); Color_Group.add(Color10_Icon); Color_Group.add(Color11_Icon); Color_Group.add(Color12_Icon); Color_Group.add(Color_Back_Btn); Color_Group.visible = false; //Next_Prev Next_Btn = this.add.button(827,266,"next_btn",function() { if(openedMenu == 1) { openedMenuPage ++; if(openedMenuPage > 4) { openedMenuPage = 1; } if(openedMenuPage == 1) { Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 2) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = true; Bang05_Icon.visible = true; Bang06_Icon.visible = true; } if(openedMenuPage == 3) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true; } if(openedMenuPage == 4) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = true; Hair05_Icon.visible = true; Hair06_Icon.visible = true; } } if(openedMenu == 5) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Lips01_Icon.visible = true; Lips02_Icon.visible = true; Lips03_Icon.visible = true; Lips04_Icon.visible = false; Lips05_Icon.visible = false; Lips06_Icon.visible = false; } if(openedMenuPage == 2) { Lips01_Icon.visible = false; Lips02_Icon.visible = false; Lips03_Icon.visible = false; Lips04_Icon.visible = true; Lips05_Icon.visible = true; Lips06_Icon.visible = true; } } if(openedMenu == 7) { openedMenuPage ++; if(openedMenuPage >= 3) { openedMenuPage = 1; } if(openedMenuPage == 1) { /*Tops_Menu_Group.visible = true; Tops_Menu_Group2.visible = false;*/ Tops_Icon.visible = true; Tops_Icon2.visible = true; Tops_Icon3.visible = true; Tops_Icon4.visible = false; Tops_Icon5.visible = false; Tops_Icon6.visible = false; } if(openedMenuPage == 2) { /*Tops_Menu_Group.visible = false; Tops_Menu_Group2.visible = true;*/ Tops_Icon.visible = false; Tops_Icon2.visible = false; Tops_Icon3.visible = false; Tops_Icon4.visible = true; Tops_Icon5.visible = true; Tops_Icon6.visible = true; } } if(openedMenu == 8) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Bottoms_Icon.visible = true; Bottoms_Icon2.visible = true; Bottoms_Icon3.visible = true; Bottoms_Icon4.visible = false; Bottoms_Icon5.visible = false; Bottoms_Icon6.visible = false; } if(openedMenuPage == 2) { Bottoms_Icon.visible = false; Bottoms_Icon2.visible = false; Bottoms_Icon3.visible = false; Bottoms_Icon4.visible = true; Bottoms_Icon5.visible = true; Bottoms_Icon6.visible = true; } } if(openedMenu == 9) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Dress_Icon.visible = true; Dress_Icon2.visible = true; Dress_Icon3.visible = true; Dress_Icon4.visible = false; Dress_Icon5.visible = false; Dress_Icon6.visible = false; } if(openedMenuPage == 2) { Dress_Icon.visible = false; Dress_Icon2.visible = false; Dress_Icon3.visible = false; Dress_Icon4.visible = true; Dress_Icon5.visible = true; Dress_Icon6.visible = true; } } if(openedMenu == 10) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Shoes_Icon.visible = true; Shoes_Icon2.visible = true; Shoes_Icon3.visible = true; Shoes_Icon4.visible = false; Shoes_Icon5.visible = false; Shoes_Icon6.visible = false; } if(openedMenuPage == 2) { Shoes_Icon.visible = false; Shoes_Icon2.visible = false; Shoes_Icon3.visible = false; Shoes_Icon4.visible = true; Shoes_Icon5.visible = true; Shoes_Icon6.visible = true; } } if(openedMenu == 11) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Socks_Icon.visible = true; Socks_Icon2.visible = true; Socks_Icon3.visible = true; Socks_Icon4.visible = false; Socks_Icon5.visible = false; Socks_Icon6.visible = false; } if(openedMenuPage == 2) { Socks_Icon.visible = false; Socks_Icon2.visible = false; Socks_Icon3.visible = false; Socks_Icon4.visible = true; Socks_Icon5.visible = true; Socks_Icon6.visible = true; } } if(openedMenu == 12) { openedMenuPage ++; if(openedMenuPage > 2) { openedMenuPage = 1; } if(openedMenuPage == 1) { Extra_Icon.visible = true; Extra_Icon2.visible = true; Extra_Icon3.visible = true; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; } if(openedMenuPage == 2) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = true; Extra_Icon5.visible = true; Extra_Icon6.visible = true; } } },this); Next_Btn.anchor.setTo(0.5,0.5); Next_Btn.input.pixelPerfectClick = true; Next_Btn.input.pixelPerfectOver = true; Prev_Btn = this.add.sprite(614,Next_Btn.y,"prev_btn"); Prev_Btn.anchor.setTo(0.5,0.5); Prev_Btn.inputEnabled = true; Prev_Btn.input.pixelPerfectClick = true; Prev_Btn.input.pixelPerfectOver = true; Prev_Btn.events.onInputUp.add(function() { if(openedMenu == 1) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 4; } if(openedMenuPage == 1) { Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; } if(openedMenuPage == 2) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = true; Bang05_Icon.visible = true; Bang06_Icon.visible = true; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; } if(openedMenuPage == 3) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true; Hair04_Icon.visible = false; Hair05_Icon.visible = false; Hair06_Icon.visible = false; } if(openedMenuPage == 4) { Bang01_Icon.visible = false; Bang02_Icon.visible = false; Bang03_Icon.visible = false; Bang04_Icon.visible = false; Bang05_Icon.visible = false; Bang06_Icon.visible = false; Hair01_Icon.visible = false; Hair02_Icon.visible = false; Hair03_Icon.visible = false; Hair04_Icon.visible = true; Hair05_Icon.visible = true; Hair06_Icon.visible = true; } } else if(openedMenu == 5) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Lips01_Icon.visible = true; Lips02_Icon.visible = true; Lips03_Icon.visible = true; Lips04_Icon.visible = false; Lips05_Icon.visible = false; Lips06_Icon.visible = false; } if(openedMenuPage == 2) { Lips01_Icon.visible = false; Lips02_Icon.visible = false; Lips03_Icon.visible = false; Lips04_Icon.visible = true; Lips05_Icon.visible = true; Lips06_Icon.visible = true; } } else if(openedMenu == 7) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Tops_Icon.visible = true; Tops_Icon2.visible = true; Tops_Icon3.visible = true; Tops_Icon4.visible = false; Tops_Icon5.visible = false; Tops_Icon6.visible = false; } if(openedMenuPage == 2) { Tops_Icon.visible = false; Tops_Icon2.visible = false; Tops_Icon3.visible = false; Tops_Icon4.visible = true; Tops_Icon4.visible = true; Tops_Icon6.visible = true; } } else if(openedMenu == 8) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Bottoms_Icon.visible = true; Bottoms_Icon2.visible = true; Bottoms_Icon3.visible = true; Bottoms_Icon4.visible = false; Bottoms_Icon5.visible = false; Bottoms_Icon6.visible = false; } if(openedMenuPage == 2) { Bottoms_Icon.visible = false; Bottoms_Icon2.visible = false; Bottoms_Icon3.visible = false; Bottoms_Icon4.visible = true; Bottoms_Icon4.visible = true; Bottoms_Icon6.visible = true; } } else if(openedMenu == 9) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Dress_Icon.visible = true; Dress_Icon2.visible = true; Dress_Icon3.visible = true; Dress_Icon4.visible = false; Dress_Icon5.visible = false; Dress_Icon6.visible = false; } if(openedMenuPage == 2) { Dress_Icon.visible = false; Dress_Icon2.visible = false; Dress_Icon3.visible = false; Dress_Icon4.visible = true; Dress_Icon4.visible = true; Dress_Icon6.visible = true; } } else if(openedMenu == 10) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Shoes_Icon.visible = true; Shoes_Icon2.visible = true; Shoes_Icon3.visible = true; Shoes_Icon4.visible = false; Shoes_Icon5.visible = false; Shoes_Icon6.visible = false; } if(openedMenuPage == 2) { Shoes_Icon.visible = false; Shoes_Icon2.visible = false; Shoes_Icon3.visible = false; Shoes_Icon4.visible = true; Shoes_Icon4.visible = true; Shoes_Icon6.visible = true; } } else if(openedMenu == 11) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Socks_Icon.visible = true; Socks_Icon2.visible = true; Socks_Icon3.visible = true; Socks_Icon4.visible = false; Socks_Icon5.visible = false; Socks_Icon6.visible = false; } if(openedMenuPage == 2) { Socks_Icon.visible = false; Socks_Icon2.visible = false; Socks_Icon3.visible = false; Socks_Icon4.visible = true; Socks_Icon4.visible = true; Socks_Icon6.visible = true; } } else if(openedMenu == 12) { openedMenuPage --; if(openedMenuPage < 1) { openedMenuPage = 2; } if(openedMenuPage == 1) { Extra_Icon.visible = true; Extra_Icon2.visible = true; Extra_Icon3.visible = true; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; } if(openedMenuPage == 2) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = true; Extra_Icon4.visible = true; Extra_Icon6.visible = true; } } },this); Color_Btn = this.add.button(624,481,"color_btn",function() { Color_Btn.visible = false; Next_Btn.visible = false; Prev_Btn.visible = false; if(openedMenu == 1) { Color_Back_Btn.visible = true; Color_Group.visible = true; Hair_Menu_Group.visible = false; Color08_Icon2.visible = false; Color09_Icon2.visible = false; Color08_Icon.visible = true; Color09_Icon.visible = true; } else if(openedMenu == 5) { Lips_Menu_Group.visible = false; Lips_Color_Group.visible = true; } else if(openedMenu == 7) { Color_Number_Back.visible = true; Tops_Menu_Group.visible = false; Color_Number_Group.visible = true; } else if(openedMenu == 8) { Color_Number_Back.visible = true; Bottoms_Menu_Group.visible = false; Color_Number_Group.visible = true; } else if(openedMenu == 9) { Color_Number_Back.visible = true; Dress_Menu_Group.visible = false; Color_Number_Group.visible = true; } else if(openedMenu == 10) { Color_Number_Back.visible = true; Shoes_Menu_Group.visible = false; Color_Number_Group.visible = true; } else if(openedMenu == 11) { Color_Number_Back.visible = true; Socks_Menu_Group.visible = false; Color_Number_Group.visible = true; } else if(openedMenu == 12) { Color_Number_Back.visible = true; Extra_Menu_Group.visible = false; Color_Number_Group.visible = true; } },this,1,0,2); Color_Btn.anchor.setTo(0.5,0.5); Trash_Btn = this.add.button(816,Color_Back_Btn.y,"trash_btn",function() { if(openedMenu == 1) { this.Bang_fnc("bangs","Bang01",BangsX,BangsY); this.Hair_fnc("hair","Hair01",HairX,HairY); Bangs.frame = 8; Hair.frame = 8; hairColor = 8; } else if(openedMenu == 2) { Bang_Hl.visible = false; Hair_Hl.visible = false; hlVisible = false; } else if(openedMenu == 3) { Eyes.frame = 10; } else if(openedMenu == 4) { Eye_Shadow.visible = false; } else if(openedMenu == 5) { this.Lips_fnc("lips","Lips0",LipsX,LipsY); Teeth.frame = 0; Teeth.x = TeethX6; Teeth.y = TeethY6; Lips.frame = 8; lipsColor = 8; } else if(openedMenu == 6) { Body.frame = 0; Head.frame = 0; } else if(openedMenu == 7) { Clothes.visible = false; Bra.visible = true; } else if(openedMenu == 8) { Bottoms.visible = false; Panties.visible = true; } else if(openedMenu == 9) { Clothes.visible = false; Bra.visible = true; Panties.visible = true; } else if(openedMenu == 10) { Shoes.visible = false; } else if(openedMenu == 11) { Socks.visible = false; } else if(openedMenu == 12) { Extra.visible = false; Extra2.visible = false; Extra3.visible = false; Extra4.visible = false; Extra5.visible = false; Extra6.visible = false; Extra.frame = 0; Extra2.frame = 0; Extra3.frame = 0; Extra4.frame = 0; Extra5.frame = 0; Extra6.frame = 0; } },this,1,0,2); Trash_Btn.anchor.setTo(0.5,0.5); //Left Side Buttons Hair_Btn = this.add.button(515,58,"hair_btn",function() { openedMenu = 1; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Hair_Menu_Group.visible = true; Hair_Menu_Group.setAll("visible",false); Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Hair_Btn.anchor.setTo(0.5,0.5); Hair_Btn.input.pixelPerfectClick = true; Hair_Btn.input.pixelPerfectOver = true; Hl_Btn = this.add.button(Hair_Btn.x,Hair_Btn.y + Hair_Btn.height + 16,"hl_btn",function() { openedMenu = 2; openedMenuPage = 1; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = Hl_Color11_Icon.x; Hl_Color_Group.visible = true; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Hl_Btn.anchor.setTo(0.5,0.5); Hl_Btn.input.pixelPerfectClick = true; Hl_Btn.input.pixelPerfectOver = true; Eye_Btn = this.add.button(Hair_Btn.x,Hl_Btn.y + Hl_Btn.height + 16,"eye_btn",function() { openedMenu = 3; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = Hl_Color11_Icon.x; Hl_Color_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; Color_Group.visible = true; Color08_Icon2.visible = true; Color09_Icon2.visible = true; Color08_Icon.visible = false; Color09_Icon.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.ScaleDoll(); },this,1,0,2); Eye_Btn.anchor.setTo(0.5,0.5); Eye_Btn.input.pixelPerfectClick = true; Eye_Btn.input.pixelPerfectOver = true; Eye_Shadow_Btn = this.add.button(Eye_Btn.x,Eye_Btn.y + Eye_Btn.height + 16,"eyeshadow_btn",function() { openedMenu = 4; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = Hl_Color11_Icon.x; Hl_Color_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; Color_Group.visible = true; Color08_Icon2.visible = true; Color09_Icon2.visible = true; Color08_Icon.visible = false; Color09_Icon.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.ScaleDoll(); },this,1,0,2); Eye_Shadow_Btn.anchor.setTo(0.5,0.5); Eye_Shadow_Btn.input.pixelPerfectClick = true; Eye_Shadow_Btn.input.pixelPerfectOver = true; Lips_Btn = this.add.button(Eye_Shadow_Btn.x,Eye_Shadow_Btn.y + Eye_Shadow_Btn.height + 16,"lips_btn",function() { openedMenu = 5; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Lips_Menu_Group.visible = true; Lips_Menu_Group.setAll("visible",false); Lips01_Icon.visible = true; Lips02_Icon.visible = true; Lips03_Icon.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; Lips_Color_Group.visible = false; this.ScaleDoll(); },this,1,0,2); Lips_Btn.anchor.setTo(0.5,0.5); Lips_Btn.input.pixelPerfectClick = true; Lips_Btn.input.pixelPerfectOver = true; SkinTone_Btn = this.add.button(Lips_Btn.x,Lips_Btn.y + Lips_Btn.height + 16,"skintone_btn",function() { openedMenu = 6; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = Hl_Color11_Icon.x; Hl_Color_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = true; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); SkinTone_Btn.anchor.setTo(0.5,0.5); SkinTone_Btn.input.pixelPerfectClick = true; SkinTone_Btn.input.pixelPerfectOver = true; //Right Side Buttons Tops_Btn = this.add.button(925,Hair_Btn.y,"tops_btn",function() { openedMenu = 7; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Tops_Menu_Group.visible = true; Tops_Menu_Group.setAll("visible",false); Tops_Icon.visible = true; Tops_Icon2.visible = true; Tops_Icon3.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Tops_Btn.anchor.setTo(0.5,0.5); Tops_Btn.input.pixelPerfectClick = true; Tops_Btn.input.pixelPerfectOver = true; Bottoms_Btn = this.add.button(Tops_Btn.x,Tops_Btn.y + Tops_Btn.height + 16,"bottoms_btn",function() { openedMenu = 8; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Bottoms_Menu_Group.visible = true; Bottoms_Menu_Group.setAll("visible",false); Bottoms_Icon.visible = true; Bottoms_Icon2.visible = true; Bottoms_Icon3.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Bottoms_Btn.anchor.setTo(0.5,0.5); Bottoms_Btn.input.pixelPerfectClick = true; Bottoms_Btn.input.pixelPerfectOver = true; Dress_Btn = this.add.button(Bottoms_Btn.x,Bottoms_Btn.y + Bottoms_Btn.height + 16,"dress_btn",function() { openedMenu = 9; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Dress_Menu_Group.visible = true; Dress_Menu_Group.setAll("visible",false); Dress_Icon.visible = true; Dress_Icon2.visible = true; Dress_Icon3.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Dress_Btn.anchor.setTo(0.5,0.5); Dress_Btn.input.pixelPerfectClick = true; Dress_Btn.input.pixelPerfectOver = true; Shoes_Btn = this.add.button(Dress_Btn.x,Dress_Btn.y + Dress_Btn.height + 16,"shoes_btn",function() { openedMenu = 10; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Shoes_Menu_Group.visible = true; Shoes_Menu_Group.setAll("visible",false); Shoes_Icon.visible = true; Shoes_Icon2.visible = true; Shoes_Icon3.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Shoes_Btn.anchor.setTo(0.5,0.5); Shoes_Btn.input.pixelPerfectClick = true; Shoes_Btn.input.pixelPerfectOver = true; Socks_Btn = this.add.button(Shoes_Btn.x,Shoes_Btn.y + Shoes_Btn.height + 16,"socks_btn",function() { openedMenu = 11; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Socks_Menu_Group.visible = true; Socks_Menu_Group.setAll("visible",false); Socks_Icon.visible = true; Socks_Icon2.visible = true; Socks_Icon3.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Socks_Btn.anchor.setTo(0.5,0.5); Socks_Btn.input.pixelPerfectClick = true; Socks_Btn.input.pixelPerfectOver = true; Extra_Btn = this.add.button(Socks_Btn.x,Socks_Btn.y + Socks_Btn.height + 16,"extra_btn",function() { openedMenu = 12; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Extra_Menu_Group.visible = true; Extra_Menu_Group.setAll("visible",false); Extra_Icon.visible = true; Extra_Icon2.visible = true; Extra_Icon3.visible = true; Hair_Menu_Group.visible = false; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; this.NormalSize_fnc(); },this,1,0,2); Extra_Btn.anchor.setTo(0.5,0.5); Extra_Btn.input.pixelPerfectClick = true; Extra_Btn.input.pixelPerfectOver = true; //Bottom Buttons Shuffle_Btn = this.add.button(627,593,"shuffle_btn",function() { this.Shuffle_Items(); },this,1,0,2); Shuffle_Btn.anchor.setTo(0.5,0.5); Show_Btn = this.add.button(Shuffle_Btn.x + Shuffle_Btn.width, Shuffle_Btn.y,"show_btn",function() { Border.visible = false; Hair_Btn.visible = false; Hl_Btn.visible = false; Eye_Btn.visible = false; Eye_Shadow_Btn.visible = false; Lips_Btn.visible = false; SkinTone_Btn.visible = false; Tops_Btn.visible = false; Bottoms_Btn.visible = false; Dress_Btn.visible = false; Shoes_Btn.visible = false; Socks_Btn.visible = false; Extra_Btn.visible = false; Color_Btn.visible = false; Trash_Btn.visible = false; Next_Btn.visible = false; Prev_Btn.visible = false; Shuffle_Btn.visible = false; Show_Btn.visible = false; Reset_Btn.visible = false; Retry_Btn.visible = true; Save_Btn.visible = true; MoreGames_Btn.visible = true; End_Logo.visible = true; Logo.visible = false; //openedMenu == 1 Hair_Menu_Group.visible = false; Color_Group.visible = false; //openedMenu == 2 Hl_Color_Group.visible = false; //openedMenu == 3 Color_Group.visible = false; //openedMenu == 4 Color_Group.visible = false; //openedMenu == 5 Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; //openedMenu == 6 SkinColor_Menu_Group.visible = false; //openedMenu == 7 Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; //openedMenu == 8 Bottoms_Menu_Group.visible = false; Color_Number_Group.visible = false; //openedMenu == 9 Dress_Menu_Group.visible = false; Color_Number_Group.visible = false; //openedMenu == 10 Shoes_Menu_Group.visible = false; Color_Number_Group.visible = false; //openedMenu == 11 Socks_Menu_Group.visible = false; Color_Number_Group.visible = false; //openedMenu == 12 Extra_Menu_Group.visible = false; Color_Number_Group.visible = false; this.NormalSize_fnc(); Doll_Group.x = 250; },this,1,0,2); Show_Btn.anchor.setTo(0.5,0.5); Reset_Btn = this.add.button(820,Shuffle_Btn.y,"reset_btn",function() { this.Bang_fnc("bangs","Bang01",BangsX,BangsY); this.Hair_fnc("hair","Hair01",HairX,HairY); Bangs.frame = 8; Hair.frame = 8; hairColor = 8; Bang_Hl.frame = 0; Hair_Hl.frame = 0; hlVisible = true; hlColor = 0; Eyes.frame = 10; Eye_Shadow.visible = false; this.Lips_fnc("lips","Lips0",LipsX,LipsY); Teeth.frame = 0; Teeth.x = TeethX6; Teeth.y = TeethY6; Lips.frame = 8; lipsColor = 8; Body.frame = 0; Head.frame = 0; Clothes.visible = false; Bra.visible = true; Bottoms.visible = false; Panties.visible = true; Clothes.visible = false; Bra.visible = true; Panties.visible = true; Shoes.visible = false; Socks.visible = false; Extra.visible = false; Extra2.visible = false; Extra3.visible = false; Extra4.visible = false; Extra5.visible = false; Extra6.visible = false; Extra.frame = 0; Extra2.frame = 0; Extra3.frame = 0; Extra4.frame = 0; Extra5.frame = 0; Extra6.frame = 0; this.NormalSize_fnc(); },this,1,0,2); Reset_Btn.anchor.setTo(0.5,0.5); //End Screen Buttons Retry_Btn = this.add.button(926,448,"retry_btn",function() { Border.visible = true; Hair_Btn.visible = true; Hl_Btn.visible = true; Eye_Btn.visible = true; Eye_Shadow_Btn.visible = true; Lips_Btn.visible = true; SkinTone_Btn.visible = true; Tops_Btn.visible = true; Bottoms_Btn.visible = true; Dress_Btn.visible = true; Shoes_Btn.visible = true; Socks_Btn.visible = true; Extra_Btn.visible = true; Color_Btn.visible = true; Next_Btn.visible = true; Prev_Btn.visible = true; Trash_Btn.visible = true; Shuffle_Btn.visible = true; Show_Btn.visible = true; Reset_Btn.visible = true; Retry_Btn.visible = false; Save_Btn.visible = false; MoreGames_Btn.visible = false; End_Logo.visible = false; Logo.visible = true; openedMenu = 1; openedMenuPage = 1; Next_Btn.visible = true; Prev_Btn.visible = true; Color_Btn.visible = true; Trash_Btn.x = 816; Hair_Menu_Group.visible = true; Hair_Menu_Group.setAll("visible",false); Bang01_Icon.visible = true; Bang02_Icon.visible = true; Bang03_Icon.visible = true; Hl_Color_Group.visible = false; Color_Group.visible = false; Lips_Menu_Group.visible = false; Lips_Color_Group.visible = false; SkinColor_Menu_Group.visible = false; Tops_Menu_Group.visible = false; Color_Number_Group.visible = false; Bottoms_Menu_Group.visible = false; Dress_Menu_Group.visible = false; Shoes_Menu_Group.visible = false; Socks_Menu_Group.visible = false; Extra_Menu_Group.visible = false; this.NormalSize_fnc(); this.NormalSize_fnc(); },this,1,0,2); Retry_Btn.anchor.setTo(0.5,0.5); Retry_Btn.visible = false; Save_Btn = this.add.button(Retry_Btn.x,Retry_Btn.y + Retry_Btn.height,"save_btn",function() { this.SaveScreenshot(); },this,1,0,2); Save_Btn.anchor.setTo(0.5,0.5); Save_Btn.visible = false; MoreGames_Btn = this.add.button(Save_Btn.x,Save_Btn.y + Save_Btn.height,"moregames_btn",function() { window.open("http://www.kawaiigames.net/","_blank"); },this,1,0,2); MoreGames_Btn.anchor.setTo(0.5,0.5); MoreGames_Btn.visible = false; End_Logo = this.add.button(893,78,"logo",function() { window.open("http://www.kawaiigames.net/","_blank"); },this,1,0,2); End_Logo.anchor.setTo(0.5,0.5); End_Logo.scale.setTo(1.2,1.2); End_Logo.smoothed = false; End_Logo.visible = false; Logo = this.add.button(0,0,"logo",function() { window.open("http://www.kawaiigames.net/","_blank"); },this,1,0,2); Logo.anchor.setTo(0.5,0.5); Logo.x = 81; Logo.y = 538; Credits_Btn = this.add.button(0,0,"credits_btn",function() { //hide the Credits_Btn Credits_Btn.visible = false; //make the Credits_Group visible Credits_Group.visible = true; //disable all buttons that is not meant to be clickable when Credits shows up Hair_Btn.inputEnabled = false; Hl_Btn.inputEnabled = false; Eye_Btn.inputEnabled = false; Eye_Shadow_Btn.inputEnabled = false; Lips_Btn.inputEnabled = false; SkinTone_Btn.inputEnabled = false; Tops_Btn.inputEnabled = false; Bottoms_Btn.inputEnabled = false; Dress_Btn.inputEnabled = false; Shoes_Btn.inputEnabled = false; Socks_Btn.inputEnabled = false; Extra_Btn.inputEnabled = false; Color_Btn.inputEnabled = false; Next_Btn.inputEnabled = false; Prev_Btn.inputEnabled = false; Trash_Btn.inputEnabled = false; Shuffle_Btn.inputEnabled = false; Show_Btn.inputEnabled = false; Reset_Btn.inputEnabled = false; Next_Btn.inputEnabled = false; Prev_Btn.inputEnabled = false; Logo.inputEnabled = false; End_Logo.inputEnabled = false; Retry_Btn.inputEnabled = false; Save_Btn.inputEnabled = false; MoreGames_Btn.inputEnabled = false; Hair_Menu_Group.setAll("inputEnabled",false); Hl_Color_Group.setAll("inputEnabled",false); Color_Group.setAll("inputEnabled",false); Lips_Menu_Group.setAll("inputEnabled",false); Lips_Color_Group.setAll("inputEnabled",false); SkinColor_Menu_Group.setAll("inputEnabled",false); Tops_Menu_Group.setAll("inputEnabled",false); Color_Number_Group.setAll("inputEnabled",false); Bottoms_Menu_Group.setAll("inputEnabled",false); Dress_Menu_Group.setAll("inputEnabled",false); Shoes_Menu_Group.setAll("inputEnabled",false); Socks_Menu_Group.setAll("inputEnabled",false); Extra_Menu_Group.setAll("inputEnabled",false); },this,1,0,2); Credits_Btn.anchor.setTo(0.5,0.5); Credits_Btn.x = 75; Credits_Btn.y = 614; //---------------------------------------------------------// //Credits Screen //Screen_Effect (black screen at the back of the credits screen) //the first 0 is the x and the second 0 is the y Screen_Effect = this.add.sprite(0,0,"screen_effect"); //Credits_Text includes the credits text and the pink border Credits_Text = this.add.sprite(0,0,"credits_text"); Credits_Text.anchor.setTo(0.5,0.5); Credits_Text.x = CenterX; Credits_Text.y = CenterY; //Close button at the upper right corner of the Credits_Text /*We add it as a sprite so that we can make it zoom in and zoom out by scaling it when the user click the close button*/ Close_Btn = this.add.button(0,0,"close_btn",function() { //we make the Credits_Group invisible and the Credits_Btn visible again Credits_Group.visible = false; Credits_Btn.visible = true; //enable all buttons that is meant to be clickable when Credits is closed Hair_Btn.inputEnabled = true; Hl_Btn.inputEnabled = true; Eye_Btn.inputEnabled = true; Eye_Shadow_Btn.inputEnabled = true; Lips_Btn.inputEnabled = true; SkinTone_Btn.inputEnabled = true; Tops_Btn.inputEnabled = true; Bottoms_Btn.inputEnabled = true; Dress_Btn.inputEnabled = true; Shoes_Btn.inputEnabled = true; Socks_Btn.inputEnabled = true; Extra_Btn.inputEnabled = true; Color_Btn.inputEnabled = true; Next_Btn.inputEnabled = true; Prev_Btn.inputEnabled = true; Trash_Btn.inputEnabled = true; Shuffle_Btn.inputEnabled = true; Show_Btn.inputEnabled = true; Reset_Btn.inputEnabled = true; Next_Btn.inputEnabled = true; Prev_Btn.inputEnabled = true; Logo.inputEnabled = true; End_Logo.inputEnabled = true; Retry_Btn.inputEnabled = true; Save_Btn.inputEnabled = true; MoreGames_Btn.inputEnabled = true; Hair_Menu_Group.setAll("inputEnabled",true); Hl_Color_Group.setAll("inputEnabled",true); Color_Group.setAll("inputEnabled",true); Lips_Menu_Group.setAll("inputEnabled",true); Lips_Color_Group.setAll("inputEnabled",true); SkinColor_Menu_Group.setAll("inputEnabled",true); Tops_Menu_Group.setAll("inputEnabled",true); Color_Number_Group.setAll("inputEnabled",true); Bottoms_Menu_Group.setAll("inputEnabled",true); Dress_Menu_Group.setAll("inputEnabled",true); Shoes_Menu_Group.setAll("inputEnabled",true); Socks_Menu_Group.setAll("inputEnabled",true); Extra_Menu_Group.setAll("inputEnabled",true); },this,1,0,2); Close_Btn.anchor.setTo(0.5,0.5); Close_Btn.x = 876; Close_Btn.y = 91; //Group that will hold all the graphics that we need for the credits screen Credits_Group = this.add.group(); Credits_Group.add(Screen_Effect); Credits_Group.add(Credits_Text); Credits_Group.add(Close_Btn); //we make it initially invisible to hide it from the users view Credits_Group.visible = false; //-----------------------------------------------------------// //Soundbtn SoundBtn = this.add.button(60,40,"sound_btn", function() { if(!MuteBool) { SoundBtn.animations.play("soundOff"); this.sound.mute = true; MuteBool = true; } else if(MuteBool) { SoundBtn.animations.play("soundOn"); this.sound.mute = false; MuteBool = false; } },this); SoundBtn.anchor.setTo(0.5,0.5); SoundBtn.animations.add("soundOn",[0],1,false); SoundBtn.animations.add("soundOff",[1],1,false); if(!MuteBool) { SoundBtn.animations.play("soundOn"); } else if(MuteBool) { SoundBtn.animations.play("soundOff"); } //--------------------------------------------------------------------------// PosTextBool = false; /*PosTextBool = true; PosText = this.add.text(870,110,"Hello",{font:"40px Arial",fill:"000000"}); PosText.anchor.setTo(0.5,0.5);*/ }, buttonUp_fnc: function(buttonObj) { buttonObj.events.onInputUp.add(function(){buttonObj.frame = 0;},this); }, buttonDown_fnc: function(buttonObj) { buttonObj.events.onInputDown.add(function(){buttonObj.frame = 1;},this); }, SaveScreenshot: function() { /*We set all of this buttons visibility to false so that when the game makes a screenshot, there are no buttons in it*/ Credits_Btn.visible = false; Retry_Btn.visible = false; Save_Btn.visible = false; MoreGames_Btn.visible = false; SoundBtn.visible = false; /*We add a game timer and set it to 90 miliseconds to give the Savescreenshot function some time to take a screenshot while there are no buttons in the screen*/ this.game.time.events.add(90,function() { /*this is a pure javascript code for taking a screenshot of the canvas and saving it locally in the players laptop,pc, chrome mobile/tablet*/ var a = document.createElement('a'); var Data = this.game.canvas.toDataURL( 'image/png' ).replace( 'image/png', 'image/octet-stream' ); a.setAttribute('download', 'cute-harley-quinn-dress-up.png'); // change this ^^^^^ if you want a different file name a.href = Data; a.innerHTML = 'testing'; a.style.display = 'none'; a.click(); /*after taking a screenshot and saving it, we will set the buttons visibility to true again so we can use them*/ Credits_Btn.visible = true; Retry_Btn.visible = true; Save_Btn.visible = true; MoreGames_Btn.visible = true; SoundBtn.visible = true; },this); }, NormalSize_fnc: function() { /*Set the Character_Group that holds all the doll's assets X and Y position and scale/resize it to it's normal size*/ Doll_Group.scale.setTo(0.92,0.92); Doll_Group.x = 45; Doll_Group.y = 46; /*this will set the smoothness filter for all the graphics/assets that are in the Character_Group. If you wanted all the graphics to be crisp, you can set this v to false. (I don't know if you're going to like it)*/ //Doll_Group.setAll("smoothed",true); }, ScaleDoll: function() { /*Set the Character_Group that holds all the doll's assets X and Y position and scale/resize it to a much bigger size (Zoom in effect)*/ Doll_Group.x = -180; Doll_Group.y = 0; Doll_Group.scale.setTo(1.7,1.7); /*this will set the smoothness filter for all the graphics/assets that are in the Doll_Group. It is set to false v so that when we scale the graphics to a larger size, it will still be going to be crisp.*/ //Doll_Group.setAll("smoothed",false); }, checkHairColor: function() { if(hairColor == 0){Hair.frame = 0;} if(hairColor == 1){Hair.frame = 1;} if(hairColor == 2){Hair.frame = 2;} if(hairColor == 3){Hair.frame = 3;} if(hairColor == 4){Hair.frame = 4;} if(hairColor == 5){Hair.frame = 5;} if(hairColor == 6){Hair.frame = 6;} if(hairColor == 7){Hair.frame = 7;} if(hairColor == 8){Hair.frame = 8;} if(hairColor == 9){Hair.frame = 9;} if(hairColor == 10){Hair.frame = 10;} if(hairColor == 11){Hair.frame = 11;} }, checkBangsColor: function() { if(hairColor == 0){Bangs.frame = 0;} if(hairColor == 1){Bangs.frame = 1;} if(hairColor == 2){Bangs.frame = 2;} if(hairColor == 3){Bangs.frame = 3;} if(hairColor == 4){Bangs.frame = 4;} if(hairColor == 5){Bangs.frame = 5;} if(hairColor == 6){Bangs.frame = 6;} if(hairColor == 7){Bangs.frame = 7;} if(hairColor == 8){Bangs.frame = 8;} if(hairColor == 9){Bangs.frame = 9;} if(hairColor == 10){Bangs.frame = 10;} if(hairColor == 11){Bangs.frame = 11;} }, Bang_fnc: function(BangKey,BangName,BangX,BangY) { if(Bangs.key != BangKey) { Bangs.destroy(); Bangs = this.add.button(0,0,BangKey); Bangs.anchor.setTo(0.5,0.5); Bangs.input.pixelPerfectClick = true; Bangs.x = BangX; Bangs.y = BangY; Bangs.name = BangName; } /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(Bang_Hl.visible && BangName == "Bang07") { if(hlColor == 1){this.Bang_Hl_fnc("bang_hl07_0001","BangHl07",BangHl07X,BangHl07Y);} . . . }*/ if(BangName == "Bang01") { /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(hlColor == 18){this.Bang_Hl_fnc("bang_hl01_0018","BangHl01",BangHl01X,BangHl01Y);} */ this.Bang_Hl_fnc("bang_hl","BangHl01",Bang_HlX,Bang_HlY); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang02") { this.Bang_Hl_fnc("bang_hl2","BangHl02",Bang_HlX2,Bang_HlY2); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang03") { this.Bang_Hl_fnc("bang_hl3","BangHl03",Bang_HlX3,Bang_HlY3); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang04") { this.Bang_Hl_fnc("bang_hl4","BangHl04",Bang_HlX4,Bang_HlY4); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang05") { this.Bang_Hl_fnc("bang_hl5","BangHl05",Bang_HlX5,Bang_HlY5); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } if(BangName == "Bang06") { this.Bang_Hl_fnc("bang_hl6","BangHl06",Bang_HlX6,Bang_HlY6); if(hlColor == 0){Bang_Hl.frame = 0;} if(hlColor == 1){Bang_Hl.frame = 1;} if(hlColor == 2){Bang_Hl.frame = 2;} if(hlColor == 3){Bang_Hl.frame = 3;} if(hlColor == 4){Bang_Hl.frame = 4;} if(hlColor == 5){Bang_Hl.frame = 5;} if(hlColor == 6){Bang_Hl.frame = 6;} if(hlColor == 7){Bang_Hl.frame = 7;} if(hlColor == 8){Bang_Hl.frame = 8;} if(hlColor == 9){Bang_Hl.frame = 9;} if(hlColor == 10){Bang_Hl.frame = 10;} if(hlColor == 11){Bang_Hl.frame = 11;} } /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Bang_Hl_fnc: function(Bang_HlKey,Bang_HlName,Bang_HlX,Bang_HlY) { Bang_Hl.destroy(); Bang_Hl = this.add.sprite(0,0,Bang_HlKey); Bang_Hl.anchor.setTo(0.5,0.5); Bang_Hl.x = Bang_HlX; Bang_Hl.y = Bang_HlY; Bang_Hl.name = Bang_HlName; if(hlVisible){Bang_Hl.visible = true;} else{Bang_Hl.visible = false;} /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Hair_fnc: function(HairKey,HairName,HairX,HairY) { /*if the Hair.key(image sprite that the Hair sprite is created, Example: "hair01_0010") is not equal to HairKey*/ if(Hair.key != HairKey) { /*destroy/erase the Hair and make a new Hair sprite using the HairKey that we passed in this Hair_fnc function.*/ Hair.destroy(); /*create a new button*/ Hair = this.add.button(0,0,HairKey); Hair.anchor.setTo(0.5,0.5); Hair.input.pixelPerfectClick = true; Hair.x = HairX; Hair.y = HairY; Hair.name = HairName; } /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(Hair_Hl.visible && HairName == "Hair07") { if(hlColor == 1){this.Hair_Hl_fnc("hair_hl07_0001","HairHl07",HairHl07X,HairHl07Y);} . . . }*/ if(HairName == "Hair01") { /* ***EDIT THIS*** */ /*delete some code from the bottom of this if statement if there are few hair colors to choose from. OR if you add more hair colors, please add it at the bottom of the if statements. Example: if(hlColor == 18){this.Hair_Hl_fnc("hair_hl01_0018","HairHl01",HairHl01X,HairHl01Y);} and so on.... just copy and paste the if statements and change the numbers accordingly*/ this.Hair_Hl_fnc("hair_hl","HairHl01",Hair_HlX,Hair_HlY); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair02") { this.Hair_Hl_fnc("hair_hl2","HairHl02",Hair_HlX2,Hair_HlY2); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair03") { this.Hair_Hl_fnc("hair_hl3","HairHl03",Hair_HlX3,Hair_HlY3); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair04") { this.Hair_Hl_fnc("hair_hl4","HairHl04",Hair_HlX4,Hair_HlY4); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair05") { this.Hair_Hl_fnc("hair_hl5","HairHl05",Hair_HlX5,Hair_HlY5); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } if(HairName == "Hair06") { this.Hair_Hl_fnc("hair_hl6","HairHl06",Hair_HlX6,Hair_HlY6); if(hlColor == 0){Hair_Hl.frame = 0;} if(hlColor == 1){Hair_Hl.frame = 1;} if(hlColor == 2){Hair_Hl.frame = 2;} if(hlColor == 3){Hair_Hl.frame = 3;} if(hlColor == 4){Hair_Hl.frame = 4;} if(hlColor == 5){Hair_Hl.frame = 5;} if(hlColor == 6){Hair_Hl.frame = 6;} if(hlColor == 7){Hair_Hl.frame = 7;} if(hlColor == 8){Hair_Hl.frame = 8;} if(hlColor == 9){Hair_Hl.frame = 9;} if(hlColor == 10){Hair_Hl.frame = 10;} if(hlColor == 11){Hair_Hl.frame = 11;} } /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Hair_Hl_fnc: function(Hair_HlKey,Hair_HlName,Hair_HlX,Hair_HlY) { Hair_Hl.destroy(); Hair_Hl = this.add.sprite(0,0,Hair_HlKey); Hair_Hl.anchor.setTo(0.5,0.5); Hair_Hl.x = Hair_HlX; Hair_Hl.y = Hair_HlY; Hair_Hl.name = Hair_HlName; if(hlVisible){Hair_Hl.visible = true;} else{Hair_Hl.visible = false;} /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Lips_fnc: function(LipsKey,LipsName,LipsX,LipsY) { Lips.destroy(); Lips = this.add.button(0,0,LipsKey); Lips.anchor.setTo(0.5,0.5); Lips.input.pixelPerfectClick = true; Lips.x = LipsX; Lips.y = LipsY; Lips.name = LipsName; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Clothes_fnc: function(ClothesKey,ClothesName,ClothesX,ClothesY) { Clothes.destroy(); Clothes = this.add.button(0,0,ClothesKey); Clothes.anchor.setTo(0.5,0.5); Clothes.input.pixelPerfectClick = true; Clothes.x = ClothesX; Clothes.y = ClothesY; Clothes.name = ClothesName; Bra.visible = false; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Bottoms_fnc: function(BottomsKey,BottomsName,BottomsX,BottomsY) { Bottoms.destroy(); Bottoms = this.add.button(0,0,BottomsKey); Bottoms.anchor.setTo(0.5,0.5); Bottoms.input.pixelPerfectClick = true; Bottoms.x = BottomsX; Bottoms.y = BottomsY; Bottoms.name = BottomsName; Panties.visible = false; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Shoes_fnc: function(ShoesKey,ShoesName,ShoesX,ShoesY) { Shoes.destroy(); Shoes = this.add.button(0,0,ShoesKey,function() { Shoes.visible = false; },this); Shoes.anchor.setTo(0.5,0.5); Shoes.input.pixelPerfectClick = true; Shoes.x = ShoesX; Shoes.y = ShoesY; Shoes.name = ShoesName; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, Socks_fnc: function(SocksKey,SocksName,SocksX,SocksY) { Socks.destroy(); Socks = this.add.button(0,0,SocksKey,function() { Socks.visible = false; },this); Socks.anchor.setTo(0.5,0.5); Socks.pixelPerfectClick = true; Socks.x = SocksX; Socks.y = SocksY; Socks.name = SocksName; /*this function will sort the Character_Group after creating the new sprite. We need to do this so that the z/depth of the new sprite will still be in the same place*/ this.SortMainGroup_fnc(); }, //Shuffle Shuffle_Items: function() { var HairRand = Math.floor(Math.random()*(6-1+1))+1; if(HairRand == 1){this.Hair_fnc("hair","Hair01",HairX,HairY);} if(HairRand == 2){this.Hair_fnc("hair2","Hair02",HairX2,HairY2);} if(HairRand == 3){this.Hair_fnc("hair3","Hair03",HairX3,HairY3);} if(HairRand == 4){this.Hair_fnc("hair4","Hair04",HairX4,HairY4);} if(HairRand == 5){this.Hair_fnc("hair5","Hair05",HairX5,HairY5);} if(HairRand == 6){this.Hair_fnc("hair6","Hair06",HairX6,HairY6);} var BangsRand = Math.floor(Math.random()*(6-1+1))+1; if(BangsRand == 1){this.Bang_fnc("bangs","Bang01",BangsX,BangsY);} if(BangsRand == 2){this.Bang_fnc("bangs2","Bang02",BangsX2,BangsY2);} if(BangsRand == 3){this.Bang_fnc("bangs3","Bang03",BangsX3,BangsY3);} if(BangsRand == 4){this.Bang_fnc("bangs4","Bang04",BangsX4,BangsY4);} if(BangsRand == 5){this.Bang_fnc("bangs5","Bang05",BangsX5,BangsY5);} if(BangsRand == 6){this.Bang_fnc("bangs6","Bang06",BangsX6,BangsY6);} var HairColorRand = Math.floor(Math.random()*(12-1+1))+1; if(HairColorRand == 1) { Hair.frame = 0; Bangs.frame = 0; hairColor = 0; } if(HairColorRand == 2) { Hair.frame = 1; Bangs.frame = 1; hairColor = 1; } if(HairColorRand == 3) { Hair.frame = 2; Bangs.frame = 2; hairColor = 2; } if(HairColorRand == 4) { Hair.frame = 3; Bangs.frame = 3; hairColor = 3; } if(HairColorRand == 5) { Hair.frame = 4; Bangs.frame = 4; hairColor = 4; } if(HairColorRand == 6) { Hair.frame = 5; Bangs.frame = 5; hairColor = 5; } if(HairColorRand == 7) { Hair.frame = 6; Bangs.frame = 6; hairColor = 6; } if(HairColorRand == 8) { Hair.frame = 7; Bangs.frame = 7; hairColor = 7; } if(HairColorRand == 9) { Hair.frame = 8; Bangs.frame = 8; hairColor = 8; } if(HairColorRand == 10) { Hair.frame = 9; Bangs.frame = 9; hairColor = 9; } if(HairColorRand == 11) { Hair.frame = 10; Bangs.frame = 10; hairColor = 10; } if(HairColorRand == 12) { Hair.frame = 11; Bangs.frame = 11; hairColor = 11; } var HlRand = Math.floor(Math.random()*(12-1+1))+1; if(HlRand == 1) { Hair_Hl.frame = 0; Bang_Hl.frame = 0; } if(HlRand == 2) { Hair_Hl.frame = 1; Bang_Hl.frame = 1; } if(HlRand == 3) { Hair_Hl.frame = 2; Bang_Hl.frame = 2; } if(HlRand == 4) { Hair_Hl.frame = 3; Bang_Hl.frame = 3; } if(HlRand == 5) { Hair_Hl.frame = 4; Bang_Hl.frame = 4; } if(HlRand == 6) { Hair_Hl.frame = 5; Bang_Hl.frame = 5; } if(HlRand == 7) { Hair_Hl.frame = 6; Bang_Hl.frame = 6; } if(HlRand == 8) { Hair_Hl.frame = 7; Bang_Hl.frame = 7; } if(HlRand == 9) { Hair_Hl.frame = 8; Bang_Hl.frame = 8; } if(HlRand == 10) { Hair_Hl.frame = 9; Bang_Hl.frame = 9; } if(HlRand == 11) { Hair_Hl.frame = 10; Bang_Hl.frame = 10; } if(HlRand == 12) { Hair_Hl.frame = 11; Bang_Hl.frame = 11; } var ClothesRand = Math.floor(Math.random()*(12-1+1))+1; if(ClothesRand == 1) { this.Clothes_fnc("tops","Top01",TopsX,TopsY); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 2) { this.Clothes_fnc("tops2","Top02",TopsX2,TopsY2); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 3) { this.Clothes_fnc("tops3","Top03",TopsX3,TopsY3); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 4) { this.Clothes_fnc("tops4","Top04",TopsX4,TopsY4); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 5) { this.Clothes_fnc("tops5","Top05",TopsX5,TopsY5); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 6) { this.Clothes_fnc("tops6","Top06",TopsX6,TopsY6); var BottomsRand = Math.floor(Math.random()*(6-1+1))+1; var BottomsColorRand = Math.floor(Math.random()*(12-1+1))+1; } if(ClothesRand == 7) { this.Clothes_fnc("dress","Dress01",DressX,DressY); Bottoms.visible = false; } if(ClothesRand == 8) { this.Clothes_fnc("dress2","Dress02",DressX2,DressY2); Bottoms.visible = false; } if(ClothesRand == 9) { this.Clothes_fnc("dress3","Dress03",DressX3,DressY3); Bottoms.visible = false; } if(ClothesRand == 10) { this.Clothes_fnc("dress4","Dress04",DressX4,DressY4); Bottoms.visible = false; } if(ClothesRand == 11) { this.Clothes_fnc("dress5","Dress05",DressX5,DressY5); Bottoms.visible = false; } if(ClothesRand == 12) { this.Clothes_fnc("dress6","Dress06",DressX6,DressY6); Bottoms.visible = false; } var ClothesColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ClothesColorRand == 1){Clothes.frame = 0;} if(ClothesColorRand == 2){Clothes.frame = 1;} if(ClothesColorRand == 3){Clothes.frame = 2;} if(ClothesColorRand == 4){Clothes.frame = 3;} if(ClothesColorRand == 5){Clothes.frame = 4;} if(ClothesColorRand == 6){Clothes.frame = 5;} if(ClothesColorRand == 7){Clothes.frame = 6;} if(ClothesColorRand == 8){Clothes.frame = 7;} if(ClothesColorRand == 9){Clothes.frame = 8;} if(ClothesColorRand == 10){Clothes.frame = 9;} if(ClothesColorRand == 11){Clothes.frame = 10;} if(ClothesColorRand == 12){Clothes.frame = 11;} if(BottomsRand == 1){this.Bottoms_fnc("bottoms","Bottoms01",BottomsX,BottomsY);} if(BottomsRand == 2){this.Bottoms_fnc("bottoms2","Bottoms02",BottomsX2,BottomsY2);} if(BottomsRand == 3){this.Bottoms_fnc("bottoms3","Bottoms03",BottomsX3,BottomsY3);} if(BottomsRand == 4){this.Bottoms_fnc("bottoms4","Bottoms04",BottomsX4,BottomsY4);} if(BottomsRand == 5){this.Bottoms_fnc("bottoms5","Bottoms05",BottomsX5,BottomsY5);} if(BottomsRand == 6){this.Bottoms_fnc("bottoms6","Bottoms06",BottomsX6,BottomsY6);} if(BottomsColorRand == 1){Bottoms.frame = 0;} if(BottomsColorRand == 2){Bottoms.frame = 1;} if(BottomsColorRand == 3){Bottoms.frame = 2;} if(BottomsColorRand == 4){Bottoms.frame = 3;} if(BottomsColorRand == 5){Bottoms.frame = 4;} if(BottomsColorRand == 6){Bottoms.frame = 5;} if(BottomsColorRand == 7){Bottoms.frame = 6;} if(BottomsColorRand == 8){Bottoms.frame = 7;} if(BottomsColorRand == 9){Bottoms.frame = 8;} if(BottomsColorRand == 10){Bottoms.frame = 9;} if(BottomsColorRand == 11){Bottoms.frame = 10;} if(BottomsColorRand == 12){Bottoms.frame = 11;} var SocksRand = Math.floor(Math.random()*(6-1+1))+1; if(SocksRand == 1){this.Socks_fnc("socks","Socks01",SocksX,SocksY);} if(SocksRand == 2){this.Socks_fnc("socks2","Socks02",SocksX2,SocksY2);} if(SocksRand == 3){this.Socks_fnc("socks3","Socks03",SocksX3,SocksY3);} if(SocksRand == 4){this.Socks_fnc("socks4","Socks04",SocksX4,SocksY4);} if(SocksRand == 5){this.Socks_fnc("socks5","Socks05",SocksX5,SocksY5);} if(SocksRand == 6){this.Socks_fnc("socks6","Socks06",SocksX6,SocksY6);} var SocksColorRand = Math.floor(Math.random()*(12-1+1))+1; if(SocksColorRand == 1){Socks.frame = 0;} if(SocksColorRand == 2){Socks.frame = 1;} if(SocksColorRand == 3){Socks.frame = 2;} if(SocksColorRand == 4){Socks.frame = 3;} if(SocksColorRand == 5){Socks.frame = 4;} if(SocksColorRand == 6){Socks.frame = 5;} if(SocksColorRand == 7){Socks.frame = 6;} if(SocksColorRand == 8){Socks.frame = 7;} if(SocksColorRand == 9){Socks.frame = 8;} if(SocksColorRand == 10){Socks.frame = 9;} if(SocksColorRand == 11){Socks.frame = 10;} if(SocksColorRand == 12){Socks.frame = 11;} var ShoesRand = Math.floor(Math.random()*(6-1+1))+1; if(ShoesRand == 1){this.Shoes_fnc("shoes","Shoes01",ShoesX,ShoesY);} if(ShoesRand == 2){this.Shoes_fnc("shoes2","Shoes02",ShoesX2,ShoesY2);} if(ShoesRand == 3){this.Shoes_fnc("shoes3","Shoes03",ShoesX3,ShoesY3);} if(ShoesRand == 4){this.Shoes_fnc("shoes4","Shoes04",ShoesX4,ShoesY4);} if(ShoesRand == 5){this.Shoes_fnc("shoes5","Shoes05",ShoesX5,ShoesY5);} if(ShoesRand == 6){this.Shoes_fnc("shoes6","Shoes06",ShoesX6,ShoesY6);} var ShoesColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ShoesColorRand == 1){Shoes.frame = 0;} if(ShoesColorRand == 2){Shoes.frame = 1;} if(ShoesColorRand == 3){Shoes.frame = 2;} if(ShoesColorRand == 4){Shoes.frame = 3;} if(ShoesColorRand == 5){Shoes.frame = 4;} if(ShoesColorRand == 6){Shoes.frame = 5;} if(ShoesColorRand == 7){Shoes.frame = 6;} if(ShoesColorRand == 8){Shoes.frame = 7;} if(ShoesColorRand == 9){Shoes.frame = 8;} if(ShoesColorRand == 10){Shoes.frame = 9;} if(ShoesColorRand == 11){Shoes.frame = 10;} if(ShoesColorRand == 12){Shoes.frame = 11;} var ExtraRand = Math.floor(Math.random()*(4-1+1))+1; if(ExtraRand == 1) { Extra.visible = true; Extra2.visible = false; Extra3.visible = false; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra.frame = 0;} if(ExtraColorRand == 2){Extra.frame = 1;} if(ExtraColorRand == 3){Extra.frame = 2;} if(ExtraColorRand == 4){Extra.frame = 3;} if(ExtraColorRand == 5){Extra.frame = 4;} if(ExtraColorRand == 6){Extra.frame = 5;} if(ExtraColorRand == 7){Extra.frame = 6;} if(ExtraColorRand == 8){Extra.frame = 7;} if(ExtraColorRand == 9){Extra.frame = 8;} if(ExtraColorRand == 10){Extra.frame = 9;} if(ExtraColorRand == 11){Extra.frame = 10;} if(ExtraColorRand == 12){Extra.frame = 11;} } if(ExtraRand == 2) { Extra.visible = false; Extra2.visible = true; Extra3.visible = false; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra2.frame = 0;} if(ExtraColorRand == 2){Extra2.frame = 1;} if(ExtraColorRand == 3){Extra2.frame = 2;} if(ExtraColorRand == 4){Extra2.frame = 3;} if(ExtraColorRand == 5){Extra2.frame = 4;} if(ExtraColorRand == 6){Extra2.frame = 5;} if(ExtraColorRand == 7){Extra2.frame = 6;} if(ExtraColorRand == 8){Extra2.frame = 7;} if(ExtraColorRand == 9){Extra2.frame = 8;} if(ExtraColorRand == 10){Extra2.frame = 9;} if(ExtraColorRand == 11){Extra2.frame = 10;} if(ExtraColorRand == 12){Extra2.frame = 11;} } if(ExtraRand == 3) { Extra.visible = false; Extra2.visible = false; Extra3.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra3.frame = 0;} if(ExtraColorRand == 2){Extra3.frame = 1;} if(ExtraColorRand == 3){Extra3.frame = 2;} if(ExtraColorRand == 4){Extra3.frame = 3;} if(ExtraColorRand == 5){Extra3.frame = 4;} if(ExtraColorRand == 6){Extra3.frame = 5;} if(ExtraColorRand == 7){Extra3.frame = 6;} if(ExtraColorRand == 8){Extra3.frame = 7;} if(ExtraColorRand == 9){Extra3.frame = 8;} if(ExtraColorRand == 10){Extra3.frame = 9;} if(ExtraColorRand == 11){Extra3.frame = 10;} if(ExtraColorRand == 12){Extra3.frame = 11;} } if(ExtraRand == 4) { Extra.visible = false; Extra2.visible = false; Extra3.visible = false; } var Extra4Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra4Rand == 1) { Extra4.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra4.frame = 0;} if(ExtraColorRand == 2){Extra4.frame = 1;} if(ExtraColorRand == 3){Extra4.frame = 2;} if(ExtraColorRand == 4){Extra4.frame = 3;} if(ExtraColorRand == 5){Extra4.frame = 4;} if(ExtraColorRand == 6){Extra4.frame = 5;} if(ExtraColorRand == 7){Extra4.frame = 6;} if(ExtraColorRand == 8){Extra4.frame = 7;} if(ExtraColorRand == 9){Extra4.frame = 8;} if(ExtraColorRand == 10){Extra4.frame = 9;} if(ExtraColorRand == 11){Extra4.frame = 10;} if(ExtraColorRand == 12){Extra4.frame = 11;} } if(Extra4Rand == 2){Extra4.visible = false;} var Extra5Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra5Rand == 1) { Extra5.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra5.frame = 0;} if(ExtraColorRand == 2){Extra5.frame = 1;} if(ExtraColorRand == 3){Extra5.frame = 2;} if(ExtraColorRand == 4){Extra5.frame = 3;} if(ExtraColorRand == 5){Extra5.frame = 4;} if(ExtraColorRand == 6){Extra5.frame = 5;} if(ExtraColorRand == 7){Extra5.frame = 6;} if(ExtraColorRand == 8){Extra5.frame = 7;} if(ExtraColorRand == 9){Extra5.frame = 8;} if(ExtraColorRand == 10){Extra5.frame = 9;} if(ExtraColorRand == 11){Extra5.frame = 10;} if(ExtraColorRand == 12){Extra5.frame = 11;} } if(Extra5Rand == 2){Extra5.visible = false;} var Extra6Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra6Rand == 1) { Extra6.visible = true; var ExtraColorRand = Math.floor(Math.random()*(12-1+1))+1; if(ExtraColorRand == 1){Extra6.frame = 0;} if(ExtraColorRand == 2){Extra6.frame = 1;} if(ExtraColorRand == 3){Extra6.frame = 2;} if(ExtraColorRand == 4){Extra6.frame = 3;} if(ExtraColorRand == 5){Extra6.frame = 4;} if(ExtraColorRand == 6){Extra6.frame = 5;} if(ExtraColorRand == 7){Extra6.frame = 6;} if(ExtraColorRand == 8){Extra6.frame = 7;} if(ExtraColorRand == 9){Extra6.frame = 8;} if(ExtraColorRand == 10){Extra6.frame = 9;} if(ExtraColorRand == 11){Extra6.frame = 10;} if(ExtraColorRand == 12){Extra6.frame = 11;} } if(Extra6Rand == 2){Extra6.visible = false;} var LipsRand = Math.floor(Math.random()*(6-1+1))+1; if(LipsRand == 1) { this.Lips_fnc("lips","Lips01",LipsX,LipsY); Teeth.frame = 0; Teeth.x = TeethX; Teeth.y = TeethY; } if(LipsRand == 2) { this.Lips_fnc("lips2","Lips02",LipsX2,LipsY2); Teeth.frame = 1; Teeth.x = TeethX2; Teeth.y = TeethY2; } if(LipsRand == 3) { this.Lips_fnc("lips3","Lips03",LipsX3,LipsY3); Teeth.frame = 2; Teeth.x = TeethX3; Teeth.y = TeethY3; } if(LipsRand == 4) { this.Lips_fnc("lips4","Lips04",LipsX4,LipsY4); Teeth.frame = 3; Teeth.x = TeethX4; Teeth.y = TeethY4; } if(LipsRand == 5) { this.Lips_fnc("lips5","Lips05",LipsX5,LipsY5); Teeth.frame = 4; Teeth.x = TeethX5; Teeth.y = TeethY5; } if(LipsRand == 6) { this.Lips_fnc("lips6","Lips06",LipsX6,LipsY6); Teeth.frame = 5; Teeth.x = TeethX6; Teeth.y = TeethY6; } var LipsColorRand = Math.floor(Math.random()*(12-1+1))+1; if(LipsColorRand == 1){Lips.frame = 0;} if(LipsColorRand == 2){Lips.frame = 1;} if(LipsColorRand == 3){Lips.frame = 2;} if(LipsColorRand == 4){Lips.frame = 3;} if(LipsColorRand == 5){Lips.frame = 4;} if(LipsColorRand == 6){Lips.frame = 5;} if(LipsColorRand == 7){Lips.frame = 6;} if(LipsColorRand == 8){Lips.frame = 7;} if(LipsColorRand == 9){Lips.frame = 8;} if(LipsColorRand == 10){Lips.frame = 9;} if(LipsColorRand == 11){Lips.frame = 10;} if(LipsColorRand == 12){Lips.frame = 11;} var SkinColorRand = Math.floor(Math.random()*(12-1+1))+1; if(SkinColorRand == 1) { Body.frame = 0; Head.frame = 0; } if(SkinColorRand == 2) { Body.frame = 1; Head.frame = 1; } if(SkinColorRand == 3) { Body.frame = 2; Head.frame = 2; } if(SkinColorRand == 4) { Body.frame = 3; Head.frame = 3; } if(SkinColorRand == 5) { Body.frame = 4; Head.frame = 4; } if(SkinColorRand == 6) { Body.frame = 5; Head.frame = 5; } if(SkinColorRand == 7) { Body.frame = 6; Head.frame = 6; } if(SkinColorRand == 8) { Body.frame = 7; Head.frame = 7; } if(SkinColorRand == 9) { Body.frame = 8; Head.frame = 8; } if(SkinColorRand == 10) { Body.frame = 9; Head.frame = 9; } if(SkinColorRand == 11) { Body.frame = 10; Head.frame = 10; } if(SkinColorRand == 12) { Body.frame = 11; Head.frame = 11; } }, SortMainGroup_fnc: function() { /*this will remove all the Doll's assets in the Character_Group to make it ready for adding it in again in the Character_Group.*/ Doll_Group.remove(Body); Doll_Group.remove(Hair); Doll_Group.remove(Hair_Hl); Doll_Group.remove(Bra); Doll_Group.remove(Panties); Doll_Group.remove(Socks); Doll_Group.remove(Clothes); Doll_Group.remove(Bottoms); Doll_Group.remove(Shoes); Doll_Group.remove(Extra); Doll_Group.remove(Extra2); Doll_Group.remove(Extra3); Doll_Group.remove(Extra6); Doll_Group.remove(Head); Doll_Group.remove(Eye_Shadow); Doll_Group.remove(Eyes_White); Doll_Group.remove(Eyes); Doll_Group.remove(Face_Details); Doll_Group.remove(Lips); Doll_Group.remove(Teeth); Doll_Group.remove(Extra4); Doll_Group.remove(Bangs); Doll_Group.remove(Bang_Hl); Doll_Group.remove(Extra5); /*this function will add all the doll's assets again in the Character_Group*/ this.AddToGroup(); }, AddToGroup: function() { /*add all the doll's assets again in the Character_Group so that all the assets are going to be sorted out*/ Doll_Group.add(Body); Doll_Group.add(Hair); Doll_Group.add(Hair_Hl); Doll_Group.add(Bra); Doll_Group.add(Panties); Doll_Group.add(Socks); Doll_Group.add(Clothes); Doll_Group.add(Bottoms); Doll_Group.add(Shoes); Doll_Group.add(Extra); Doll_Group.add(Extra2); Doll_Group.add(Extra3); Doll_Group.add(Extra6); Doll_Group.add(Head); Doll_Group.add(Eye_Shadow); Doll_Group.add(Eyes_White); Doll_Group.add(Eyes); Doll_Group.add(Face_Details); Doll_Group.add(Lips); Doll_Group.add(Teeth); Doll_Group.add(Extra4); Doll_Group.add(Bangs); Doll_Group.add(Bang_Hl); Doll_Group.add(Extra5); }, update: function() { }, debug_fnc: function(Obj) { /*this.input.onDown.add(function() { Obj.animations.play("Tool8Anim"); },this);*/ Obj.inputEnabled = true; Obj.input.enableDrag(false); Obj.events.onInputUp.add(function() { if(PosTextBool){PosText.text = Obj.x + "\n" + Obj.y;} else{console.log(Obj.x + "\n" + Obj.y);} },this); }, anim_fnc: function(Obj,fps) { Obj.animations.add("Anim"); Obj.animations.play("Anim",fps,true); } }