Page 1


 
 About
 


JC
Panorama
Viewer
is
an
ActionScript
3.0
component
that
enables
displaying
several
types
of
panoramas
 (plain,
cylindrical,
spherical
and
cubical)
and
virtual
tours
based
on
multiple
panoramas.
The
component
 comes
as
a
free
version
and
a
commercial
version.
The
difference
between
the
free
panorama
viewer
and
 the
commercial
one
is
that
the
free
panorama
viewer
displays
a
watermark
in
the
preloader.
 
 This
flash
component
supports
hotspots
(informative,
web
link
and
panorama
link),
horizontal
and
vertical
 mouse
movement,
scroll
zoom
and
transitions.
JC
Panorama
Viewer
comes
together
with
JC
Panorama
 Editor,
an
AIR
application
that
allows
you
to
create
and
edit
panoramas
and
virtual
tours
directly
on
your
 desktop.

 
 When
you
export
your
panorama/virtual
tour
project
in
JC
Panorama
Editor
you
will
get
the
folder
 structure
plus
all
images
and
xml,
also
the
fla
file
for
the
panorama
or
virtual
tour
containing
the
JC
 Panorama
Viewer
component
on
the
stage,
all
these
together
in
order
for
you
to
simply
deploy
them
on
 your
webserver.


Compatibility
 
 ActionScript:
3.0
 Flash
IDE:
Flash
CS3,
Flash
CS4
 FlashPlayer:
FlashPlayer
9+



 


How
to
use
 


JC
Panorama
Viewer
works
by
loading
XML
data
containing
information
about
a
specific
panorama
and
 then,
based
on
that
information,
it
loads
and
displays
the
visual
assets
like
panoramic
images
and
.swf
files.

 
 The
component
accepts
user
input
as
mouse
and
keyboard
actions
to
rotate
the
panorama
using

mouse
 movement
or
the
arrow
keys.
The
hotspots
are
able
to
perform
different
types
of
actions
including
loading
 other
panoramas,
in
case
of
a
virtual
tour.
 
 The
component
can
be
set
up
in
a
few
seconds.
To
set
it
up
manually,
simply
select
JC
PanoramaViewer
in
 the
Components
panel
and
drag
it
over
the
stage.
Open
up
the
Component
Inspector
panel,
set
the
 xmlPath
property
to
the
URL
of
an
.xml
file
that
contains
the
data
of
a
panorama.
That
.xml
file
must
 contain
the
list
of
images
that
the
panorama
needs
to
load,
so
make
sure
that
the
panorama
has
access
to
 those
images.
Once
you
do
this,
the
JC
Panorama
Viewer
should
be
fully
working
so
you
can
run
the
 application.

 



From
the
Component
Inspector
panel
you
can
do
other
settings
to
the
component,
including
changing
the
 way
users
interact
with
the
panorama
and
the
way
the
content
is
displayed.
JC
Panorama
Viewer
can
also
 be
used
dynamically
through
ActionScript
code
and
can
receive
XML
data
created
dynamically
by
code.
 
 You
can
generate
panoramas
by
using
our
JC
Panorama
Editor
(has
a
free
version)
that
allows
you
to
create
 and
edit
panoramas
and
virtual
tours.
A
panorama
is
made
up
of
several
files:
the
.xml
file
containing
the
 description
of
the
panorama,
the
properties
of
the
panorama
and
links
to
the
images;
image
files
used
by
 the
panorama;
a
.fla
and
.swf
file
together
with
its
HTML
wrapper
representing
the
actual
panorama
player.



 


Customization
 


JC
Panorama
Viewer
is
a
.fla
based
component
which
means
that
it
contains
all
the
necessary
assets:
the
 hotspot
icons,
the
preloader
and
the
tooltip.
These
assets
are
actual
movie
clips
located
in
the
 JCPanoramaViwerSkins
folder,
inside
the
Library,
once
you
add
the
JC
Panorama
Viewer
component
to
your
 file.
You
can
customize
all
these
assets
to
suit
your
needs.
 
 There
are
three
hotspot
icons
for
information,
link
and
panorama.
There's
also
a
preloader
displayed
while
 the
panorama
loads
the
necessary
files
and
a
tooltip
movie
clip
used
to
display
information
about
the
 different
hotspots
present
in
the
panorama.
It
is
recommended
that
the
tooltip
text
field
uses
embedded
 characters,
so
you
would
either
have
to
embed
the
desired
font
in
the
Library
of
your
project
or
simply
use
 an
