Sie sind nicht angemeldet.

1

Mittwoch, 2. März 2011, 07:52

how to do this effect

hi all
I want this effect:
before open/load the pano, i want to preload a infomation plugin in the center screen, it's a pic or text, just a introduction of the pano.
if i click the info area, then load the whole pano clearly;
if i dont click the info area, it just load the preview.jpg pano or do nothing!
how to set the code?
thanks

Quellcode

1
2
3
4
5
6
7
8
9
10
<krpano version="1.0.8" onstart="set(plugin[info].visible,true)">
	<plugin name="info"
			url="info.jpg"
			align="center"
			edge="center"
			visible="false"
			preload="true"
			onclick=""
			/>
</krpano>

2

Mittwoch, 2. März 2011, 16:02

Are you using scenes? Do you have a command to select the scene on start? Why not set visible="true" and not use the on start command? If you are using scenes you will probably need to add keep="true" to that plugin too.

3

Mittwoch, 2. März 2011, 17:24


Hello!

try this:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<scene name="bath" >
  <preview type="CUBESTRIP" url="panoramas/bath_preview.jpg" />
  <plugin name="button" url="button.png" x="10" y="10" edge="lefttop" align="lefttop" keep="true" scale="1"
     onclick="loadscene(bath); setsceneimage(panoramas/bath); "
  />
</scene>

<action name="setsceneimage">
   txtadd(url, %1, "_l.jpg" ); set(image.left.url, get(url) );
   txtadd(url, %1, "_f.jpg" ); set(image.front.url, get(url) );
   txtadd(url, %1, "_r.jpg" ); set(image.right.url, get(url) );
   txtadd(url, %1, "_b.jpg" ); set(image.back.url, get(url) );
   txtadd(url, %1, "_u.jpg" ); set(image.up.url, get(url) );
   txtadd(url, %1, "_d.jpg" ); set(image.down.url, get(url) );
</action>


for hide button use set(plugin[button].visible, false); in setsceneimage action.

Result:
first load only preview
onclick button will load cube images

Good luck!
Hope this help!
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

4

Freitag, 4. März 2011, 06:52

Thanks boss
your code enlignten me, and i made some change, and get the effect I desired,
thanks very much

5

Freitag, 4. März 2011, 09:29

Welcome! *thumbsup*
glad to help you
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Ähnliche Themen