Hello,
I've got a code that was made by someone a while ago.
In that code the thumbnails are aligned on the left side.. Now I want them to be centralized, but I can't find how to change this..
I wandered if someone could help me..
Thanks in advance !
This is the code
Code
<action name="load_thumbnails">
copy(thumb_menu_yoffset, menu.yoffset);
add(thumb_menu_xoffset, menu.xoffset, menu.floor.width);
add(thumb_menu_xoffset, 10);
add(thumb_menu_yoffset, -0);
for(set(scene_count, 0), scene_count LT panoramas.pano.count, inc(scene_count),
<!-- if the panorama is binded to this floor, show the thumbnail -->
if(panoramas.pano[get(scene_count)].floor == floors.current,
<!-- create the thumbnail -->
copy(thumb, scene[get(panoramas.pano[get(scene_count)].name)].thumburl);
txtadd(thumbname,'thumb_', get(panoramas.pano[get(scene_count)].name));
addplugin(get(thumbname));
copy(plugin[get(thumbname)].ref, panoramas.pano[get(scene_count)].name);
copy(plugin[get(thumbname)].tooltip, panoramas.pano[get(scene_count)].tooltip);
if(panoramas.pano[get(scene_count)].name == panoramas.current,
set(plugin[get(thumbname)].active, true);
copy(plugin[get(thumbname)].alpha, menu.thumbnail.active.alpha);
,
copy(plugin[get(thumbname)].alpha, menu.thumbnail.normal.alpha);
set(plugin[get(thumbname)].active, false);
);
set(plugin[get(thumbname)].url, get(thumb));
set(plugin[get(thumbname)].added, true);
set(plugin[get(thumbname)].keep, true);
set(plugin[get(thumbname)].align, topleft);
copy(plugin[get(thumbname)].width, menu.thumbnail.width);
copy(plugin[get(thumbname)].height, menu.thumbnail.height);
<!-- put the buttons under eachother -->
copy(plugin[get(thumbname)].y, thumb_menu_xoffset);
add(thumb_menu_yoffset, get(plugin[get(thumbname)].height));
add(thumb_menu_yoffset, menu.thumbnail.padding);
add(thumb_menu_yoffset, menu.thumbnail.textheight);
copy(plugin[get(thumbname)].x, thumb_menu_yoffset);
<!-- mouse events -->
set(plugin[get(thumbname)].onhover,show_tooltip(get(tooltip)));
set(plugin[get(thumbname)].onover,
ifnot(active,
copy(alpha, menu.thumbnail.over.alpha);
set(css,data:OverCSS);
);
);
set(plugin[get(thumbname)].onout,
ifnot(active,
copy(alpha, menu.thumbnail.normal.alpha);
set(css,data:OverCSS);
);
);
set(plugin[get(thumbname)].onclick,
ifnot(active,
change_location(get(ref));
);
);
set(plugin[get(thumbname)].zorder, 100);
set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000));
set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF');
<!-- create the text above the thumbnail -->
txtadd(thumbtextname,'thumbtext_', get(panoramas.pano[get(scene_count)].name));
addplugin(get(thumbtextname));
set(plugin[get(thumbtextname)].url, %SWFPATH%/plugins/textfield.swf);
copy(plugin[get(thumbtextname)].width, menu.thumbnail.width);
copy(plugin[get(thumbtextname)].height, menu.thumbnail.textheight);
set(plugin[get(thumbtextname)].align, leftbottom);
set(plugin[get(thumbtextname)].keep, true);
set(plugin[get(thumbtextname)].parent, get(thumbname));
set(plugin[get(thumbtextname)].handcursor, true);
set(plugin[get(thumbtextname)].enabled, true);
set(plugin[get(thumbtextname)].edge, lefttop);
set(plugin[get(thumbtextname)].capture, false);
set(plugin[get(thumbtextname)].children, false);
set(plugin[get(thumbtextname)].border, 0);
set(plugin[get(thumbtextname)].bordercolor, 0xFFFFFF);
set(plugin[get(thumbtextname)].effect, glow(0xFFFFFF,0,2,10000));
set(plugin[get(thumbtextname)].jsborder, '');
copy(plugin[get(thumbtextname)].backgroundcolor, menu.backgroundcolor);
<!--set(plugin[get(thumbtextname)].x, get(plugin[get(thumbname)].x));
set(plugin[get(thumbtextname)].y, get(plugin[get(thumbname)].y));-->
set(plugin[get(thumbtextname)].zorder, 190);
set(_thumbtitle, '');
txtadd(_thumbtitle, <p>, get(panoramas.pano[get(scene_count)].title), </p>);
set(plugin[get(thumbtextname)].html, get(_thumbtitle));
set(plugin[get(thumbtextname)].css, data:ThumbnailCSS);
,
<!-- else remove it -->
txtadd(thumbname,'thumb_', get(panoramas.pano[get(scene_count)].name));
if(plugin[get(thumbname)] !== null,
removeplugin(get(thumbname));
);
txtadd(thumbtextname,'thumbtext_', get(panoramas.pano[get(scene_count)].name));
if(plugin[get(thumbtextname)] !== null,
removeplugin(get(thumbtextname));
);
);
);
</action>
Display More
and this goes with
Code
<menu xoffset="0" yoffset="0" backgroundcolor="0x666666" alpha="0.8">
<floor cssbuttons="false" padding="10" width="35" height="35" borderwidth="0" bordercolor="0xFFFFFF">
<normal backgroundcolor="0xFFFFFF" alpha="0.5" />
<over backgroundcolor="0xFFFFFF" alpha="0.9" />
<active backgroundcolor="0xFFFFFF" alpha="0.9" />
</floor>
<thumbnail width="100" height="30" textheight="20" padding="100" borderwidth="0" bordercolor="0xFFFFFF">
<normal alpha="0.2" />
<over alpha="0.6" />
<active alpha="0.8" />
</thumbnail>
</menu>
Display More