hi, i'm making my first virtual tour for iphone-ipad, i've inserted the links to navigate other scenes but the links are on 2d space with x and y coordinates as you can see here i'd want to put the buttons to change the scene in the 3d space for example over a door or over a window, etc this is the code i use how i have to modify it?? thank you
Code
<krpano version="1.0.8.14" onstart="start();">
<!-- action to create dynamically a textfield based button -->
<action name="createbutton">
txtadd(pname,'button_',%1);
addplugin(get(pname));
set(plugin[%pname].children,false);
set(plugin[%pname].css,p{color:#000000;font-family:Arial;font-weight:bold;font-size:10px;margin-left:5;margin-right:5;text-align:center;});
set(plugin[%pname].backgroundcolor,0xFFFFFF);
set(plugin[%pname].roundedge,5);
set(plugin[%pname].shadow,1);
set(plugin[%pname].borderwidth,0);
set(plugin[%pname].glow,4);
set(plugin[%pname].glowcolor,0xFFFFFF);
set(plugin[%pname].blendmode,layer);
set(plugin[%pname].visible,false);
set(plugin[%pname].onover,tween(alpha,0.7,distance(0.3,0.2)); );
set(plugin[%pname].onout,tween(alpha,1.0,distance(0.3,0.2)); );
set(plugin[%pname].onloaded,set(alpha,0);set(visible,true);tween(alpha,1,0.3););
set(plugin[%pname].html,[p]%1[/p]);
set(plugin[%pname].width,155);
set(plugin[%pname].height,22);
set(plugin[%pname].align,%2);
set(plugin[%pname].x,%3);
set(plugin[%pname].y,%4);
set(plugin[%pname].onclick,%5);
set(plugin[%pname].url,%SWFPATH%/plugins/textfield.swf);
set(plugin[%pname].onhover,showtext(%1 Example, hoverstyle));
</action>
<!-- action to create a textfield based static text
createtext(text, align, x, y, font, fontsize, color, alpha, filter*);
-->
<action name="createtext">
if(txtcnt === null, set(txtcnt,0));
inc(txtcnt);
txtadd(pname,'text_', get(txtcnt));
addplugin(get(pname));
set(plugin[%pname].children,false);
set(plugin[%pname].css,p{color:%7;font-family:%5;font-size:%6;margin-left:5;margin-right:5;text-align:center;});
if(%9 != null, set(plugin[%pname].effect,%9) );
set(plugin[%pname].background,false);
set(plugin[%pname].enabled,false);
set(plugin[%pname].visible,false);
set(plugin[%pname].onloaded,set(alpha,0);set(visible,true);tween(alpha,1,0.3););
set(plugin[%pname].html,[p]%1[/p]);
set(plugin[%pname].align,%2);
set(plugin[%pname].alpha,%8);
set(plugin[%pname].x,%3);
set(plugin[%pname].y,%4);
set(plugin[%pname].url,%SWFPATH%/plugins/textfield.swf);
</action>
<action name="addexample">
createbutton(%1, center, get(xpos), get(ypos), loadpano(%2); );
inc(ypos,30);
inc(buttoncount);
if(buttoncount GE buttonnextrow, inc(xpos,170); set(buttoncount,0); copy(ypos,yposstart); );
</action>
<action name="start">
if(isflash,
createtext('[b][i]krpano 1.0.8.14[br]xml usage examples[/i][/b]', center, 0, -100, Times, 30px, #FFFFFF, 1.0, 'glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);');
set(xpos,-260);
set(ypos,-130);
set(yposstart,-130);
set(buttoncount,0);
set(buttonnextrow,10);
,
createtext('[b][i]krpano 1.0.8.14[br]xml usage examples[/i][/b][br][small](HTML5/krpanoJS)[/small]', center, 0, -100, Arial, 26px, #000000, 1.0);
set(xpos,-90);
set(ypos,-110);
set(yposstart,-110);
set(buttoncount,0);
set(buttonnextrow,9);
);
addexample('Scena 2', '02.xml');
addexample('Scena 3', '03.xml');
addexample('Scena 4', '04.xml');
addexample('Scena 5', '05.xml');
addexample('Scena 6', '06.xml');
if(isflash,
addexample('XML Slider / Cube Blending','examples/xml-usage/slider-blend-cubes/slider.xml');
);
createtext('[i]...and see also the other examples in the %%27examples%%27 folder...[/i]', center, 0, +360, Times, 14px, #000000, 0.5);
ifnot(plugin[button_BACK].loaded,
createbutton(BACK, rightbottom, 32, 32, 'resetkrpano(); loadpano(%SWFPATH%/krpano.xml,null,IGNOREKEEP,BLEND(1));' );
set(plugin[button_BACK].width,70);
set(plugin[button_BACK].zorder,99999);
set(plugin[button_BACK].keep,true);
set(plugin[button_BACK].onhover,null);
);
</action>
<action name="resetkrpano">
<!-- remove all scene/data/action nodes -->
set(scene.count, 0);
set(data.count, 0);
set(action.count, 0);
<!-- stop all timers/tweens -->
breakall();
<!-- if there is a soundinterface - stop all sound -->
if(stopallsounds !== null, stopallsounds() );
<!-- remove all events -->
set(onstart, null);
set(events.onenterfullscreen, null);
set(events.onexitfullscreen, null);
set(events.onxmlcomplete, null);
set(events.onpreviewcomplete, null);
set(events.onloadcomplete, null);
set(events.onloaderror, null);
set(events.onnewpano, null);
set(events.onremovepano, null);
set(events.onkeydown, null);
set(events.onkeyup, null);
set(events.onviewchange, null);
set(events.onclick, null);
set(events.onmousedown, null);
set(events.onmouseup, null);
set(events.onmousewheel, null);
set(events.onidle, null);
set(events.onresize, null);
<!-- remove contextmenu items -->
set(contextmenu.item.count, 0);
<!-- remove custom cursors -->
set(cursors.url, null);
<!-- disable autorotate -->
set(autorotate.enabled, false);
<!-- reset area -->
set(area.x, 0);
set(area.y, 0);
set(area.width, 100%);
set(area.height, 100%);
<!-- enable flash10 -->
set(display.flash10, on);
</action>
Alles anzeigen