Frame 1
var pre_enabled = true;
var pre_bar_bgcolor = 255;
var pre_bar_bgalpha = 30;
var pre_bar_color = 128;
var pre_bar_alpha = 100;
var pre_bar_rect = (new flash.geom.Rectangle(10, 30, 180, 10));
var pre_text_rect = (new flash.geom.Rectangle(10, 10, 180, 20));
var pre_image_anchor = 0;
var sprite_x = new Array();
var sprite_y = new Array();
var sprite_anchor = new Array();
var sprite_enabled = new Array();
var overlay_text = "Test";
var overlay_timeout = 0;
Main.init(_root);
pano = Main.pc;
pano.initMovClip = false;
pano.started = false;
if (window_width != undefined) {
pano.setWindowSize(window_width, window_height);
pano.windowScaleIgnore = true;
}
if (window_x != undefined) {
pano.setWindowPos(window_x, window_y);
}
var showItem = true;
var my_cm = new ContextMenu(menuHandler);
my_cm.hideBuiltInItems();
this.menu = my_cm;
var pre_text_fmt = new TextFormat();
pre_text_fmt.bold = true;
pre_text_fmt.font = "Arial";
pre_text_fmt.size = 12;
pre_text_fmt.color = 0;
Frame 2
Main.showfps = false;
Main.title_string = "";
Main.userdata_copyright = "";
Main.userdata_author = "";
Main.userdata_source = "";
Main.userdata_date = "";
Main.userdata_title = "";
Main.userdata_comment = "";
Main.userdata_description = "";
Main.userdata_information = "";
Main.locked = false;
Main.allowFullscreen = false;
Main.ignoreWheel = false;
Main.userdata_software = "Pano2QTVR pro 1.6.6 licensed to iNViSiBLE TEAM";
Main.scaleMode = 1;
Main.windowWidth = 1024;
Main.windowHeight = 768;
pano.setWindowSize(0, 0);
pre_enabled = true;
pre_bar_bgcolor = 8421631 /* 0x8080FF */;
pre_bar_bgalpha = 50;
pre_bar_color = 255;
pre_bar_alpha = 50;
pre_text_fmt.color = 16777215 /* 0xFFFFFF */;
pre_text_rect.left = 10;
pre_text_rect.top = 10;
pre_bar_rect.left = 10;
pre_bar_rect.top = 30;
pre_bar_rect.width = 180;
pre_bar_rect.height = 10;
pano.pan.cur = 0;
pano.tilt.cur = 0;
pano.fov.cur = 70;
pano.pan.def = 0;
pano.tilt.def = 0;
pano.fov.def = 70;
pano.pan.min = 0;
pano.tilt.min = -90;
pano.fov.min = 10;
pano.pan.max = 360;
pano.tilt.max = 90;
pano.fov.max = 120;
pano.autorotate = false;
pano.autorotate_timeout = 3;
pano.autorotate_pan = 1;
pano.autorotate_tilt_force = 0;
pano.autorotate_onlyinfocus = true;
pano.autorotate_onlyloaded = false;
pano.preloadColor = 16777216 /* 0x1000000 */;
pano.sensitifity = 8;
pano.simulateMass = true;
pano.hasHotspots = false;
pano.hotspottxt_width = 200;
pano.hotspottxt_height = 20;
pano.tileSize = 1280;
pano.meshBase = 9;
pano.meshAuto = true;
Main.bmpMotionSmooth = false;
pano.init_cube();
pano.started = true;
pano.setMeshDensity(0);
Set("sprite_enabled[0]", false);
Set("sprite_enabled[1]", false);
Set("sprite_enabled[2]", false);
Set("sprite_enabled[3]", false);
Set("sprite_enabled[4]", false);
Set("sprite_enabled[5]", false);
Set("sprite_enabled[6]", false);
Set("sprite_enabled[7]", false);
Set("sprite_enabled[8]", false);
Set("sprite_enabled[9]", false);
Set("sprite_enabled[10]", false);
Set("sprite_enabled[11]", false);
Set("sprite_enabled[12]", false);
Set("sprite_enabled[13]", false);
Set("sprite_enabled[14]", false);
Set("sprite_enabled[15]", false);
pano.hs_local = 1;
pano.hs_local = 0;
Frame 4
function goFullScreen() {
Stage.displayState = "fullScreen";
}
function exitFullScreen() {
Stage.displayState = "normal";
}
function pre_image_resize() {
preimg._x = pre_imagex;
preimg._y = pre_imagey;
a = pre_image_anchor;
if (((a == 3) || (a == 4)) || (a == 5)) {
preimg._x = ((Stage.width - Main.windowWidth) / 2) + pre_imagex;
prebar._x = (Stage.width - Main.windowWidth) / 2;
}
if (((a == 1) || (a == 4)) || (a == 7)) {
preimg._y = ((Stage.height - Main.windowHeight) / 2) + pre_imagey;
prebar._y = (Stage.height - Main.windowHeight) / 2;
}
if (((a == 6) || (a == 7)) || (a == 8)) {
preimg._x = (Stage.width - Main.windowWidth) + pre_imagex;
prebar._x = Stage.width - Main.windowWidth;
}
if (((a == 2) || (a == 5)) || (a == 8)) {
preimg._y = (Stage.height - Main.windowHeight) + pre_imagey;
prebar._y = Stage.height - Main.windowHeight;
}
pretxt._x = prebar._x + pre_text_rect.left;
pretxt._y = prebar._y + pre_text_rect.top;
}
function sprite_image_resize() {
var _local1;
sp = 0;
while (sp < 16) {
if (sprite_enabled[sp] == true) {
_local1 = sprite_anchor[sp];
if (((_local1 == 3) || (_local1 == 4)) || (_local1 == 5)) {
simg[sp]._x = ((Stage.width - Main.windowWidth) / 2) + sprite_x[sp];
}
if (((_local1 == 1) || (_local1 == 4)) || (_local1 == 7)) {
simg[sp]._y = ((Stage.height - Main.windowHeight) / 2) + sprite_y[sp];
}
if (((_local1 == 6) || (_local1 == 7)) || (_local1 == 8)) {
simg[sp]._x = (Stage.width - Main.windowWidth) + sprite_x[sp];
}
if (((_local1 == 2) || (_local1 == 5)) || (_local1 == 8)) {
simg[sp]._y = (Stage.height - Main.windowHeight) + sprite_y[sp];
}
}
sp++;
}
}
var simg = new Array();
if (window_width != undefined) {
var nw = parseInt(window_width);
var nh = parseInt(window_height);
if ((nw != NaN) && (nh != NaN)) {
pano.setWindowSize(nw, nh);
}
}
if (window_x != undefined) {
var nx = parseInt(window_x);
var ny = parseInt(window_y);
if ((nx != NaN) && (ny != NaN)) {
pano.setWindowPos(nx, ny);
}
}
if (Main.scaleMode == 1) {
Stage.scaleMode = "noScale";
}
if (Main.scaleMode == 2) {
Stage.scaleMode = "noBorder";
}
if (Main.scaleMode == 3) {
Stage.scaleMode = "exactFit";
}
if (Main.allowFullscreen == true) {
var fullscreenCM = new ContextMenu(menuHandler);
fullscreenCM.hideBuiltInItems();
var fs = new ContextMenuItem("Go Full Screen", goFullScreen);
fullscreenCM.customItems.push(fs);
var xfs = new ContextMenuItem("Exit Full Screen", exitFullScreen);
fullscreenCM.customItems.push(xfs);
_root.menu = fullscreenCM;
}
if (pan != undefined) {
var v = parseFloat(pan);
if (v != NaN) {
pano.setPan(v);
}
}
if (tilt != undefined) {
var v = parseFloat(tilt);
if (v != NaN) {
pano.setTilt(v);
}
}
if (fov != undefined) {
var v = parseFloat(fov);
if (v != NaN) {
pano.setFov(v);
}
}
if (autorotate != undefined) {
var v = parseFloat(autorotate);
if (v != NaN) {
pano.autorotate = v != 0;
pano.autorotate_pan = v;
}
}
var sp;
sp = 0;
while (sp < 16) {
if (sprite_enabled[sp] == true) {
simg[sp] = _root.createEmptyMovieClip("smg" + sp, 2960 + (sp * 2));
simg[sp]._x = sprite_x[sp];
simg[sp]._y = sprite_y[sp];
var simgd = flash.display.BitmapData.loadBitmap(("sprite" + sp) + "image");
simg[sp].attachBitmap(simgd, (2960 + (sp * 2)) + 1);
}
sp++;
}
if (Main.scaleMode == 1) {
var myListener = new Object();
myListener.onResize = function () {
sprite_image_resize();
if (pre_image == 1) {
pre_image_resize();
}
};
Stage.addListener(myListener);
Main.doStageResize();
sprite_image_resize();
}
if (autorotate_delay != undefined) {
var v = parseFloat(autorotate_delay);
if (v != NaN) {
pano.autorotate_timeout = v;
}
}
if (pano.started == false) {
pano.init_cube();
pano.started = true;
}
pano.init_faces();
if (pre_enabled) {
pre_text_rect.width = 180;
pre_text_rect.height = 20;
_root.createTextField("pretxt", 996, pre_text_rect.left, pre_text_rect.top, pre_text_rect.width, pre_text_rect.height);
_root.pretxt._visible = false;
_root.pretxt.setNewTextFormat(pre_text_fmt);
_root.pretxt.selectable = false;
_root.pretxt.text = "Loading...";
_root.createEmptyMovieClip("prebar", 994);
if (pre_image == 1) {
var preimg = _root.createEmptyMovieClip("preimg", 992);
preimg._x = pre_imagex;
preimg._y = pre_imagey;
var preimgbd = flash.display.BitmapData.loadBitmap("preloadimage");
preimg.attachBitmap(preimgbd, 993);
}
pre_image_resize();
}
_root.onEnterFrame = function () {
var _local3;
var _local6;
var _local2;
var _local5;
var _local4;
_local4 = getBytesLoaded() / getBytesTotal();
if (pre_enabled) {
_root.pretxt._visible = true;
_root.pretxt.text = ("Loading... " + Math.floor(100 * _local4)) + " %";
_root.prebar.clear();
_root.prebar.beginFill(pre_bar_bgcolor, pre_bar_bgalpha);
_root.prebar.lineStyle(2, pre_bar_color, pre_bar_alpha);
_local3 = pre_bar_rect.left;
_local6 = _local3 + (pre_bar_rect.width * _local4);
_local2 = pre_bar_rect.top;
_local5 = _local2 + pre_bar_rect.height;
_root.prebar.moveTo(_local3, _local2);
_root.prebar.lineTo(_local6, _local2);
_root.prebar.lineTo(_local6, _local5);
_root.prebar.lineTo(_local3, _local5);
_root.prebar.lineTo(_local3, _local2);
_root.prebar.endFill();
}
Main.doEnterFrame();
if (_local4 == 1) {
_root.gotoAndPlay(_root._framesloaded);
}
};
Frame 5
pano.init_faces();
Frame 6
pano.init_faces();
Frame 7
pano.init_faces();
Frame 8
pano.init_faces();
Frame 9
pano.init_faces();
Frame 10
pano.init_faces();
Frame 11
pano.init_faces();
Frame 13
if (pre_enabled) {
_root.pretxt.removeTextField();
_root.prebar.removeMovieClip();
_root.preimg.removeMovieClip();
}
_root.onEnterFrame = function () {
Main.doEnterFrame();
};
pano.init_faces();
pano.completed = true;
pano.dirty = true;
pano.windowScaleIgnore = false;
stop();
Symbol 18 MovieClip [__Packages.Main] Frame 0
class Main
{
static var pc, bclip, fc, setupFrame, setupRow, fps_txt, p2vr_txt, t_fps, t1, t2;
function Main () {
}
static function main() {
title_string = "Pano2QTVR + FlashPack";
init(_root);
pc.meshBase = 10;
pc.init_cube();
pc.init_faces();
showfps = true;
pc.meshCylBase = 5;
pc.setMeshDensity(0);
pc.autorotate = true;
pc.doPaint();
pc.started = true;
pc.dirty = true;
setWindowSize(0, 0);
pc.initHotspots();
}
static function init(pbclip) {
bclip = pbclip;
pc = new PanoCube();
pc.init(bclip);
isinfocus = false;
title_string = "";
pc.pan.init(pan_init, pan_min, pan_max);
pc.tilt.init(tilt_init, tilt_min, tilt_max);
pc.fov.init(fov_init, fov_min, fov_max);
pc.started = false;
fc = 0;
bclip.onEnterFrame = doEnterFrame;
var _local3 = new Object();
_local3.onMouseDown = doMouseDown;
_local3.onMouseUp = doMouseUp;
_local3.onMouseWheel = doMouseWheel;
_local3.onMouseMove = doMouseMove;
Mouse.addListener(_local3);
var _local4 = new Object();
_local4.onKeyDown = doKeyDown;
_local4.onKeyUp = doKeyUp;
Key.addListener(_local4);
bclip.focusEnabled = true;
setupFrame = 0;
setupRow = 0;
var _local5 = new Object();
_local5.onResize = doStageResize;
Stage.addListener(_local5);
if (!windowScale) {
pc.rect.width = windowWidth;
pc.rect.height = windowHeight;
}
var _local2 = new TextFormat();
_local2.bold = true;
_local2.font = "Arial";
_local2.size = 12;
_local2.color = 16777215 /* 0xFFFFFF */;
fps_txt = bclip.createTextField("fps_txt", 111, 10, 10, 1101, 20);
_local2.align = "left";
fps_txt.setNewTextFormat(_local2);
fps_txt.selectable = false;
fps_txt.text = "";
if (title_string != "") {
var _local1 = new TextFormat();
_local1.bold = true;
_local1.font = "Arial";
_local1.size = 12;
_local1.color = 16777215 /* 0xFFFFFF */;
p2vr_txt = bclip.createTextField("p2vr_txt", 1100, Stage.width - 215, Stage.height - 20, 200, 20);
_local1.align = "right";
p2vr_txt.setNewTextFormat(_local1);
p2vr_txt.selectable = false;
p2vr_txt.text = title_string;
}
doReposElements();
}
static function doKeyDown() {
if (!locked) {
pc.lastkeycode = Key.getCode();
if (Key.getAscii() == 43) {
pc.changeFov(-1);
}
if (Key.getAscii() == 45) {
pc.changeFov(1);
}
if (Key.isDown(16)) {
if (Key.getCode() == 73) {
showfps = !showfps;
if (!showfps) {
fps_txt.text = "";
}
}
if (Key.getCode() == 72) {
pc.meshBase++;
}
if (Key.getCode() == 76) {
pc.meshBase--;
}
}
pc.key_down = true;
pc.dirty = true;
}
}
static function doKeyUp() {
pc.key_down = false;
pc.dirty = true;
}
static function doStageResize() {
if (windowScale) {
pc.doStageResize();
doReposElements();
}
}
static function doEnterFrame() {
fc++;
if (showfps) {
if ((fc % 10) == 0) {
var _local3 = new Date();
var _local2;
_local2 = _local3.getTime();
fps_txt.text = (((("fps " + (Math.round(100000 / (_local2 - t_fps)) * 0.1)) + " Q: ") + pc.meshBase) + "/") + pc.cubeTiles;
t_fps = _local2;
}
}
if ((!pc.started) && (_root._currentframe > 5)) {
pc.init_faces();
pc.doPaint();
pc.started = true;
pc.dirty = true;
}
pc.doEnterFrame();
}
static function addHotspot(ap, at, typ, url) {
title_string = (((((("ap:" + ap) + "at:") + at) + "t:") + typ) + "url:") + url;
}
static function timestamp() {
var _local1 = new Date();
t1 = _local1.getTime();
t2 = t1;
}
static function doMouseDown() {
if (!locked) {
pc.doMouseDown();
}
}
static function doMouseWheel(delta) {
if (!ignoreWheel) {
if (!locked) {
pc.doMouseWheel(delta);
}
}
}
static function doMouseMove() {
var _local3;
var _local2;
pc.checkHotspots(_root._xmouse, _root._ymouse);
}
static function doClickHotspot(id) {
if (pc.onClickHotspot != undefined) {
pc.onClickHotspot(id);
}
}
static function doRollOverHotspot(id) {
if (pc.onRollOverHotspot != undefined) {
pc.onRollOverHotspot(id);
}
}
static function doRollOutHotspot(id) {
if (pc.onRollOutHotspot != undefined) {
pc.onRollOutHotspot(id);
}
}
static function doMouseUp() {
if (!locked) {
pc.doMouseUp();
}
}
static function doReposElements() {
_root.p2vr_txt._x = (Stage.width - _root.p2vr_txt._width) - 15;
_root.p2vr_txt._y = Stage.height - 20;
pc.reposElements();
}
static function setWindowSize(wx, wy) {
if (wx == 0) {
windowScale = true;
pc.doStageResize();
} else {
windowScale = false;
windowWidth = wx;
windowHeight = wy;
pc.rect.width = windowWidth;
pc.rect.height = windowHeight;
}
}
static function setWindowPos(wx, wy) {
var _local5 = pc.rect.width;
var _local4 = pc.rect.height;
pc.rect.left = wx;
pc.rect.top = wy;
pc.rect.width = _local5;
pc.rect.height = _local4;
_root._x = wx;
_root._y = wy;
}
static function findHotspot(aid) {
var _local1;
var _local2;
_local2 = pc.hotspots.length - 1;
while (_local2 >= 0) {
_local1 = pc.hotspots[_local2];
if (_local1.id == aid) {
return(_local1);
}
_local2--;
}
return(null);
}
static function controller_callback(id, v) {
if (v != undefined) {
if (id == "zoom") {
pc.changeFov(-v);
}
if (id == "fov") {
pc.changeFov(v);
}
if (id == "pan") {
pc.changePan(v);
}
if (id == "tilt") {
pc.changeTilt(v);
}
if (id == "quality") {
if (v < 3) {
pc.cubeTiles = 4;
}
pc.cubeTiles = v;
}
if (id == "autoplay") {
pc.autoplay = v != 0;
if (v == 0) {
pc.resetlastaction();
}
}
if (id == "autorotate") {
pc.autorotate = v != 0;
}
} else {
if ((id == "zoom") || (id == "fov")) {
return(pc.fov.cur);
}
if (id == "pan") {
return(pc.pan.cur);
}
if (id == "tilt") {
return(pc.tilt.cur);
}
if (id == "autoplay") {
return((pc.autoplay ? 1 : 0));
}
if (id == "autorotate") {
return((pc.autorotate ? 1 : 0));
}
if (id == "userdata.copyright") {
return(userdata_copyright);
}
if (id == "userdata.author") {
return(userdata_author);
}
if (id == "userdata.source") {
return(userdata_source);
}
if (id == "userdata.date") {
return(userdata_date);
}
if (id == "userdata.title") {
return(userdata_title);
}
if (id == "userdata.comment") {
return(userdata_comment);
}
if (id == "userdata.description") {
return(userdata_description);
}
if (id == "userdata.information") {
return(userdata_information);
}
if (id == "userdata.software") {
return(userdata_software);
}
if (id == "flags") {
return(pc.controllerFlags);
}
}
}
static var title_string = "";
static var title_timeout = 0;
static var fov_init = 70;
static var fov_min = 30;
static var fov_max = 100;
static var pan_init = 0;
static var pan_min = 0;
static var pan_max = 360;
static var tilt_init = 0;
static var tilt_min = -90;
static var tilt_max = 90;
static var qualityMotion = "HIGH";
static var qualityStatic = "HIGH";
static var mqual = 0;
static var isinfocus = false;
static var showfps = false;
static var locked = false;
static var ignoreWheel = false;
static var allowFullscreen = true;
static var windowScale = true;
static var windowWidth = 400;
static var windowHeight = 300;
static var scaleMode = 300;
static var userdata_copyright = "";
static var userdata_author = "";
static var userdata_source = "";
static var userdata_date = "";
static var userdata_title = "";
static var userdata_comment = "";
static var userdata_description = "";
static var userdata_information = "";
static var userdata_software = "";
}
Symbol 19 MovieClip [__Packages.PanoCube] Frame 0
class PanoCube
{
var framecnt, fov, pan, tilt, bmp_in, bmp_loaded, va, vat, m, hotspots, qthotspots, mdown, mdownt, turn, cubeTiles, rect, hs_local, dPan, dTilt, autorotate_pan, autorotate_tilt_force, autorotate_timeout, autorotate, autorotate_onlyinfocus, enable_callback, controllerPos, controllerAlpha, bmpSmooth, isCylinder, cylTilesXS, completed, preloadColor, windowScaleIgnore, lastaction_dt, tileSize, sensitifity, simulateMass, hasHotspots, hotspottxt_width, hotspottxt_height, currentHotspot, onClickQtHotspot, useMask, bclip, cv, hotspot_txt, dirty, cylTilesXBase, cylTilesX, ed, cv2, mat_sf, cylTilesY, started, dA, autoplay, lastkeycode, autorotate_onlyloaded, onRotate, lastMouseDown;
function PanoCube () {
framecnt = 0;
fov = new PanoViewLimits(90, 20, 120);
pan = new PanoViewLimits(0, 0, 360);
tilt = new PanoViewLimits(0, -90, 90);
bmp_in = new Array();
bmp_loaded = new Array();
va = new Array();
vat = new Array();
m = new flash.geom.Matrix();
hotspots = new Array();
qthotspots = new Array();
mdown = new flash.geom.Point();
mdownt = 0;
turn = false;
cubeTiles = meshBase;
rect = new flash.geom.Rectangle();
hs_local = 0;
dPan = 0;
dTilt = 0;
autorotate_pan = 0.5;
autorotate_tilt_force = 0.01;
autorotate_timeout = 5;
autorotate = false;
autorotate_onlyinfocus = true;
enable_callback = false;
controllerPos = 6;
controllerAlpha = 100;
bmpSmooth = true;
rect.width = Stage.width;
rect.height = Stage.height;
isCylinder = false;
cylTilesXS = 4;
enable_callback = true;
completed = false;
preloadColor = 16777216 /* 0x1000000 */;
windowScaleIgnore = false;
lastaction_dt = 0;
tileSize = 0;
sensitifity = 8;
simulateMass = true;
hasHotspots = false;
hotspottxt_width = 200;
hotspottxt_height = 20;
currentHotspot = null;
onClickQtHotspot = undefined;
useMask = true;
}
function init(pbclip) {
var _local3;
var _local5;
var _local6;
bclip = pbclip;
cv = bclip.createEmptyMovieClip("cv", 20);
cv._alpha = 100;
cv.blendMode = "normal";
cv.onRollOver = function () {
Main.isinfocus = true;
};
cv.onRollOut = function () {
Main.isinfocus = false;
};
cv.useHandCursor = false;
var _local2 = new TextFormat();
_local2.bold = false;
_local2.font = "Arial";
_local2.color = 0;
hotspot_txt = bclip.createTextField("hotspot_txt", 150, 10, 10, hotspottxt_width, hotspottxt_height);
_local2.align = "center";
hotspot_txt.setNewTextFormat(_local2);
hotspot_txt.selectable = false;
hotspot_txt.html = true;
hotspot_txt.borderColor = 0;
hotspot_txt.backgroundColor = 16777215 /* 0xFFFFFF */;
hotspot_txt.type = "dynamic";
hotspot_txt.htmlText = "HS";
hotspot_txt._alpha = 70;
hotspot_txt.border = true;
hotspot_txt.background = true;
hotspot_txt._visible = false;
hotspot_txt.multiline = true;
updateMask();
}
function updateMask() {
if (useMask) {
_root.createEmptyMovieClip("panomask", 0);
_root.panomask.moveTo(0, 0);
_root.panomask.beginFill(136);
_root.panomask.lineTo(rect.right - rect.left, 0);
_root.panomask.lineTo(rect.right - rect.left, rect.bottom - rect.top);
_root.panomask.lineTo(0, rect.bottom - rect.top);
_root.panomask.endFill();
cv.setMask(_root.panomask);
} else {
cv.setMask(null);
}
}
function setWindowSize(wx, wy) {
if (windowScaleIgnore == false) {
Main.setWindowSize(wx, wy);
}
updateMask();
}
function setWindowPos(wx, wy) {
Main.setWindowPos(wx, wy);
updateMask();
}
function doStageResize() {
_root._x = _root._x - ((Stage.width - rect.width) / 2);
_root._y = _root._y - ((Stage.height - rect.height) / 2);
rect.width = Stage.width;
rect.height = Stage.height;
setup_cube();
dirty = true;
checkLimits();
updateMask();
}
function reposElements() {
var _local4;
var _local3;
_local4 = Math.floor(controllerPos / 3);
_local3 = controllerPos % 3;
if (_local4 == 0) {
_root.cclip._x = 0;
}
if (_local4 == 1) {
_root.cclip._x = (rect.width - _root.cclip._width) / 2;
}
if (_local4 == 2) {
_root.cclip._x = rect.width - _root.cclip._width;
}
if (_local3 == 0) {
_root.cclip._y = 0;
}
if (_local3 == 1) {
_root.cclip._y = (rect.height - _root.cclip._height) / 2;
}
if (_local3 == 2) {
_root.cclip._y = rect.height - _root.cclip._height;
}
updateMask();
}
function init_cube() {
var _local2;
_local2 = 0;
while (_local2 < 12) {
bmp_loaded.push(false);
_local2++;
}
setup_cube();
setMeshDensity(0);
}
function setup_cube() {
var _local4;
var _local2;
var _local3 = 1.001;
if (isCylinder == true) {
return(undefined);
}
if (Main.qualityMotion == "LOW") {
_local3 = 1.0025;
if (tileSize > 0) {
_local3 = 1.002 + (2 / tileSize);
}
}
var _local6 = (fov.cur / 2) * (Math.PI/180);
var _local5 = Math.floor(((Stage.height / 2) / Math.tan(_local6)) * 2);
if (tileSize > 0) {
if (Main.qualityMotion == "LOW") {
_local3 = 1.0005 + (((tileSize / _local5) * 2) / tileSize);
} else {
_local3 = 1 + (((tileSize / _local5) * 1) / tileSize);
}
}
va = new Array();
_local4 = 0;
while (_local4 < 6) {
va.push(new Vector3d(-_local3, -_local3, -1));
va.push(new Vector3d(_local3, -_local3, -1));
va.push(new Vector3d(-_local3, _local3, -1));
va.push(new Vector3d(_local3, _local3, -1));
if (_local4 < 4) {
_local2 = 0;
while (_local2 < 4) {
va[(va.length - 4) + _local2].roty((Math.PI/2) * _local4);
_local2++;
}
}
if (_local4 == 4) {
_local2 = 0;
while (_local2 < 4) {
va[(va.length - 4) + _local2].rotx((Math.PI/2));
_local2++;
}
}
if (_local4 == 5) {
_local2 = 0;
while (_local2 < 4) {
va[(va.length - 4) + _local2].rotx(-1.5707963267949);
_local2++;
}
}
_local4++;
}
}
function init_faces() {
if (isCylinder) {
init_cylinder_tiles();
} else {
init_cubefaces();
}
dirty = true;
}
function init_cubefaces() {
var _local2;
var _local3 = false;
_local2 = 0;
while (_local2 < 6) {
init_cubeface(_local2);
if (!bmp_loaded[_local2]) {
_local3 = true;
}
_local2++;
}
if (hasHotspots) {
_local2 = 6;
while (_local2 < 8) {
init_cubeface(_local2);
if (!bmp_loaded[_local2]) {
_local3 = true;
}
_local2++;
}
}
if (!_local3) {
completed = true;
}
}
function init_cubeface(cf) {
var _local7;
var _local6;
if (initMovClip) {
var _local3 = bclip.attachMovie(("library.hof.hof_512_" + cf) + ".jpg", "obj_mc", 10);
bmp_in[cf] = new flash.display.BitmapData(_local3._width, _local3._height, true, 4289344324);
bmp_in[cf].draw(_local3);
_local3.removeMovieClip();
} else if (!bmp_loaded[cf]) {
var _local4;
if (cf < 6) {
_local4 = flash.display.BitmapData.loadBitmap("cube_" + cf);
} else {
var _local5 = cf - 6;
_local4 = flash.display.BitmapData.loadBitmap("cube_hsc_" + _local5);
}
if (_local4 == undefined) {
if (cf < 6) {
_local4 = flash.display.BitmapData.loadBitmap("prevcube_" + cf);
if (_local4 != undefined) {
bmp_in[cf] = _local4;
}
}
if (bmp_in[cf] == undefined) {
if (preloadColor < 16777216) {
bmp_in[cf] = new flash.display.BitmapData(128, 128, false, preloadColor);
} else {
bmp_in[cf] = new flash.display.BitmapData(128, 128, false, 13421772);
bmp_in[cf].noise(23, 0, 95, 7, true);
}
}
} else {
bmp_in[cf] = _local4;
bmp_loaded[cf] = true;
}
}
}
function init_cylinder() {
var _local2;
var _local14;
var _local4;
var _local10;
var _local8;
var _local12;
var _local15;
var _local13;
if (cylTilesXS < 1) {
cylTilesXS = 1;
}
_local2 = 0;
while (_local2 < cylTilesXS) {
bmp_loaded.push(false);
_local2++;
}
var _local9 = pan.max - pan.min;
if (meshBase > 5) {
cylTilesXBase = 12 * Math.floor((meshBase - 3) / 2);
meshCylBase = Math.floor((meshBase + 4) / 2);
} else {
cylTilesXBase = 12;
meshCylBase = 4;
}
cylTilesXBase = Math.ceil(((cylTilesXBase * _local9) / 360) / cylTilesXS);
if ((cylTilesXBase * cylTilesXS) < 10) {
cylTilesXBase = Math.ceil(10 / cylTilesXS);
}
cylTilesX = cylTilesXBase;
isCylinder = true;
init_cylinder_tiles();
if (bmp_loaded[0]) {
_local10 = cylTilesXS * bmp_in[0].width;
_local8 = bmp_in[0].height;
} else {
_local10 = cylinderImageWidth;
_local8 = cylinderImageHeight;
}
var _local11 = 57.2957795130823 * Math.atan((_local8 * Math.PI) / (_local10 * (360 / _local9)));
tilt.min = -_local11;
tilt.max = _local11;
checkLimits();
va = new Array();
var _local7 = _local10 / (cylTilesX * cylTilesXS);
_local2 = 0;
while (_local2 < (cylTilesX * cylTilesXS)) {
var _local6 = Math.cos(Math.PI / (cylTilesX * cylTilesXS));
var _local3 = ((Math.PI / (cylTilesX * cylTilesXS)) * (_local9 / 360)) * 1.0002;
var _local5 = ((-_local3) / _local7) * _local8;
va.push(new Vector3d(_local3, _local5, _local6, _local2 * _local7, 0));
va.push(new Vector3d(-_local3, _local5, _local6, (_local2 + 1) * _local7, 0));
va.push(new Vector3d(_local3, -_local5, _local6, _local2 * _local7, _local8));
va.push(new Vector3d(-_local3, -_local5, _local6, (_local2 + 1) * _local7, _local8));
_local4 = 0;
while (_local4 < 4) {
va[(va.length - 4) + _local4].roty((((2 * _local2) * _local3) + _local3) + ((((-pan.max) + 180) * Math.PI) / 180));
_local4++;
}
_local2++;
}
}
function resetlastaction() {
var _local2 = new Date();
lastaction_dt = _local2.getTime();
}
function init_cylinder_tiles() {
var _local2;
_local2 = 0;
while (_local2 < cylTilesXS) {
init_cylinder_tile(_local2);
_local2++;
}
}
function init_cylinder_tile(ti) {
if (initMovClip) {
var _local3 = bclip.attachMovie("library.pat.cyl_1800_200.jpg", "obj_mc", 10);
bmp_in[ti] = new flash.display.BitmapData(_local3._width, _local3._height, true, 4289344324);
bmp_in[ti].draw(_local3);
_local3.removeMovieClip();
bmp_loaded[ti] = true;
} else if (!bmp_loaded[ti]) {
var _local4;
_local4 = flash.display.BitmapData.loadBitmap("cube_" + ti);
if (_local4 == undefined) {
_local4 = flash.display.BitmapData.loadBitmap("prevcube_" + ti);
if (_local4 != undefined) {
bmp_in[ti] = _local4;
}
if (bmp_in[ti] == undefined) {
if (preloadColor < 16777216) {
bmp_in[ti] = new flash.display.BitmapData(128, 32, false, preloadColor);
} else {
bmp_in[ti].noise(23, 0, 95, 7, true);
bmp_in[ti] = new flash.display.BitmapData(128, 32, false, 13421772);
}
}
} else {
bmp_in[ti] = _local4;
bmp_loaded[ti] = true;
}
}
}
function DisplayTile(bmp, sp, invTex, v1, v2, v3, v4, deep, splits) {
var _local17 = -0.01;
var _local19 = rect.width;
var _local18 = rect.height;
if (((((splits < 5) && (!isCylinder)) || ((splits < 2) && (isCylinder))) || ((((v1.pz < _local17) && (v2.pz < _local17)) && (v3.pz < _local17)) && (v4.pz < _local17))) && ((splits < 1) || (((((((v1.px >= 0) || (v2.px >= 0)) || (v3.px >= 0)) || (v4.px >= 0)) && ((((v1.py >= 0) || (v2.py >= 0)) || (v3.py >= 0)) || (v4.py >= 0))) && ((((v1.px <= _local19) || (v2.px <= _local19)) || (v3.px <= _local19)) || (v4.px <= _local19))) && ((((v1.py <= _local18) || (v2.py <= _local18)) || (v3.py <= _local18)) || (v4.py <= _local18))))) {
if (deep > 0) {
var _local23;
var _local3 = new Vector3d();
var _local2 = new Vector3d();
var _local22;
var _local15;
var _local14 = rect.width >> 1;
var _local13 = rect.height >> 1;
var _local9;
if (((deep & 1) == 0) || (isCylinder)) {
_local3.x = (v1.x + v3.x) * 0.5;
_local3.y = (v1.y + v3.y) * 0.5;
_local3.z = (_local3.pz = (v1.z + v3.z) * 0.5);
_local2.x = (v2.x + v4.x) * 0.5;
_local2.y = (v2.y + v4.y) * 0.5;
_local2.z = (_local2.pz = (v2.z + v4.z) * 0.5);
if (_local3.z < 0) {
_local9 = ((_local3.z > -1E-5) ? 10000 : ((-ed) / _local3.z));
_local3.px = (_local3.x * _local9) + _local14;
_local3.py = (_local3.y * _local9) + _local13;
} else {
_local3.px = (_local3.x * 1000) + _local14;
_local3.py = (_local3.y * 1000) + _local13;
}
if (_local2.z < 0) {
_local9 = ((_local2.z > -1E-5) ? 10000 : ((-ed) / _local2.z));
_local2.px = (_local2.x * _local9) + _local14;
_local2.py = (_local2.y * _local9) + _local13;
} else {
_local2.px = (_local2.x * 1000) + _local14;
_local2.py = (_local2.y * 1000) + _local13;
}
_local15 = new flash.geom.Point(invTex.x, invTex.y * 2);
_local22 = new flash.geom.Point(sp.x, sp.y + (1 / _local15.y));
DisplayTile(bmp, sp, _local15, v1, v2, _local3, _local2, deep - 1, splits + 1);
DisplayTile(bmp, _local22, _local15, _local3, _local2, v3, v4, deep - 1, splits + 1);
} else {
_local3.x = (v1.x + v2.x) * 0.5;
_local3.y = (v1.y + v2.y) * 0.5;
_local3.z = (_local3.pz = (v1.z + v2.z) * 0.5);
_local2.x = (v3.x + v4.x) * 0.5;
_local2.y = (v3.y + v4.y) * 0.5;
_local2.z = (_local2.pz = (v3.z + v4.z) * 0.5);
if (_local3.z < 0) {
_local9 = ((_local3.z > -1E-5) ? 10000 : ((-ed) / _local3.z));
_local3.px = (_local3.x * _local9) + _local14;
_local3.py = (_local3.y * _local9) + _local13;
} else {
_local3.px = (_local3.x * 1000) + _local14;
_local3.py = (_local3.y * 1000) + _local13;
}
if (_local2.z < 0) {
_local9 = ((_local2.z > -1E-5) ? 10000 : ((-ed) / _local2.z));
_local2.px = (_local2.x * _local9) + _local14;
_local2.py = (_local2.y * _local9) + _local13;
} else {
_local2.px = (_local2.x * 1000) + _local14;
_local2.py = (_local2.y * 1000) + _local13;
}
_local15 = new flash.geom.Point(invTex.x * 2, invTex.y);
_local22 = new flash.geom.Point(sp.x + (1 / _local15.x), sp.y);
DisplayTile(bmp, sp, _local15, v1, _local3, v3, _local2, deep - 1, splits + 1);
DisplayTile(bmp, _local22, _local15, _local3, v2, _local2, v4, deep - 1, splits + 1);
}
} else {
var _local11 = new flash.geom.Matrix();
var _local10 = new flash.geom.Matrix();
_local11.a = (v2.px - v1.px) * invTex.x;
_local11.c = (v4.px - v2.px) * invTex.y;
_local11.b = (v2.py - v1.py) * invTex.x;
_local11.d = (v4.py - v2.py) * invTex.y;
_local11.tx = (v1.px - (sp.x * _local11.a)) - (sp.y * _local11.c);
_local11.ty = (v1.py - (sp.x * _local11.b)) - (sp.y * _local11.d);
_local10.a = (v4.px - v3.px) * invTex.x;
_local10.c = (v3.px - v1.px) * invTex.y;
_local10.b = (v4.py - v3.py) * invTex.x;
_local10.d = (v3.py - v1.py) * invTex.y;
_local10.tx = (v1.px - (sp.x * _local10.a)) - (sp.y * _local10.c);
_local10.ty = (v1.py - (sp.x * _local10.b)) - (sp.y * _local10.d);
cv.beginBitmapFill(bmp, _local11, false, bmpSmooth);
cv.moveTo(v1.px, v1.py);
cv.lineTo(v2.px, v2.py);
cv.lineTo(v4.px, v4.py);
cv.endFill();
cv.beginBitmapFill(bmp, _local10, false, bmpSmooth);
cv.moveTo(v1.px, v1.py);
cv.lineTo(v3.px, v3.py);
cv.lineTo(v4.px, v4.py);
cv.endFill();
}
}
}
function doPaint() {
checkLimits();
if (isCylinder) {
paint_cylinder(1);
} else {
paint_cube(1);
}
}
function paint_cube(blend) {
var _local34;
var _local37;
var _local7;
var _local6;
var _local39;
var _local38;
var _local28;
var _local8;
var _local30;
var _local29;
var _local25 = 50;
var _local21 = 1;
var _local20 = 0;
var _local24 = -0.15;
var _local23;
var _local22;
var _local10;
var _local9;
var _local16;
var _local19;
var _local27;
var _local13 = new Vector3d();
var _local12 = new Vector3d();
var _local11 = new Vector3d();
var _local15 = new Vector3d();
var _local14 = new Vector3d();
var _local17 = new Vector3d();
var _local26 = new Vector3d();
var _local5;
var _local4;
var _local3;
var _local2;
var _local35;
var _local33;
var _local32;
var _local31;
var _local18;
if (cubeTiles < 2) {
cubeTiles = 2;
}
transform();
framecnt++;
_local21 = 0;
_local20 = -1;
cv._alpha = 100;
if (_local20 >= 0) {
cv2._alpha = blend * 100;
} else {
cv2._alpha = 0;
}
_local23 = rect.width;
_local10 = _local23 / 2;
_local22 = rect.height;
_local9 = _local22 / 2;
cv.clear();
ed = _local9 / Math.tan((fov.cur * Math.PI) / 360);
_local8 = 0;
while (_local8 < 6) {
_local16 = bmp_in[_local8].width;
_local19 = _local16 / 2;
mat_sf = 1 / _local16;
_local18 = new flash.geom.Point(mat_sf, mat_sf);
_local5 = vat[(_local8 * 4) + 0];
_local4 = vat[(_local8 * 4) + 1];
_local3 = vat[(_local8 * 4) + 2];
_local2 = vat[(_local8 * 4) + 3];
_local7 = 0;
_local6 = 0;
if (((_local5.z <= _local4.z) && (_local5.z <= _local3.z)) && (_local5.z <= _local2.z)) {
_local7 = 0;
_local6 = 0;
}
if (((_local4.z <= _local5.z) && (_local4.z <= _local3.z)) && (_local4.z <= _local2.z)) {
_local7 = 1;
_local6 = 0;
}
if (((_local3.z <= _local5.z) && (_local3.z <= _local4.z)) && (_local3.z <= _local2.z)) {
_local7 = 0;
_local6 = 1;
}
if (((_local2.z <= _local5.z) && (_local2.z <= _local4.z)) && (_local2.z <= _local3.z)) {
_local7 = 1;
_local6 = 1;
}
_local11.interpol4(_local5, _local4, _local3, _local2, _local7, _local6);
_local15.interpol4(_local5, _local4, _local3, _local2, _local7 + 0.01, _local6);
_local14.interpol4(_local5, _local4, _local3, _local2, _local7, _local6 + 0.01);
_local17.interpol4(_local5, _local4, _local3, _local2, _local7 + 0.01, _local6 + 0.01);
_local11.project(ed, _local10, _local9);
_local15.project(ed, _local10, _local9);
_local14.project(ed, _local10, _local9);
_local17.project(ed, _local10, _local9);
_local13.x = _local11.px - _local15.px;
_local13.y = _local11.py - _local15.py;
_local12.x = _local11.px - _local14.px;
_local12.y = _local11.py - _local14.py;
if (((_local13.x * _local12.y) - (_local13.y * _local12.x)) > 0) {
_local5.project(ed, _local10, _local9);
_local4.project(ed, _local10, _local9);
_local3.project(ed, _local10, _local9);
_local2.project(ed, _local10, _local9);
DisplayTile(bmp_in[_local8], new flash.geom.Point(0, 0), _local18, _local5, _local4, _local3, _local2, cubeTiles, 0);
}
_local8++;
}
}
function paint_cylinder(blend) {
var _local34;
var _local37;
var _local3;
var _local25;
var _local28;
var _local27;
var _local39;
var _local38;
var _local26;
var _local4;
var _local30;
var _local29;
var _local22 = 50;
var _local16 = 1;
var _local15 = 0;
var _local21 = -0.15;
var _local19;
var _local18;
var _local6;
var _local5;
var _local12;
var _local14;
var _local24;
var _local23 = new Vector3d();
var _local10;
var _local9;
var _local8;
var _local7;
var _local35;
var _local33;
var _local32;
var _local31;
var _local13;
if (cubeTiles < 2) {
cubeTiles = 2;
}
transform();
framecnt++;
_local16 = 0;
_local15 = -1;
cv._alpha = 100;
if (_local15 >= 0) {
cv2._alpha = blend * 100;
} else {
cv2._alpha = 0;
}
_local19 = rect.width;
_local6 = _local19 / 2;
_local18 = rect.height;
_local5 = _local18 / 2;
cv.clear();
ed = _local5 / Math.tan((fov.cur * Math.PI) / 360);
var _local17 = fov.cur / 2;
var _local20 = (Math.atan((rect.width / rect.height) * Math.tan((_local17 * Math.PI) / 180)) * 180) / Math.PI;
cylTilesX = cylTilesXBase / 1;
var _local11 = cylTilesXBase / cylTilesX;
_local4 = 0;
while (_local4 < cylTilesXS) {
_local12 = bmp_in[_local4].width;
_local14 = bmp_in[_local4].height;
mat_sf = 1 / _local12;
_local13 = new flash.geom.Point(cylTilesX / _local12, 1 / _local14);
_local3 = 0;
while (_local3 < cylTilesX) {
var _local2 = (((cylTilesX * _local4) * _local11) + _local3) * 4;
_local10 = vat[_local2];
_local8 = vat[_local2 + 2];
_local2 = (((((cylTilesX * _local4) * _local11) + _local3) + _local11) - 1) * 4;
_local9 = vat[_local2 + 1];
_local7 = vat[_local2 + 3];
if ((((_local10.z < 0) || (_local9.z < 0)) || (_local8.z < 0)) || (_local7.z < 0)) {
_local10.project(ed, _local6, _local5);
_local9.project(ed, _local6, _local5);
_local8.project(ed, _local6, _local5);
_local7.project(ed, _local6, _local5);
DisplayTile(bmp_in[_local4], new flash.geom.Point((_local3 * _local12) / cylTilesX, 0), _local13, _local10, _local9, _local8, _local7, cylTilesY, 0);
}
_local3++;
}
_local4++;
}
}
function changePan(a) {
if (!isNaN(a)) {
setPan(pan.cur + a);
}
}
function changeTilt(a) {
if (!isNaN(a)) {
setTilt(tilt.cur + a);
}
}
function changeFov(a) {
if (!isNaN(a)) {
setFov(fov.cur + a);
}
}
function setPan(a) {
if (!isNaN(a)) {
dirty = dirty || (pan.cur != a);
pan.cur = a;
}
checkLimits();
}
function setTilt(a) {
if (!isNaN(a)) {
dirty = dirty || (tilt.cur != a);
tilt.cur = a;
}
checkLimits();
}
function setFov(a) {
if (!isNaN(a)) {
if (fov.cur != a) {
setup_cube();
fov.cur = a;
dirty = true;
}
}
checkLimits();
}
function getPan() {
return(pan.cur);
}
function getTilt() {
return(tilt.cur);
}
function getFov() {
return(fov.cur);
}
function checkLimits() {
var _local2;
var _local3;
_local2 = fov.cur / 2;
if (_local2 > 55) {
_local2 = 55;
fov.cur = _local2 * 2;
}
_local3 = (Math.atan((rect.width / rect.height) * Math.tan((_local2 * Math.PI) / 180)) * 180) / Math.PI;
if (_local3 > 55) {
_local3 = 55;
_local2 = (Math.atan((rect.height / rect.width) * Math.tan((_local3 * Math.PI) / 180)) * 180) / Math.PI;
fov.cur = _local2 * 2;
}
if (fov.cur > fov.max) {
fov.cur = fov.max;
}
if (fov.cur < fov.min) {
fov.cur = fov.min;
}
if (fov.cur > (tilt.max - tilt.min)) {
fov.cur = tilt.max - tilt.min;
}
if (tilt.max < 90) {
if ((tilt.cur + _local2) > tilt.max) {
tilt.cur = tilt.max - _local2;
}
} else if (tilt.cur > tilt.max) {
tilt.cur = tilt.max;
}
if (tilt.min > -90) {
if ((tilt.cur - _local2) < tilt.min) {
tilt.cur = tilt.min + _local2;
}
} else if (tilt.cur < tilt.min) {
tilt.cur = tilt.min;
}
if ((pan.max - pan.min) < 359.99) {
var _local4 = 0;
if (tilt.cur != 0) {
var _local9;
var _local6;
var _local8 = rect.width / 2;
var _local7 = rect.height / 2;
_local9 = _local8 * Math.tan((_local3 * Math.PI) / 180);
_local6 = _local7 * Math.tan((_local2 * Math.PI) / 180);
var _local5 = _local7 / Math.tan((Math.abs(tilt.cur) * Math.PI) / 180);
_local5 = _local5 - _local6;
if (_local5 > 0) {
_local4 = (Math.atan(1 / (_local5 / _local6)) * 180) / Math.PI;
_local4 = (_local4 * (pan.max - pan.min)) / 360;
}
}
if ((pan.cur + (_local3 + _local4)) > pan.max) {
pan.cur = pan.max - (_local3 + _local4);
}
if ((pan.cur - (_local3 + _local4)) < pan.min) {
pan.cur = pan.min + (_local3 + _local4);
}
if ((tilt.cur + _local2) > 90) {
tilt.cur = 90 - _local2;
}
if ((tilt.cur - _local2) < -90) {
tilt.cur = -90 + _local2;
}
}
}
function setMeshDensity(dA) {
if (meshAuto) {
if (dA < 0.25) {
cubeTiles = meshBase;
cylTilesY = meshCylBase;
} else if (dA < 4) {
cubeTiles = meshBase - 1;
cylTilesY = meshCylBase - 1;
} else {
cubeTiles = meshBase - 2;
cylTilesY = meshCylBase - 2;
}
if (cubeTiles < 2) {
cubeTiles = 2;
}
if (cylTilesY < 2) {
cylTilesY = 2;
}
} else {
cubeTiles = meshBase;
cylTilesY = meshCylBase;
}
}
function doEnterFrame() {
if (((pan.cur == NaN) || (tilt.cur == NaN)) || (fov.cur == NaN)) {
pan.cur = 0;
tilt.cur = 0;
fov.cur = 70;
}
if (started) {
dA = 0;
key_down = key_down || (Key.isDown(17));
if (key_down) {
resetlastaction();
autoplay = false;
dPan = 0;
dTilt = 0;
if (lastkeycode == 39) {
dPan = -1;
}
if (lastkeycode == 37) {
dPan = 1;
}
if (lastkeycode == 40) {
dTilt = -1;
}
if (lastkeycode == 38) {
dTilt = 1;
}
if (Key.isDown(17)) {
changeFov(1);
}
if (Key.isDown(16)) {
changeFov(-1);
}
changeTilt(dTilt);
changePan(dPan);
dA = (dPan * dPan) + (dTilt * dTilt);
setMeshDensity(dA);
}
if (turn) {
resetlastaction();
var _local3 = new Date();
mdownt = mdownt - _local3.getTime();
if (mdownt > 200) {
mdownt = 200;
}
if (mdownt < 20) {
mdownt = 20;
}
mdownt = 10 * sensitifity;
dTilt = (((-(bclip._ymouse - mdown.y)) * mdownt) * 1E-5) * fov.cur;
dPan = (((-(bclip._xmouse - mdown.x)) * mdownt) * 1E-5) * fov.cur;
dA = (dPan * dPan) + (dTilt * dTilt);
setMeshDensity(dA);
mdownt = _local3.getTime();
changeTilt(dTilt);
changePan(dPan);
dirty = (dA != 0) || (cubeTiles != meshBase);
}
if (autorotate && (!autoplay)) {
var _local3 = new Date();
if (((_local3.getTime() - lastaction_dt) / 1000) > autorotate_timeout) {
autoplay = true;
}
}
if ((autoplay && ((!autorotate_onlyinfocus) || (Main.isinfocus))) && ((!autorotate_onlyloaded) || (completed))) {
var _local2 = 0;
dTilt = (autorotate_tilt_force * (-tilt.cur)) / 100;
_local2 = (autorotate_tilt_force * (fov.def - fov.cur)) / 100;
dPan = (dPan * 0.8) + ((-autorotate_pan) * 0.2);
dA = (dPan * dPan) + (dTilt * dTilt);
setMeshDensity(dA);
changeTilt(dTilt);
changePan(dPan);
changeFov(_local2);
dirty = true;
}
if (((!key_down) && (!turn)) && (!autoplay)) {
if (simulateMass) {
dTilt = dTilt * 0.7;
dPan = dPan * 0.7;
dA = (dPan * dPan) + (dTilt * dTilt);
} else {
dA = 0;
}
if (dA < 0.01) {
setMeshDensity(0);
if (dA > 0) {
dirty = true;
}
dTilt = 0;
dPan = 0;
} else {
setMeshDensity(dA);
changeTilt(dTilt);
changePan(dPan);
dirty = true;
}
}
if (dA < 0.01) {
bmpSmooth = true;
cv._quality = Main.qualityStatic;
cv2._quality = Main.qualityStatic;
} else {
bmpSmooth = Main.bmpMotionSmooth;
cv2._quality = Main.qualityMotion;
cv._quality = Main.qualityMotion;
}
if (dirty) {
doPaint();
dirty = false;
}
}
}
function transform() {
var _local5;
var _local4;
var _local7;
var _local2;
var _local3;
var _local6;
var _local9 = new Matrix4d();
var _local8 = new Matrix4d();
_local9.setRotX((((-tilt.cur) * 2) * Math.PI) / 360);
_local8.setRotY(((pan.cur * 2) * Math.PI) / 360);
_local6 = Matrix4d.multiply(_local9, _local8);
_local7 = (rect.height / 2) / Math.tan((fov.cur * Math.PI) / 360);
vat = new Array();
_local5 = 0;
while (_local5 < va.length) {
_local2 = va[_local5];
_local3 = new Vector3d();
_local6.mulVector(_local2, _local3);
vat.push(_local3);
_local2.pz = _local3.z;
if (_local2.pz < 0) {
_local4 = _local7 / _local3.z;
if (_local3.z > -1E-5) {
_local4 = 10000;
}
_local2.px = _local3.x * _local4;
_local2.py = (-_local3.y) * _local4;
_local2.px = _local2.px + (rect.width / 2);
_local2.py = _local2.py + (rect.height / 2);
} else {
_local2.px = _local3.x * 1000;
_local2.py = (-_local3.y) * 1000;
}
_local5++;
}
updateHotspots(_local6);
if (enable_callback) {
if (onRotate != undefined) {
onRotate(pan.cur, tilt.cur, fov.cur);
}
}
}
function hide() {
cv._alpha = 0;
cv2._alpha = 0;
}
function updateHotspots(m) {
var _local5;
var _local4 = new Vector3d();
var _local3;
var _local2;
var _local6;
_local6 = (rect.height / 2) / Math.tan((fov.cur * Math.PI) / 360);
_local5 = 0;
while (_local5 < hotspots.length) {
_local2 = hotspots[_local5];
_local4.init(0, 0, -1);
_local4.rotx((_local2.posTilt * Math.PI) / 180);
_local4.roty(((-_local2.posPan) * Math.PI) / 180);
_local3 = new Vector3d();
m.mulVector(_local4, _local3);
_local3.project(_local6, rect.width / 2, rect.height / 2);
_local2.clip._visible = _local3.pz < 0;
_local2.clip._x = _local2.ofs.x + _local3.px;
_local2.clip._y = _local2.ofs.y + _local3.py;
_local5++;
}
}
function doMouseDown() {
mdown.x = bclip._xmouse;
mdown.y = bclip._ymouse;
var _local3 = new Date();
var _local2;
_local2 = _local3.getTime();
if ((_local2 - lastMouseDown) < 500) {
doMouseDoubleClick();
}
lastMouseDown = _local2;
if (Main.isinfocus) {
bclip._focusrect = false;
Selection.setFocus(bclip);
turn = true;
autoplay = false;
}
}
function doMouseWheel(delta) {
changeFov(delta / 3);
autoplay = false;
resetlastaction();
}
function doMouseUp() {
if (turn) {
turn = false;
dirty = true;
}
var _local2 = new Date();
var _local3;
_local3 = _local2.getTime();
if ((((_local3 - lastMouseDown) < 500) && (Math.abs(mdown.x - bclip._xmouse) < 10)) && (Math.abs(mdown.y - bclip._ymouse) < 10)) {
doMouseClick();
}
}
function doMouseClick() {
if (currentHotspot != null) {
if (onClickQtHotspot != undefined) {
onClickQtHotspot(currentHotspot.id, currentHotspot.title, currentHotspot.url, currentHotspot.target);
} else if (currentHotspot.onCallback != undefined) {
currentHotspot.onCallback(currentHotspot.id);
} else if (currentHotspot.url.length > 0) {
_root.getURL(currentHotspot.url, currentHotspot.target);
}
}
}
function doMouseDoubleClick() {
}
function addQtHotspot(aid, title, url, target) {
var _local2 = new Hotspot();
_local2.id = "" + aid;
_local2.url = url;
_local2.title = title;
_local2.target = target;
if (hs_local == 1) {
_local2.ofs.x = 0;
_local2.ofs.y = 0;
} else {
_local2.ofs.x = bclip._x;
_local2.ofs.y = bclip._y;
}
qthotspots[aid] = _local2;
}
function addHotspot(aid, apan, atilt, aclip, url, target) {
var _local2 = new Hotspot();
_local2.id = aid;
_local2.posPan = apan;
_local2.posTilt = atilt;
_local2.clip = aclip;
_local2.url = url;
_local2.target = target;
if (hs_local == 1) {
_local2.ofs.x = 0;
_local2.ofs.y = 0;
} else {
_local2.ofs.x = bclip._x;
_local2.ofs.y = bclip._y;
}
aclip._visible = false;
hotspots.push(_local2);
}
function addClickHotspot(aid, apan, atilt, hstext, w, h) {
var _local4 = _root.createEmptyMovieClip("hs_mc", _root.getNextHighestDepth());
var _local3 = _local4.attachMovie("hs_urlmc", aid, _local4.getNextHighestDepth());
_local3.hstext.html = true;
_local3.hstext.htmlText = hstext;
if (w > 0) {
_local3.hstext._x = _local3.hstext._x + ((_local3.hstext._width - w) / 2);
_local3.hstext._width = w;
}
if (h > 0) {
_local3.hstext._height = h;
}
_local3.hstext._visible = false;
if (enable_callback) {
_local3.onRelease = function () {
Main.doClickHotspot(this._name);
};
_local3.onRollOver = function () {
Main.doRollOverHotspot(this._name);
this.hstext._visible = true;
};
_local3.onRollOut = function () {
Main.doRollOutHotspot(this._name);
this.hstext._visible = false;
};
}
addHotspot(aid, apan, atilt, _local3);
}
function addUrlHotspot(aid, apan, atilt, hstext, url, target, w, h) {
var _local5 = _root.createEmptyMovieClip("hs_mc", _root.getNextHighestDepth());
var _local3 = _local5.attachMovie("hs_urlmc", aid, _local5.getNextHighestDepth());
_local3.hstext.html = true;
_local3.hstext.htmlText = hstext;
if (w > 0) {
_local3.hstext._x = _local3.hstext._x + ((_local3.hstext._width - w) / 2);
_local3.hstext._width = w;
}
if (h > 0) {
_local3.hstext._height = h;
}
_local3.hstext._visible = false;
if (enable_callback) {
_local3.onRelease = function () {
var _local3;
_local3 = Main.findHotspot(this._name);
if (_local3 != null) {
_root.getURL(_local3.url, _local3.target);
}
};
_local3.onRollOver = function () {
var _local2;
this.hstext._visible = true;
};
_local3.onRollOut = function () {
Main.doRollOutHotspot(this._name);
this.hstext._visible = false;
};
}
addHotspot(aid, apan, atilt, _local3, url, target);
}
function addTextHotspot(aid, apan, atilt, hstext, w, h) {
var _local4 = _root.createEmptyMovieClip("hs_mc", _root.getNextHighestDepth());
var _local3 = _local4.attachMovie("hs_textmc", aid, _local4.getNextHighestDepth());
_local3.hstext.html = true;
_local3.hstext.htmlText = hstext;
if (w > 0) {
_local3.hstext._x = _local3.hstext._x + ((_local3.hstext._width - w) / 2);
_local3.hstext._width = w;
}
if (h > 0) {
_local3.hstext._height = h;
}
_local3.hstext._visible = false;
_local3.useHandCursor = false;
if (enable_callback) {
_local3.onRelease = function () {
Main.doClickHotspot(this._name);
};
_local3.onRollOver = function () {
Main.doRollOverHotspot(this._name);
this.hstext._visible = true;
};
_local3.onRollOut = function () {
Main.doRollOutHotspot(this._name);
this.hstext._visible = false;
};
}
addHotspot(aid, apan, atilt, _local3);
}
function initHotspots() {
var _local3 = _root.createEmptyMovieClip("mmmc", _root.getNextHighestDepth());
var _local5 = _local3.attachMovie("hs_target", "hs1", _local3.getNextHighestDepth());
var _local4 = _local5.transform.matrix;
_local4.scale(5, 5);
_local5.transform.matrix = _local4;
_local3.onRelease = function () {
};
_local3.play();
_local3.enabled = true;
addHotspot("id1", 0, 0, _local3);
addUrlHotspot("test", 10, 10, "testurl", "http://sinnfrei.at", "_blank");
addClickHotspot("test", 10, 10, "testurl");
}
function unloadHotspots() {
var _local2;
var _local3;
_local2 = 0;
while (_local2 < hotspots.length) {
_local3 = hotspots[_local2];
_local3.clip.unloadMovie();
_local2++;
}
}
function addController(ctrlUrl, pos, alpha) {
var cclip = bclip.createEmptyMovieClip("cclip", 10000);
var _local6;
cclip._visible = false;
cclip._lockroot = true;
if ((pos >= 0) && (pos <= 8)) {
controllerPos = pos;
}
if (alpha > 0) {
controllerAlpha = alpha;
}
cclip._alpha = controllerAlpha;
var _local2 = new MovieClipLoader();
var _local3 = new Object();
_local3.onLoadInit = function () {
cclip.playerControl = Main.controller_callback;
cclip._visible = true;
Main.doReposElements();
};
_local2.addListener(_local3);
_local2.loadClip(ctrlUrl, cclip);
}
function setPanLimits(vmin, vmax) {
pan.min = vmin;
pan.max = vmax;
checkLimits();
}
function setTiltLimits(vmin, vmax) {
tilt.min = vmin;
tilt.max = vmax;
checkLimits();
}
function setFovLimits(vmin, vmax) {
fov.min = vmin;
fov.max = vmax;
checkLimits();
}
function isComplete() {
return(completed);
}
function checkHotspots(x, y) {
var _local9;
var _local10;
var _local12;
var _local15;
var _local13;
var _local11;
var _local16;
var _local2;
var _local6;
var _local5;
var _local3;
if (hasHotspots) {
_local9 = rect.height / (2 * Math.tan((fov.cur * Math.PI) / 360));
_local10 = x - (rect.width / 2);
_local12 = y - (rect.height / 2);
_local11 = (180 * Math.atan(_local10 / _local9)) / Math.PI;
_local16 = (180 * Math.atan(_local12 / Math.sqrt((_local10 * _local10) + (_local9 * _local9)))) / Math.PI;
_local2 = new Vector3d(0, 0, -1);
_local2.rotx((_local16 * Math.PI) / 180);
_local2.roty((_local11 * Math.PI) / 180);
_local2.rotx(((-tilt.cur) * Math.PI) / 180);
_local2.roty(((-pan.cur) * Math.PI) / 180);
if (((_local2.z < 0) && (_local2.z <= (-Math.abs(_local2.x)))) && (_local2.z <= (-Math.abs(_local2.y)))) {
_local6 = 0.5 * (1 - (_local2.x / _local2.z));
_local5 = 0.5 * (1 + (_local2.y / _local2.z));
_local3 = 0;
}
if (((_local2.x >= 0) && (_local2.x >= Math.abs(_local2.y))) && (_local2.x >= Math.abs(_local2.z))) {
_local6 = 0.5 * (1 + (_local2.z / _local2.x));
_local5 = 0.5 * (1 - (_local2.y / _local2.x));
_local3 = 1;
}
if (((_local2.z >= 0) && (_local2.z >= Math.abs(_local2.x))) && (_local2.z >= Math.abs(_local2.y))) {
_local6 = 0.5 * (1 - (_local2.x / _local2.z));
_local5 = 0.5 * (1 - (_local2.y / _local2.z));
_local3 = 2;
}
if (((_local2.x <= 0) && (_local2.x <= (-Math.abs(_local2.y)))) && (_local2.x <= (-Math.abs(_local2.z)))) {
_local6 = 0.5 * (1 + (_local2.z / _local2.x));
_local5 = 0.5 * (1 + (_local2.y / _local2.x));
_local3 = 3;
}
if (((_local2.y >= 0) && (_local2.y >= Math.abs(_local2.x))) && (_local2.y >= Math.abs(_local2.z))) {
_local6 = 0.5 * (1 + (_local2.x / _local2.y));
_local5 = 0.5 * (1 - (_local2.z / _local2.y));
_local3 = 4;
}
if (((_local2.y <= 0) && (_local2.y <= (-Math.abs(_local2.x)))) && (_local2.y <= (-Math.abs(_local2.z)))) {
_local6 = 0.5 * (1 - (_local2.x / _local2.y));
_local5 = 0.5 * (1 - (_local2.z / _local2.y));
_local3 = 5;
}
_local15 = Math.floor(tileSize * _local6);
_local13 = Math.floor(tileSize * _local5);
var _local14 = Math.floor(_local3 / 3);
var _local8 = bmp_in[6 + _local14].getPixel(_local15, _local13);
var _local4 = 0;
if (_local8 != undefined) {
if ((_local3 == 2) || (_local3 == 5)) {
_local4 = _local8 % 256;
}
if ((_local3 == 1) || (_local3 == 4)) {
_local4 = Math.floor(_local8 / 256) % 256;
}
if ((_local3 == 0) || (_local3 == 3)) {
_local4 = Math.floor(_local8 / 65536) % 256;
}
}
cv.useHandCursor = _local4 > 0;
if ((_local4 > 0) && (Main.isinfocus)) {
var _local7 = qthotspots[_local4];
if (hotspottxt_width > 0) {
hotspot_txt.autoSize = false;
hotspot_txt._width = hotspottxt_width;
hotspot_txt._height = hotspottxt_height;
} else {
hotspot_txt.autoSize = true;
}
hotspot_txt.htmlText = _local7.title;
hotspot_txt._x = (_local7.ofs.x + x) - (hotspot_txt._width / 2);
hotspot_txt._y = (_local7.ofs.x + y) + 20;
hotspot_txt._visible = _local7.title.length > 0;
currentHotspot = _local7;
} else {
currentHotspot = null;
hotspot_txt._visible = false;
}
}
}
function controller(id, v) {
return(Main.controller_callback(id, v));
}
function setAutorotate(vSpeed, vDelay, vReturnToH, vFocus) {
autorotate_pan = vSpeed;
autorotate = vSpeed != 0;
if (!isNaN(vDelay)) {
autorotate_timeout = vDelay;
}
if (!isNaN(vReturnToH)) {
autorotate_tilt_force = vReturnToH;
}
autorotate_onlyinfocus = vFocus == true;
if (vSpeed == 0) {
autoplay = false;
}
}
function setLocked(nl) {
Main.locked = nl;
}
var meshBase = 8;
var meshCylBase = 6;
var meshAuto = true;
var cylinderImageWidth = 0;
var cylinderImageHeight = 0;
var key_down = false;
var initMovClip = true;
var controllerFlags = "";
}
Symbol 20 MovieClip [__Packages.Matrix4d] Frame 0
class Matrix4d
{
var n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44;
function Matrix4d () {
setIdent();
}
function setIdent() {
n11 = 1;
n12 = 0;
n13 = 0;
n14 = 0;
n21 = 0;
n22 = 1;
n23 = 0;
n24 = 0;
n31 = 0;
n32 = 0;
n33 = 1;
n34 = 0;
n41 = 0;
n42 = 0;
n43 = 0;
n44 = 1;
}
function setRotX(a) {
var _local2 = Math.cos(a);
var _local3 = Math.sin(a);
n11 = 1;
n12 = 0;
n13 = 0;
n14 = 0;
n21 = 0;
n22 = _local2;
n23 = _local3;
n24 = 0;
n31 = 0;
n32 = -_local3;
n33 = _local2;
n34 = 0;
n41 = 0;
n42 = 0;
n43 = 0;
n44 = 1;
}
function setRotY(a) {
var _local2 = Math.cos(a);
var _local3 = Math.sin(a);
n11 = _local2;
n12 = 0;
n13 = -_local3;
n14 = 0;
n21 = 0;
n22 = 1;
n23 = 0;
n24 = 0;
n31 = _local3;
n32 = 0;
n33 = _local2;
n34 = 0;
n41 = 0;
n42 = 0;
n43 = 0;
n44 = 1;
}
function setRotZ(a) {
var _local2 = Math.cos(a);
var _local3 = Math.sin(a);
n11 = _local2;
n12 = _local3;
n13 = 0;
n14 = 0;
n21 = -_local3;
n22 = _local2;
n23 = 0;
n24 = 0;
n31 = 0;
n32 = 0;
n33 = 1;
n34 = 0;
n41 = 0;
n42 = 0;
n43 = 0;
n44 = 1;
}
function setScale(s) {
n11 = s;
n12 = 0;
n13 = 0;
n14 = 0;
n21 = 0;
n22 = s;
n23 = 0;
n24 = 0;
n31 = 0;
n32 = 0;
n33 = s;
n34 = 0;
n41 = 0;
n42 = 0;
n43 = 0;
n44 = 1;
}
static function multiply(m1, m2) {
var _local1 = new Matrix4d();
var _local24;
var _local27;
var _local19;
var _local25;
var _local13;
var _local20;
var _local33;
var _local35;
var _local21;
var _local26;
var _local14;
var _local22;
var _local8;
var _local15;
var _local31;
var _local34;
var _local16;
var _local23;
var _local9;
var _local17;
var _local5;
var _local10;
var _local29;
var _local32;
var _local11;
var _local18;
var _local6;
var _local12;
var _local4;
var _local7;
var _local28;
var _local30;
_local24 = m1.n11;
_local27 = m2.n11;
_local21 = m1.n12;
_local25 = m2.n21;
_local16 = m1.n13;
_local20 = m2.n31;
_local11 = m1.n14;
_local35 = m2.n41;
_local1.n11 = (((_local24 * _local27) + (_local21 * _local25)) + (_local16 * _local20)) + (_local11 * _local35);
_local26 = m2.n12;
_local22 = m2.n22;
_local15 = m2.n32;
_local34 = m2.n42;
_local1.n12 = (((_local24 * _local26) + (_local21 * _local22)) + (_local16 * _local15)) + (_local11 * _local34);
_local23 = m2.n13;
_local17 = m2.n23;
_local10 = m2.n33;
_local32 = m2.n43;
_local1.n13 = (((_local24 * _local23) + (_local21 * _local17)) + (_local16 * _local10)) + (_local11 * _local32);
_local18 = m2.n14;
_local12 = m2.n24;
_local7 = m2.n34;
_local30 = m2.n44;
_local1.n14 = (((_local24 * _local18) + (_local21 * _local12)) + (_local16 * _local7)) + (_local11 * _local30);
_local19 = m1.n21;
_local14 = m1.n22;
_local9 = m1.n23;
_local6 = m1.n24;
_local1.n21 = (((_local19 * _local27) + (_local14 * _local25)) + (_local9 * _local20)) + (_local6 * _local35);
_local1.n22 = (((_local19 * _local26) + (_local14 * _local22)) + (_local9 * _local15)) + (_local6 * _local34);
_local1.n23 = (((_local19 * _local23) + (_local14 * _local17)) + (_local9 * _local10)) + (_local6 * _local32);
_local1.n24 = (((_local19 * _local18) + (_local14 * _local12)) + (_local9 * _local7)) + (_local6 * _local30);
_local13 = m1.n31;
_local8 = m1.n32;
_local5 = m1.n33;
_local4 = m1.n34;
_local1.n31 = (((_local13 * _local27) + (_local8 * _local25)) + (_local5 * _local20)) + (_local4 * _local35);
_local1.n32 = (((_local13 * _local26) + (_local8 * _local22)) + (_local5 * _local15)) + (_local4 * _local34);
_local1.n33 = (((_local13 * _local23) + (_local8 * _local17)) + (_local5 * _local10)) + (_local4 * _local32);
_local1.n34 = (((_local13 * _local18) + (_local8 * _local12)) + (_local5 * _local7)) + (_local4 * _local30);
_local33 = m1.n41;
_local31 = m1.n42;
_local29 = m1.n43;
_local28 = m1.n44;
_local1.n41 = (((_local33 * _local27) + (_local31 * _local25)) + (_local29 * _local20)) + (_local28 * _local35);
_local1.n42 = (((_local33 * _local26) + (_local31 * _local22)) + (_local29 * _local15)) + (_local28 * _local34);
_local1.n43 = (((_local33 * _local23) + (_local31 * _local17)) + (_local29 * _local10)) + (_local28 * _local32);
_local1.n44 = (((_local33 * _local18) + (_local31 * _local12)) + (_local29 * _local7)) + (_local28 * _local30);
return(_local1);
}
function mulVector(v, w) {
w.x = ((v.x * n11) + (v.y * n12)) + (v.z * n13);
w.y = ((v.x * n21) + (v.y * n22)) + (v.z * n23);
w.z = ((v.x * n31) + (v.y * n32)) + (v.z * n33);
}
function toString() {
var _local2 = new String("Matrix(\n");
_local2 = _local2 + (((((((n11 + "\t") + n12) + "\t") + n13) + "\t") + n14) + newline);
_local2 = _local2 + (((((((n21 + "\t") + n22) + "\t") + n23) + "\t") + n24) + newline);
_local2 = _local2 + (((((((n31 + "\t") + n32) + "\t") + n33) + "\t") + n34) + newline);
_local2 = _local2 + (((((((n41 + "\t") + n42) + "\t") + n43) + "\t") + n44) + ")\n");
return(_local2);
}
}
Symbol 21 MovieClip [__Packages.Vector3d] Frame 0
class Vector3d
{
var x, y, z, u, v, pz, px, py;
function Vector3d (ix, iy, iz, iu, iv) {
x = ix;
y = iy;
z = iz;
u = iu;
v = iv;
}
function init(ix, iy, iz) {
x = ix;
y = iy;
z = iz;
}
function rotx(a) {
var _local5;
var _local4;
var _local2;
var _local3;
_local3 = Math.sin(a);
_local2 = Math.cos(a);
_local5 = (_local2 * y) + (_local3 * z);
_local4 = ((-_local3) * y) + (_local2 * z);
y = _local5;
z = _local4;
}
function roty(a) {
var _local5;
var _local4;
var _local2;
var _local3;
_local3 = Math.sin(a);
_local2 = Math.cos(a);
_local5 = (_local2 * x) - (_local3 * z);
_local4 = (_local3 * x) + (_local2 * z);
x = _local5;
z = _local4;
}
function rotz(a) {
var _local5;
var _local4;
var _local2;
var _local3;
_local3 = Math.sin(a);
_local2 = Math.cos(a);
_local5 = (_local2 * x) - (_local3 * y);
_local4 = (_local3 * x) + (_local2 * y);
x = _local5;
y = _local4;
}
function sub(v) {
var _local2 = new Vector3d();
_local2.x = x - v.x;
_local2.y = y - v.y;
_local2.z = z - v.z;
return(_local2);
}
function project(ed, ofsx, ofsy) {
var _local2;
pz = z;
if (z < 0) {
_local2 = (-ed) / z;
if (Math.abs(z) < 1E-5) {
_local2 = ((z > 0) ? -10000 : 10000);
}
px = x * _local2;
py = y * _local2;
px = px + ofsx;
py = py + ofsy;
} else {
px = x * 1000;
py = y * 1000;
}
}
function asPoint() {
var _local2 = new flash.geom.Point();
_local2.x = px;
_local2.y = py;
return(_local2);
}
function cp(v) {
v.x = x;
v.y = y;
v.z = z;
v.px = px;
v.py = py;
}
function pdist2(v) {
return(((v.px - px) * (v.px - px)) + ((v.py - py) * (v.py - py)));
}
function interpol2(a, b, s) {
x = (a.x * s) + (b.x * (1 - s));
y = (a.y * s) + (b.y * (1 - s));
z = (a.z * s) + (b.z * (1 - s));
}
function interpol2proj(a, b, s, ed, ofsx, ofsy) {
var _local3 = 1 - s;
var _local2;
x = (a.x * s) + (b.x * _local3);
y = (a.y * s) + (b.y * _local3);
z = (a.z * s) + (b.z * _local3);
pz = z;
if (z < 0) {
if (z > -1E-5) {
_local2 = 10000;
} else {
_local2 = (-ed) / z;
}
px = (x * _local2) + ofsx;
py = (y * _local2) + ofsy;
} else {
px = x * 1000;
py = y * 1000;
}
}
function interpol4(a, b, c, d, u, v) {
x = (((a.x * (1 - u)) + (b.x * u)) * (1 - v)) + (((c.x * (1 - u)) + (d.x * u)) * v);
y = (((a.y * (1 - u)) + (b.y * u)) * (1 - v)) + (((c.y * (1 - u)) + (d.y * u)) * v);
z = (((a.z * (1 - u)) + (b.z * u)) * (1 - v)) + (((c.z * (1 - u)) + (d.z * u)) * v);
}
function interpol4proj(a, b, c, d, u, v, ed, ofsx, ofsy) {
var _local2 = 1 - u;
var _local5 = 1 - v;
var _local4;
x = (((a.x * _local2) + (b.x * u)) * _local5) + (((c.x * _local2) + (d.x * u)) * v);
y = (((a.y * _local2) + (b.y * u)) * _local5) + (((c.y * _local2) + (d.y * u)) * v);
z = (((a.z * _local2) + (b.z * u)) * _local5) + (((c.z * _local2) + (d.z * u)) * v);
pz = z;
if (z < 0) {
if (z > -1E-5) {
_local4 = 10000;
} else {
_local4 = (-ed) / z;
}
px = (x * _local4) + ofsx;
py = (y * _local4) + ofsy;
} else {
px = x * 1000;
py = y * 1000;
}
return(new flash.geom.Point(px, py));
}
function toString() {
return(((((((((("(" + x) + ",") + y) + ",") + z) + ") - (") + px) + ",") + py) + ")");
}
}
Symbol 22 MovieClip [__Packages.PanoViewLimits] Frame 0
class PanoViewLimits
{
var def, min, max, cur;
function PanoViewLimits (def, min, max) {
init(def, min, max);
}
function init(def, min, max) {
this.def = def;
this.min = min;
this.max = max;
cur = def;
}
}
Symbol 23 MovieClip [__Packages.Hotspot] Frame 0
class Hotspot
{
var ofs;
function Hotspot () {
ofs = new flash.geom.Point();
}
}