extra
text
field
that
contains
all
the
characters
you
will
need
embedded
into
it.



 


Properties
 
 Property


autoPlay


content


Type
 Component
 Inspector
 Boolean
 yes


Array
 yes


Description


A
boolean
value
that
specifies
whether
the
panorama
will
start
playing
 after
it
is
initialized
or
not.
 
 Default
is
false.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.keyboardControl = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 The
list
of
references
to
the
loaded
content.
The
content
could
be
images
 or
external
.swf
files.
In
case
of
.swf
files,
the
references
point
to
the
root
 of
the
files.
The
number
of
items
in
the
list
can
range
from
1
(in
case
of
 cylindrical
panoramas)
to
6
(in
case
of
cubical
panoramas).
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; var myPanorama:JCPanoramaViewer = new JCPanoramaViewer();


myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.keyboardControl = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; myPanorama.addEventListener(JCPanoramaViewerEvents .INIT, panoramaInitialized);

direction


String
 yes


keyboardControl


Boolean
 yes


lockPan


Boolean
 yes


function panoramaInitialized(evt:JCPanoramaViewerEvents):vo id { trace(evt.target.content[0]); // [object BitmapData] } 
 Specifies
in
which
direction
the
panorama
plays
(if
autoPlay
is
set
to
 true).
Possible
values
are
left
and
right.
 
 Default
is
right.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.keyboardControl = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
that
specifies
whether
the
panorama
can
be
controlled
 using
the
keyboard
(arrow
keys)
to
move
the
camera
up,
down,
left
and
 right.
 
 Default
is
false.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.keyboardControl = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
which
specifies
whether
the
camera
is
allowed
to
pan
or
 not.
If
panning
is
allowed,
the
camera
can
rotate
around
its
vertical
axis
 (pan)
in
360
degrees,
without
stopping
at
the
leftmost
and
the
rightmost
 edge
of
the
panorama.
The
camera
rotates
left
and
right
without
being
 blocked
at
the
left
or
right
ends.
It
is
similar
to
the
lockTilt
property
 which
allows
the
camera
to
rotate
up
and
down.
 
 Default
is
false.
 
 Example:
 var myPanorama:JCPanoramaViewer = new


lockTilt


Boolean
 no


mouseAction


String
 yes


JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.lockPan = false; myPanorama.lockTilt = false myPanorama.mouseAction = "DragDirect"; myPanorama.mouseControl = true; myPanorama.speed = 4; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
which
specifies
whether
the
camera
is
allowed
to
tilt
or
 not.
If
tilting
is
allowed,
the
camera
can
rotate
around
its
horizontal
axis
 (tilt)
in
360
degrees
without
stopping
at
the
top
or
the
bottom
of
the
 panorama.
The
camera
rotates
upwards
and
downwards
without
being
 blocked
at
the
top
or
bottom.
It
is
similar
to
the
lockPan
property
which
 allows
the
camera
to
rotate
left
and
right.
 
 Default
is
true.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.lockPan = false; myPanorama.lockTilt = false myPanorama.mouseAction = "DragDirect"; myPanorama.mouseControl = true; myPanorama.speed = 4; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 Specifies
how
mouse
movement
controls
the
movement
of
the
 panorama.
When
the
mouse
pointer
rolls
over
the
panorama,
it
starts
 controlling
it
as
mentioned
bellow:
 
 MoveDirect
–
the
panorama
moves
on
the
same
direction
and
in
the
 same
way
as
the
mouse
does
and
it
rotates
with
a
speed
which
is
directly
 proportional
to
the
distance
between
the
point
where
the
mouse
changes
 direction
and
the
point
where
the
current
location
of
the
mouse
is.
 
 MoveReverse
–
the
panorama
moves
on
the
same
direction
but
in
the
 opposite
way
as
the
mouse
does
and
it
rotates
with
a
speed
which
is
 directly
proportional
to
the
distance
between
the
point
where
the
mouse
 changes
direction
and
the
point
where
the
current
location
of
the
mouse
 is.
 
 PressDirect
–
the
mouse
controls
the
panorama
only
after
the
mouse
 button
has
been
pressed
over
the
panorama:
the
panorama
moves
on
the
 same
direction
and
in
the
same
way
as
the
mouse
does
and
it
rotates
with
 a
speed
which
is
directly
proportional
to
the
distance
between
the
point
 where
the
mouse
changes
direction
and
the
point
where
the
current
 location
of
the
mouse
is.
 
 PressReverse
–
the
mouse
controls
the
panorama
only
after
the
mouse
 button
has
been
pressed
over
the
panorama:
the
panorama
moves
on
the
 same
direction
but
in
the
opposite
way
as
the
mouse
does
and
it
rotates
 with
a
speed
which
is
directly
proportional
to
the
distance
between
the
 point
where
the
mouse
changes
direction
and
the
point
where
the



mouseControl


Boolean
 yes


current
location
of
the
mouse
is.
 
 MoveRelativeToMiddleDirect
–
the
mouse
controls
the
movement
of
the
 panorama
relative
to
the
middle
of
the
panorama:
the
panorama
moves
 on
the
same
direction
and
in
the
same
way
as
the
mouse
does.
 
 MoveRelativeToMiddleReverse
–
the
mouse
controls
the
movement
of
 the
panorama
relative
to
the
middle
of
the
panorama:
the
panorama
 moves
on
the
same
direction
and
in
the
opposite
way
as
the
mouse
does.
 
 PressRelativeToMiddleDirect
–
the
mouse
controls
the
panorama
only
 after
the
mouse
button
has
been
pressed
over
the
panorama
and
relative
 to
the
middle
of
the
panorama:
the
panorama
moves
on
the
same
 direction
and
in
the
same
way
as
the
mouse
does.
 
 PressRelativeToMiddleReverse
–
the
mouse
controls
the
panorama
only
 after
the
mouse
button
has
been
pressed
over
the
panorama
and
relative
 to
the
middle
of
the
panorama:
the
panorama
moves
on
the
same
 direction
and
in
the
opposite
way
as
the
mouse
does.
 
 MoveRelativeToPressPoint
–
the
mouse
controls
the
panorama
only
after
 the
mouse
button
has
been
pressed
over
the
panorama
and
the
 panorama
rotates
relative
to
the
point
where
the
the
button
has
been
 pressed
on
the
same
direction
and
in
the
same
way.
 
 DragDirect
–
the
panorama
moves
as
it
is
being
dragged
by
the
mouse.
 The
panorama
moves
in
the
same
direction
as
the
mouse.
 
 DragReverse
–
the
panorama
moves
as
it
is
being
dragged
by
the
mouse.
 The
panorama
moves
in
the
same
direction
as
the
mouse.
 
 Default
is
Move_Relative_To_PressPoint.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.lockPan = false; myPanorama.lockTilt = false myPanorama.mouseAction = "DragDirect"; myPanorama.mouseControl = true; myPanorama.speed = 4; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
that
specifies
whether
the
panorama
can
be
controlled
 by
mouse
movement
or
not.
 
 Default
is
true.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.mouseAction = "DragDirect"; myPanorama.mouseControl = true; myPanorama.speed = 4; myPanorama.motionSpeed = 3;


motionSpeed


Number
 yes


pan


Number
 yes


quality


Number
 yes


smooth


Boolean
 no


addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 Specifies
the
speed
of
the
panorama's
rotation
when
it
is
no
longer
 controlled
by
mouse
or
keyboard
actions.
This
speed
is
applied
after
the
 mouse
is
released
or
after
an
arrow
key
has
been
pressed.
During
the
 mouse
or
keyboard
control,
the
panorama
moves
with
a
speed
specified
 by
the
speed
property.
As
soon
as
the
user
releases
the
mouse
or
the
 arrow
key,
the
motionSpeed
property
is
applied
until
the
panorama
 slows
down
and
stops.
 
 Default
is
2.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.mouseAction = "DragDirect"; myPanorama.mouseControl = true; myPanorama.speed = 4; myPanorama.motionSpeed = 3; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 Specifies
by
how
many
degrees
(0
–
359)
will
the
panorama
initially
be
 rotated
on
the
horizontal
direction
(around
its
vertical
axis).
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.pan = 45; myPanorama.tilt = 45; myPanorama.zoom = 50; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 The
number
of
triangles
used
to
display
the
content.
The
quality
of
the
 panorama
itself
depends
on
this
setting.
For
higher
settings,
the
 panorama
will
display
bent
and
rounded
content
with
more
fidelity.
But
 this
setting
also
affects
the
movement
of
the
panorama:
the
higher
the
 quality
setting,
the
more
CPU
intensive
the
panorama
will
be.
Values
 range
from
1
to
10.
 
 Default
is
2.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.quality = 5; myPanorama.smooth = true; myPanorama.staticSmooth = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
which
specifies
if
the
panorama
will
apply
smoothing
to
 the
content
during
each
rendering
(during
movement
too).



speed


Number
 yes


staticSmooth


Boolean
 no


tilt


Number
 yes



 Default
is
false.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.quality = 5; myPanorama.smooth = true; myPanorama.staticSmooth = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 Specifies
the
speed
at
which
the
panorama
will
rotate
during
mouse
or
 keyboard
control
and
when
the
panorama
is
rotating
automatically
 (autoPlay
is
set
to
true).
 
 Default
is
2.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.mouseAction = "DragDirect"; myPanorama.mouseControl = true; myPanorama.speed = 4; myPanorama.motionSpeed = 3; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
which
specifies
whether
the
panorama
applies
smoothing
 on
the
content,
when
it
is
no
longer
moving.
 
 Default
is
true.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.quality = 5; myPanorama.smooth = true; myPanorama.staticSmooth = false; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 Specifies
by
how
many
degrees
(0
–
359)
will
the
panorama
initially
be
 rotated
on
the
vertical
direction
(around
its
horizontal
axis).
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.pan = 45; myPanorama.tilt = 45; myPanorama.zoom = 50; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 



transitionType


String
 no


transitionDuration


Number
 no


useEmbedPreloader


Boolean
 no


useToolTips


Boolean
 no


The
type
of
transition
between
two
XML
contents
assigned
to
the
 panorama.
When
a
new
XML
is
set
either
by
setting
the
xmlPath
to
a
 new
.xml
file
or
setting
the
xml
property
to
a
new
XML
object,
there's
a
 transition
taking
place
between
the
two
panoramas.
Possible
values
are
 zoom
and
alpha.
 
 Default
is
zoom.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.transitionType = "alpha"; myPanorama.transitionDuration = 2; myPanorama.useEmbedPreloader = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 The
duration
of
the
transition
between
two
panoramas.
 
 Default
is
1.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.transitionType = "alpha"; myPanorama.transitionDuration = 2; myPanorama.useEmbedPreloader = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 [only
available
for
the
full
version]
A
boolean
value
that
specifies
whether
 the
component
should
display
an
internal
preloader
while
the
panorama
 content
is
loaded.
 
 Default
is
true.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.transitionType = "alpha"; myPanorama.transitionDuration = 2; myPanorama.useEmbedPreloader = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 A
boolean
value
which
specifies
whether
the
panorama
should
display
a
 tool
tip
with
information
on
the
hotspot,
when
the
mouse
rolls
over
 hotspots.
 



Default
is
true.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.useToolTips = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; xml


XML
 no


The
XML
data
containing
all
the
necessary
data
of
the
panorama.
If
the
 xml
property
is
changed
to
another
XML
object,
the
new
panorama
will
 be
displayed
using
a
transition
specified
at
transitionType.



 Please
note
that
if
the
component's
source
XML
data
contains
property
 settings
too
then
those
settings
have
priority
over
the
ones
made
 previously
from
the
Component
Inspector
or
by
ActionScript
code.
If
you
 wish
to
overwrite
the
settings
from
the
XML
data,
please
set
those
 properties
again
using
ActionScript
code,
after
the
XML
data
has
been
 processed
(listen
for

the
XML_LOAD_COMPLETE
event).
 
 Example:
 import flash.net.URLLoader; import flash.net.URLRequest; var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.transitionType = "alpha"; myPanorama.useToolTips = true; addChild(myPanorama); var panoXML:XML = new XML(); panoXML.ignoreWhitespace = true; var request:URLRequest = new URLRequest("panoramaData.xml") var ldr:URLLoader = new URLLoader(); ldr.addEventListener(Event.COMPLETE, dataLoaded); ldr.load(request);

xmlPath


String
 yes


function dataLoaded(evt:Event):void { panoXML = XML(ldr.data); myPanorama.xml = panoXML; } 
 The
path
and
file
name
of
the
.xml
file
containing
all
the
necessary
data
of
 the
panorama.
If
another
.xml
file
is
set,
the
new
panorama
will
be
 displayed
using
a
transition
specified
at
transitionType.



 Please
note
that
if
the
component's
source
XML
data
contains
property
 settings
too
then
those
settings
have
priority
over
the
ones
made
 previously
from
the
Component
Inspector
or
by
ActionScript
code.
If
you
 wish
to
overwrite
the
settings
from
the
XML
data,
please
set
those
 properties
again
using
ActionScript
code,
after
the
XML
data
has
been
 processed
(listen
for

the
XML_LOAD_COMPLETE
event).
 



zoom


Number
 yes


Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.autoPlay = true; myPanorama.direction = "left"; myPanorama.useEmbedPreloader = true; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 
 The
horizontal
viewing
angle
under
which
the
panorama
is
visible.
This
 horizontal
angle
sets
the
viewable
area
of
the
images
in
the
panorama.
A
 large
viewing
angle
means
that
a
larger
area
of
the
panorama
is
visible,
 which
means
practically
that
the
panorama
is
zoomed
out.
A
smaller
 viewing
angle
means
zooming
in.
 
 Default
is
70.
 
 Example:
 var myPanorama:JCPanoramaViewer = new JCPanoramaViewer(); myPanorama.width = 500; myPanorama.height = 300; myPanorama.pan = 45; myPanorama.tilt = 45; myPanorama.zoom = 50; addChild(myPanorama); myPanorama.xmlPath = "panoramaData.xml"; 



 Methods
 
 Name
 deletePanorama():void


getPosition():Object


loadContent(source:String):void


reload():void


render():void


setPosition(pan:Number,
tilt:Number):void


Description
 Deletes
the
currently
loaded
panorama
(all
the
XML
data
and
 content)
without
using
any
transition
to
hide
the
visible
content.
 
 Returns
the
current
position
of
the
panorama.
 
 Returns:
 –
an
object
containing
the
current
pan
and
tilt
values
–
the
 horizontal
and
vertical
position
in
degrees
 
 Loads
the
specified
content
into
the
panorama.
 
 Parameters:
 ‐
source:String
–
the
path
and
file
name
of
the
target
content
 
 Reloads
all
the
images
of
the
panorama.
The
current
position
of
the
 component
should
not
change.
 
 Forces
the
component
to
redraw.
The
component
should
keep
its
 position
and
none
of
the
properties
should
change.
 
 Sets
a
new
position
for
the
panorama.
 
 Parameters:



− −

setSize(width:Number,
height:Number):void


unload():void


pan:Number
–
the
new
pan
value
(the
horizontal
angle)
 from
0
to
359
 tilt:Number
–
the
new
tilt
value
(the
vertical
angle)
from
0
 to
359



 Sets
a
new
size
for
the
component.
 
 Parameters:
 − width:Number
–
the
new
width
of
the
component
 instance
 − height:Number
–
the
new
height
of
the
component
 instance
 
 Unloads
the
current
panorama
and
applies
the
currently
selected
 transition
(transitionType)
before
visually
removing
it.
 



 Events
 
 Event
 HOTSPOT_ACTION


Description
 The
event
is
dispatched
when
the
action
of
a
hotspot
is
initiated.
The
event
object
 contains
information
about
the
hotspot
and
the
content.
 
 Event
object
properties:
 − attributes:Array
–
all
the
attributes
of
the
target
hotspot
 − content:Object
–
a
reference
to
the
hotspot
object
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.HOTSPOT _ACTION, hotspotAction);

HOTSPOT_PRESS


function hotspotAction(evt:JCPanoramaViewerEvents):void { trace("Hotspot has initiated the action :: "+evt.attributes+" :: "+evt.content); } 
 The
event
is
dispatched
when
there's
a
mouse
press
action
on
the
hotspot.
The
event
 object
contains
information
about
the
hotspot
and
the
content.
 
 Event
object
properties:
 − attributes:Array
–
all
the
attributes
of
the
target
hotspot
 − content:Object
–
a
reference
to
the
hotspot
object
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.HOTSPOT _PRESS, hotspotPress); function hotspotPress(evt:JCPanoramaViewerEvents):void { trace("hotspot pressed... "+evt.attributes+" :: "+evt.content); } 
 



HOTSPOT_RELEASE


The
event
is
dispatched
when
there's
a
mouse
release
action
on
the
hotspot.
The
 event
object
contains
information
about
the
hotspot
and
the
content.
 
 Event
object
properties:
 − attributes:Array
–
all
the
attributes
of
the
target
hotspot
 − content:Object
–
a
reference
to
the
hotspot
object
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.HOTSPOT _RELEASE, hotspotReleased); function hotspotReleased(evt:JCPanoramaViewerEvents):void { trace("hotspot released... "+evt.attributes+" :: "+evt.content);

HOTSPOT_DOUBLE_CLICK


The
event
is
dispatched
when
there's
a
double
click
mouse
action
on
the
hotspot.
The
 event
object
contains
information
about
the
hotspot
and
the
content.
 
 Event
object
properties:
 − attributes:Array
–
all
the
attributes
of
the
target
hotspot
 − content:Object
–
a
reference
to
the
hotspot
object
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.HOTSPOT _DOUBLE_CLICK, hotspotSelected);

