Professional Documents
Culture Documents
0
Interactive Panoramas and Zoom Images in web pages using Flash
Documentation
Contents
1 The PanoramaStudio Viewer 1
1.1 Overview and system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Using the Viewer with the PanoramaStudio application . . . . . . . . . . . . . . . . . . . 1
1.4 Using the Viewer with panoramic images created with other software . . . . . . . . . . . . 1
1.5 Controlling the PanoramaStudio Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.6 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4 Parameters reference 7
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2 XML elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.3 All-purpose attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4 HTML-formatted text in Viewer text fields . . . . . . . . . . . . . . . . . . . . . . . . . . 17
i
1
1.2 Features
• Interactive and platform-independent presentation of panoramas and large images on a local com-
puter as well as on websites in the internet
• Supports partial panoramas as well as full spherical 360x180 degree panoramas
• Fast and performant displaying of nearly arbitrarily large images using dynamic loading
• Highly optimized Flash code - the complete Viewer is just about 100 KB
• Supports spherical, cylindrical and cubic panorama formats
• Controlling the Viewer with JavaScript functions
• Supports hotspots and virtual tours
• Supports simulation of artifical lens flares and allows embedding MP3 sound files for a more realistic
environment
• Auto Play for automatic panning and zooming in the panorama
• User-interaction by mouse, keyboard, and mouse wheel
• Extensive configuration options
1.4 Using the Viewer with panoramic images created with other software
As a matter of principle the Viewer handles and shows all cylindrical and spherical panoramas and also
flat images created with other software. Therefore the images can be imported in the PanoramaStudio
application using File→Import/Export→Import panoramic image... and then converted and exported for
the Viewer.
2 1 THE PANORAMASTUDIO VIEWER
1.6 License
License agreement
PanoramaStudio Viewer - Version 3.0
for Adobe Flash Player Version 9 or higher
Copyright
c 2005-2010, Tobias Huellmandel Software
Internet: http://www.tshsoft.com
E-Mail: support@tshsoft.com
2. COMMERCIAL/PRIVATE USE:
2.1 PRIVATE USE
The private/non-commercial use of the Software,
also in the internet, is free and does not require an additional license.
3. LICENSE RESTRICTIONS:
3.1 You may not use this Software in a way other than allowed in this
License.
3.2 You shall not use an UNREGISTERED copy of the Software on
a commercial internet presence after the end of a 30-day trial
period.
3.3 You may not alter, modify, adapt or translate the Software, or
decompile, reverse engineer, or disassemble the Software.
3.4 You may not modify the Software or create derivative works based
upon the Software.
Purchase a License
According to the above license agreement a license key is needed for the commercial use of the
PanoramaStudio Viewer on the internet after a 30-day trial period. For such a commercial use you
can buy your license at the registration service Share-It!. With the purchase you will get a license key
compatible to the domain name of your internet presence.
• The right to use the PanoramaStudio Viewer on a commercial website. The number of panoramas
showed with a licensed copy of the Viewer on a website is not limited.
• The option to show your own logo in the Viewer window.
• Free support.
Customer service
Do you have questions about your order, payment or the delivery? Do you have already ordered a
product and want to check your data? You will find the answers at the Customer Care Center of Share-
It!: http://shareit1.element5.de/ccc/index.html?publisherid=20959&languageid=1
5
The PanoramaStudio Viewer itself is involved here as file panoStudioViewer.swf. All required
parameters for the description and configuration of the panorama or zoom image are contained in a
XML file. The XML file is assigned here using the FlashVars parameter ’pano=...’. The following
example has the pano parameter in the <object> and <embed> tag assigned to the parameter file
MyPanorama.xml. You find a detailed description of the structure of this XML file in chap. 4 (→ S.7).
Optionally the panorama has in its object tag with id and in its embed tag with name a labeling which
allows to control the panorama from within a webpage using JavaScript.
<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="1024" height="480" id="pano1"
codebase="http://active.macromedia.com/flash9/cabs/swflash.cab#version=9,0,28,0">
<param name="movie" value="panoStudioViewer.swf" />
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="pano=MyPanorama.xml" />
<embed src="panoStudioViewer.swf" width="1024" height="480"
type="application/x-shockwave-flash" name="pano1"
allowScriptAccess="always" allowNetworking="all" allowFullScreen="true"
FlashVars="pano=MyPanorama.xml"
pluginspage="http://www.macromedia.com/go/getflashplayer" >
</embed>
</object>
on the local computer. This means, JavaScript commands work for the PanoramaStudio Viewer
only if it runs on a webserver or in a local folder which is explicitely enabled with the Flash se-
curity manager. You can open the Flash security manager online and add folders here: http:
//www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
• void startAutoPlay()
Starts the Auto Play.
• void stopAutoPlay()
Stops the Auto Play.
• void toggleHotspots()
Shows/Hides the hotspots.
• void showToolbar()
Shows the toolbar in the Viewer window.
• void hideToolbar()
Hides the toolbar.
• boolean isPlaying()
Checks, if the Auto Play is active.
JavaScript examples
Here is an example of a JavaScript action on an <a href> tag. The Auto Play direction will be changed
here: <a href=# onClick="document.MyPanorama.setAutoPlay(-2.0,-1.0,1.0);">Change direction</a>
4 Parameters reference
4.1 Overview
All parameters regarding the properties of the panorama and the appearance of the Viewer are stored in
a XML file.
The structure of the XML file for a Viewer panorama contains the XML declaration followed by the
<panoramaStudioViewer> element with a version attribute which must be 3.0 for the current version.
The XML declaration contains the XML version and the character encoding. For the PanoramaStudio
Viewer this must be:
All required parameters are specified within the <panoramaStudioViewer> element. Each parameter is
a XML element itself. Here is a list of all valid child elements of the <panoramaStudioViewer> element:
</panoramaStudioViewer>
8 4 PARAMETERS REFERENCE
<image>
Specification of the image data. The <image> element and the image data should be created automati-
cally using the PanoramaStudio application. You should not edit or change this section.
Attributes:
Sub-elements:
• <bitmap> - image data of the panorama or zoom image. If multilevel=’true’ then the Viewer
expects multiple bitmap elements of the image in different resolutions.
Attributes:
– width - [Integer], width of the overall image for this bitmap element
– height - [Integer], height of the overall image for this bitmap element
– tilesize - [Integer], width/height of an image tile in this bitmap element, if the image is
split up in tiles.
– src - [String]. URL of a JPG image file or a template for a series of JPG image tiles. If the
image is split up in tiles, then %x and %y is used as placeholder for the x and y coordinates
in the URL of the image tile. Leading zeros i.e. for a three digit number are expressed with
%00x.
Example:
<bitmap width=’22705’ height=’7918’ tilesize=’841’
src=’pano1/pano1.tiles/l4 %0y %0x.jpg’/>
Sub-elements of bitmap:
– <left>, <right>, <front>, <back>, <up>, <down> - In a cubic panorama the
bitmap element expects the six cube faces in this sub-elements. The src attribute contains
the image file name or the template for the image tiles as otherwise in the src attribute of
the bitmap element. width and height in the parent bitmap element must be identical and
describe the size of a cube face.
• <preview> - Preview image
Attributes:
– src - [String], Path of a JPEG image file
– rotate - [String], For cubic panoramas the preview image must be a horizontal strip of the
six cube faces. The rotate attribute contains optionally an encoded instruction on how to
rotate the six cube faces. It must be a string of 6 characters. 0 means no rotation for that
face, 1: 90 degrees, 2: 180 degrees, 3: 270 degrees.
Example: rotate=’001122’
4.2 XML elements 9
<settings>
The settings element allows to configure the memory management and the properties for loading and
decoding images.
Attributes:
• maxdatamem - [Integer], maximum allowed cache memory for compressed JPEG image files in MB
(default: 50, min: 4, max: 500)
• maximgmem - [Integer], maximum allowed cache memory for decoded image data in MB (default:
300, min: 100, max: 1500)
• decodequeues - [Integer], maximum number of simultaneous image decoding jobs (default: 3, min:
1, max: 10)
<quality>
Attributes:
• flash9quality - [Integer], sets the quality for the Flash 9 mode. Levels: 0: lowest quality/fastest,
1: low, 2: medium, 3: high, 4: dynamic (default: 1)
<view>
Attributes:
• x - [Number], horizontal position of the viewer in a zoom image in the range of 0 (left) to 1 (right)
(default: 0.5)
• y - [Number], vertical position of the viewer in a zoom image in the range of 0 (top) to 1 (bottom)
(default: 0.5)
• zoom - [Number], zoom setting for zoom images. A value of 0 shows the image completely zoomed
out, a value of 1 shows the image in its original size (default: 0)
• mode - [String], mode for zoom images, fillWindow: the image can be zoomed out as far as it
still fills the window or fitInWindow: The image can be zoomed out until it fits completely in the
window (default: ’fitInWindow’)
10 4 PARAMETERS REFERENCE
<camera>
Camera properties. Limits the minimum and maximum zoom allowed. Defines the covered field-of-view
for partial panoramas.
Attributes:
• minpan - [Number], the left boundary of the panoramic image in degrees (default: 0)
• maxpan - [Number], the right boundary of the panoramic image (default: 360)
• mintilt - [Number], the upper boundary of the panoramic image (default: -90)
• maxtilt - [Number], the lower boundary of the panoramic image (default: 90)
• minhfov - [Number], minimum horizontal field-of-view. This limits the maximum magnification
(default: 0.000000001)
• maxhfov - [Number], maximum horizontal field-of-view (default: 140)
• maxzoom - [Number], maximum possible magnification of the image pixels (alternative to the
parameter minhfov) (default: 10)
<hotspots>
Attributes:
• visible - [Boolean], if set to true the hotspots are always visible, else only if the mouse cursor
hovers over a hotspot (default: ’true’)
<hotspot>
Attributes:
• href - [String], Destination URL. Valid URLs are webpages or another panorama using the XML
parameter file as URL (see also target)
• target - [String], HTML target. If using the keyword myself here, then the href attribute expects
a XML parameter file of another panorama which will be opened in the same Viewer window, else
this attribute has the same meaning as in HTML.
• targetview - [String], command list, which allows setting an initial view for the new panorama
(read also cmd in openPanorama in chap. 3.3 (→ S.5) )
• transition - [String], command list, where you can configure a transition effect when open-
ing another panorama. Specification using an example: ’zoomin,1.0 ; blend,2.0’ Here the
zoomin,1.0 initiates a zoom on the clicked hotspot within a period of 1.0 seconds, following a fade
into the new panorama (blend) within 2.0 seconds.
• path - [String], path specifying a polygon hotspot. path contains a closed polygon of coordinates
using the notation ’x1, y1 ; x2 ,y2 ; x3, y3, ....’. You can easily create such polygon hot-
spots using the hotspots tool in PanoramaStudio.
4.2 XML elements 11
Sub-elements:
• <textbox> - Shows a textbox element as tooltip for the hotspot (read also <textbox> element).
Only the position of the tooltip is not declared with the corresponding textbox attributes but with
the displaytext attribute of the hotspot, if a textbox is used as tooltip.
<lensflare>
Attributes:
• pan - [Number], horizontal position of the lens flare in degrees (min: 0, max: 360)
• tilt - [Number], vertical position of the lens flare in degrees (min: -90, max: 90)
• type - [Integer], type of the lens flare. There are 7 pre-defined types (min: 0, max: 6)
• brightening - [Number], brightening of the scene if the view is directed to this light source (default:
0.8, min: 0, max: 1)
• scale - [Number], size of the glares for this lens flare (default: 1, min: 0.1, max: 10)
<progress>
Progress indicator while loading image data for the panorama or zoom image
12 4 PARAMETERS REFERENCE
Attributes:
• type - [String], type of the indicator, valid entries are ’textOnly’: progress is displayed as text-
only, ’progressBar’: progress bar with text, ’progressIndicator’: circular progress indicator
with text.
• showtext - [Boolean], if ’true’, progressBar and progressIndicator have an additional text
displaying the status, ’false’ otherwise (default: ’true’)
• text - [String], if defined, this replaces the default text of the progress indicator. As placeholder
%d is used for the progress in percent. The string can be formatted using some basic HTML tags
(read also HTML-formatted text in Viewer text fields).
Example: text=’{i}Loading: %d%{/i}’
• style - (see style attribute)
• filters - (see filters attribute)
• align - (see align attribute)
• xoff - (see xoff attribute)
• yoff - (see yoff attribute)
<key>
Element containing the license key. A license key is necessary if the Viewer is used on a commercial
website. Please read the license conditions for more information regarding the commercial use of the
Viewer. Example:
<key>123456789</key>
<sound>
Attributes:
• src - [String], URL of a MP3 file
• loop - [Boolean], play sound file in an infinite loop (default: ’true’)
• directional - [Number], if defined, this attribute allows to place the source of the sound on a
certain direction in the panorama so that is plays from this direction. As source direction you can
set the horizontal angle in degrees (default: 0, min: 0, max: 360).
<logo>
The <logo> element allows to insert an own logo replacing the Viewer logo, if the Viewer runs on the
local computer or online with a license for commercial use (see <key>)
Attributes:
• src - [String], URL of a logo image file (GIF, PNG, or JPEG).
• href - [String], target URL of the webpage opened when the logo is clicked.
• target - [String], HTML target.
• align - (see align attribute )
• xoff - (see xoff attribute )
• yoff - (see yoff attribute )
4.2 XML elements 13
Sub-elements:
– <textbox> - Shows a textbox element as tooltip for the logo (see <textbox> element). Only
the position of the tooltip can not be declared with the corresponding textbox attributes but
is always attached to the mouse when the mouse hovers over the logo.
<control>
Attributes:
• mousemode - [String], control mode. Valid entries: ’move’, the camera pans in the direction the
mouse is moved. ’drag’ the image/panorama can be dragged with the mouse.
• mousemass - [String], mouse mass (only if mousemode=’move’). With the mouse mass you can
assign inertia to the mouse actions. This allows smooth acceleration and deceleration when panning
the camera with the mouse. (default: 0.5, min: 0.1, max: 2.0)
• mousesensitivity - [String], with the mouse sensitivity (only if mousemode=’move’) you can
affect the force and velocity of the camera movements initiated by mouse interactions. (default:
1.2, min: 0.1, max: 2.0)
<autoplay>
Attributes:
• status - [String], valid entries: ’on’ or ’off’ to switch the Auto-Play on or off.
• pan - [Number], for panoramas, horizontal panning speed in degrees per second (values <0 to the
left, values >0 to the right).
• tilt - [Number], for panoramas, vertical panning speed in degrees per second (values <0 to the
top, values >0 to the bottom).
• x - [Number], for zoom images, horizontal scrolling speed in parts of the image width per second
(values <0 to the left, values >0 to the right).
• y - [Number], for zoom images, vertical scrolling speed in parts of the image height per second
(values <0 to the top, values >0 to the bottom).
• zoom - [Number], zoom in or zoom out. Values less than 1.0 perform a zoom in, values bigger than
1.0 perform a zoom out.
• restart - Restart of the Auto-Play after an interruption due to an user interaction in seconds
(default: 5.0, min: 0, max: 1000)
<border>
Attributes:
• visible - [Boolean], show border (default: ’false’)
• color - [Integer], border color in hexadecimal or HTML notation.
<toolbar>
Shows a toolbar with buttons to navigate and to switch the Auto-Play and Hotspots on/off. Besides
a number of predefined designs and layouts the toolbar is also fully configurable with own layouts and
designs. Therefore it has a lot of attributes which allow modifying the look of the toolbar in nearly every
detail.
Attributes:
• visible - [Boolean], shows the toolbar. (default: ’true’)
• layout - [Integer], selection of three different default layouts for the buttons (default: 0, min: 0,
max: 2)
• design - [Integer], selection of 14 different predefined designs for the buttons of the toolbar (default:
0, min: 0, max: 13)
• filters - (see filters attribute)
• fullscreenbutton - [Boolean], shows a button in the toolbar to toggle the fullscreen mode (default:
’true’)
• playbutton - [Boolean], shows a button to start/stop the Auto Play (default: ’true’)
• hotspotsbutton - [Boolean], shows a button in the toolbar to show/hide the hotspots in the
panorama (default: ’true’)
• buttonwidth - [Integer], width of the buttons in pixels (default: 32, min: 8, max: 256)
• buttonheight - [Integer], height of the buttons in pixels (default: 28, min: 8, max: 256)
• buttonrounded - [Integer], draw the buttons with rounded edges (default: 10, min: 0, max: 256)
• tweentime - [Number], duration of the transition between the button states (normal, onHover,
and onMouseDown) (default: 0.3, min: 0, max: 10)
• fillcolor - [String], attribute for the fill color of the buttons. This can be a directed color gradient
for each of the button states normal, onHover, and onMouseDown. The enumeration of the states
is split with a semicolon, where the last two states are optional. For each state the color or color
gradient is described within [] brackets. Colors are specified in hexadecimal or HTML notation,
followed by an optional direction parameter for the direction of the gradient. In a color gradient
the colors will be uniformly distributed. Example for a gradient with two color in each of the three
states:
fillcolor=’[#222277,#47c4ee],90; [#4444cc,#69cdee],90 ; [#4444ff,#a0e7ff],90’
• fillalpha - [String], enumeration of the transparency of the fill color for the buttons in the three
states. 0 is completely transparent, 1 opaque. Example:
fillalpha=’0.5 ; 0.7 ; 1.0’
• linecolor - [String], this is the attribute for the border colors of the buttons. These can be
optionally directed color gradients as in fillcolor. See also fillcolor
• linealpha - [String], transparency of the border color of the buttons, the same as fillalpha is
for the inside area of the buttons.
• linethickness - [String], defines the line thickness of the border around the buttons. It is an
enumeration of the three button states split with semicolons. Example:
linethickness=’1.5 ; 2.0 ; 2.0’
4.2 XML elements 15
• shapecolor - [String], defines the color of the symbols on the buttons in the three possible button
states. These can be directed color gradients optionally. See also fillcolor
• shapealpha - [String], transparency of the symbols on the buttons, same as fillalpha is for the
button area.
Sub-elements:
<customlayout>
<button idx=’0’ type=’7’ position=’-1’ />
<button idx=’1’ type=’8’ position=’1’ xoff=’4’ yoff=’0’ indent=’false’/>
<button idx=’2’ type=’2’ position=’1’ xoff=’4’ yoff=’0’ />
<button idx=’3’ type=’3’ position=’1’ xoff=’4’ yoff=’0’ />
<button idx=’4’ type=’4’ position=’1’ xoff=’4’ yoff=’0’ />
<button idx=’5’ type=’5’ position=’1’ xoff=’4’ yoff=’0’ />
<button idx=’6’ type=’0’ position=’1’ xoff=’4’ yoff=’0’ />
<button idx=’7’ type=’1’ position=’1’ xoff=’4’ yoff=’0’ />
<button idx=’8’ type=’6’ position=’1’ xoff=’4’ yoff=’0’ />
</customlayout>
<textbox>
The <textbox> element for displaying text is used amongst others as tooltip for the hotspot and
<logo> element, but can also be used directly for displaying text in the panorama.
16 4 PARAMETERS REFERENCE
Attributes:
• text - Contains the (HTML formatted) text. See also 4.4.
• style - (see style attribute )
• filters - (see filters attribute )
• alpha - [Number], transparency of the textbox, 0: completely transparent, 1: opaque (default: 1.0,
min: 0.0, max:1.0)
• background - [Boolean], show text in front of a background (default: ’false’)
• backgroundcolor - [Integer], background color in hexadecimal or HTML notation.
• width - [String], fixed width for the textbox, even if the text is just one line which is smaller than
this width. Valid entries in percent (%) or pixels (px). Example:
width=’33%’
width=’250px’
• maxwidth - [String], if width is not defined, you can define with maxwidth a maximum width.
Especially for a single-line text with background which is smaller than maxwidth the width of the
textbox will be adjusted. For longer texts maxwidth causes an automatic line break. Valid entries
in percent (%) or pixels (px). Example:
maxwidth=’33%’
maxwidth=’250px’
<include>
<include> allows including further XML parameter files. An include file has the same structure than
the main XML. Within the <panoStudioViewer> element you can declare properties and elements to
configure the currently displayed panorama. This allows to store settings and parameters used by several
panoramas into one external include file (i.e. custom toolbars).
Attributes:
• src - [String], URL of an include file
<addon>
• style - [String], elements like <progress> and <textbox> allow formatting the displayed text
using a subset of CSS. Therefore you have the following CSS properties: color, font-color,
font-family, font-size, font-style, and text-align. A complete list and documentation can
be found here: http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/
text/StyleSheet.html
You can assign CSS properties in the style attribute either globally or even for individual tags.
4.4 HTML-formatted text in Viewer text fields 17
Example 1:
style=’color: #00ffff; font-family: Arial,Helvetica,sans-serif;
font-size: 15px; font-weight: normal; display: inline’
Example 2:
style=’body {color: #ffffff; font-family: Arial,Helvetica,sans-serif;
font-size: 10px; font-weight: normal; display: inline; } p { font-size:20; }
’
• filters - [String], some elements like <progress>, <toolbar>, and <textbox> allow applying
some visual effects using a set of filters. You can apply a combination of multiple filters. The
specification is written as a enumeration of the filter name followed by an array of optional
parameters. More filters can follow after a semicolon. The syntax has the notation filtername1,
param1, param2, ... ; filtername2, param1, param2, ... ; ...
As filters you have: glow, blur, dropshadow und bevel. The filters are identical to the correspon-
dent filters in the Flash API. The optional parameters are also identical to the parameters in the
constructors of these filters:
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/filters/
GlowFilter.html
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/filters/
BlurFilter.html
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/filters/
DropShadowFilter.html
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/filters/
BevelFilter.html
Example:
filters=’glow, 0x0000ff ,1,2.0,2.0,3,1 ; glow,0,0.5,6.0,6.0,1,1 ; dropshadow’
• align - [String], Alignment of an element in the window, possible values left, top, right, bottom,
lefttop, leftbottom, righttop, rightbottom, and center
• xoff - [Integer], offset to the left (<0) or to the right (>0)
• yoff - [Integer], offset to the top (<0) or to the bottom (>0)
Example: