Sie sind nicht angemeldet.

opticalfx

Schüler

  • »opticalfx« ist der Autor dieses Themas

Beiträge: 62

Wohnort: Peterborough, UK

Beruf: Virtual Tour Photographer

  • Nachricht senden

1

Mittwoch, 15. Februar 2012, 17:01

making photos pop up from a button

I spent several hours reading different ways to make a photo pop out when I click on a hotspot and this one seems simple and does all I need.

Quellcode

1
2
<plugin name="spot4" style="mapspot-photo" x="396" y="98" onclick="closemap(); wait(0.5); tween(plugin[bedroom].alpha,1);tween(plugin[bedroom].scale,1); "/>
	<plugin name="bedroom" url="hotspots/bed.jpg" keep="true" handcursor="false" align="center" edge="center" alpha="0" scale="0"  onclick="tween(plugin[bedroom].alpha,0);tween(plugin[bedroom].scale,0);"/>


It simply tweens from alpha and scale = 0 to 1.

That's all works ok but then I wanted to improve the startup action so that it moves to a viewpoint on loading the initial tour, as follows:

Quellcode

1
2
3
4
5
6
7
8
9
<action name="startup">
		<!-- load the first scene  -->
		loadscene(get(scene[0].name), null, MERGE);
		set(view.architectural,1.0);
		lookat(-5, 14); 
		wait(BLEND); 
		lookto(-76,3,100,smooth(100,100,30));

	</action>


When I add these lookat and lookto instructions the photos no longer pop out.

Can anyone see what I'm doing wrong?


The tour and xml are here:
http://www.opticalfx.co.uk/ipadtest/index.html
http://www.opticalfx.co.uk/ipadtest/tour.xml
http://www.opticalfx.co.uk/ipadtest/buttons.xml

The hotspots are the 3 camera icons on the floorplan. They currently work until you add the code above to startup.

Any help greatly appreciated.

Thanks,

Adrian
Many thanks,

Adrian Salisbury, UK
Smart Virtual Tours

opticalfx

Schüler

  • »opticalfx« ist der Autor dieses Themas

Beiträge: 62

Wohnort: Peterborough, UK

Beruf: Virtual Tour Photographer

  • Nachricht senden

2

Mittwoch, 15. Februar 2012, 18:04

Don't worry, I seem to have fixed it myself *smile*

I came across another tour that did what I wanted and I spotted that they put the instructions in the onstart call:

onstart="startup();
set(view.architectural,1.0);
lookat(-5, 14);
wait(BLEND);
lookto(-76,3,100,smooth(100,100,30));">

That seems to work fine.
Many thanks,

Adrian Salisbury, UK
Smart Virtual Tours

hans van dijk

Anfänger

Beiträge: 5

Wohnort: groningen

Beruf: photographer

  • Nachricht senden

3

Mittwoch, 15. Februar 2012, 18:56

photo popup

Hallo Adrian
Can you post the example with the photo popping- up and the xml file. Sounds interesting. Ik spend a week to find a way to pop-up a text. Still cannot find it.
Thanks for posting so far.


Oh I see the photo's popup already in the first file, thanks

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »hans van dijk« (15. Februar 2012, 19:09)