HOTSPOT_ROLL_OVER


function hotspotSelected(evt:JCPanoramaViewerEvents):void { trace("hotspot selected :: "+evt.attributes+" :: "+evt.content); } 
 The
event
is
dispatched
when
the
mouse
rolls
over
the
hotspot.
The
event
object
 contains
information
about
the
hotspot
and
the
content.
 
 Event
object
properties:
 − attributes:Array
–
all
the
attributes
of
the
target
hotspot
 − content:Object
–
a
reference
to
the
hotspot
object
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.HOTSPOT _ROLL_OVER, hotspotOver);

HOTSPOT_ROLL_OUT


function hotspotOver(evt:JCPanoramaViewerEvents):void { trace("mouse over hotspot :: "+evt.attributes+" :: "+evt.content); } 
 The
event
is
dispatched
when
the
mouse
rolls
outside
the
hotspot.
The
event
object
 contains
information
about
the
hotspot
and
the
content.
 
 Event
object
properties:
 − attributes:Array
–
all
the
attributes
of
the
target
hotspot
 − content:Object
–
a
reference
to
the
hotspot
object



Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.HOTSPOT _ROLL_OUT, hotspotOut);

IMAGE_LOAD_START


function hotspotOut(evt:JCPanoramaViewerEvents):void { trace("mouse rolled out of hotspot :: "+evt.attributes+" :: "+evt.content); } 
 The
