ДействиеСценарий / Говнокод #8780 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
// в клипе с названием kd_18copya
onClipEvent(enterFrame){
	_golova.gotoAndStop(_root.mc_GAME.odj_S)
	_telo.gotoAndStop(_root.mc_GAME.odj_T1)
	_platie.gotoAndStop(_root.mc_GAME.odj_T1)
	ruka_L.gotoAndStop(_root.mc_GAME.odj_T1)
	ruka_R.gotoAndStop(_root.mc_GAME.odj_T1)
	noga_1_L.gotoAndStop(_root.mc_GAME.odj_T2)
	noga_1_R.gotoAndStop(_root.mc_GAME.odj_T2)
	noga_2_L.gotoAndStop(_root.mc_GAME.odj_T2)
	noga_2_R.gotoAndStop(_root.mc_GAME.odj_T2)
	noga_L.gotoAndStop(_root.mc_GAME.odj_T2)
	noga_R.gotoAndStop(_root.mc_GAME.odj_T2)
	bot_L.gotoAndStop(_root.mc_GAME.odj_N)
	bot_R.gotoAndStop(_root.mc_GAME.odj_N)
	bot_L.bot.gotoAndStop(_root.mc_GAME.odj_B)
	bot_R.bot.gotoAndStop(_root.mc_GAME.odj_B)
}

Вот он каков as1)

kyzi007 kyzi007, (Updated )

Комментарии (41, +41)

ДействиеСценарий / Говнокод #8772 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
d1.onPress=function() {
	startDrag(this);
};
d1.onRelease=function(){
	stopDrag();
	if(d1.hitTest(a) || d1.hitTest(b) || d1.hitTest(c) || d1.hitTest(d)){
		popadanie=popadanie | 8;
		if(d1.hitTest(a)){ z[0] = 4; }
		if(d1.hitTest(b)){ z[1] = 4; }
		if(d1.hitTest(c)){ z[2] = 4; }
		if(d1.hitTest(d)){ z[3] = 4; }				
	}
	else{
		popadanie=popadanie & 7;
		if(d1.hitTest(a)){ z[0] = 0; }
		if(d1.hitTest(b)){ z[1] = 0; }
		if(d1.hitTest(c)){ z[2] = 0; }
		if(d1.hitTest(d)){ z[3] = 0; }		
	}
	if(popadanie==15){ proverka._visible = true;}
	else{
		proverka._visible = false;
	}
};

Из старого кода. Таких функций еще 3, мне почему-то было лень напрямую сравнить, какой из 8 прямоугольников с каким перекрылся. Заодно потроллел преподовательницу.

unfalse unfalse, (Updated )

Комментарии (3, +3)

