News Examples Documentation Download Buy Forum Contact

Documentation

Plugins

XML Extensions

Tools


Third Party Software
for krpano

NOTE: This page is from an older version, see the latest version here.

krpano XML Reference Version 1.0.7

krpano uses simple xml files for storing the panorama settings. These files can be written or edited with a normal texteditor, but the xml-syntax-rules must be respected!

For more information about the basic XML syntax look here:

http://www.w3schools.com/xml/xml_syntax.asp



The schematic base structure of a krpano xml file version 1.0.7
(the sub-nodes can be in any order)

click to a xml node to view details about it:
<krpano attributes>
    <image attributes> ... </image>
    <preview attributes />
    <display attributes />
    <view attributes />
    <plugin attributes />
    <hotspot attributes />
    <hotspot attributes> ... <point ... /> </hotspot>
    <events attributes />
    <action attributes> ... </action>
    <control attributes />
    <autorotate attributes />
    <contextmenu attributes />
    <progress attributes />
    <network attributes />
    <memory attributes />
    <security attributes />
    <textstyle attributes />
    <lensflareset attributes> ... </lensflareset>
    <lensflare attributes />
    <include attributes />
    <data attributes> ... </data>
</krpano>

The root node is <krpano>. Within this node there are all other child nodes. "attributes" is a placeholder for the attributes of the node.

NOTES for the "url" attribute:

  • the "url" attribute is a special one
  • the paths defined with it, are relative to XML file where it was defined
  • it is also possible to use these placeholders to specify the full path:
    • %FIRSTXML% - path of the first loaded xml file
    • %CURRENTXML% - path of the current loaded xml file
    • %SWFPATH% - path of the swf file
    • %HTMLPATH% - path of the html file

Description of all nodes - krpano version 1.0.7

<krpano>
the root node of a krpano xml file

attributes:
  • version
    krpano version used when creating the xml file,
    NOTE - this version number is used to be downward compatible,
    that's important for older plugins or javascript interface examples

    - versions lower or equal then 1.0.5 have a "string"-based get/set interface
    - versions higher then 1.0.5 have a "type-correct" get/set interface
  • onstart
    action that will performed at the start of the viewing.
  • basedir
    base directory for the loadpano action commands.
    this can be a relative or a absolute path,
    the path can include this placeholders:
    • %FIRSTXML% - path of the first loaded xml file
    • %CURRENTXML% - path of the current loaded xml file
    • %SWFPATH% - path of the swf file
    • %HTMLPATH% - path of the html file
    the defaultvalue is %FIRSTXML%, that means the paths of all all following loaded XML files by the loadpano() action are relative to the first loaded XML file.

    VERSION NOTES / UPDATE NOTES:
    the behavior of version older than 1.0.6 can be restored by setting
    "basedir" to %CURRENTXML%
  • logkey
    disable the 'O' key, which switch the log window on/off
    allowed values: true or false, default is true
    note: this parameter is only checked once at startup
  • actionintervalbase
    base of interval actions: (for movments like lookto,tween,...)
    • "timer"
      • movement based on time
      • constant time interval (as good as possible)
      • the number for frames for the movement depends on the power of the computer (when reloading also on the internet connection) (more frames and smoother moving on faster computers and less frames and maybe jerky moving on slower ones)
    • "frame"
      • movement based on frame
      • always the same number of frames are used for a movement
      • the time of the movement depends on the power of the computer (short time on faster computers and longer time on slower ones, but always smooth)
      • when doing scripted "zooms" in multiresolution panoramas this helps to keep the movment smooth when tiles are reloaded
example code - start with a move to 45,2 and fov 120:
<krpano version="1.0.7" onstart="lookto(45,2,120);">
    ...
</krpano>
example code - disable 'O'-key and set actionintervalbase to frame:
<krpano version="1.0.7" 
        logkey="false" 
        actionintervalbase="frame"
        >
    ...
</krpano>

<image>
The Panorama Image
- set the type of the panorama image
- the paths to the image files
- when tiled or multiresolutions - the tilesize and the size of image

attributes:
  • type - type of the panorama image (must be defined)

    allowed values:
    SPHERE - for spherical / equirectangular panorama images
    CUBE - for six single cube side images
    CUBESTRIP - the six cube images in one image strip

    Depending on type there are different child-nodes:
    Child nodes for type="SPHERE"
    Child nodes for type="CUBE"
    Child nodes for type="CUBESTRIP"
  • tiled
    is the image tiled or not
    true or false, default=false

    if tiled=true then the url of the image should have placeholders for the tileindex
    placeholders:
    for the horizontal tile index:  %u, %x, %h or %c
    for the vertical tile index:    %v, %y or %r
    
    there can be one or more "0" between the "%" and the "u,x,c,v,y,r" to align the number and fill the space with 0's.

    examples:
    tile_%y_%x.jpg    ->
         tile_1_1.jpg,    tile_1_2.jpg,   ... tile_8_16.jpg
    
    tile_%0y_%0x.jpg  ->
         tile_01_01.jpg,  tile_01_02.jpg, ... tile_08_16.jpg
    
    tile%00V%00U.jpg  ->
         tile001001.jpg,  tile001002.jpg, ... tile008016.jpg
    
  • tiledimagewidth
    image width of the whole tiled image
  • tiledimageheight
    image height of the whole tiled image
  • tilesize
    width and height of the tiles, a good compromise between loading overhead and tile imagesize are a tilesizes from around 500 to 1500.
  • baseindex
    numbering start index of the tiles, default=1
  • multires
    multiresolution images - only for SPHERE or CUBE images
    Child nodes for multiresolution images
  • multiresthreshold
    threshold when to switch from one multiresolution level to the next
    0..1, default = 0.025
example codes:
<image type="SPHERE">
    <sphere url="sphereimage.jpg" />