event
is
dispatched
when
an
image
starts
loading
into
the
panorama.
This
event
is
 dispatched
for
each
image
separately.
The
event
object
provides
the
index
of
the
 image
and
its
path.
 
 Event
object
properties:
 − index:int
–
the
index
of
the
image
that
starts
loading
 − path:String
–
the
path
and
file
name
of
the
image
that
starts
loading
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.IMAGE_L OAD_START, imageStart);

IMAGE_LOAD_PROGRESS


function imageStart(evt:JCPanoramaViewerEvents):void { trace("Starting "+evt.index+" :: "+evt.path); } 
 The
event
is
dispatched
during
the
loading
process
of
the
images
of
the
panorama.
 This
event
is
dispatched
for
each
image
separately.
The
event
object
specifies
how
 much
of
image
has
loaded
and
the
total
size
of
the
image.
 
 Event
object
properties:
 − index:int
–
the
index
of
the
image
that
starts
loading
 − path:String
–
the
path
and
file
name
of
the
image
that
starts
loading
 − bytesLoaded:int
–
how
much
of
the
target
image
has
been
loaded
so
far
 − bytesTotal:int
–
the
total
size
of
the
target
image
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.IMAGE_L OAD_PROGRESS, imageLoading);

IMAGE_LOAD_COMPLETE


