Hi all,
I am using Klaus' Thumbbar to show some images. Works great.
Now I would like to have a - lets say 15px white border around the big image. Can somebody help me with this please? What do I have to do?
Thanks
Kai
Hi all,
I am using Klaus' Thumbbar to show some images. Works great.
Now I would like to have a - lets say 15px white border around the big image. Can somebody help me with this please? What do I have to do?
Thanks
Kai
Hi Kai,
A possible code could be adding an effect to the image plugin... like this:
<action name="thumbbar_showimage">
thumbbar_hide_allimages();
set(plugin[%1].zorder, 3);
push(plugin[%1].width);
push(plugin[%1].height);
plugin[%1].resetsize();
copy(plugin[%1].originalwidth, plugin[%1].width);
copy(plugin[%1].originalheight, plugin[%1].height);
pop(plugin[%1].height);
pop(plugin[%1].width);
set(imgwidth, get(plugin[%1].originalwidth));
set(imgheight, get(plugin[%1].originalheight));
set(maxwidth, get(stagewidth));
sub(maxwidth, maxwidth, thumbbar_xborder);
set(maxheight, get(stageheight));
sub(maxheight, maxheight, thumbbar_yborder);
if(imgwidth GT maxwidth,
mul(imgheight, imgheight, maxwidth);
div(imgheight, imgheight, imgwidth);
copy(imgwidth, maxwidth);
);
if(imgheight GT maxheight,
mul(imgwidth, imgwidth, maxheight);
div(imgwidth, imgwidth, imgheight);
copy(imgheight, maxheight);
);
tween(plugin[%1].width, get(imgwidth));
tween(plugin[%1].height, get(imgheight));
mul(tmp, thumbbar_border, 3);
add(tmp, tmp, thumbbar_thumbwidth);
plugin[%1].changeorigin(center,center);
tween(plugin[%1].x, 0);
tween(plugin[%1].y, 0);
set(plugin[%1].effect, glow(0xFFFFFF,1,15,20); );
set(plugin[%1].onclick, thumbbar_hideimage(%1) );
</action>
<action name="thumbbar_hideimage">
plugin[%1].changeorigin(get(thumbbar_align),get(thumbbar_align));
set(plugin[%1].effect, );
set(plugin[%1].zorder, 2);
tween(plugin[%1].width, get(thumbbar_thumbwidth));
tween(plugin[%1].height, get(thumbbar_thumbheight));
tween(plugin[%1].x, get(plugin[%1].thumbx));
tween(plugin[%1].y, get(plugin[%1].thumby));
set(plugin[%1].onclick, thumbbar_showimage(%1) );
</action>
Alles anzeigen
note lines 46 and 53....
Hope this help.
SAlut.
Hi Michel,
thanks. This was exactly what I needed.
Have a great day:-)
Kai
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!