</image>
<image type="SPHERE"
       tiled="true"
       tiledimagewidth="8192"
       tiledimageheight="4096"
       tilesize="1024"
      >
    <sphere url="sphere_tiles_%v_%u.jpg" />
</image>
<image type="CUBE">
    <left  url="left.jpg"  />
    <front url="front.jpg" />
    <right url="right.jpg" />
    <back  url="back.jpg"  />
    <up    url="up.jpg"    />
    <down  url="down.jpg"  />
</image>

Child nodes for <image type="SPHERE">
Settings for a sphere panorama image.

Child nodes:
<image type="SPHERE">
    <sphere attributes />
</image>

attributes for sphere:
  • url
    path to the sphere image
example code:
<image type="SPHERE">
    <sphere url="sphereimage.jpg" />
</image>

Child nodes for <image type="CUBE">
Settings for a cube panorama image. A cube panorama have six single images.
One for every cube-side.

Child nodes:
<image type="CUBE">
    <left  attributes />
    <front attributes />
    <right attributes />
    <back  attributes />
    <up    attributes />
    <down  attributes />
</image>

attributes for left/front/right/back/up/down:
  • url
    path to the image of a cube side
  • rotate
    rotate the image - rotation in degrees, default="0"
  • flip
    flip/mirror the image over the X and/or Y axis
    allowed values: "X" or "Y" or "XY" or "none", default="none"
NOTE: the rotate and flip attributes do not work for tiled images
example codes:
<image type="CUBE">
    <left  url="left.jpg"  />
    <front url="front.jpg" />
    <right url="right.jpg" />
    <back  url="back.jpg"  />
    <up    url="up.jpg"    />
    <down  url="down.jpg"  />
</image>
<image type="CUBE">
    <left  url="left.jpg"  />
    <front url="front.jpg" />
    <right url="right.jpg" />
    <back  url="back.jpg"  />
    <up    url="up.jpg"   rotate="-90" />
    <down  url="down.jpg" rotate="+90" />
</image>

Child nodes for <image type="CUBESTRIP">
Settings for a cubestrip panorama image.
The six single images for a cube are merged into one big images.
The images could be ordered horizontally or vertically. That will be automatic detected.

Child nodes:
<image type="CUBE">
    <cubestrip attributes />
    <left  attributes />
    <front attributes />
    <right attributes />
    <back  attributes />
    <up    attributes />
    <down  attributes />
</image>

attributes for cubestrip:
  • url
    path to the cubestrip image
attributes for left/front/right/back/up/down:
  • strip
    Order of the image in the strip (1-6)
    Default values:
    left="1", front="2", right="3", back="4", up="5", down="6"
  • rotate
    rotate the image - rotation in degrees, default="0"
  • flip
    flip/mirror the image over the X and/or Y axis
    allowed values: "X" or "Y" or "XY" or "none", default="none"
NOTE: tiled or multiresolution cubestrips are not supported
example codes:
<image type="CUBESTRIP">
    <cubestrip url="cubestrip.jpg" />
</image>
<image type="CUBESTRIP">
    <cubestrip url="cubestrip.jpg" />
    <left  strip="2" rotate="-90" />
    <front strip="1" />
    <right strip="3" rotate="+90" />
    <back  strip="4" />
    <up    strip="6" rotate="+180" />
    <down  strip="5" rotate="-180" />
</image>

Child nodes for <image type="..." multires="true">
Settings for a multiresolution panorama image.
The tilesize is specificed on the <image> node.
The <image> node would have one ore more <level> child nodes.
For each <level> nodes the width and the height must be defined.
Within the <level> node - are the image definitions for sphere or cube images.

Child nodes for SPHERE images:
<image type="SPHERE" multires="true" tilesize="...">
    <level attributes>
        <sphere attributes />
    </level>
    <level attributes>
        ...
    </level>
</image>
or for CUBE images:
<image type="CUBE" multires="true" tilesize="...">
    <level attributes>
        <left  attributes />
        <front attributes />
        <right attributes />
        <back  attributes />
        <up    attributes />
        <down  attributes />
    </level>
    <level attributes>
        ...
    </level>
</image>

attributes for level:
  • tiledimagewidth
    image width of the whole tiled image
  • tiledimageheight
    image height of the whole tiled image
  • details
    individual details setting for this level
  • download - settings for downloading tiles:
    • view - download only the tiles that are needed for the current view
    • all - download all tiles of the current level (not recommended)
    • auto - automatic, if imageheight is smaller than 2000 then all tiles are downloaded, if greater only the ones for the current view (=default).
  • decode - settings for decoding the downloaded tiles:
    • view - decode only the tiles that are needed for the current view
    • all - decode all tiles of the current level (not recommended)
    • auto - automatic, if imageheight is smaller than 2000 then all tiles are decoded, if greater only the ones for the current view (=default).
attributes for left/front/right/back/up/down and sphere:
  • url
    path to the image tiles - must have placeholders for the tileindices
    placeholders:
    for the horizontal tile index:  %u, %x, %h or %c
    for the vertical tile index:    %v, %y or %r
    
    there can be one or more "0" between the "%" and the "u,x,c,v,y,r" to align the number and fill the space with 0's.
example codes:
<image type="SPHERE" multires="true" tilesize="512">
    <level tiledimagewidth="2048" tiledimageheight="1024">
        <shpere url="tiles_2k_%0y_%0x.jpg" />
    </level>
    <level tiledimagewidth="4096" tiledimageheight="2048">
        <shpere url="tiles_4k_%0y_%0x.jpg" />
    </level>
    <level tiledimagewidth="8192" tiledimageheight="4096">
        <shpere url="tiles_8k_%0y_%0x.jpg" />
    </level>