ДействиеСценарий / Говнокод #8768 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
for(i=0;i<5;i++){
		if(_root.positions[i] == number){
// поменяем мувиклипы местами
			p2=_root.positions[i+1];
			with(_root){
			switch(p2){
				case 2: tx=b._x; ty=b._y; b._x=c._x; b._y=c._y; c._x=tx; c._y=ty; break;
				case 1: tx=a._x; ty=a._y; a._x=c._x; a._y=c._y; c._x=tx; c._y=ty; break;
				case 4: tx=d._x; ty=d._y; d._x=c._x; d._y=c._y; c._x=tx; c._y=ty; break;
				case 5: tx=e._x; ty=e._y; e._x=c._x; e._y=c._y; c._x=tx; c._y=ty; break;
				case 6: tx=f._x; ty=f._y; f._x=c._x; f._y=c._y; c._x=tx; c._y=ty; break;
				default: break;
			}
			}

Когда-то давно написал это, чтобы менять местами два прямоугольника, лежащие рядом, по нажатию на кнопку на одном из них. До сих пор горжусь тем, какой же я крутой кодер.

unfalse unfalse, (Updated )

Комментарии (13, +13)

ДействиеСценарий / Говнокод #8754 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
public function checkDrop (pos: Array): Array
 {
 	checkItem ();
 	var res: Array = [];
 	var item: Array
 	var mc: MovieClip
 	for (var i: int = 0; i < pos.length; i++)
 	{
   item = pos[i];
   if (itemList[item[0]])mc = itemList[item[0]][item[1]] as MovieClip;
   if (mc)
   {
   	if (mc.blcd != 0 && ((item[2] == 2 && mc.blcd == 2) || (item[2] == 1 && mc.blcd == 2) || (item[2] == 2 && mc.blcd == 1))) res[i] = 1;
   }
 	}
 	return res;
 }

Проверка проходимости сетки. И, да, эти мувики не в дисплейлисте, они просто хранят информацию.

kyzi007 kyzi007, (Updated )

Комментарии (48, +48)

ДействиеСценарий / Говнокод #8745 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
private function pathfindingOfHell(begin:Point, to:Point, delPoint:Point):Boolean
		{
			var aop:Vector.<GameFigure> = new Vector.<GameFigure>();
			aop.push(arr[begin.x][begin.y]);
			var i:uint = 0;
			while (i != count * 2 - 1)
			{
				for (var x_:int = -1;x_ < 2;x_++)
					for (var y_:int = -1;y_ < 2;y_++)
					{
						if (x_ != 0 && y_ != 0)
						{
							var tP:Point = new Point(aop[aop.length - 1].x_pos + x_, aop[aop.length - 1].y_pos + y_);
							var target:GameFigure = arr[tP.x][tP.y];

							if (!target.isFreedom && !searchInArray(aop, target) && delPoint != tP)
							{
								aop.push(target);
								if (target == arr[to.x][to.y])
								{
									aop = null;
									return true;
								}
							}
						}
					}
				i++;
			}
			aop = null;
			return false;
		}

KirAmp KirAmp, (Updated )

Комментарии (5, +5)

ДействиеСценарий / Говнокод #8714 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
public class MonstrGrafic extends ModulINT {
		var data:XML;
		var colors:Array = new Array(
			'0x008080',
			'0x800080',
			'0xccffcc',
			'0x00ffff',
			'0x800000',
			'0x0000ff',
			'0x00ccff',
			'0xccffff',
			'0xffff00',
			'0xffff99',
			'0x000080',
			'0xff00ff'
		);
		var ListTime:Array = new Array(
			"08:00:00 - 08:15:00",
			"08:15:00 - 08:30:00",
			"08:30:00 - 08:45:00",
			"08:45:00 - 09:00:00",
			"09:00:00 - 09:15:00",
			"09:15:00 - 09:30:00",
			"09:30:00 - 09:45:00",
			"09:45:00 - 10:00:00",
			"10:00:00 - 10:15:00",
			"10:15:00 - 10:30:00",
			"10:30:00 - 10:45:00",
			"10:45:00 - 11:00:00",
			"11:00:00 - 11:15:00",
			"11:15:00 - 11:30:00",
			"11:30:00 - 11:45:00",
			"11:45:00 - 12:00:00",
			"12:00:00 - 12:15:00",
			"12:15:00 - 12:30:00",
			"12:30:00 - 12:45:00",
			"12:45:00 - 13:00:00",
			"13:00:00 - 13:15:00",
			"13:15:00 - 13:30:00",
			"13:30:00 - 13:45:00",
			"13:45:00 - 14:00:00",
			"14:00:00 - 14:15:00",
			"14:15:00 - 14:30:00",
			"14:30:00 - 14:45:00",
			"14:45:00 - 15:00:00",
			"15:00:00 - 15:15:00",
			"15:15:00 - 15:30:00",
			"15:30:00 - 15:45:00",
			"15:45:00 - 16:00:00",
			"16:00:00 - 16:15:00",
			"16:15:00 - 16:30:00",
			"16:30:00 - 16:45:00",
			"16:45:00 - 17:00:00",
			"17:00:00 - 17:15:00",
			"17:15:00 - 17:30:00",
			"17:30:00 - 17:45:00",
			"17:45:00 - 18:00:00",
			"18:00:00 - 18:15:00",
			"18:15:00 - 18:30:00",
			"18:30:00 - 18:45:00",
			"18:45:00 - 19:00:00",
			"19:00:00 - 19:15:00",
			"19:15:00 - 19:30:00",
			"19:30:00 - 19:45:00",
			"19:45:00 - 20:00:00",
			"20:00:00 - 20:15:00",
			"20:15:00 - 20:30:00",
			"20:30:00 - 20:45:00",
			"20:45:00 - 21:00:00",
			"21:00:00 - 21:15:00",
			"21:15:00 - 21:30:00",
			"21:30:00 - 21:45:00",
			"21:45:00 - 22:00:00",
			"22:00:00 - 22:15:00",
			"22:15:00 - 22:30:00",
			"22:30:00 - 22:45:00",
			"22:45:00 - 23:00:00",
			"23:00:00 - 23:15:00",
			"23:15:00 - 23:30:00",
			"23:30:00 - 23:45:00",
			"23:45:00 - 24:00:00"
		);

kyzi007 kyzi007, (Updated )

Комментарии (65, +65)

ДействиеСценарий / Говнокод #8672 Ссылка на оригинал

0

  1. 1
var mapDress:BitmapData = MathUtils.getTransformationMapTShort(bottomMovie.width, bottomMovie.height, pointFilterTopLeft, pointFilterBezierLeft, point1, pointFilterLimitLeft, pointFilterTopRight, pointFilterBezierRight, point2, pointFilterLimitRight, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_right, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_left);

"752 см позитива!"

Z-13 Z-13, (Updated )

Комментарии (7, +7)

ДействиеСценарий / Говнокод #8671 Ссылка на оригинал

0

  1. 1
this.cutUnderLineAndG((this.getChildAt(bottomIndex.layer) as MovieClip).getChildAt(bottomIndex.child) as MovieClip, point1, point2, pointG, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_right, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_left);

Нет слов...

Z-13 Z-13, (Updated )

Комментарии (46, +46)

ДействиеСценарий / Говнокод #8641 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
private function dateLabel(item:Object, column:AdvancedDataGridColumn):String
{
	var df:DateFormatter = new DateFormatter();
	df.formatString = "DD.MM.YYYY JJ:SS"
	return df.format(item[column.dataField]);
}

перепутал минуты с секундами, тестер долго понять не мог, на сколько часы на сервере спешат )

remlend remlend, (Updated )

Комментарии (4, +4)