Показать сообщение отдельно
Старый 28.08.2006, 13:59
fromotherplanet вне форума Посмотреть профиль Отправить личное сообщение для fromotherplanet Найти все сообщения от fromotherplanet
  № 51  
Ответить с цитированием
fromotherplanet

Регистрация: Aug 2006
Сообщений: 60
Вообще вот
Код:
import flash.display.BitmapData;
import flash.geom.Point;
//////
var mc_1:MovieClip = this.createEmptyMovieClip ("mc", this.getNextHighestDepth ());
var myBitmapData:BitmapData = new BitmapData (800, 600, true, 0x00000000);
mc_1.attachBitmap (myBitmapData, this.getNextHighestDepth ());
myBitmapData.draw (mcs);

//////
var mc_2:MovieClip = this.createEmptyMovieClip ("mc2", this.getNextHighestDepth ());
myBitmapData2 = new BitmapData (200, 200, true, 0x00000000);
mc_2.attachBitmap (myBitmapData2, this.getNextHighestDepth ());
myBitmapData2.draw (mcf);
mc_2.startDrag (true);
Mouse.hide ();
/////
var destPoint:Point = new Point (mc_1._x, mc_1._y);
var currPoint:Point = new Point (mc_2._x, mc_2._y);
mc_1.onEnterFrame = function () {
	//currPoint.x = mc_2._x;
//	currPoint.y = mc_2._y;
	myBitmapData2 = new BitmapData (200, 200, true, 0x00000000);
	mc_2.attachBitmap (myBitmapData2, this.getNextHighestDepth ());
	myBitmapData2.draw (mcf);
	if (myBitmapData.hitTest (new Point (this._x, this._y), 100, myBitmapData2, new Point (mc_2._x, mc_2._y))) {
		this._alpha = 50;
	} else {
		this._alpha = 100;
	}
};