![]() |
|
||||||||||
|
|||||||
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | Опции просмотра |
|
![]() |
![]() |
|
|||||
|
Регистрация: Apr 2004
Адрес: Питер
Сообщений: 41
|
Зашол на сайт http://www.metoart.ru/ и обнаружил там интересненькую штучку в низу.Это какой то скроллер,только он двигается в направлении перемещения мышки.Очень интересная чтучка
Господа флэшеры,не могли бы вы мне скинуть какойнибуть похожий исходничёк С уважением Роман
__________________
Это просто праздник какойто |
|
|||||
|
исходник я не подкину, но хочу немного сайт закритиковать
)) ну он слишком уж маленький )) видимо на 640х480 рассчитывали... дуть с моим 1280х960 жуть просто мелипиздричка какая... так низя... |
|
|||||
|
[+1.1 04.03.2006]
|
scroll u menja takoj jestj - sam delal... neochenj praviljno napisan no rabotajet... :/
vecherom vyshlju...
__________________
design is like a puzzle, I`m just trying to solve it now... |
|
|||||
|
Регистрация: Mar 2004
Адрес: Саров
Сообщений: 23
|
Нормальный сайт,, нормальный размер у меня на 1280х1024 смотрится гуд
|
|
|||||
|
Flash Aксакал
Регистрация: Jun 2005
Сообщений: 636
|
только fps побольше поставь - 31 например
MovieClip.prototype.drawRect = function (x, y, width, height, color, alpha) {
this.beginFill(color, alpha);
this.moveTo(x, y);
this.lineTo(x + width, y);
this.lineTo(x + width, y + height);
this.lineTo(x, y + height);
this.lineTo(x, y);
this.endFill();
};
getListPrototype = function () {
var o = new Object ();
o.__proto__ = MovieClip.prototype;
o.offset = null;
o.x1 = null;
o.x2 = null;
o.xMin = null;
o.xMax = null;
o.k = null;
o.destination = null;
o.init = function (offset) {
this.offset = offset;
// вычисляем
var s1 = this.container._width - this.mask._width;
var s2 = this.mask._width - this.offset * 2;
this.xMin = 0;
this.xMax = this.mask._width;
this.yMin = 0;
this.yMax = 50;
this.x1 = this.xMin + this.offset;
this.x2 = this.xMax - this.offset;
this.destination = 0;
this.k = s1 / s2;
this.mask.onEnterFrame = function () {
this._parent.__onEnterFrame ();
};
};
o.__onEnterFrame = function () {
var x = this._xmouse;
var y = this._ymouse;
if (y > this.yMin && y < this.yMax) {
x = Math.max (x, this.x1);
x = Math.min (x, this.x2);
x -= this.x1;
this.destination = - x * this.k;
this.__mover ();
} // end if
};
o.__mover = function () {
var x = this.destination;
var k = (x - this.container._x ) * .3;
if (Math.abs (k) < .3) {
this.container._x = x;
} else {
this.container._x += k;
} // end if
};
return o;
}
getListItemPrototype = function () {
var o = new Object ();
o.__proto__ = MovieClip.prototype;
o.init = function (index, width, height) {
this.drawRect (0, 0, 50, 50, 0x00FFF0, 100);
this.createTextField ('txt', 1, 0, 0, 20, 20);
this.txt.text = index;
this._alpha = 40;
};
o.onRollOver = function () {
this._alpha = 80;
};
o.onRollOut = function () {
this._alpha = 40;
};
return o;
}
main = function () {
var pane = this.createEmptyMovieClip ('pane', 1);
var itemPrototype = getListItemPrototype ();
var itemContainer = pane.createEmptyMovieClip ('container', 1);
// cоздаем айтемы
for (var i = 0; i < 50; i++) {
var mc = itemContainer.createEmptyMovieClip ('item' + i, i);
// назначаем класс
mc.__proto__ = itemPrototype;
mc.init (i, 50, 50);
// позиция
mc._x = 55 * i;
} // end for
// маска
var mask = pane.createEmptyMovieClip ('mask', 2);
mask.drawRect (0, 0, Stage.width, 50, 0x0ff000, 100);
mask._alpha = 0;
// накладываем маску
pane.setMask (mask);
// накладываем прототип
pane.__proto__ = getListPrototype ();
pane.init (50);
};
main ();
|
|
|||||
|
Регистрация: Apr 2004
Адрес: Питер
Сообщений: 41
|
Плиз...скиньте кто нибуть исходничёк,очень нужно
![]()
__________________
Это просто праздник какойто |
|
|||||
|
Ветеран форума
|
Всё же тебе дали ... даже с комментариями ..........
__________________
BestMasterиZация |
|
|||||
|
Регистрация: Mar 2004
Адрес: Саров
Сообщений: 23
|
2 кузен
Он из того же рода что и я =) надо исходник для того чтоб посмотреть как делают ребята, выше чем мы по уровню, поучиться посмотреть, как лучше, как надо =) |
|
|||||
|
[+1.1 04.03.2006]
|
Nu eto kanshno nesovsem to... no mozhet pomozhet... :/
Edit.: neposylajetsja... govorit fajl boljshe 97 Kb (moj 250Kb) ![]()
__________________
design is like a puzzle, I`m just trying to solve it now... |
|
|||||
|
Flash Aксакал
Регистрация: Jun 2005
Сообщений: 636
|
Цитата:
|
![]() |
![]() |
Часовой пояс GMT +4, время: 06:20. |
|
|
« Предыдущая тема | Следующая тема » |
|
|