</image>
<image type="CUBE" multires="true" tilesize="512">
    <level tiledimagewidth="1024" tiledimageheight="1024">
        <left  url="cube1024/left_%v_%u.jpg" />
        <front url="cube1024/front_%v_%u.jpg" />
        <right url="cube1024/right_%v_%u.jpg" />
        <back  url="cube1024/back_%v_%u.jpg" />
        <up    url="cube1024/up_%v_%u.jpg" />
        <down  url="cube1024/down_%v_%u.jpg" />
    </level>
    <level tiledimagewidth="2048" tiledimageheight="2048">
        <left  url="cube2048/left_%v_%u.jpg" />
        <front url="cube2048/front_%v_%u.jpg" />
        <right url="cube2048/right_%v_%u.jpg" />
        <back  url="cube2048/back_%v_%u.jpg" />
        <up    url="cube2048/up_%v_%u.jpg" />
        <down  url="cube2048/down_%v_%u.jpg" />
    </level>
    <level tiledimagewidth="4096" tiledimageheight="4096">
        <left  url="cube4096/left_%v_%u.jpg" />
        <front url="cube4096/front_%v_%u.jpg" />
        <right url="cube4096/right_%v_%u.jpg" />
        <back  url="cube4096/back_%v_%u.jpg" />
        <up    url="cube4096/up_%v_%u.jpg" />
        <down  url="cube4096/down_%v_%u.jpg" />
    </level>
</image>

<preview> (optional)
Panorama image that will be displayed while loading. Should be small!

- the image should be not too low res (to avoid big pixels)
- but it should very smooth for good jpeg compression
- filesize should be small!
- sphere or cubestrip images are possiblie
- or alternatively you can display a custom colored gird sphere or cube
- default = no preview

attributes:
  • type
    • "SPHERE" (=default)
    • "CUBESTRIP"
    • "grid(...)" - a generated grid preview image
      grid(type,xsteps,ysteps,res,lincol,bkcol,pntcol)
      • type = SPHERE or CUBE (must be defined)
      optional parameters:
      • xsteps = horizontal distance between lines in pixels, default=10
      • ysteps = vertical distance between lines in pixels, default=10
      • res = resolution of gridimage, default=400
      • lincol = color of lines in hex-format (default=0x666666)
      • bkcol = background color (default=0x222222)
      • pntcol = color of points (default=linecolor)
  • url
    the path to the preview image
    can be a spherical/equirectangular image or
    a vertical or horizonal cubestrip image
  • striporder
    order of the images in the cubestrip image (default="LFRBUD")
  • details
    rendering details (4-32), more details are more exact 3d-geometry, default=8
example codes:
<preview type="sphere" url="spherepreview.jpg" details="10" />
<preview type="cubestrip" url="cspreview.jpg" details="12" />
<preview type="grid(cube)" details="12" />

DEMO: view some preview examples interactive

high quality preview images can be easily created with the kmakepreview tool

<action>
a named collection of actions calls,
addtionally it's possible to pass parameters to the actions

this action can be called from events with:
  "action(name,parameter1*,parameter2*,...*);"

*parameters are optional!

to access the parameters inside the action use %0-%9 placeholders:
%0 - is the name of the action itself
%1 - first parameter
%2 - second parameter
.. and so on ...

attributes:
  • name
    name of the action
notes:
  • when loading a other xml file, all action tags remain unchanged unless they are defined again in the other xml. then they will be overwritten with the new ones.
example code - move to a viewpoint and load a other pano
<action name="loadpano1">
    lookto(88.517,1.097,6,smooth());
    loadpano(next.xml,null,MERGE,BLEND(1));
    lookat(180.8,1.9,22);
    wait(blend);
    lookto(263.711,0.982,87,smooth(100,20,50));"
</action>
	
<hotspot ...
         onclick="action(loadpano1);"
         />
example code - fade a image in and out on hotspot over:
<action name="fadein">
    set(plugin[%1].visible,true);
    tween(plugin[%1].alpha,1);
</action>
	
<action name="fadeout">
    tween(plugin[%1].alpha,0,,,set(plugin[%1].visible,false));
</action>

<plugin name="image1" ... alpha="0" />

<hotspot ...
         onover="action(fadein,image1);"
         onout="action(fadeout,image1);"
         />

<events>
set actions for special events

attributes:
  • onenterfullscreen
    this event is called when switching to fullscreen mode
  • onexitfullscreen
    this event is called when switching back from fullscreen mode
notes:
  • when loading a other xml file, all settings in the event tag remain unchanged unless they are defined again in the other xml. then the attributes will be overwritten with the new ones.
example code
<events onenterfullscreen="action(show_fs_interface);"
        onexitfullscreen="action(hide_fs_interface);"
        />

<display> (optional)
settings for the quality and performance

attributes:
  • fps
    framerate in frames per second, should be something between 30 and 100, default=60
  • details
    - rendering details (1-n)
    - more details is more exact 3d-geometry
    - higher values will reduce "wave-distortions-effects" but also the performance
    - default=16
  • tessmode
    tesslation mode, 1-5 or "-1" (=automatic)
    default="-1" => 0 for spheres and 3 for cubes
  • movequality
    quality while moving - LOW or HIGH or HIGHSHARP, default=LOW
  • stillquality
    quality while not moving - LOW or HIGH or HIGHSHARP, default=HIGH

    NEW - HIGHSHARP - after rendering the pano in HIGH quality it will be additionally postprocess with a 1 pixel unsharp-mask filter, this setting needs a lot of processing power so it should be only used for stillquality.
  • stilltime
    time in seconds after swtiching from "movequality" to "stillquality", default=0.25
example codes:
<display fps="40" details="18" />
<display details="20" 
         movequality="LOW" 
         stillquality="HIGHSHARP" 
         />

<view> (optional)
viewing settings - looking direction - field of view - etc.