function imageLoading(evt:JCPanoramaViewerEvents):void { trace("Loading "+evt.index+" :: "+evt.path); trace("progress :: "+evt.bytesLoaded+" / "+evt.bytesTotal); } 
 The
event
is
dispatched
when
the
images
has
completely
loaded.
This
event
is
 dispatched
for
each
image
separately.
The
event
object
specifies
how
much
of
image
 has
loaded
and
the
total
size
of
the
image.
 
 Event
object
properties:
 − index:int
–
the
index
of
the
image
that
was
loaded
 − path:String
–
the
path
and
file
name
of
the
image
that
was
loaded
 
 Example:



import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.IMAGE_L OAD_COMPLETE, imageLoaded);

IMAGE_LOAD_ERROR


function imageLoaded(evt:JCPanoramaViewerEvents):void { trace("Completed "+evt.index+" :: "+evt.path); } 
 The
event
is
dispatched
when
there
was
an
error
during
the
loading
process
of
an
 image.
This
event
is
dispatched
for
each
image
separately.
The
event
object
specifies
 how
much
of
image
has
loaded
and
the
total
size
of
the
image.
 
 Event
object
properties:
 − index:int
–
the
index
of
the
image
that
starts
loading
 − path:String
–
the
path
and
file
name
of
the
image
that
starts
loading
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.IMAGE_L OAD_ERROR, imageError);

INIT


function imageError(evt:JCPanoramaViewerEvents):void { trace("Error loading image "+evt.index+" :: "+evt.path); } 
 The
event
is
dispatched
when
the
panorama
is
already
initialized
and
displayed.
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.INIT, panoramaInitialized);

LOAD_START


