- 1
// Если FlowerItem, то ложим продукт в подарки, иначе ложим на склад
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−362
// Если FlowerItem, то ложим продукт в подарки, иначе ложим на склад
Блядь, ну ведь не ложим, а кладем!
−114
function cleanFrame() {
removeChild(MaskedScienseClip);{
trace("MaskedScienseClip added");}
removeChild(MaskedScienseShape);{
trace("MaskedScienseShape removed");}
removeChild(blink1);{
trace("blink1 removed");}
removeChild(btn_sciense);{
trace("btn_sciense removed");}
removeChild(MaskedComputersClip);{
trace("MaskedComputersClip removed");}
removeChild(MaskedComputersShape);{
trace("MaskedComputersShape removed");}
removeChild(blink2);{
trace("blink2 removed");}
removeChild(btn_computers);{
trace("btn_computers removed");}
removeChild(MaskedHumansClip);{
trace("MaskedHumansClip removed");}
removeChild(MaskedHumansShape);{
trace("MaskedHumansShape removed");}
removeChild(blink3);{
trace("blink3 removed");}
removeChild(btn_humans);{
trace("btn_humans removed");}
removeChild(MaskedAnimalsClip);{
trace("MaskedAnimalsClip removed");}
removeChild(MaskedAnimalsShape);{
trace("MaskedAnimalsShape removed");}
removeChild(blink4);{
trace("blink4 removed");}
removeChild(btn_animals);{
trace("btn_animals removed");}
removeChild(MaskedNatureClip);{
trace("MaskedNatureClip removed");}
removeChild(MaskedNatureShape);{
trace("MaskedNatureShape removed");}
removeChild(blink5);{
trace("blink5 removed");}
removeChild(btn_nature);{
trace("btn_nature removed");}
removeChild(MaskedWorldClip);{
trace("MaskedWorldClip removed");}
removeChild(MaskedWorldShape);{
trace("MaskedWorldShape removed");}
removeChild(blink6);{
trace("blink6 removed");}
removeChild(btn_world);{
trace("btn_world removed");}
removeChild(MaskedEnterClip);{
trace("MaskedEnterClip removed");}
removeChild(MaskedEnterShape);{
trace("MaskedEnterShape removed");}
removeChild(blink7);{
trace("blink7 removed");}
removeChild(btn_enter);{
trace("btn_enter removed");}
removeChild(MaskedSportClip);{
trace("MaskedSportClip removed");}
removeChild(MaskedSportShape);{
trace("MaskedSportShape removed");}
removeChild(blink8);{
trace("blink8 removed");}
removeChild(btn_sport);{
trace("btn_sport removed");}
removeChild(MaskedTransportClip);{
trace("MaskedTransportClip removed");}
removeChild(MaskedTransportShape);{
trace("MaskedTransportShape removed");}
removeChild(blink9);{
trace("blink9 removed");}
removeChild(btn_transport);{
trace("btn_transport removed");}
removeChild(categorySTXT);{
trace("categorySTXT removed");}
removeChild(scienseTXT);{
trace("scienseTXT removed");}
removeChild(computersTXT);{
trace("computersTXT removed");}
removeChild(humansTXT);{
trace("humansTXT removed");}
removeChild(animalsTXT);{
trace("animalsTXT removed");}
removeChild(natureTXT);{
trace("natureTXT removed");}
removeChild(worldTXT);{
trace("worldTXT removed");}
removeChild(enterTXT);{
trace("enterTXT removed");}
removeChild(sportTXT);{
trace("sportTXT removed");}
removeChild(transportTXT);{
trace("transportTXT removed");}
removeChild(logo_small);{
trace("logo_small removed");}
}
Ледящая душу красота.
−119
for (i = 0; i < config.sizecombobox[0].*.length(); i++) {
var size: XML = config.sizecombobox[0].*[i];
for (s = 0; s < size.compactnesscombobox[0].*.length(); s++) {
var compact: XML = size.compactnesscombobox[0].*[s];
flag = false;
for (k = 0; k < dataCompactIds.length; k++) {
if (int(compact.id) == dataCompactIds[k]) {
flag = true;
break;
}
}
if (!flag) {
if (compact.label != '') {
dataCompactIds.push(compact.id);
dataallCompact.addItem(compact);
}
}
for (v = 0; v < compact.papercombobox[0].*.length(); v++) {
flag = false;
var paper: XML = compact.papercombobox[0].*[v];
for (k = 0; k < dataPaperIds.length; k++) {
if (paper.id == dataPaperIds[k]) {
flag = true;
break;
}
}
if (!flag) {
dataPaperIds.push(paper.id);
dataallPaper.addItem(paper);
}
}
}
}
Работаем с хмлью:)
−113
if(_FRM_==302 || _FRM_==303 || _FRM_==304){//KAT
if (GETKEY(302) == "A") {return 302}else if (GETKEY(303) == "A") { return 303}else if (GETKEY(304) == "A") {return(304)}
}else if(_FRM_==305 || _FRM_==306 || _FRM_==307){//DOG
if (GETKEY(305) == "A") {return(305)}else if (GETKEY(306) == "A") { return(306)}else if (GETKEY(307) == "A") {return(307)}
}else if(_FRM_==300 || _FRM_==308){// FISH
if (GETKEY(300) == "A") {return(300)}else if (GETKEY(308) == "A") {return(308)}
}else if(_FRM_==301 || _FRM_==309){ // BIRD
if (GETKEY(301) == "A") {return(301)}else if (GETKEY(309) == "A") {return(309)}
}else if(_FRM_==64 || _FRM_==352 || _FRM_ == 356 || _FRM_==363){// mc_LOJKA
if (GETKEY(64) == "A") {return(64)
}else if (GETKEY(352) == "A") {return(352)
}else if (GETKEY(356) == "A") {return(356)
}else if (GETKEY(363) == "A") {return(363)}
}else if(_FRM_==357 || _FRM_==26){ //mc_NEPROLIVAIKA
if (GETKEY(357) == "A") {return(357)
}else if (GETKEY(26) == "A") {return(26)}
}else if(_FRM_==42 || _FRM_==43 || _FRM_==44){ //mc_BUTILKA
if (GETKEY(42) == "A") {return(42)
}else if (GETKEY(43) == "A") {return(43)
}else if (GETKEY(44) == "A") {return(44)}
}else if(_FRM_==40 || _FRM_==38 || _FRM_==37){//mc_SOSKA
if (GETKEY(40) == "A") {return(40)
}else if (GETKEY(38) == "A") {return(38)
}else if (GETKEY(37) == "A") {return(37)}
}else if(_FRM_==30 || _FRM_==31 || _FRM_==32){// mc_PUSTYSHKA
if (GETKEY(30) == "A") {return(30)
}else if (GETKEY(31) == "A") {return(31)
}else if (GETKEY(32) == "A") {return(32)}
И еще всего сотенка строк, а вообще есть ифы такого плана по 700 строк, просто кусочки их не столь эпичны
Вычисляем столкновения!.
−113
var _str = ""
var _a_=""
_a_ = KID_DANGER_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_DANGER_cnt.toString(16); if (_a_.length < 2) { _str += "0" };_str += _a_
_a_ = KID_EAT_pos.toString(16); if (_a_.length < 2) { _str += "0" };_str += _a_;_a_ = KID_EAT_cnt.toString(16); if (_a_.length < 2) { _str += "0" };_str += _a_
_a_ = KID_PLAY_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_PLAY_cnt.toString(16); if (_a_.length < 2) { _str += "0" };_str += _a_
_a_ = KID_WASH_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_WASH_cnt.toString(16); if (_a_.length < 2) { _str += "0" };_str += _a_
_a_ = KID_SLEEP_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_SLEEP_cnt.toString(16); if (_a_.length < 2) { _str += "0" };_str += _a_
_a_ = KID_EDU_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_EDU_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = KID_STREET_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_STREET_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = KID_CLEAN_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_CLEAN_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = KID_GARBAGE_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_GARBAGE_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = KID_TOILET_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_TOILET_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = KID_HEALTH_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KID_HEALTH_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = KAT_event_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = KAT_event_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = DOG_event_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = DOG_event_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = FISH_event_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = FISH_event_cnt.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_
_a_ = BIRD_event_pos.toString(16); if (_a_.length < 2) { _str += "0" }; _str += _a_; _a_ = BIRD_event_cnt.toString(16);if (_a_.length <2) { _str+="0" }; _str += _a_
Эмм, работа со строками...
−115
function MONEY_REDRAW() {
mc_ROOM.mc_MONEY_A._0.gotoAndStop(CHR_MONEY_A%10+1)
mc_ROOM.mc_MONEY_A._1.gotoAndStop(int(CHR_MONEY_A/10)%10+1)
mc_ROOM.mc_MONEY_A._2.gotoAndStop(int(CHR_MONEY_A/100)%10+1)
mc_ROOM.mc_MONEY_A._3.gotoAndStop(int(CHR_MONEY_A/1000)%10+1)
mc_ROOM.mc_MONEY_A._4.gotoAndStop(int(CHR_MONEY_A/10000)%10+1)
mc_ROOM.mc_MONEY_A._5.gotoAndStop(int(CHR_MONEY_A/100000)%10+1)
mc_ROOM.mc_MONEY_B._0.gotoAndStop(CHR_MONEY_B%10+1)
mc_ROOM.mc_MONEY_B._1.gotoAndStop(int(CHR_MONEY_B/10)%10+1)
mc_ROOM.mc_MONEY_B._2.gotoAndStop(int(CHR_MONEY_B/100)%10+1)
mc_ROOM.mc_MONEY_B._3.gotoAndStop(int(CHR_MONEY_B/1000)%10+1)
mc_ROOM.mc_MONEY_B._4.gotoAndStop(int(CHR_MONEY_B/10000)%10+1)
mc_ROOM.mc_MONEY_B._5.gotoAndStop(int(CHR_MONEY_B/100000)%10+1)
mc_SHOP.mc_MONEY_C._0.gotoAndStop(CHR_MONEY_A%10+1)
mc_SHOP.mc_MONEY_C._1.gotoAndStop(int(CHR_MONEY_A/10)%10+1)
mc_SHOP.mc_MONEY_C._2.gotoAndStop(int(CHR_MONEY_A/100)%10+1)
mc_SHOP.mc_MONEY_C._3.gotoAndStop(int(CHR_MONEY_A/1000)%10+1)
mc_SHOP.mc_MONEY_C._4.gotoAndStop(int(CHR_MONEY_A/10000)%10+1)
mc_SHOP.mc_MONEY_C._5.gotoAndStop(int(CHR_MONEY_A/100000)%10+1)
mc_SHOP.mc_MONEY_D._0.gotoAndStop(CHR_MONEY_B%10+1)
mc_SHOP.mc_MONEY_D._1.gotoAndStop(int(CHR_MONEY_B/10)%10+1)
mc_SHOP.mc_MONEY_D._2.gotoAndStop(int(CHR_MONEY_B/100)%10+1)
mc_SHOP.mc_MONEY_D._3.gotoAndStop(int(CHR_MONEY_B/1000)%10+1)
mc_SHOP.mc_MONEY_D._4.gotoAndStop(int(CHR_MONEY_B/10000)%10+1)
mc_SHOP.mc_MONEY_D._5.gotoAndStop(int(CHR_MONEY_B/100000)%10+1)
mc_ROOM.mc_MONEY_A.play()
mc_ROOM.mc_MONEY_B.play()
mc_SHOP.mc_MONEY_C.play()
mc_SHOP.mc_MONEY_D.play()
}
Магия чисел
−112
function READ_MAIL() {
if (mc_MESS._currentframe==1) {
if (mails_body.substr((mails_num - 1) * 9, 1) == "1") {// sys mail
GET_SYS_MAIL(mails_body.substr((mails_num - 1) * 9 + 1, 8))
}else if (mails_body.substr((mails_num - 1) * 9, 1) == "2") {// user mail
GET_USER_MAIL(mails_body.substr((mails_num - 1) * 9 + 1, 8))
}else if (mails_body.substr((mails_num - 1) * 9, 1) == "5") {//present
GET_PRESENT_MAIL(mails_body.substr((mails_num - 1) * 9 + 1, 8))
}
}
}
Читаем данные...
−123
design.product_btn.txt.txt.text = getLocalizedText('MENUS.WAREHOUSE.PRODUCTS', "Продукты", "Fla");
design.inventory_btn.txt.txt.text = getLocalizedText('MENUS.WAREHOUSE.INVENTORY', "Инвентарь", "Fla");
design.materials_btn.txt.txt.text = getLocalizedText('MENUS.WAREHOUSE.MATERIALS', "Материалы", "Fla");
Зачем дополнительный мувик без эффектов — ума не приложу.
txt.txt.text!
−120
// в BudgetDataVO.as
public static const CONSOLIDATE_DATA:int = 3; // when consolidated view is open
// в другом месте:
var firstIndex:int = type == BudgetDataVO.CONSOLIDATE_DATA ? -1 : 0;
Все тот же Сан Диего.
−106
if (_start > _end) _start = _end;
if (_end < _start) _end = _start;
c пламенным приветом = )