attributes:
  • hlookat
    horizontal look position in spherical coordinates (0 .. 360°), default="0"
  • vlookat
    vertical look position in spherical coordinates (-90 .. +90°), default="0"
  • camroll
    roll/rotation of camera (only when control.mousetype is "drag3d")
  • fov
    field of view (in degrees, 1 .. 179°), default="90"
  • fovmin
    minimum of fov, default="1"
  • fovmax
    maximum of fov, default="179"
  • limitfov
    limit fov to avoid displaying of the fisheye lens border, true or false
    default=true
  • fisheye
    fisheye effect, (0 - 1), default="0.35"
  • fisheyefovlink
    fov and fisheye are linked together (when zooming in - the fisheye effect will be reduced) this value is the correlation of these values:
    (0.0 - 3.0), 0=linear correlation, 3=dynamic correlation) - default="0.5"

    for example: fov="180" and fisheye="1.0" will be a full 180° fisheye view
  • stereographic - NEW
    stereographic fisheye projection (true or false, default=false)
    this is switch between normal fisheye and stereographic view, it allowes interessting panorama views like Little Planet Views
  • architectural
    architectural projection, (0 - 1), default="0.0" (=disabled)
    set to "1.0" to enable architectural projection mode
  • architecturalonlymiddle
    do architectural projection only in the middle area, switch back to normal projection on nadir / zenith views, true or false, default=false
    NOTE - this parameter is only temporary, it may be changed in future versions
  • limitview
    possible values:
    "off" - no limiting
    "auto" - automatic limiting (default)
    "range" - limit to the area set by "hlookatmin","hlookatmax","vlookatmin","vlookatmax"
    "lookat" - limit the lookat angle to "hlookatmin","hlookatmax","vlookatmin","vlookatmax"
    (when using range limiting the fisheye effect should be set to 0)
  • hlookatmin
    horizontal minimum look position in spherical coordinates (-180° .. +180°), default="-180"
    (if (hlookatmax-hlookatmin) is 360 then there is no limiting)
  • hlookatmax
    horizontal maximum look position in spherical coordinates (-180° .. +180°), default="+180"
    (if (hlookatmax-hlookatmin) is 360 then there is no limiting)
  • vlookatmin
    vertical minimum look position in spherical coordinates (-90° .. +90°), default="-90"
  • vlookatmax
    vertical maximum look position in spherical coordinates (-90° .. +90°), default="+90"
example code:
<view hlookat="150.0"
      vlookat="-10.1"
      camroll="0.0"
      fov="120.0"
      fovmin="30.0"
      fovmax="160.0"
      fisheye="0.35"
      fisheyefovlink="0.55"
      limitfov="true"
      />
<view hlookat="0" vlookat="0"
      fov="120" fovmin="30" fisheye="0"
      limitview="range"
      vlookatmin="-45"
      vlookatmax="+45"
      />

<plugin> (optional)
<plugin> can be used to include other flash applications to just simple images,
e.g. buttons, images, logos...

attributes:
  • name
    name of the plugin, needed for identification / access to it
  • url
    path to the image or swf file

  • visible
    true or false, default=true
  • enabled
    is plugin enabled to receive mouse events (true or false, default=true)
    NEW in Version 1.0.7:
    when false then mouse events are routed to underlying objects
  • capture
    a addtional setting to "enabled":
    - when "enabled=true" and "capture=true" then mouse events are only sent to this plugin
    - when "enabled=true" and "capture=false" then the mouse events are sent to the plugin and also to all underlying objects
    (true or false, default=true)
  • children
    send mouse events also to children objects of the plugin
    (needed for some flash plugins)
    true or false, default=true
  • handcursor
    show handcursor when mouse is over (true or false, default=true)

  • keep (NEW - Version 1.0.7 and higher)
    important flag for virtual tour or conntect panoramas!
    possibly values: true or false, default=false
    when keep is set to true the plugin/hotspot is kept when loading other panoramas, otherwise it will be removed

  • zorder
    order of the plugins, 0-n, default=""

  • alpha
    alpha blend factor (0-1), default="1.0"
    NOTE - when alpha is set to "0" the plugin is invisible, but it still receives mouse events, and it also is drawn by the flashplayer.
    to hide a plugin completely, set "visible" to false
  • blendmode
    Flash blending mode
    some modes: "normal", "add", "difference", "multiply", "screen" ...
    default="normal"

    look here for all available modes:
          http://livedocs.adobe.com/.../BlendMode.html
    and here for their working:
          http://livedocs.adobe.com/.../DisplayObject.html#blendMode

  • autopos (decrepated)
    automatic postion, syntax: "origin,xoffset,yoffset" or "false"
  • autoscale (decrepated)
    automatic scaling, syntax: "xscale,yscale" or "false"

  • align
    origin positon on the screen:
    lefttop,left,leftbottom,top,center,bottom,righttop,right,rightbottom
    NOTE - this is the same like the "origin" attribute, just another/better name
  • origin (decrepated)
    origin positon on the screen:
    lefttop,left,leftbottom,top,center,bottom,righttop,right,rightbottom
  • edge
    edge/origin positon on the plugin itself - default is same value as "origin"
  • x
    distance from the origin screen position to the edge postion
    can a absolute pixel value or a relative to screenwidth percent value
  • y
    distance from the origin screen position to the edge postion can a absolute pixel value or a relative to screenheight percent value
  • width
    width of the plugin in absolute pixels or percents of the screenwidth
    set it to "prop" to allow scaling the width proportional to the height
    if nothing is set, the width of the source file will be set
  • height
    height of the plugin in absolute pixels or percents of the screenheight
    set it to "prop" to allow scaling the height proportional to the width
    if nothing is set, the height of the source file will be set
  • scale
    scaling of the plugin, default="1.0"

    Illustration of the relation of "align", "edge", "x", "y", "width", "height" and scale:


  • smoothing
    pixel smoothing when resizing (by changing width / height or scale)
    (true or false, default=true)

  • onover
    action that will be called when mouse comes overs the plugin/image
  • onhover
    action that will called in intervals when mouse stays/hovers over the plugin/image
  • onout
    action that will be called when mouse leaves the plugin/image
  • onclick
    action that will be called when mouse clicks on plugin/image
  • ondown
    action that will be called when mouse button is down on plugin/image
  • onup
    action that will be called on mouse button up
  • onloaded
    action that will be called when loading of the plugin is done

  • changeorigin(neworigin,newedge) (function)
    this a function to change the alignment / origin of a plugin without changing the current position (that means it recalculates the "x" and "y" values to keep the current position but with other offsets).
    syntax:
    plugin[name].changeorigin(neworigin,newedge);
  • resetsize() (function)
    sets the "width" and "height" attribute to original size of the source image
    can be used for dynamic "url" changing to get the size of the new loaded image!
    syntax:
    plugin[name].resetsize();


