Skip to main content

Flash HTML Interface (Pano2VR)

Since Pano2VR 2.0 beta3 it is possible to modify panoramas created for Flash 9 from the HTML page. This allows you to change parameters on the fly, add hotspots or add custom skins for the panorama without recreating them with Pano2VR.

This also simplifies database driven websites because the HTML parameters can be controlled for example with a PHP page.

To control the parameters you need to pass them with FlashVars in the embed code. Some simple parameters can be passed directly, more advanced things can be controlled with XML strings. Please note that you need to encode the XML string to avoid the browser from interpreting the XML code as HTML.

Here is a short example:

<script language="javascript" src="p2q_embed_object.js"></script>
<script language="javascript">
	function htmlEncode(s) {
		var str = new String(s);
		str = str.replace(/&/g, "&amp;");
		str = str.replace(/</g, "&lt;");
		str = str.replace(/>/g, "&gt;");
		str = str.replace(/"/g, "&quot;");
		return str;
	var flashvars,pano;
	pano+='<hotspot pan="10" tilt="10" title="Title Text" url="" />';
	pano+='<hotspot pan="100" tilt="-5" title="Another link with more text" url="" />';
	flashvars="pan=123&tilt=5&panorama=" + htmlEncode(pano);

You can downloaded the required p2q_embed_object.js from here.

See also[edit]

Flash Output Settings (Pano2VR)

Using the Skin Editor