function panoramaInitialized(evt:JCPanoramaViewerEvents):void { trace("The panorama has been initialized. You can now access the contents: "+evt.target.content); } 
 The
event
is
dispatched
when
the
panorama
starts
loading
the
images.
This
event
is
 dispatched
once,
when
each
panorama
starts
loading.
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.LOAD_ST ART, startingLoad);

LOAD_PROGRESS


function startingLoad(evt:JCPanoramaViewerEvents):void { trace("starting the loading process..."); } 
 The
event
is
dispatched
during
the
loading
process
of
the
panorama's
contents.
This
 event
is
dispatched
once
for
each
panorama.
 
 Event
object
properties:
 − index:int
–
the
number
of
loaded
images
so
far
 − totalImages:int
–
the
total
number
of
images
that
should
be
loaded



Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.LOAD_PR OGRESS, loadInProgress);

LOAD_COMPLETE


function loadInProgress(evt:JCPanoramaViewerEvents):void { trace("loaded "+evt.index+" out of "+evt.totalImages); } 
 The
event
is
dispatched
when
the
panorama
starts
loading
the
images.
This
event
is
 dispatched
once,
when
each
panorama
has
finished
loading.
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.LOAD_CO MPLETE, loadingComplete);

ROTATE


function loadingComplete(evt:JCPanoramaViewerEvents):void { trace("loading is complete..."); } 
 The
event
is
dispatched
when
the
camera
is
rotated.
The
new
pan
and
tilt
values
can
 be
retrieved
directly
from
the
component
instance.
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.ROTATE, panoramaRotated);

NODE_CHANGED


function panoramaRotated(evt:JCPanoramaViewerEvents):void { trace("New position: "+myPanorama.pan+" , "+myPanorama.tilt); } 
 The
event
is
dispatched
when
a
node
of
the
virtual
tour
has
changed.

 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.NODE_CH ANGED, nodeChanged);

TRANSITION_START


function nodeChanged(evt:JCPanoramaViewerEvents):void { trace("Node has changed..."); } 
 The
event
is
dispatched
when
the
transition
between
two
virtual
tour
nodes
starts.
 
 Event
object
properties:
 − transitionType:String
–
the
type
of
transition
that
is
executing:
show
or
 hide
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents;


myPanorama.addEventListener(JCPanoramaViewerEvents.TRANSIT ION_START, transitionStart);

TRANSITION_FINISH


function transitionStart(evt:JCPanoramaViewerEvents):void { trace("Starting "+evt.transitionType+" transition..."); } 
 The
event
is
dispatched
when
the
transition
between
two
virtual
tour
nodes
has
 finished.
 
 Event
object
properties:
 − transitionType:String
–
the
type
of
transition
that
is
executing:
show
or
 hide
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.TRANSIT ION_FINISH, transitionEnd);

UNLOAD


function transitionEnd(evt:JCPanoramaViewerEvents):void { trace("Transition "+evt.transitionType+" ended..."); } 
 The
event
is
dispatched
when
currently
loaded
panorama
gets
unloaded
(call
to
the
 unload()
method),
deleted
(call
to
the
deletePanorama()
method)
or
replaced
 by
another
panorama
(a
new
XML
data
is
loaded
via
the
xmlPath
or
xml
property).
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.UNLOAD, panoramaUnloaded);

XML_LOAD_START


function panoramaUnloaded(evt:JCPanoramaViewerEvents):void { trace("Panorama has been unloaded..."); } 
 The
event
is
dispatched
when
the
panorama
starts
loading
the
.xml
file.
 
 Event
object
properties:
 − path:String
–
the
path
and
file
name
of
the
source
.xml
file
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.XML_LOA D_START, xmlStarted);

XML_LOAD_PROGRESS


function xmlStarted(evt:JCPanoramaViewerEvents):void { trace("starting to load XML data :: "+evt.path); } 
 The
event
is
dispatched
during
the
loading
process
of
the
XML
data.
 
 Event
object
properties:
 − path:String
–
the
path
and
file
name
of
the
source
.xml
file
 − bytesLoaded:int
–
how
much
of
the
XML
data
has
loaded
so
far



− bytesTotal:int
–
the
total
size
of
the
XML
data
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.XML_LOA D_PROGRESS, xmlLoading); function xmlLoading(evt:JCPanoramaViewerEvents):void { trace("loading XML data :: "+evt.bytesLoaded+" / "+evt.bytesTotal+" :: "+evt.path); } XML_LOAD_COMPLETE