example codes:
<plugin name="logo" 
        url="krpano_logo.png" 
        align="rightbottom" x="10" y="10"
        onhover="showtext(visit krpano.com);" 
        onclick="openurl(http://krpano.com,_blank);" 
        />
<plugin name="options" url="plugins/options.swf" />
<plugin name="editor"  url="plugins/editor.swf" />

<hotspot> (optional)
Hotspots are areas in the panorama, which react on mouse hovering or clicking. They can be used to load other panoramas, links to other urls, change the viewing ...

There are currently 2 types of Hotspots:
  • Polygonal Hotspots
    these are areas which are defined by a set of points
  • Image Hotspots
    these are images or flash movies as hotspots
The type of the hotspots is defined by their attributes:
- if the "url" attribute is set it is a image hotspot
- if not and there are points defined it is a polygonal hotspot


common attributes for polygonal and image hotspots:
  • name
    name of the hotspot, needed for identification / access to it

  • visible
    true or false, default=true
  • enabled
    is hotspot enabled to receive mouse events (true or false, default=true)
    new in Version 1.0.7:
    when false then mouse events are routed to underlying objects
  • capture
    a addtional setting to "enabled":
    - when "enabled=true" and "capture=true" then mouse events are only sent to this hotspot
    - when "enabled=true" and "capture=false" then the mouse events are sent to the hotspot and also to all underlying objects
    (true or false, default=true)
  • children
    send mouse events also to children objects of the plugin
    (needed for some flash plugins)
    true or false, default=true
  • handcursor
    show handcursor when mouse is over (true or false, default=true)

  • keep (NEW - Version 1.0.7 and higher)
    important flag for virtual tour or conntect panoramas!
    possibly values: true or false, default=false
    when keep is set to true the plugin/hotspot is kept when loading other panoramas, otherwise it will be removed

  • zorder
    order of the hotspots, 0-n, default=""

  • alpha
    alpha blend factor (0-1), default="1.0"
    NOTE - when alpha is set to "0" the plugin is invisible, but it still receives mouse events, and it also is drawn by the flashplayer.
    to hide a plugin completely, set "visible" to false
  • blendmode
    Flash blending mode
    some modes: "normal", "add", "difference", "multiply", "screen" ...
    default="normal"

    look here for all available modes:
          http://livedocs.adobe.com/.../BlendMode.html
    and here for their working:
          http://livedocs.adobe.com/.../DisplayObject.html#blendMode

  • onover
    action that will be called when mouse comes overs the plugin/image
  • onhover
    action that will called in intervals when mouse stays/hovers over the plugin/image
  • onout
    action that will be called when mouse leaves the plugin/image
  • onclick
    action that will be called when mouse clicks on plugin/image
  • ondown
    action that will be called when mouse button is down on plugin/image
  • onup
    action that will be called on mouse button up

attributes for polygonal hotspots:
  • fillcolor
    filling color for the hotspot (color in hexadecimal in form of 0xFFFFFF), default="0xFFFFFF"
  • fillcolorhover
    filling color for the hotspot when mouse hovers the area, default="0xFFFFFF"
  • fillalpha
    alpha value (transparency) for the hotspot (0-1), default="0.0"
  • fillalphahover
    alpha value for the hotspot when mouse hovers the area (0-1), default="0.1"
  • borderwidth
    linewidth of the border in pixels, default="0"
  • borderwidthhover
    linewidth of the border when mouse hovers the area, default="4"
  • bordercolor
    color for the border, default="0xFFFFFF"
  • bordercolorhover
    color for the border when mouse hovers the area, default="0xFFFFFF"
  • borderalpha
    alpha value for the border (0-1), default="0.0"
  • borderalphahover
    alpha value for the border when mouse hovers the area (0-1), default="0.8"
  • fadeintime
    time to fade from normal to hover state in seconds, default="0.15"
  • fadeouttime
    time to fade from hover to normal state in seconds, default="0.30"
  • fadeincurve
    linear or nonlinear in-fading when hovering:
    1.0=linear fading, < 1.0=slower fading, > 1.0 = faster fading, default="1.1"
  • fadeoutcurve
    linear or nonlinear out-fading when mouse moved from area
    1.0=linear fading, < 1.0=slower fading, > 1.0 = faster fading, default="0.7"

  • Child nodes for polygonal hotspots:
    <hotspot attributes>
        <point attributes />
        <point attributes />
        <point attributes />
        ...        
    </hotspot>
    		

    point attributes:
    • ath
      point at horizontal position in spherical coordinates (0 .. 360°)
    • atv
      point at vertical position in spherical coordinates (-90 .. +90°)


