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

0

  1. 1
  2. 2
  3. 3
  4. 4
if ((m_window.popupBox_mc.popupBox_tf.text == "Пожалуйста обратитесь в службу поддержки и опишите действия после которых возникла ошибка. Затем обновите страницу.")||(m_window.popupBox_mc.popupBox_tf.text == "Ошибка ресурсов сервера. Пожалуйста обратитесь в службу поддержки и опишите действия после которых возникла ошибка. Затем обновите страницу.")||(m_window.popupBox_mc.popupBox_tf.text == "Ты запустил игру в двух браузерах или окнах одновременно. Закрой одно из окон и обнови страницу!")||(m_window.popupBox_mc.popupBox_tf.text == GlobalEngine.quickLocalize("FarmGame", "ServerError"))||(m_window.popupBox_mc.popupBox_tf.text == GlobalEngine.quickLocalize("FarmGame", "RefreshGame")))
{				
m_window.popupBox_mc.accept_bt.visible = false;
}

jahnique jahnique, (Updated )

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

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

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
private function handleApplcationCallback(call:String, params:String = "") : void 
{
	var paramsArr:Array; 
	if(params)
		paramsArr = params.length > 0 ? params.split(",") : [];
	else 
		paramsArr = [];	
	try 
	{
		handleApplicationCalls(call,paramsArr);
	} 
	catch (error : Error)
	{
	}
}

wvxvw wvxvw, (Updated )

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

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

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
public function receive(streamName:String):void
{
	stopReceive()
	
	if(!netConnection.connected)
	{
		receiveStreamName = streamName;
		LogAppender.getInstance().appendLog(LogType.STREAM_LOG,"FMSStream.receive?not connected, set streamName: " + receiveStreamName);
		return;
	}
	
	nsReceive = new NetStream(netConnection);
	nsReceive.addEventListener(NetStatusEvent.NET_STATUS, handleReceiveNetStreamStatus);
	nsReceive.play(streamName, -2, -1, true);
	dispatchEvent(new VRDataEvent(VRDataEvent.OPPONENT_STREAM_UPDATED));
	// default audio sound
	var st:SoundTransform = nsReceive.soundTransform;
	st.volume = 0.7;
	nsReceive.soundTransform = st;			
	examineCallTimer.start();
	LogAppender.getInstance().appendLog(LogType.STREAM_LOG,"FMSStream.receive?play=" + streamName);
}

Уже за новыми наушниками собирался идти...

wvxvw wvxvw, (Updated )

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

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

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
static public function getCamera():Camera
{
	// Return the same camera if it has been successfully requested before
	if (cam != null)
	{
		if (cam.muted) Security.showSettings(SecurityPanel.PRIVACY);
		return cam;
	}
	
	// Get the camera
	cam = Camera.getCamera();
	if (cam != null)
	{
		// Set properties if a camera was found
		if((cam.name.toLowerCase().indexOf("usb") != -1) && 
			(flash.system.Capabilities.os.toLowerCase().indexOf("mac") != -1))
		{
			// this is a mac default cam, dont change mode
			Logger.getInstance().debug("has usb + mac: no set mode");
		}
		else
		{
			cam.setMode(CAMERA_WIDTH, CAMERA_HEIGHT, 30, true);
			Logger.getInstance().debug("setMode to cam");
		}
		cam.addEventListener(StatusEvent.STATUS, NeaveCamera.statusListener);
		return cam;
	}
	else
	{
		// No camera found
		Security.showSettings(SecurityPanel.CAMERA);
		return new Camera();
	}
}

В отчаянии.

wvxvw wvxvw, (Updated )

Комментарии (0)

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

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
var p2pStream:P2PStream = this
var client:Object = new Object();
client.onPeerConnect =  function(subscriber:NetStream):Boolean{
	return p2pStream.onPeerConnect()}

nsPublish = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
nsPublish.client = client;

Это AS3 (хотя это было бы говном в AS2 тоже, но там хоть причину можно было понять).

wvxvw wvxvw, (Updated )

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

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

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
/**
 *  @private
 *  The exponent used in the easer function for the main part of the throw animation.
 *  NOTE: if you change this, you need to re-differentiate the easer
 *  function and use the resulting derivative calculation in createThrowMotionPath. 
 */
private static const THROW_CURVE_EXPONENT:Number = 3.0;

...

// Set the velocity for the next loop iteration.  Make sure it matches the actual velocity in effect when the
// throw reaches the end of the list.
//
// The easer function we use for the throw is 1-((1-x)^3), the derivative of which is 3*x^2-6*x+3.
// (I used http://www.numberempire.com/derivatives.php to differentiate the easer function).
// Since the slope of a curve function at any point x (i.e. f(x)) is the value of the derivative at x (i.e. f'(x)),
// we can use this to determine the velocity of the throw at the point it reached the beginning of the bounce.
var x:Number = partialTime / effectTime;
var y:Number = 3 * Math.pow(x, 2) - 6 * x + 3;

Flex 4.5 Hero.
Благо на работу кода это не сказывается, но всё-таки...

Разработчикам: Вообще класс и непосредственно алгоритм touch/kinetic скролла там сделан отвратительно, но с некоторыми весьма хорошими фишками (отпределение скорости, например). Советую вам покопаться.

fljot fljot, (Updated )

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