Simple Flash Panorama Player
Copyright 2009, 2010
Axel T. Schreiner, Computer Science, RIT.
Last modified 6/21/10.
sfpp is a simple Flash program to display spherical
(equi-rectangular), cylindrical, or cube-based panoramas. It includes an
interactive web page to create the HTML code to display a panorama.
This description is part of sfpp.
sfpp is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
sfpp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with sfpp. If not, see
http://www.gnu.org/licenses/.
- Installation
- Get SFPP.
-
Download
sfpp.zip
and unpack the archive in some directory which will be called SFPP below.
- Deployment.
-
A panorama consists of one or six media files and an HTML file
which loads and configures sfpp and references programs
in the directory SFPP/runtime which may be shared
by all panoramas. If the HTML file is created with the sfpp
designer, as explained below, it expects to be located in the same
parent directory as runtime. If the HTML file is loaded
from the local file system there might be security issues
which can be resolved using the
security settings
for the Flash Player.
- Designer
-
The sfpp designer is started by opening the page
SFPP/designer.html
in a web browser. The page contains a link to manage
security settings
for the Flash Player.
The left half of the page contains configuration parameters
which are validated and used when the run button is
pressed. The panorama should appear in the right half of
the page; code for an HTML file to display the panorama
should appear above to be copied as needed.
While the panorama is loaded and displayed the run button
changes to stop. If stop is pressed, the panorama
is removed and can be reconfigured and displayed again.
Most configuration parameters apply to the panorama
and are described below. The last few parameters apply to Flash Player
and are discussed
here.
For testing the sfpp web site contains cylinder.jpg and
cube/{front,back,left,right,top,bottom}.jpg with a tilt range
of about -17 to 17 degrees.
- object width and height
-
Required attributes to dimension the size of the panorama display,
specified as a number of pixels or a percentage of the available
dimension.
- sphere
-
URL for the panorama file in equirectangular projection. One kind of
projection is required, the first one specified is used. Flash supports
GIF, JPG, and PNG as file formats. Picture size should not exceed
8000x4000 pixels.
- cylinder
-
URL for the panorama file in cylindrical projection. Picture size should
not exceed 8000x4000 pixels.
- cube front, back, left, right, top, and bottom
-
URLs for the cube faces of a panorama. Picture size should not exceed
4000x4000 pixels per face. A cube is likely to produce the best quality.
- logo and URL
-
Optional parameters to specify a logo text at the bottom right.
If a URL is specified a click on the logo opens it in a
new browser window. If a logo is not specified, the URL text is displayed.
- upTO and downTO
-
Parameters to limit pitch (upward and downward tilt) of the viewer
in degrees. The range is limited to the interval (-90, 90).
The maximum field of vision should not exceed this range.
- leftTO and rightTO
-
Parameters to limit yaw (horizontal rotation) of the viewer
in degrees. The range is limited to the interval (0, 360).
The maximum field of vision should not exceed this range.
- FOV, minFOV, and maxFOV
-
Parameters to define the initial field of vision of the viewer
in degrees and limit the range for zooming in and out. The
sfpp designer shows the current field of vision
while a panorama is displayed.
- pitch and yaw
-
Parameters to define the initial pitch (upward and downward tilt)
and yaw (horizontal rotation) of the viewer in degrees. The
sfpp designer shows the current pitch and yaw
while a panorama is displayed.
- delta FOV, pitch, and yaw
-
Parameters to define increments in degrees for keyboard control
of the panorama (page up and down for the field of vision,
up and down arrows for pitch, and left and right arrows for yaw).
- mirrorImage
-
If this parameter is asserted, the panorama is mirrored horizontally.
- allowfullscreen
-
This parameter has to be asserted to allow full-screen display
of the panorama. Full-screen display is toggled with a double-click
or the escape key. Additionally, the parameter must be
passed to the Flash player as an attribute.
- size and tesselation
-
These parameters control the quality vs. the speed of displaying the panorama.
The panorama file is used as a texture for a three-dimensional object
(sphere, cylinder, or cube) with size as a radius. Tesselation controls
how many triangles are used to approximate the object; a higher value
should produce smoother results but require more processing power.
- react and mouse
-
These parameters control the animation. React is the number of seconds
which a tween is allowed to take for adjusting a property, e.g.,
pitch by delta pitch; a smaller value improves response time but makes
the animation less smooth. Mouse controls how a mouse drag is translated into
a viewer movement; a larger value requires more dragging to move the viewer.
- Recompilation
- Get FLEX.
-
Download version 4 of the
Flex SDK
and unpack the archive in some directory which will be called FLEX below.
- Get SFPP as described above.
-
Download
sfpp.zip
and unpack the archive in some directory which will be called SFPP below.
- Get PAPERVISION3D.
-
Download version 2.1.932 of
papervision3d
and unpack the archive in some directory which will be called
PAPERVISION3D below. Move one directory:
$ mv PAPERVISION3D/org SFPP/src/
- Get SWFOBJECT.
-
Download version 2.2 of
<swfobject>
and unpack the archive in some directory which will be called
SWFOBJECT below. Move two files:
$ mv SWFOBJECT/expressInstall.swf \
SWFOBJECT/swfobject.js SFPP/runtime/
- Get TWEENLITE.
-
Download version 11.36 of
TweenLite (AS3)
and unpack the archive in some directory which will be called
TWEENLITE below. Move one file and two directories:
$ mv TWEENLITE/com/greensock/TweenLite.as \
TWEENLITE/com/greensock/core TWEENLITE/com/greensock/easing \
TWEENLITE/com/greensock/plugins SFPP/src/com/greensock
- Compile and install.
-
Execute the following commands to produce files which Adobe's Flash Player
(but not Shockwave Player) can execute:
$ cd SFPP/src && FLEX/bin/mxmlc -use-network=false \
-static-link-runtime-shared-libraries=true sfpp.as
$ cp SFPP/src/sfpp.swf SFPP/runtime
- Troubleshooting
-
If an HTML file created with the sfpp designer
is opened in a browser which supports Flash it will take some time to load the panorama.
Initially the load status is displayed; for a cube the numbers
will start from zero for each of the six faces.
If the HTML file is loaded from the local file system,
you may have to 'trust' the directory by connecting to the
security settings
for the Flash Player.
Even version 10 of the Shockwave player cannot render Flash files which require
version 9 and above. On Mac OS X an old plugin
/Library/Internet Plug-Ins/NP-PPC-Dir-Shockwave should be removed
(it would only work with a PowerPC-based browser anyhow)
and a current Flash Player must be installed.
Google's Chrome does not officially support Flash Player; however, if a current version
of Flash Player is installed or reinstalled Flash content can be viewed.
- Compatibility
-
The following browsers have been tested under Mac OS X version 10.5.7
with the sfpp designer:
The following browsers have been tested under Windows XP,
with the sfpp designer:
Camino version 1 requires an event to redraw Flash content in the browser window
when terminating full-screen mode; this has been fixed in version 2 (beta).