attributes for image hotspots:
  • url
    path to the image or swf file

  • ath
    horizontal hotspot position in spherical coordinates (0 .. 360°)
  • atv
    vertical hotspot position in spherical coordinates (-90 .. +90°)
  • scale
    scale of the hotspot, default="1.0"
    "1.0" equates approximately to original pixelsize on a field of view of 90°
  • zoom
    change the size of the hotspots on zooming
    "true" or "false", default="false"

  • width
    width of the hotspot in absolute pixels
  • height
    height of the hotspot in absolute pixels
  • smoothing
    pixel smoothing when resizing (by changing width / height or scale)
    (true or false, default=true)

  • onloaded
    action that will be called when loading of the hotspot image is done


example code:
<hotspot name="nextpano" 
         onhover="showtext(load next pano)"
         onclick="loadpano(nextpano.xml)" >
    <point ath="160" atv="-20" />
    <point ath="200" atv="-20" />
    <point ath="200" atv="+20" />
    <point ath="160" atv="+20" />
</hotspot>

<control> (optional)
mouse and/or keyboard controls settings

attributes:
  • usercontrol
    allowed control modes: "all" or "keyb" or "mouse" or "off" - default="all"
  • mousetype
    mouse control type:
    "drag2d" or "drag3d" or "moveto" (default="drag2d)
    drag2d = drag and drop panorama on a 2d axis
    drag3d = drag and drop panorama on a 3d axis
    moveto = mouse sets a move vector for viewing
  • movetocursor
    when mousetype = "moveto" - the mouse cursor type - "" or "vector" or "arrow", default=""
  • cursorsize
    when mousetype = "moveto" - size of the mouse cursor, default="10"
  • mouseaccelerate
    acceleration of moving, default="1.00"
  • mousespeed
    max. speed of moving, default="10.00"
  • mousefriction
    friction of moving, default="0.80"
  • keybaccelerate
    acceleration of moving, default="0.50"
  • keybspeed
    max. speed of moving, default="10.00"
  • keybfriction
    friction of moving, default="0.90"
  • keybinvert
    invert up and down - true or false, default=false
  • mousefovchange
    mouse wheel fov change in degrees, default="1.00"
  • keybfovchange
    keyboard fov change in degrees, default="1.00"
  • fovspeed
    max. fov change speed, default="3.00"
  • fovfriction
    fov change friction, default="0.90"
  • keycodesleft
    keycodes to move left, default="37" (cursor left)
  • keycodesright
    keycodes to move right, default="39" (cursor right)
  • keycodesup
    keycodes to move up, default="38" (cursor up)
  • keycodesdown
    keycodes to move down, default="40" (cursor down)
  • keycodesin
    keycodes to zoom in, default="16,65,107" (shift-key,A-key,plus-key)
  • keycodesout
    keycodes to zoom out, default="17,89,90,109" (ctrl-key,Y-key,Z-key,minus-key)
  • headswing
    swing/tilt head/view when fast moving left or right (moveto mode only)
    this value sets the strength of this effect from 0 to 10 and higher
    default="0" (=disabled)
example code:
<control usercontrol    ="all"
         mousetype      ="drag2d"
         movetocursor   =""
         cursorsize     ="10.0"
         mouseaccelerate="1.00"
         mousespeed     ="10.00"
         mousefriction  ="0.80"
         keybaccelerate ="0.50"
         keybspeed      ="10.00"
         keybfriction   ="0.90"
         keybinvert     ="false"
         mousefovchange ="1.00"
         keybfovchange  ="1.00"
         fovspeed       ="3.00"
         fovfriction    ="0.90"
         />

<contextmenu>
- changes the right click context menu
- add user defined items
- assign actions calls
- reorder the "About krpano..." item

attributes:
  • fullscreen
    show buildin "Fullscreen" / "Exit Fullscreen" item, true or false, default=true
  • item (sub node)
    context menu items

    attributes:
    • name
      name/ id of this item, needed for get / set access
    • caption
      caption of the item, that will be shown in the contextmenu
      special captions:
      - use "KRPANO" to place the "About krpano..." item there
      - if no "KRPANO" item was defined it will be added at the end
      - use "FULLSCREEN" to place the "Fullscreen" / "Exit Fullscreen" item there
      - if no "FULLSCREEN" item was defined it will be added at the end
    • separator
      a separator bar should appear above the current item, true" or false, default=false
    • enabled
      state of the item, enabled or disabled, true or false, default=true
    • visible
      item visibility, true or false, default=true
    • onclick
      action event to call on click/select
example code:
<contextmenu fullscreen="false">
   <item name="item1" 
         caption="About the Panorama..."     
         onclick="action(show_pano_info);" 
         />
   <item name="item2" 
         caption="About the Photographer..." 
         onclick="openurl(http://...);" 
         />
   <item name="item3" 
         caption="About this Hotspot..."     
         enabled="false" 
         />
   <item name="item4" 
         separator="true" 
         caption="Normal Projection"     
         onclick="set(view.fisheye,0);
                  set(view.architectural,0);
                  set(update,view);"
         />
   <item name="item5" 
         caption="Fisheye Projection"     
         onclick="set(view.fisheye,0.35);
                  set(view.architectural,0);
                  set(update,view);"
         />         
   <item name="item6" 
         caption="Architectural Projection"     
         onclick="set(view.fisheye,0.0);
                  set(view.architectural,1.0);
                  set(update,view);"
         />                  
   <item name="item7" 
         separator="true" 
         caption="KRPANO" 
         />
</contextmenu>

<autorotate>
Automatic rotation/moving/zooming when no user-interaction.

attributes:
  • enabled
    true or false (default=false)
  • waittime
    time in seconds to wait after last user-interaction (default="1.5")
  • accel
    moving acceleration in degrees/second² (default="1")
  • speed
    maximum moving speed in degrees/second (default="10")
    use a negative value for left rotation
  • horizon
    destination horizon ("off" or "-90" to "+90", default="0")
  • tofov
    destination field of view ("off" or "0" to "180", default="off")
example code:
<autorotate enabled="true" 
            waittime="1.0" 
            accel="1.5" 
            speed="10" 
            horizon="20" 
            tofov="150" 
            />

<progress> (optional)
show state of loading progress

attributes:
  • showload
    show loading progress function - "none" or "bar(...)", default="bar()"

    bar syntax: (all parameters are optional)
    bar(origin,width,height,offsetx,offsety,style,  
        backcolor,loadcolor,decodecolor,
        bordercolor,borderwidth,glowcolor,glowwidth)
    • origin = origin of progressbar: lefttop, leftmid, leftbottom, midtop, center, midbottom, righttop, rightmid, rightbottom; default=center
    • width = width of progressbar in pixels (if you add a "%" to value its a percent value of the screenwidth), default="200"
    • height = height of progressbar (height% = percent of screenheight), default="10"
    • offsetx = x-distance from origin (offsetx% = percent of screenheight), default="0"
    • offsety = y-distance from origin (offsety% = percent of screenheight), default="50"
    • style = "solid" or "shaded", default="shaded"
    • backcolor = background color of progressbar, default=0x000000
    • loadcolor = color of loading progressbar, default=0xDDDDDD
    • decodecolor = color of decoding progressbar, default=0xDDDDDD
    • bordercolor = color of border, default=0x111111
    • borderwidth = width of border, default=1
    • glowcolor = color of glow, default=0xFFFFFF (=white)
    • glowwidth = width of glow, default=8
  • showwait
    show waiting function - "none" or "loopings(...)", default="loopings()"

    loopings syntax: (all parameters are optional)
    loopings(color,points,size,bigpoint,smallpoint,
             glowcolor,glowwidth,xpos,ypos)
    • color = color of points, default=0xFFFFFF (=white)
    • points = number of points, default=15
    • size = radius of looping wheel, default=15 (=white)
    • bigpoint = size of biggest point, default=0 (=automatic)
    • smallpoint = size of smallest point, default=0 (=automatic)
    • glowcolor = color of glow, default=0xFFFFFF (=white)
    • glowwidth = width of glow, default=8
    • xpos = position on screen (0..1), default=0.5 (=center)
    • ypos = position on screen (0..1), default=0.5 (=center)

example codes:
<progress showload="bar(center,33%,3%,0,15%,shaded,
                        0x000000,0x666666,0xAAAAAA)" />
