Показать сообщение отдельно
Старый 05.03.2011, 03:21
AlexCooper вне форума Посмотреть профиль Отправить личное сообщение для AlexCooper Найти все сообщения от AlexCooper
  № 6  
Ответить с цитированием
AlexCooper
 
Аватар для AlexCooper

Регистрация: Sep 2008
Адрес: Черкассы
Сообщений: 1,167
Записей в блоге: 1
Отправить сообщение для AlexCooper с помощью ICQ Отправить сообщение для AlexCooper с помощью Skype™
Код AS1/AS2:
import flash.display.BitmapData;
 
var colors:Array = new Array(["0xFF0000"],["0x00FF00"],["0x0000FF"],["0xFFFF00"],["0x00FFFF"],["0xFF00FF"],["0xFFFFFF"]);
 
for (item in colors)
{
	var newColorBox:MovieClip = _root.attachMovie("colorbox","color"+item,_root.getNextHighestDepth());
		newColorBox._y = 50;
		newColorBox._x = item*(newColorBox._width + 10) + (Stage.width-(newColorBox._width + 10)*(colors.length-1))/2;
 
		color = new Color(newColorBox);
		color.setRGB(colors[item].toString(16));
 
		newColorBox.onPress = drags;
		newColorBox.onRelease = setfill;
}
 
function drags()
{
	this._alpha = 50;
	this.startDrag();
}
 
function setfill()
{
	var imageBitmap:BitmapData = new BitmapData(Stage.width,Stage.height, true, 0x00000000)
	imageBitmap.draw(_root);
 
	colormix = new Color(banka);
	colormix.setRGB("0x"+imageBitmap.getPixel(banka._x,banka._y).toString(16));
 
	this._alpha = 100;
	this.stopDrag();
}
Вложения
Тип файла: rar colormix.rar (5.3 Кб, 43 просмотров)
__________________
return this...