Показать сообщение отдельно
Старый 16.10.2014, 18:41
warning1 вне форума Посмотреть профиль Отправить личное сообщение для warning1 Найти все сообщения от warning1
  № 5  
Ответить с цитированием
warning1

Регистрация: Aug 2008
Сообщений: 92
Нашёл код для изменения оттенка:

Код AS1/AS2:
onClipEvent(load){
	//Import the classes needed to transform the color
	import flash.geom.ColorTransform;
	import flash.geom.Transform;
	//A starting amount to tint the image
	redamount = 0;
	//Is the image getting more red or more blue?
	goingred = true;
}
//Run at the start of each frame
onClipEvent(enterFrame) {
	//if going red is set to true, set the color transform to tint the image more red
	if (goingred) {
		redamount++;
	//otherwise, it is getting more blue
	} else {
		redamount--;
	}
	//the boundaries. If a limit (0 or 64) has been reached, flip from going red to going blue
	if (redamount == 0 || redamount == 64) {
		goingred = !goingred;
	}
	//Declare a new ColorTransform object
	var colorTrans:ColorTransform = new ColorTransform();
	//Set the red offset to the specified amount. Higher is stronger
	colorTrans.redOffset = redamount;
	//when the red offset is low, the blue offset is high, and vice versa. 
	colorTrans.blueOffset = 64-redamount;
	//Create a new Transform object. This is attached to the movieclip 'tintedimage'
	var trans:Transform = new Transform(this);
	//apply the color transform to the transform object
	trans.colorTransform = colorTrans;
}
Как объединить с предыдущим ? (засунуть в слайдер).