<progress showload="none" showwait="loopings(0xFFFFFF)" />

<network> (optional)
network settings for downloading and decoding images

attributes:
  • downloadqueues
    number of images that could be downloaded at the same time, default=2
  • decodequeues
    number of images the could be decoded at the same time, default=2
    WARNING - don't use high values here, decoding costs much performance!
example codes:
<network downloadqueues="2" />
<network downloadqueues="8" decodequeues="2" />
<memory> (optional)
setting for memory usage

attributes:
  • maxmem
    maximum memory usage for the decoded image tiles in MB, default=350
    interessting for large multiresolution images, if this limit is reached, not used tiles are freeed, if they are reused then they must be decoding again,
example code:
<memory maxmem="500" />

<security>
Loads a cross-domain policy file from a location specified by the url parameter. By default the Flash Player looks for the policy file located in root of a domain with the filename crossdomain.xml on the server to which a data-loading request is being made. With the crossdomain.url setting the Flash Player can load a policy file from a arbitrary locations.
For more Information have a look at the Adobe site:
http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

attributes:
  • crossdomainxml.url
    Path to the crossdomain.xml on the other server
  • allowdomain.domain
    Allow access to other domains (necessary for plugins that want access other domains). You can also specify the special domain "*" to allow access from all domains. Specifying "*" is the only way to allow access to nonlocal SWF files from local SWF files that have been published using Access Network Only for the Local Playback Security option in the Flash authoring tool.
example code:
<security>
    <crossdomainxml url="http://..../crossdomain.xml" />
</security>
<security>
    <allowdomain domain="maps.google.com" />
</security>

<textstyle>
with textstyle it's possible to define a own stylings for texts shown in the showtext() action. the textstyle can be passed by name as second parameter

attributes:
  • name
    name of the textstyle, use DEFAULT to overwrite the default settings
  • font
    The name of the font.
  • fontsize
    The point size of the text.
  • bold
    Specifies whether the text is boldface, true or false
  • italic
    Indicates whether text is italicized, true or false
  • background
    Specifies whether the text field has a background fill, true or false
  • backgroundcolor
    The color of the text field background
  • border
    Specifies whether the text field has a border, true or false
  • bordercolor
    The color of the text field border
  • textcolor
    The color of the text in a text field
  • alpha
    alpha transparency value (0-1)
  • blendmode
    Flash blending mode
    some modes: "normal", "add", "difference", "multiply", "screen" ...
    default="normal"

    look here for all available modes:
          http://livedocs.adobe.com/.../BlendMode.html
    and here for their working:
          http://livedocs.adobe.com/.../DisplayObject.html#blendMode
  • effect
    bitmap effects, can be any combination of this effect functions:
    • glow(color,alpha,range,strength);
    • dropshadow(depth,angle,color,range,strength);
    • blur(radius);
  • origin
    "cursor" - set textposition to mouse cursor (=default)
    for a fixed positon on screen use one of these values:
    "lefttop", "left", "leftbottom", "top", "center", "bottom", "righttop", "right", "rightbottom"
  • edge
    edge/origin positon on the text itself, default="bottom"
  • textalign
    align of the text: "none", "left", "center", "right" (default="none")
  • xoffset
    x offset of text (default="0")
  • yoffset
    y offset of text (default="-3")
  • noclip
    avoid clipping of text on screen borders (default=true)
  • showtime
    time to the show the text in seconds (default="0,1")