The
event
is
dispatched
after
the
XML
data
has
completely
loaded.
 
 Event
object
properties:
 − path:String
–
the
path
and
file
name
of
the
source
.xml
file
 − bytesTotal:int
–
the
total
size
of
the
XML
data
 − xml:XML
–
a
reference
to
the
object
containing
the
XML
data
 

 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.XML_LOA D_COMPLETE, xmlComplete);

ZOOM


function xmlComplete(evt:JCPanoramaViewerEvents):void { trace("XML data loaded :: "+evt.path+" :: "+evt.xml); } 
 The
event
is
dispatched
when
the
zoom
level
changes.
The
new
zoom
value
can
be
 retrieved
directly
from
the
component
instance.
 
 Example:
 import com.jumpeye.Events.JCPanoramaViewerEvents; myPanorama.addEventListener(JCPanoramaViewerEvents.ZOOM, panoramaZoom); function panoramaZoom(evt:JCPanoramaViewerEvents):void { trace("New zoom level: "+myPanorama.zoom); } 



 Hotspots
 


The
hotspots
are
locations
on
the
images
that
make
up
a
panorama.
Those
locations
could
represent
points
 of
interest
for
the
viewer
watching
the
panorama
and
allow
user
interaction.
A
hotspot
can
only
be
added
 from
the
XML
data
of
the
panorama
(an
external
.xml
file
or
an
XML
object
created
by
code).
 
 A
hotspot
has
the
following
attributes:
 − id:String
–
the
id
of
the
hotspot.
 − action:String
–
specifies
the
type
of
mouse
event
to
which
the
hotspot
will
execute
its
actions.
 Possible
values
are
press,
release,
over
and
doubleClick.
 − pan:Number
–
the
horizontal
angle
of
the
panorama.
 − tilt:Number
–
the
vertical
angle
of
the
panorama.



− − − − − − −

customIcon:String
–
the
location
where
the
icon
should
be
loaded
from.
It
could
be
the
url
of
an
 external
image
or
.swf
file
(if
it
has
a
file
extension)
or
the
class
name
of
a
movie
clip
from
the
 Library.
If
the
target
file/movie
clip
does
not
exist
or
the
path
is
incorrect,
there
will
be
no
icon
 loaded
into
the
panorama
and
further
more,
there
could
be
an
error
message
displayed.
 fixed:Boolean
–
specifies
if
the
hotspot
will
get
distorted
together
with
the
panorama.
 refresh:Boolean
–
specifies
if
the
hotspot
clip
will
be
refreshed
(useful
when
it
is
an
animated
 clip)
 type:String
–
the
type
of
hotspot.
Possible
values
are
info,
link
and
panorama.
 panoURL:String
–
the
url
of
another
panorama
which
will
be
loaded
if
the
action
(mouse
action)
 takes
place
on
the
hotspot.
 linkURL:String
–
the
url
that
will
be
opened
if
the
action
(mouse
action)
takes
place
on
the
 hotspot.
 target:String
–
the
target
browser
window
into
which
the
link
will
be
opened.
 useHandCursor:Boolean
(default
=
false)
–
specifies
whether
the
hand
cursor
will
be
displayed
 when
the
mouse
cursor
is
over
the
hotspot
icon.



 A
hotspot
XML
node
has
another
child
node
representing
the
description
text
associated
to
that
hotspot.
 The
description
is
displayed
as
tooltip
when
the
mouse
rolls
over
the
hotspot
icon.
 
 Example:
 <hotspot action="press" id="1" source="" pan="90.54545454545455" tilt="25.71428571428571" fixed="true" type="info" target="2"> <description><![CDATA[This is the <b>description</b> of the hotspot which uses <i>html text</i>]]></description> </hotspot>


 


Virtual
tours
 


The
component
contains
a
basic
virtual
tour
which
has
the
following
features:
 − when
a
panorama
hotspot
is
selected,
the
component
loads
the
other
panorama
and
applies
a
 transition
between
the
previously
loaded
panorama
and
the
newly
loaded
one
 − all
the
virtual
tours
settings
are
made
only
in
the
XML
data
 Virtual
tools
are
created
using
our
JC
Panorama
Editor
application.


Sürprise (Test-Restaurant) 8807 Freienbach  

How
to
use
 
 ActionScript:
3.0
 Flash
IDE:
Flash
CS3,
Flash
CS4
 FlashPlayer:
FlashPlayer
9+
 
 
 
 
 
 autoPlay
 Boolean
 yes
 var myPanor...