
21.09.2005, 15:16
|
|
Регистрация: Jul 2005
Сообщений: 93
|
А разобрался сам без ХитТеста... Кому интересно это выглядет примерно так:
onClipEvent (enterFrame) {
if (_root.but._x < _root.gr._x) {
_root.but._x = _root.gr._x;
}
if (_root.but._x + _root.but._width > _root.gr._x + _root.gr._width) {
_root.but._x = _root.gr._x + _root.gr._width - _root.but._width;
}
if (_root.but._y < _root.gr._y) {
_root.but._y = _root.gr._y;
}
if (_root.but._y + _root.but._height > _root.gr._y + _root.gr._height) {
_root.but._y = _root.gr._y + _root.gr._height - _root.but._height;
}
}
|