notes:
  • when loading a other xml file, all textstyle tags remain unchanged unless they are defined again in the other xml. then they will be overwritten with the new ones.
example code - DEFAULT style:
<textstyle name="DEFAULT"
           font="Times"
           fontsize="12"
           bold="true"
           italic="false"
           background="false"
           backgroundcolor="0xFFFFFF"
           border="true"
           bordercolor="0x000000"
           textcolor="0x000000"
           alpha="1.0"
           blendmode="normal"
           effect=""
           />
example code - own style:
<textstyle name="NEWSTYLE"
           font="Arial" fontsize="10"
           border="false" background="false"
           textcolor="0xFFFFFF"
           effect="glow(0x000000,0.7,4,2);
                   dropshadow(2,45,0x000000,3,1);"
           />
example code - showtext() with second parameter
... onhover="showtext(Text with textstyle,NEWSTYLE);" ...

DEMO: view some textstyles interactive

<lensflareset> (optional)
create a lensflare set, settings how the flares are looking
there is one base image for the flares.
the flares will be defined as pice of the base image, but they could have a other color and size

Child nodes:
<lensflareset attributes>
    <flare attributes />
    <flare attributes />
    <flare attributes />
    ...        
</lensflareset>

attributes for lensflareset:
  • name
    name of the lensflareset, this name can be used by a lensflare set="..."
  • url
    path to the image with the flares
attributes for flare:
  • pixsize
    pixel size of the area of a flare, the area must be quadratic, so only value must be set
  • pixupos
    horizontal pixel position of flare area
  • pixvpos
    vertical pixel position of flare area
  • color
    color of the flare (hexadecimal in form of 0xFFFFFF), will be blended with the image colors
    "0xFFFFFF" for no change of the original pixels
  • pos
    position of the flare on the screen:
    0.0 = at the start point (at the ath,atv position of a lensflare)
    1.0 = opposite position from start point
    can be from -2.0 to +5.0
  • scale
    size in relation to screen height, typical values are from 0.01 to 0.10
example codes:
<lensflareset name="USER1" url="flare2.jpg">
    <flare pixsize="128" pixupos="0"   pixvpos="0" 
           color="0x967864"  pos="+0.00" scale="0.130" />
    <flare pixsize="128" pixupos="256" pixvpos="0" 
           color="0x200A05"  pos="-0.40" scale="0.100" />
    <flare pixsize="128" pixupos="128" pixvpos="0" 
           color="0x967878"  pos="+0.30" scale="0.100" />
    <flare pixsize="128" pixupos="256" pixvpos="0" 
           color="0x2B2D14"  pos="+0.60" scale="0.092" />
    <flare pixsize="128" pixupos="128" pixvpos="0" 
           color="0x46140A"  pos="+0.40" scale="0.050" />
    <flare pixsize="64"  pixupos="512" pixvpos="0" 
           color="0x142800"  pos="+0.25" scale="0.018" />
    <flare pixsize="128" pixupos="384" pixvpos="0" 
           color="0x211E19"  pos="+2.30" scale="0.300" />
    <flare pixsize="64"  pixupos="512" pixvpos="0" 
           color="0x280F00"  pos="+1.20" scale="0.050" />
    <flare pixsize="64"  pixupos="512" pixvpos="0" 
           color="0x212400"  pos="+1.70" scale="0.045" />
    <flare pixsize="128" pixupos="128" pixvpos="0" 
           color="0x0F1E4B"  pos="+2.30" scale="0.030" />
    <flare pixsize="128" pixupos="128" pixvpos="0" 
           color="0x002850"  pos="+3.40" scale="0.020" />
</lensflareset>

<lensflare> (optional)
sets up a sun lensflare effect

attributes:
  • name
    name of the lensflare, needed for identification / access to it
  • keep
    important flag for virtual tour or conntect panoramas!
    possibly values: true or false, default=false
    when keep is set to true the lensflare is kept when loading other panoramas, otherwise it will be removed

  • set
    lensflareset, must be defined before, default="DEFAULT"
    ("DEFAULT" is a predefined lensflareset)
  • ath
    sun at horizontal position in spherical coordinates (0 .. 360°)
  • atv
    sun at vertical position in spherical coordinates (-90 .. +90°)
  • size
    size of flares, default="0.8"
  • blind
    blind factor, how much will it blind when you look into the sun:
    0=nothing, 1=full blending, default="0.6"
  • blindcurve
    blinding curve, (1-10), 1=linear, default="4"
example codes:
<lensflare set="DEFAULT"
           ath="140.3057"
           atv="-20.6741"
           size="0.80"
           blind="0.60"
           blindcurve="6.00"
         />
<lensflare set="MYLENSFLARESET"
           ath="20.0"
           atv="-45.0"
         />

<include> (optional)
include other xml files (can be used more than once)
this can be used to split up the images and settings.
the include tag will be replace with the contents of the included xml file.

attributes:
  • url
    path of the xml file to include
example codes:
<include url="settings.xml" />
<include url="plugins.xml" />
<include url="lensflaresets.xml" />
<include url="../samesettingsforallpanos.xml" />

<data> (optional)
a named data section, can be used to store information.
access to content via "get(data[name].content);"

attribute:
  • name
    name of the data
notes:
  • when loading a other xml file, all data tags remain unchanged unless they are defined again in the other xml. then they will be overwritten with the new ones.
example code - store html and css code for the textstyle plugin
<data name="cssdata">
    a { color:#0000FF; }
    a:hover { color:#FF0000; }
</data>

<data name="htmldata">
    <b>Hello from Flash HTML</b><br/>
    <a href="event:set(plugin[txt].visible,false);">
    	close this window
    </a>
</data>
	
<plugin name="txt" url="textfield.swf"
        html="htmldata"
        css="cssdata"
        />