Hi!
scaling is not possible, it will be incorrect calculations.
Yes you can use iphone layout for PC , just change devices attribute in include tag.
Regards
Andrey.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »abuethe« (30. Juni 2012, 13:16)
Hi!Hi Andrey,
your IF_defaultBlack Demo introduces also "Buttons with captions" as an feature.
Coud you explani closer how to use it.
Greetz
Mil
Hi!I was wondering if it is possible, to generate automatically bigger
(more width) thumbs for the vtour. And as part of that, is it possible to get the
scene title in or under the thumbs?
Thanks!
Yes, you are right, the info button is not an part of template, it's just example of how to use this code.After building a tour via the mac droplet there is no info button and I don´t see a template to fill it with text as well ?!? Anyone a clue? The rest of the interface works as planned though - good work :)
Edit: ok, I was of course able to copy&paste from the demo - and got it working. But maybe there should be a template to fill out for the info button as well in the code?
|
|
Quellcode |
1 2 3 |
_window_hide(win2); set(plugin[text].html,'data:text_D2'); _window_new_fix(win2,get(curr_txtwin_width),get(curr_txtwin_height),text,p2,R); |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
<action name="_window_new_fix">
<!--
6 args!!!!!
%1 win name
%2 width
%3 height
%4 nname of plugin to show
%5 parent of the text-plane
%6 orientation left/right
-->
ifnot(plugin[%1].loaded,
addplugin(%1);
if(%6 != null,
txtadd(win_align,_window_no_dragable_,%6);
plugin[%1].loadstyle(get(win_align));
,
plugin[%1].loadstyle(_window_no_dragable);
);
set(plugin[%1].width,%2);
set(plugin[%1].height,%3);
sub(plugin[%1].canvas_width,%2,plugin[%1].padding);
sub(plugin[%1].canvas_height,%3,plugin[%1].padding);
if(%5 != null,
set(plugin[%1].parent,%5);
);
addplugin(%1_canvas);
set(plugin[%1_canvas].parent,%1);
plugin[%1_canvas].loadstyle(_window_canvas);
copy(plugin[%1_canvas].width,plugin[%1].canvas_width);
copy(plugin[%1_canvas].height,plugin[%1].canvas_height);
addplugin(%1_sbx);
set(plugin[%1_sbx].parent,%1_canvas);
plugin[%1_sbx].loadstyle(_scrollbar_hor);
div(plugin[%1_sbx].width,plugin[%1_canvas].width,3);
addplugin(%1_sby);
set(plugin[%1_sby].parent,%1_canvas);
plugin[%1_sby].loadstyle(_scrollbar_vert);
div(plugin[%1_sby].height,plugin[%1_canvas].height,3);
<!--addplugin(%1_close);
set(plugin[%1_close].parent,%1);
plugin[%1_close].loadstyle(_window_close);
plugin[%1_close].loadstyle(_button);
_button_init(%1_close);-->
if(%4 != null,
set(plugin[%1].content,%4);
set(plugin[%4].parent,%1_canvas);
_makeScrollable(%4,get(plugin[%1].canvas_width),get(plugin[%1].canvas_height));
copy(sbx_size,plugin[%1].canvas_width);
copy(sby_size,plugin[%1].canvas_height);
set(plugin[%4].dragX,false);
set(plugin[%4].dragY,false);
txtadd(plugin[%4].ondown,_window_set_active(%1););
if(plugin[%4].width GT plugin[%4].scroll_width,
set(plugin[%4].dragX,true);
txtadd(plugin[%4].onDragStart,_window_sb_show(%1,sbx););
txtadd(plugin[%4].onDragEnd,_window_sb_hide(%1,sbx););
sub(sby_size,3);
);
if(plugin[%4].height GT plugin[%4].scroll_height,
set(plugin[%4].dragY,true);
txtadd(plugin[%4].onDragStart,_window_sb_show(%1,sby););
txtadd(plugin[%4].onDragEnd,_window_sb_hide(%1,sby););
sub(sbx_size,3);
);
_scrollbar_autoset(%4,%1_sbx,hor,get(sbx_size));
_scrollbar_autoset(%4,%1_sby,vert,get(sby_size));
);
);
set(plugin[%1].x,0); set(plugin[%1].y,0);
tween(plugin[%1].alpha,1,0.3,easeOutQuad);
_window_set_active(%1);
</action>
<action name="_window_hide">
tween(plugin[%1].alpha,0,0.3,easeOutQuad,set(plugin[%1].y,-20000););
removeplugin(%1_canvas);
removeplugin(%1);
set(plugin[text].html,nothing);
</action>
<style name="_window_no_dragable_R" url="%HTMLPATH%/skin/default_black/alpha0.png" keep="true" alpha="0"
edge="right" align="right" x="0" y="1" oy="0"
scalechildren="false"
padding="20"
onloaded=""
onclose=""
zorder="1100"
ondown="_window_set_active(get(name));"
/>
<style name="_window_no_dragable_L" url="%HTMLPATH%/skin/default_black/win_bg.png" keep="true" alpha="0"
edge="left" align="left" x="0" y="1" oy="0"
scalechildren="false"
padding="20"
onloaded=""
onclose=""
zorder="1100"
ondown="_window_set_active(get(name));"
/>
|
|
|
Quellcode |
1 2 3 4 5 |
for(set(i,0), i LT plugin[%1].thumb.count, inc(i), txtadd(_name,%1_thumb_,get(i)); set(plugin[get(_name)].onhover,your_onhover_action(get(_index));); ); |
|
|
Quellcode |
1 2 3 |
<action name="show_description"> showtext(get(scene[%1].description)); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 |
ifnot(plugin[%1].thumb.count GT 0,
for(set(i,0), i LT scene.count, inc(i), txtadd(plugin[%1].thumb_name,tn_,get(i));
copy(plugin[%1].thumb[get(i)].name,plugin[%1].thumb_name);
copy(plugin[%1].thumb[get(i)].url,scene[get(i)].thumburl);
copy(plugin[%1].thumb[get(i)]._scene,scene[get(i)].name);
set(plugin[%1].thumb[get(i)].onclick,ifnot(plugin[get(parent)].moved,_gotoscene(get(_scene));););
set(plugin[%1].thumb[get(i)].onhover,your_onhover_action() ); ------ add this line -----
);
);
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<!-- load the soundinterface plugin -->
<plugin name="soundinterface"
url="%SWFPATH%/plugins/soundinterface.swf"
alturl="%SWFPATH%/plugins/soundinterface.js"
rootpath=""
preload="true"
volume="0.3"
keep="true"
/>
<!-- start playing the sound -->
<events name="currentpano"
onnewpano="playsound(bgsnd, 'sounds/engine.mp3|sounds/engine.ogg', 0);"
onremovepano="stopsound(bgsnd);"
/>
<!-- button to pause the sound: -->
<plugin name="snd" url="skin/default/soundonoff.png" zorder="10"
align="bottomleft" x="50" y="20" alpha="0.85" scale="1.0"
onover="tween(alpha,1);" onout="tween(alpha,0.70);"
crop="0|0|50|50"
onloaded="if(ismobile,set(scale,1));"
onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
/>
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 |
<plugin style="_button_left" name="_mouse" x="192" crop_normal="266|0|38|30" crop_down="266|30|38|30" crop_active="266|60|38|30" crop_inactive="266|90|38|30" crop_hover="266|120|38|30" switcher="true" switched="false" onswitchon="set(control.mousetype,moveto)" onswitchoff="set(control.mousetype,drag2d)" /> |
