Просмотр полной версии : Создание zoomer`а на флеше
http://zoomify.com/
в верхней части страницы есть интересненький увеличитель.
Вот КАК такой сделать?
Расковырял свфку, но просто потонул в коде. Если есть у кого идеи или технологии как такое сделать (хотя бы в общих чертах), поделитесь, пожалуйста!
Ну а если у кого есть и исходник (а вдруг!), опишите его действие.
Очень надо!
Подгружается несколько фоток, потом по мере увелечения подгружаются фотки более большого размера ... грамотно реализовать подобное не так просто как кажется ...
motor4ik
12.01.2006, 18:23
это точно, структурировано все должно быть...а когда увеличиваешь это просто обман, те подсовывают размытый клип, который банально увеличивается в размерах а потом заменяется картинкой с большим масштабом :=)
Да это понятно.. ты бы видел код. там точно структурировано.
А вот КОНКРЕТНЫЕ идеи есть?
А что конкретно тебе нужно ?! Конкретные вопросы есть ?!
...
function zoomifyToolbarClass()
{
this.gSliderIsDown = false;
this.gSliderY = 0;
callbackName = targetPath(this) + ".viewChangedCallback";
this.getImageInstance().registerCallback("View", callbackName);
this.update();
} // End of the function
zoomifyToolbarClass.prototype = new MovieClip();
Object.registerClass("ZoomifyToolbarSymbol", zoomifyToolbarClass);
zoomifyToolbarClass.prototype.viewChangedCallback = function (instance, x, y, zoom)
{
this.adjustSlider();
};
zoomifyToolbarClass.prototype.update = function ()
{
this.ZoomSlider_mc._visible = this._showSlider;
};
zoomifyToolbarClass.prototype.setSliderVisibility = function (sliderVisibility)
{
this._showSlider = sliderVisibility;
this.update();
};
zoomifyToolbarClass.prototype.adjustSlider = function ()
{
if (this.gSliderY == 0)
{
this.gSliderY = this.ZoomSlider_mc._y;
} // end if
var currZoom = this.getImageInstance().getZoom();
var minZoom = this.getImageInstance()._minZoom;
var maxZoom = this.getImageInstance()._maxZoom;
if (maxZoom == -1)
{
maxZoom = this.getImageInstance().calculateScreenZoom();
} // end if
if (minZoom == -1)
{
minZoom = this.getImageInstance().calculateScreenZoom();
} // end if
var toolbarWidth = this.background_mc._width;
this.ZoomSlider_mc._x = -toolbarWidth / 2 + toolbarWidth * ((currZoom - minZoom) / (maxZoom - minZoom));
this.ZoomSlider_mc._y = this.gSliderY;
};
zoomifyToolbarClass.prototype.sliderDragged = function ()
{
if (this.gSliderIsDown == true)
{
if (this.gSliderY == 0)
{
this.gSliderY = this.ZoomSlider_mc._y;
} // end if
var currZoom = this.getImageInstance().getZoom();
var minZoom = this.getImageInstance()._minZoom;
var maxZoom = this.getImageInstance()._maxZoom;
if (maxZoom == -1)
{
maxZoom = this.getImageInstance().calculateScreenZoom();
} // end if
if (minZoom == -1)
{
minZoom = this.getImageInstance().calculateScreenZoom();
} // end if
var toolbarWidth = this.background_mc._width;
if (this.ZoomSlider_mc._x > toolbarWidth / 2)
{
this.ZoomSlider_mc._x = toolbarWidth / 2;
} // end if
if (this.ZoomSlider_mc._x < -toolbarWidth / 2)
{
this.ZoomSlider_mc._x = -toolbarWidth / 2;
} // end if
var sliderX = this.ZoomSlider_mc._x;
var newZoom = minZoom + (maxZoom - minZoom) * ((sliderX + toolbarWidth / 2) / toolbarWidth);
this.ZoomSlider_mc._y = this.gSliderY;
this.getImageInstance().setZoom(newZoom);
} // end if
};...
вот это - часть кода. очень небольшая его часть. Поможешь разобраться?
Буду очень благодарен за ссылку на статьи по работе с классами, прототипами и всей похожей лабудой
У-у-у-у нет , проще сделать самому ... и вообще не советую сразу хвататься за такие вещи, с флешом то небось не больше месяца ...
Значит, не советуешь, да? Ну, тогда я конечно так и поступлю.
Еще бы, я сам и буду делать. Просто хотел сперва послушать умных людей, мож что присоветовали бы, или может кто опыт имел. А то, что они подгружаются в зависимости от масштаба и положения - это и так видно с первого взгляда.
А больше ничего знать и ненужно ...
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.