OwlCyberSecurity - MANAGER
Edit File: dressup.js
var dressup = function(game) { } dressup.prototype = { create: function() { CenterX = this.world.centerX; CenterY = this.world.centerY; hairColor = 0; hlColor = 0; lipsColor = 6; bodyColor = 0; hlVisible = false; depthCount = 1; openedMenu = 1; openedMenuPage = 1; BG = this.add.sprite(0,0,"background"); /*Intro_Character = this.add.sprite(246,322,"intro_character"); Intro_Character.anchor.setTo(0.5,0.5);*/ Body = this.add.sprite(243,477,"body"); Body.anchor.setTo(0.5,0.5); Body.frame = 2; bodybmd = this.make.bitmapData(960, 640); bodybmd.shadow("#FFFFFF",10,-0.1,-0.1); bodybmd.draw(Body, this.world.centerX, this.world.centerY); BodyBmd = this.add.sprite(Body.x,Body.y,bodybmd); BodyBmd.anchor.setTo(0.5,0.5); /*Bra = this.add.sprite(466,302,"bra"); Bra.anchor.setTo(0.5,0.5); Bra.visible = false;*/ Head = this.add.sprite(246,264,"head"); Head.anchor.setTo(0.5,0.5); Head.frame = 2; headbmd = this.make.bitmapData(960, 640); headbmd.shadow("#FFFFFF",10,-0.1,-0.1); headbmd.draw(Head, this.world.centerX, this.world.centerY); HeadBmd = this.add.sprite(Head.x,Head.y,headbmd); HeadBmd.anchor.setTo(0.5,0.5); Panties = this.add.sprite(253,470,"panties"); Panties.anchor.setTo(0.5,0.5); Panties.visible = false; SocksX = 242; SocksY = 565; SocksX2 = 243; SocksY2 = 578; SocksX3 = 243; SocksY3 = 578; SocksX4 = 243; SocksY4 = 575; SocksX5 = 243; SocksY5 = 565; SocksX6 = 243; SocksY6 = 564; Socks = this.add.sprite(SocksX,SocksY,"socks"); Socks.anchor.setTo(0.5,0.5); Socks.visible = false; BottomsX = 240; BottomsY = 520; BottomsX2 = 241; BottomsY2 = 524; BottomsX3 = 248; BottomsY3 = 507; BottomsX4 = 249; BottomsY4 = 505; BottomsX5 = 242; BottomsY5 = 521; BottomsX6 = 242; BottomsY6 = 519; Bottoms = this.add.sprite(BottomsX,BottomsY,"bottoms"); Bottoms.anchor.setTo(0.5,0.5); Bottoms.visible = false; TopsX = 256; TopsY = 441; TopsX2 = 266; TopsY2 = 428; TopsX3 = 265; TopsY3 = 438; TopsX4 = 264; TopsY4 = 433; TopsX5 = 265; TopsY5 = 428; TopsX6 = 258; TopsY6 = 424; DressX = 250; DressY = 484; DressX2 = 259.5; DressY2 = 481; DressX3 = 252.5; DressY3 = 481.5; DressX4 = 250; DressY4 = 481; DressX5 = 249; DressY5 = 483; DressX6 = 259.5; DressY6 = 479.5; Clothes = this.add.sprite(DressX2,DressY2,"dress2"); Clothes.anchor.setTo(0.5,0.5); Clothes.name = "Dress02"; /*Eye_Shadow = this.add.sprite(454,141,"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_White.visible = false;*/ EyebrowX = 249; EyebrowY = 281; EyebrowX2 = 248; EyebrowY2 = 283; EyebrowX3 = 246; EyebrowY3 = 269; Eyebrows = this.add.sprite(EyebrowX,EyebrowY,"eyebrows"); Eyebrows.anchor.setTo(0.5,0.5); Eyebrows.frame = 0; Eyes = this.add.sprite(247,303,"eyes"); Eyes.anchor.setTo(0.5,0.5); Face_Details = this.add.sprite(247,299,"face_details"); Face_Details.anchor.setTo(0.5,0.5); LipsX = 248; LipsY = 345; LipsX2 = 265; LipsY2 = 356; LipsX3 = 261; LipsY3 = 355; LipsX4 = 263; LipsY4 = 350; LipsX5 = 253; LipsY5 = 352; LipsX6 = 261; LipsY6 = 355; Lips = this.add.sprite(LipsX,LipsY,"lips"); Lips.anchor.setTo(0.5,0.5); Lips.frame = 0; /*TeethX3 = 467; TeethY3 = 194; TeethX4 = 460; TeethY4 = 188; TeethX5 = 473; TeethY5 = 194; Teeth = this.add.sprite(TeethX3,TeethY3,"teeth"); Teeth.anchor.setTo(0.5,0.5); Teeth.frame = 0; Teeth.visible = false;*/ HairX = 240; HairY = 363; HairX2 = 205; HairY2 = 376; HairX3 = 247; HairY3 = 364; HairX4 = 244; HairY4 = 362; HairX5 = 242; HairY5 = 363; HairX6 = 244; HairY6 = 363; Hair = this.add.sprite(HairX3,HairY3,"hair3"); Hair.anchor.setTo(0.5,0.5); Hair.frame = 0; hairbmd = this.make.bitmapData(960, 640); hairbmd.shadow("#FFFFFF",10,-0.1,-0.1); hairbmd.draw(Hair, this.world.centerX, this.world.centerY); HairBmd = this.add.sprite(HairX3,HairY3,hairbmd); HairBmd.anchor.setTo(0.5,0.5); /*Hair_HlX = 437; Hair_HlY = 168; Hair_HlX2 = 452; Hair_HlY2 = 133; Hair_HlX3 = 334; Hair_HlY3 = 289; Hair_HlX4 = 424; Hair_HlY4 = 204; Hair_HlX5 = 360; Hair_HlY5 = 264; Hair_HlX6 = 416; Hair_HlY6 = 122; Hair_Hl = this.add.sprite(Hair_HlX,Hair_HlY,"hair_hl"); Hair_Hl.anchor.setTo(0.5,0.5); Hair_Hl.frame = 0; Hair_Hl.visible = false;*/ BangsX = 246; BangsY = 221; BangsX2 = 245; BangsY2 = 221; BangsX3 = 246; BangsY3 = 219; BangsX4 = 244; BangsY4 = 221; BangsX5 = 243; BangsY5 = 261; BangsX6 = 240; BangsY6 = 236; Bangs = this.add.sprite(BangsX3,BangsY3,"bangs3"); Bangs.anchor.setTo(0.5,0.5); Bangs.frame = 0; bangbmd = this.make.bitmapData(960, 640); bangbmd.shadow("#FFFFFF",10,-0.1,-0.1); bangbmd.draw(Bangs, this.world.centerX, this.world.centerY); BangBmd = this.add.sprite(BangsX3,BangsY3,bangbmd); BangBmd.anchor.setTo(0.5,0.5); Bang_HlX = 238; Bang_HlY = 235; Bang_HlX2 = 242; Bang_HlY2 = 206; Bang_HlX3 = 246; Bang_HlY3 = 185; Bang_HlX4 = 203; Bang_HlY4 = 208; Bang_HlX5 = 217; Bang_HlY5 = 275; Bang_HlX6 = 268; Bang_HlY6 = 242; Bang_Hl = this.add.sprite(Bang_HlX3,Bang_HlY3,"bang_hl3"); Bang_Hl.anchor.setTo(0.5,0.5); Bang_Hl.frame = 0; Bang_Hl.visible = false; Extra = this.add.sprite(334,402,"extras"); Extra.anchor.setTo(0.5,0.5); Extra.visible = false; Extra2 = this.add.sprite(242,223,"extras2"); Extra2.anchor.setTo(0.5,0.5); Extra2.visible = false; Extra3 = this.add.sprite(251,404,"extras3"); Extra3.anchor.setTo(0.5,0.5); Extra3.visible = false; Extra4 = this.add.sprite(228,575,"extras4"); Extra4.anchor.setTo(0.5,0.5); Extra4.visible = false; Extra5 = this.add.sprite(305.5,438.5,"extras5"); Extra5.anchor.setTo(0.5,0.5); Extra5.visible = false; Extra6 = this.add.sprite(246,298,"extras6"); Extra6.anchor.setTo(0.5,0.5); Extra6.visible = false; ShoesX = 240; ShoesY = 582; ShoesX2 = 241; ShoesY2 = 565; ShoesX3 = 241; ShoesY3 = 579; ShoesX4 = 242; ShoesY4 = 578; ShoesX5 = 243; ShoesY5 = 573; ShoesX6 = 241; ShoesY6 = 561; Shoes = this.add.sprite(ShoesX,ShoesY,"shoes"); Shoes.anchor.setTo(0.5,0.5); Shadow = this.add.sprite(246,319,"shadow"); Shadow.anchor.setTo(0.5,0.5); Doll_Group = this.add.group(); this.SortMainGroup_fnc(); //Doll_Group.setAll("smoothed",false); //Doll_Group.scale.setTo(0.5,0.5); Doll_Group.x = 0; Doll_Group.y = 1; //dressup Border = this.add.sprite(713,283,"border"); Border.anchor.setTo(0.5,0.5); //Hair_Menu Bang01_Icon = this.add.button(Border.x + 3,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 + 3,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 + 3,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 + 3.5,Bang01_Icon.y + .5,"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 + 3.4,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 + 3.4,Bang05_Icon.y + Bang05_Icon.height + 9.2,"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 + 3,130,"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 + 3,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 + 3,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 + 3,Hair01_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 + 3,Hair04_Icon.y + Hair04_Icon.height + 11.5,"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 + 2.7,Hair05_Icon.y + Hair05_Icon.height + 10.3,"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(632,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 + 7,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 + 5,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 + 25,"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 + 7,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 + 5,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 + 21,"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 + 6,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 + 6,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 + 25,"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 + 6,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 + 6,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(630.4,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 + 7.5,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 + 7.5,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 + 25,"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 + 7.5,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 + 7.5,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.5,"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 + 7.5,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 + 7.5,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 + 7.5,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 + 7.5,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 + 25,"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 + 7.5,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 + 7.5,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);}; //Eye_Color Eye_Color = this.add.button(631,98,"eye_color_icon",function() { Eyes.frame = 0; },this,1,0,0); Eye_Color.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color); this.buttonDown_fnc(Eye_Color);}; Eye_Color2 = this.add.button(Eye_Color.x + Eye_Color.width + 8,Eye_Color.y,"eye_color_icon2",function() { Eyes.frame = 1; },this,1,0,0); Eye_Color2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color2); this.buttonDown_fnc(Eye_Color2);}; Eye_Color3 = this.add.button(Eye_Color2.x + Eye_Color2.width + 7,Eye_Color2.y,"eye_color_icon3",function() { Eyes.frame = 2; },this,1,0,0); Eye_Color3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color3); this.buttonDown_fnc(Eye_Color3);}; Eye_Color4 = this.add.button(Eye_Color.x,Eye_Color.y + Eye_Color.height + 25,"eye_color_icon4",function() { Eyes.frame = 3; },this,1,0,0); Eye_Color4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color4); this.buttonDown_fnc(Eye_Color4);}; Eye_Color5 = this.add.button(Eye_Color4.x + Eye_Color4.width + 8,Eye_Color4.y,"eye_color_icon5",function() { Eyes.frame = 4; },this,1,0,0); Eye_Color5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color5); this.buttonDown_fnc(Eye_Color5);}; Eye_Color6 = this.add.button(Eye_Color5.x + Eye_Color5.width + 7,Eye_Color5.y,"eye_color_icon6",function() { Eyes.frame = 5; },this,1,0,0); Eye_Color6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color6); this.buttonDown_fnc(Eye_Color6);}; Eye_Color7 = this.add.button(Eye_Color4.x,Eye_Color4.y + Eye_Color4.height + 21,"eye_color_icon7",function() { Eyes.frame = 6; },this,1,0,0); Eye_Color7.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color7); this.buttonDown_fnc(Eye_Color7);}; Eye_Color8 = this.add.button(Eye_Color7.x + Eye_Color7.width + 8,Eye_Color7.y,"eye_color_icon8",function() { Eyes.frame = 7; },this,1,0,0); Eye_Color8.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color8); this.buttonDown_fnc(Eye_Color8);}; Eye_Color9 = this.add.button(Eye_Color8.x + Eye_Color8.width + 7,Eye_Color8.y,"eye_color_icon9",function() { Eyes.frame = 8; },this,1,0,0); Eye_Color9.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color9); this.buttonDown_fnc(Eye_Color9);}; Eye_Color10 = this.add.button(Eye_Color7.x,Eye_Color7.y + Eye_Color7.height + 25,"eye_color_icon10",function() { Eyes.frame = 9; },this,1,0,0); Eye_Color10.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color10); this.buttonDown_fnc(Eye_Color10);}; Eye_Color11 = this.add.button(Eye_Color10.x + Eye_Color10.width + 8,Eye_Color10.y,"eye_color_icon11",function() { Eyes.frame = 10; },this,1,0,0); Eye_Color11.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color11); this.buttonDown_fnc(Eye_Color11);}; Eye_Color12 = this.add.button(Eye_Color11.x + Eye_Color11.width + 7,Eye_Color11.y,"eye_color_icon12",function() { Eyes.frame = 11; },this,1,0,0); Eye_Color12.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eye_Color12); this.buttonDown_fnc(Eye_Color12);}; Eye_Color_Group = this.add.group(); Eye_Color_Group.add(Eye_Color); Eye_Color_Group.add(Eye_Color2); Eye_Color_Group.add(Eye_Color3); Eye_Color_Group.add(Eye_Color4); Eye_Color_Group.add(Eye_Color5); Eye_Color_Group.add(Eye_Color6); Eye_Color_Group.add(Eye_Color7); Eye_Color_Group.add(Eye_Color8); Eye_Color_Group.add(Eye_Color9); Eye_Color_Group.add(Eye_Color10); Eye_Color_Group.add(Eye_Color11); Eye_Color_Group.add(Eye_Color12); Eye_Color_Group.visible = false; //Eyeshadow Color /*Eyeshadow_Color = this.add.button(631.3,97,"eyeshadow_icon",function() { Eye_Shadow.frame = 0; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color); this.buttonDown_fnc(Eyeshadow_Color);}; Eyeshadow_Color2 = this.add.button(Eyeshadow_Color.x + Eyeshadow_Color.width + 6,Eyeshadow_Color.y,"eyeshadow_icon2",function() { Eye_Shadow.frame = 1; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color2); this.buttonDown_fnc(Eyeshadow_Color2);}; Eyeshadow_Color3 = this.add.button(Eyeshadow_Color2.x + Eyeshadow_Color2.width + 6,Eyeshadow_Color2.y,"eyeshadow_icon3",function() { Eye_Shadow.frame = 2; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color3); this.buttonDown_fnc(Eyeshadow_Color3);}; Eyeshadow_Color4 = this.add.button(Eyeshadow_Color.x,Eyeshadow_Color.y + Eyeshadow_Color.height + 26.3,"eyeshadow_icon4",function() { Eye_Shadow.frame = 3; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color4.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color4); this.buttonDown_fnc(Eyeshadow_Color4);}; Eyeshadow_Color5 = this.add.button(Eyeshadow_Color4.x + Eyeshadow_Color4.width + 6,Eyeshadow_Color4.y,"eyeshadow_icon5",function() { Eye_Shadow.frame = 4; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color5.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color5); this.buttonDown_fnc(Eyeshadow_Color5);}; Eyeshadow_Color6 = this.add.button(Eyeshadow_Color5.x + Eyeshadow_Color5.width + 6,Eyeshadow_Color5.y,"eyeshadow_icon6",function() { Eye_Shadow.frame = 5; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color6.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color6); this.buttonDown_fnc(Eyeshadow_Color6);}; Eyeshadow_Color7 = this.add.button(Eyeshadow_Color4.x,Eyeshadow_Color4.y + Eyeshadow_Color4.height + 22.2,"eyeshadow_icon7",function() { Eye_Shadow.frame = 6; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color7.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color7); this.buttonDown_fnc(Eyeshadow_Color7);}; Eyeshadow_Color8 = this.add.button(Eyeshadow_Color7.x + Eyeshadow_Color7.width + 6,Eyeshadow_Color7.y,"eyeshadow_icon8",function() { Eye_Shadow.frame = 7; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color8.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color8); this.buttonDown_fnc(Eyeshadow_Color8);}; Eyeshadow_Color9 = this.add.button(Eyeshadow_Color8.x + Eyeshadow_Color8.width + 6,Eyeshadow_Color8.y,"eyeshadow_icon9",function() { Eye_Shadow.frame = 8; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color9.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color9); this.buttonDown_fnc(Eyeshadow_Color9);}; Eyeshadow_Color10 = this.add.button(Eyeshadow_Color7.x,Eyeshadow_Color7.y + Eyeshadow_Color7.height + 23.4,"eyeshadow_icon10",function() { Eye_Shadow.frame = 9; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color10.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color10); this.buttonDown_fnc(Eyeshadow_Color10);}; Eyeshadow_Color11 = this.add.button(Eyeshadow_Color10.x + Eyeshadow_Color10.width + 6,Eyeshadow_Color10.y,"eyeshadow_icon11",function() { Eye_Shadow.frame = 10; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color11.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color11); this.buttonDown_fnc(Eyeshadow_Color11);}; Eyeshadow_Color12 = this.add.button(Eyeshadow_Color11.x + Eyeshadow_Color11.width + 6,Eyeshadow_Color11.y,"eyeshadow_icon12",function() { Eye_Shadow.frame = 11; Eye_Shadow.visible = true; },this,1,0,0); Eyeshadow_Color12.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyeshadow_Color12); this.buttonDown_fnc(Eyeshadow_Color12);}; Eyeshadow_Color_Group = this.add.group(); Eyeshadow_Color_Group.add(Eyeshadow_Color); Eyeshadow_Color_Group.add(Eyeshadow_Color2); Eyeshadow_Color_Group.add(Eyeshadow_Color3); Eyeshadow_Color_Group.add(Eyeshadow_Color4); Eyeshadow_Color_Group.add(Eyeshadow_Color5); Eyeshadow_Color_Group.add(Eyeshadow_Color6); Eyeshadow_Color_Group.add(Eyeshadow_Color7); Eyeshadow_Color_Group.add(Eyeshadow_Color8); Eyeshadow_Color_Group.add(Eyeshadow_Color9); Eyeshadow_Color_Group.add(Eyeshadow_Color10); Eyeshadow_Color_Group.add(Eyeshadow_Color11); Eyeshadow_Color_Group.add(Eyeshadow_Color12); Eyeshadow_Color_Group.visible = false;*/ //Eyebrows Eyebrows_Icon = this.add.button(Border.x + 1.8, 132, "eyebrows_icon",function() { Eyebrows.frame = 0; Eyebrows.x = EyebrowX; Eyebrows.y = EyebrowY; },this,1,0,0); Eyebrows_Icon.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyebrows_Icon); this.buttonDown_fnc(Eyebrows_Icon);}; Eyebrows_Icon2 = this.add.button(Border.x + 1.8, Eyebrows_Icon.y + Eyebrows_Icon.height + 10, "eyebrows_icon2",function() { Eyebrows.frame = 1; Eyebrows.x = EyebrowX2; Eyebrows.y = EyebrowY2; },this,1,0,0); Eyebrows_Icon2.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyebrows_Icon2); this.buttonDown_fnc(Eyebrows_Icon2);}; Eyebrows_Icon3 = this.add.button(Border.x + 1.8, Eyebrows_Icon2.y + Eyebrows_Icon2.height + 9, "eyebrows_icon3",function() { Eyebrows.frame = 2; Eyebrows.x = EyebrowX3; Eyebrows.y = EyebrowY3; },this,1,0,0); Eyebrows_Icon3.anchor.setTo(0.5,0.5); if(!this.game.device.desktop){this.buttonUp_fnc(Eyebrows_Icon3); this.buttonDown_fnc(Eyebrows_Icon3);}; Eyebrows_Menu_Group = this.add.group(); Eyebrows_Menu_Group.add(Eyebrows_Icon); Eyebrows_Menu_Group.add(Eyebrows_Icon2); Eyebrows_Menu_Group.add(Eyebrows_Icon3); Eyebrows_Menu_Group.visible = false; //Lips_Icon Lips01_Icon = this.add.button(Border.x + 3,130,"lips01_icon",function() { Lips.frame = 0; Lips.x = LipsX; Lips.y = LipsY; },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 + 3,Lips01_Icon.y + Lips01_Icon.height + 10,"lips02_icon",function() { Lips.frame = 1; Lips.x = LipsX2; Lips.y = LipsY2; },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 + 3,Lips02_Icon.y + Lips02_Icon.height + 10,"lips03_icon",function() { Lips.frame = 2; Lips.x = LipsX3; Lips.y = LipsY3; },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 + 3,130.5,"lips04_icon",function() { Lips.frame = 3; Lips.x = LipsX4; Lips.y = LipsY4; },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 + 3,Lips04_Icon.y + Lips04_Icon.height + 10,"lips05_icon",function() { Lips.frame = 4; Lips.x = LipsX5; Lips.y = LipsY5; },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 + 3,Lips05_Icon.y + Lips05_Icon.height + 9,"lips06_icon",function() { Lips.frame = 5; Lips.x = LipsX6; Lips.y = LipsY6; },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(630.4,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 + 7.5,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 + 7.5,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 + 25,"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 + 7.5,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 + 7.5,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.5,"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 + 7.5,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 + 7.5,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 + 25,"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 + 7.5,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 + 7.5,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 + 3,129.5,"tops_icon",function() { this.Clothes_fnc("tops","Top01",TopsX,TopsY); if(Bottoms.visible == false){Panties.visible = true;} },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 + 5.4,Tops_Icon.y + Tops_Icon.height + 10.4,"tops_icon2",function() { this.Clothes_fnc("tops2","Top02",TopsX2,TopsY2); if(Bottoms.visible == false){Panties.visible = true;} },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 + 3,Tops_Icon2.y + Tops_Icon2.height + 10,"tops_icon3",function() { this.Clothes_fnc("tops3","Top03",TopsX3,TopsY3); if(Bottoms.visible == false){Panties.visible = true;} },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 + 3.5,Tops_Icon.y + 1.8,"tops_icon4",function() { this.Clothes_fnc("tops4","Top04",TopsX4,TopsY4); if(Bottoms.visible == false){Panties.visible = true;} },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 + 3,Tops_Icon4.y + Tops_Icon4.height + 9.5,"tops_icon5",function() { this.Clothes_fnc("tops5","Top05",TopsX5,TopsY5); if(Bottoms.visible == false){Panties.visible = true;} },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 + 3.5,Tops_Icon5.y + Tops_Icon5.height + 9.2,"tops_icon6",function() { this.Clothes_fnc("tops6","Top06",TopsX6,TopsY6); if(Bottoms.visible == false){Panties.visible = true;} },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 + 3,131,"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 + 3,Bottoms_Icon.y + Bottoms_Icon.height + 9.4,"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 + 3.2,Bottoms_Icon2.y + Bottoms_Icon2.height + 9.4,"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 + 3,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 + 3,Bottoms_Icon4.y + Bottoms_Icon4.height + 9,"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 + 3,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 + 3,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 + 3,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 + 3,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 + 3,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 + 3,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 + 3,Dress_Icon5.y + Dress_Icon5.height + 8,"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 + 3,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 + 3,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 + 3,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 + 3,Shoes_Icon.y + .5,"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 + 3,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 + 3,Shoes_Icon5.y + Shoes_Icon5.height + 9,"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; Layer_Down = this.add.button(812,85,"layer_down",function() { if(depthCount > 1) { depthCount--; this.SortMainGroup_fnc(); } else { depthCount = 1; this.SortMainGroup_fnc(); } console.log(depthCount); },this,1,0,1); Layer_Down.anchor.setTo(0.5,0.5); Layer_Up = this.add.button(616,85,"layer_up",function() { if(depthCount < 2) { depthCount++; this.SortMainGroup_fnc(); } else { depthCount = 2; this.SortMainGroup_fnc(); } console.log(depthCount); },this,1,0,1); Layer_Up.anchor.setTo(0.5,0.5); 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.add(Layer_Up); Shoes_Menu_Group.add(Layer_Down); Shoes_Menu_Group.visible = false; //Socks_Icon Socks_Icon = this.add.button(Border.x + 3,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 + 3,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 + 3,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 + 3.5,Socks_Icon.y +.5,"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 + 3.5,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 + 3.5,Socks_Icon5.y + Socks_Icon5.height + 9,"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 + 3,129,"extra_icon",function() { Extra.frame = 0; if(Extra.visible){Extra.visible = false;} else{Extra.visible = true;} },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 + 3,Extra_Icon.y + Extra_Icon.height + 10.2,"extra_icon2",function() { Extra2.frame = 0; if(Extra2.visible){Extra2.visible = false;} else{Extra2.visible = true;} },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 + 3,Extra_Icon2.y + Extra_Icon2.height + 9.2,"extra_icon3",function() { Extra3.frame = 0; if(Extra3.visible){Extra3.visible = false;} else{Extra3.visible = true;} },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 + 2.8,Extra_Icon.y,"extra_icon4",function() { Extra4.frame = 0; if(Extra4.visible){Extra4.visible = false;} else{Extra4.visible = true;} },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 + 2.8,Extra_Icon4.y + Extra_Icon4.height + 10.2,"extra_icon5",function() { Extra5.frame = 0; if(Extra5.visible){Extra5.visible = false;} else{Extra5.visible = true;} },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 + 2.8,Extra_Icon5.y + Extra_Icon5.height + 9.2,"extra_icon6",function() { Extra6.frame = 0; if(Extra6.visible){Extra6.visible = false;} else{Extra6.visible = true;} },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(631,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 + 8,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 + 7,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 + 25,"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 + 8,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 + 7,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 + 21,"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 + 8,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 + 7,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 + 25,"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 + 8,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 + 7,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 + 7,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 + 8,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; 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 == 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; /*Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = false; Extra_Icon11.visible = false; Extra_Icon12.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; } /*if(openedMenuPage == 3) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = true; Extra_Icon8.visible = true; Extra_Icon9.visible = true; } if(openedMenuPage == 4) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = true; Extra_Icon11.visible = true; Extra_Icon12.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; 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; 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 == 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_Icon5.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_Icon5.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_Icon5.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_Icon5.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_Icon5.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; /*Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = false; Extra_Icon11.visible = false; Extra_Icon12.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; /*Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false;*/ } /*if(openedMenuPage == 3) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = true; Extra_Icon8.visible = true; Extra_Icon9.visible = true; Extra_Icon10.visible = false; Extra_Icon11.visible = false; Extra_Icon12.visible = false; } if(openedMenuPage == 4) { Extra_Icon.visible = false; Extra_Icon2.visible = false; Extra_Icon3.visible = false; Extra_Icon4.visible = false; Extra_Icon5.visible = false; Extra_Icon6.visible = false; Extra_Icon7.visible = false; Extra_Icon8.visible = false; Extra_Icon9.visible = false; Extra_Icon10.visible = true; Extra_Icon11.visible = true; Extra_Icon12.visible = true; }*/ } },this); Color_Btn = this.add.button(624,479,"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("bangs3","Bang03",BangsX3,BangsY3); this.Hair_fnc("hair3","Hair03",HairX3,HairY3); Bangs.frame = 0; Hair.frame = 0; hairColor = 0; } else if(openedMenu == 2) { Bang_Hl.visible = false; //Hair_Hl.visible = false; hlVisible = false; } else if(openedMenu == 3) { Eyes.frame = 0; } else if(openedMenu == 4) { //Eye_Shadow.visible = false; Eyebrows.frame = 0; Eyebrows.x = EyebrowX; Eyebrows.y = EyebrowY; } else if(openedMenu == 5) { //this.Lips_fnc("lips","Lips0",LipsX,LipsY); //Teeth.visible = false; Lips.frame = 0; Lips.x = LipsX; Lips.y = LipsY; //lipsColor = 6; } else if(openedMenu == 6) { Body.frame = 2; Head.frame = 2; } else if(openedMenu == 7) { Clothes.visible = false; //Bra.visible = true; if(Bottoms.visible){Panties.visible = false;} else{Panties.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; /*Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_Icon.visible = true;*/ //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_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; 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 + 8; Hl_Color_Group.visible = true; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_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); 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 + 8; Hl_Color_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.visible = true; Color_Group.visible = false; /*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 - 2,Eye_Btn.y + Eye_Btn.height + 16,"eyeshadow_btn",function() { openedMenu = 4; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = 816; //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; //Eyeshadow_Color_Group.visible = true; Eyebrows_Menu_Group.visible = true; Eye_Color_Group.visible = false; Color_Group.visible = false; /*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 = false;// 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; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.visible = false; 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 + 3,Lips_Btn.y + Lips_Btn.height + 14,"skintone_btn",function() { openedMenu = 6; Next_Btn.visible = false; Prev_Btn.visible = false; Trash_Btn.x = Hl_Color11_Icon.x + 8; Hl_Color_Group.visible = false; Hair_Menu_Group.visible = false; Color_Group.visible = false; Color_Btn.visible = false; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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 = 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; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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 = 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; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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 = 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; Layer_Up.visible = true; Layer_Down.visible = true; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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 = 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; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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 = 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; //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_Group.visible = false; Eye_Color_Group.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 = 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 Eye_Color_Group.visible = false; //openedMenu == 4 //Eyeshadow_Color_Group.visible = false; Eyebrows_Menu_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("bangs3","Bang03",BangsX3,BangsY3); this.Hair_fnc("hair3","Hair03",HairX3,HairY3); Bangs.frame = 0; Hair.frame = 0; hairColor = 0; Bang_Hl.frame = 0; Bang_Hl.visible = false; //Hair_Hl.frame = 0; hlVisible = false; hlColor = 0; Eyes.frame = 0; //Eye_Shadow.visible = false; Eyebrows.frame = 0; Eyebrows.x = EyebrowX; Eyebrows.y = EyebrowY; //this.Lips_fnc("lips","Lips0",LipsX,LipsY); //Teeth.visible = false; Lips.frame = 0; Lips.x = LipsX; Lips.y = LipsY; //lipsColor = 6; Body.frame = 2; Head.frame = 2; 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; /*Hair01_Icon.visible = true; Hair02_Icon.visible = true; Hair03_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); 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/exclusive-games","_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/?utm_source=cute_yuri_on_ice&utm_medium=html5game","_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/?utm_source=cute_yuri_on_ice&utm_medium=html5game","_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); Eye_Color_Group.setAll("inputEnabled",false); //Eyeshadow_Color_Group.setAll("inputEnabled",false); Eyebrows_Menu_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); Eye_Color_Group.setAll("inputEnabled",true); //Eyeshadow_Color_Group.setAll("inputEnabled",true); Eyebrows_Menu_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:"#DD3397"}); PosText.anchor.setTo(0.5,0.5); PosText.setShadow(3,3,"rgba(0,0,0,0.5)",2);*/ }, 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', 'kawaii-games-cute-yuri-on-ice-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.5,0.5); Doll_Group.x = 0; Doll_Group.y = 1; /*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 = -209; Doll_Group.y = -26; Doll_Group.scale.setTo(1,1);*/ /*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.sprite(0,0,BangKey); Bangs.anchor.setTo(0.5,0.5); Bangs.x = BangX; Bangs.y = BangY; Bangs.name = BangName; BangBmd.destroy(); bangbmd.clear(); bangbmd.draw(Bangs, this.world.centerX, this.world.centerY); BangBmd = this.add.sprite(BangX,BangY,bangbmd); BangBmd.anchor.setTo(0.5,0.5); } /* ***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; HairBmd.destroy(); hairbmd.clear(); hairbmd.draw(Hair, this.world.centerX, this.world.centerY); HairBmd = this.add.sprite(HairX,HairY,hairbmd); HairBmd.anchor.setTo(0.5,0.5); } /* ***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") { 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; if(Clothes.name == "Dress01" || Clothes.name == "Dress02" || Clothes.name == "Dress03" || Clothes.name == "Dress04" || Clothes.name == "Dress05" || Clothes.name == "Dress06") { Clothes.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()*(2-1+1))+1; if(ExtraRand == 1) { Extra.visible = true; 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 || ExtraRand == 0){Extra.visible = false;} var Extra2Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra2Rand == 1) { Extra2.visible = true; 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(Extra2Rand == 2 || Extra2Rand == 0){Extra2.visible = false;} var Extra3Rand = Math.floor(Math.random()*(2-1+1))+1; if(Extra3Rand == 1) { 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(Extra3Rand == 2 || Extra3Rand == 0){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 || Extra4Rand == 0){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 || Extra5Rand == 0){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 || Extra6Rand == 0){Extra6.visible = false;} var LipsRand = Math.floor(Math.random()*(6-1+1))+1; if(LipsRand == 1) { /*this.Lips_fnc("lips","Lips01",LipsX,LipsY); Teeth.visible = false;*/ Lips.frame = 0; Lips.x = LipsX; Lips.y = LipsY; } if(LipsRand == 2) { /*this.Lips_fnc("lips2","Lips02",LipsX2,LipsY2); Teeth.visible = false;*/ Lips.frame = 1; Lips.x = LipsX2; Lips.y = LipsY2; } if(LipsRand == 3) { /*this.Lips_fnc("lips3","Lips03",LipsX3,LipsY3); Teeth.frame = 0; Teeth.x = TeethX3; Teeth.y = TeethY3;*/ Lips.frame = 2; Lips.x = LipsX3; Lips.y = LipsY3; } if(LipsRand == 4) { /*this.Lips_fnc("lips4","Lips04",LipsX4,LipsY4); Teeth.frame = 1; Teeth.x = TeethX4; Teeth.y = TeethY4;*/ Lips.frame = 3; Lips.x = LipsX4; Lips.y = LipsY4; } if(LipsRand == 5) { /*this.Lips_fnc("lips5","Lips05",LipsX5,LipsY5); Teeth.frame = 2; Teeth.x = TeethX5; Teeth.y = TeethY5;*/ Lips.frame = 4; Lips.x = LipsX5; Lips.y = LipsY5; } if(LipsRand == 6) { /*this.Lips_fnc("lips6","Lips06",LipsX6,LipsY6); Teeth.visible = false;*/ Lips.frame = 5; Lips.x = LipsX6; Lips.y = LipsY6; } /*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 EyebrowsRand = Math.floor(Math.random()*(3-1+1))+1; if(EyebrowsRand == 1) { Eyebrows.frame = 0; Eyebrows.x = EyebrowX; Eyebrows.y = EyebrowY; } if(EyebrowsRand == 2) { Eyebrows.frame = 1; Eyebrows.x = EyebrowX2; Eyebrows.y = EyebrowY2; } if(EyebrowsRand == 3) { Eyebrows.frame = 2; Eyebrows.x = EyebrowX3; Eyebrows.y = EyebrowY3; } 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(Shadow); Doll_Group.remove(BangBmd); Doll_Group.remove(HairBmd); Doll_Group.remove(BodyBmd); Doll_Group.remove(HeadBmd); Doll_Group.remove(Hair); Doll_Group.remove(Body); //Doll_Group.remove(Bra); Doll_Group.remove(Panties); Doll_Group.remove(Socks); Doll_Group.remove(Bottoms); Doll_Group.remove(Shoes); Doll_Group.remove(Clothes); Doll_Group.remove(Head); //Doll_Group.remove(Eye_Shadow); //Doll_Group.remove(Eyes_White); Doll_Group.remove(Face_Details); Doll_Group.remove(Eyes); Doll_Group.remove(Eyebrows); Doll_Group.remove(Lips); //Doll_Group.remove(Teeth); Doll_Group.remove(Bangs); Doll_Group.remove(Bang_Hl); //Doll_Group.remove(Hair_Hl); Doll_Group.remove(Extra2); Doll_Group.remove(Extra3); Doll_Group.remove(Extra4); Doll_Group.remove(Extra5); Doll_Group.remove(Extra); Doll_Group.remove(Extra6); /*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*/ if(depthCount == 1) { Doll_Group.add(Shadow); Doll_Group.add(BangBmd); Doll_Group.add(HairBmd); Doll_Group.add(BodyBmd); Doll_Group.add(HeadBmd); Doll_Group.add(Hair); Doll_Group.add(Body); //Doll_Group.add(Bra); Doll_Group.add(Panties); Doll_Group.add(Socks); Doll_Group.add(Shoes); Doll_Group.add(Bottoms); Doll_Group.add(Clothes); Doll_Group.add(Head); //Doll_Group.add(Eye_Shadow); //Doll_Group.add(Eyes_White); Doll_Group.add(Face_Details); Doll_Group.add(Eyes); Doll_Group.add(Eyebrows); Doll_Group.add(Lips); //Doll_Group.add(Teeth); Doll_Group.add(Bangs); Doll_Group.add(Bang_Hl); //Doll_Group.add(Hair_Hl); Doll_Group.add(Extra2); Doll_Group.add(Extra3); Doll_Group.add(Extra4); Doll_Group.add(Extra5); Doll_Group.add(Extra); Doll_Group.add(Extra6); } else if(depthCount == 2) { Doll_Group.add(Shadow); Doll_Group.add(BangBmd); Doll_Group.add(HairBmd); Doll_Group.add(BodyBmd); Doll_Group.add(HeadBmd); Doll_Group.add(Hair); Doll_Group.add(Body); //Doll_Group.add(Bra); Doll_Group.add(Panties); Doll_Group.add(Socks); Doll_Group.add(Bottoms); Doll_Group.add(Clothes); Doll_Group.add(Shoes); Doll_Group.add(Head); //Doll_Group.add(Eye_Shadow); //Doll_Group.add(Eyes_White); Doll_Group.add(Face_Details); Doll_Group.add(Eyes); Doll_Group.add(Eyebrows); Doll_Group.add(Lips); //Doll_Group.add(Teeth); Doll_Group.add(Bangs); Doll_Group.add(Bang_Hl); //Doll_Group.add(Hair_Hl); Doll_Group.add(Extra2); Doll_Group.add(Extra3); Doll_Group.add(Extra4); Doll_Group.add(Extra5); Doll_Group.add(Extra); Doll_Group.add(Extra6); } }, 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); }, }