Section 1
//MainTimeline (pika_fla.MainTimeline)
package pika_fla {
import flash.display.*;
public dynamic class MainTimeline extends MovieClip {
public var __id0_:controlVR;
public function MainTimeline(){
__setProp___id0__Scene1_Layer1_1();
}
function __setProp___id0__Scene1_Layer1_1(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.progressFont = "";
__id0_.progressColor = 0x777777;
__id0_.titleColor = 0;
__id0_.source = "pikachoo.xml";
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package pika_fla
Section 2
//close_mc (close_mc)
package {
import flash.display.*;
public dynamic class close_mc extends MovieClip {
}
}//package
Section 3
//controlVR (controlVR)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import flash.xml.*;
import flash.ui.*;
public class controlVR extends MovieClip {
protected var cCursor_mc;
protected var __objectLoaded:Boolean;
protected var __activeLayer:Number;
protected var __activeImage:Number;
var className:String;// = "controlVR"
protected var __calcFont:String;
protected var intro_txt:TextField;
protected var __xFile:String;
protected var __spinTimer:Timer;
protected var __masterY:Number;
protected var __images:Array;
protected var __imageCount:Number;
protected var __masterX:Number;
protected var __controllable:Number;
protected var __title:String;
protected var __isDragging:Boolean;
protected var __imagesLoaded:Number;
protected var focus_txt:TextField;
protected var __imageHeight:Number;
protected var __progressBar:Number;
protected var __imageXCount:Number;
protected var __zoomX:Number;
protected var __zoomY:Number;
protected var __xmlStatus:String;
protected var __imageWidth:Number;
protected var __nodeWidth:Number;
protected var cursor_mc:Sprite;
protected var __xmlLoader:URLLoader;
protected var __images_mcl:Array;
protected var __masterZoom:Number;
protected var __rotating:Number;
protected var __tempo:Number;
protected var progBar_mc:Sprite;
protected var __imageDP:XMLDocument;
protected var __progressColor:Number;
protected var __controllerPriorX:Number;
protected var __controllerPriorY:Number;
protected var vrMask_mc:Shape;
protected var oCursor_mc;
protected var __imageYCount:Number;
protected var __zoomable:Number;
protected var __direction:String;
protected var __nodeHeight:Number;
protected var __park:Number;
protected var __keyboard:Number;
protected var __titleColor:Number;
protected var __doMouseOut:Boolean;
protected var vr_mc:Sprite;
protected var __progressFont:String;
static var symbolName:String = "controlVR";
static var auther:String = "John Henry Northall";
static var version:String = "1.0.2.1";
static var symbolOwner:Object = controlVR;
public function controlVR(){
className = "controlVR";
__images = new Array();
__spinTimer = new Timer(50);
__xmlLoader = new URLLoader();
__images_mcl = new Array();
vr_mc = new Sprite();
vrMask_mc = new Shape();
progBar_mc = new Sprite();
cursor_mc = new Sprite();
oCursor_mc = new open_mc();
cCursor_mc = new close_mc();
focus_txt = new TextField();
intro_txt = new TextField();
super();
stop();
removeChildAt(0);
addEventListener(Event.ENTER_FRAME, init, false, 0, true);
}
protected function __loadNextImage(_arg1:Number):void{
var _local2:*;
var _local3:*;
_local2 = 10;
if (!(_arg1 % _local2)){
_local3 = 0;
while (_local3 < _local2) {
if (__imageCount > (_arg1 + _local3)){
__loadImage((_arg1 + _local3));
};
_local3++;
};
};
}
protected function __setActiveImage(_arg1:Number):void{
var _local2:*;
var _local3:*;
_local2 = __images_mcl[__activeImage];
_local2.x = __park;
_local3 = __images_mcl[_arg1];
_local3.width = (__imageWidth * __zoomX);
_local3.height = (__imageHeight * __zoomY);
_local3.x = ((__imageWidth / 2) - ((__imageWidth * __zoomX) / 2));
_local3.y = ((__imageHeight / 2) - ((__imageHeight * __zoomX) / 2));
__activeImage = _arg1;
}
public function moveDown():void{
__masterY = (__masterY + (__imageHeight / __imageYCount));
if (!__rotating){
__autoControl();
};
}
public function get source():String{
return (__xFile);
}
protected function __conMouseUp(_arg1):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, __conMouseUp);
if (cursor_mc.contains(cCursor_mc)){
cursor_mc.removeChild(cCursor_mc);
};
cursor_mc.x = vr_mc.mouseX;
cursor_mc.y = vr_mc.mouseY;
cursor_mc.addChild(oCursor_mc);
__isDragging = false;
__startSpin();
if (__doMouseOut){
__conRollOut(1);
};
stage.focus = focus_txt;
_arg1.updateAfterEvent();
}
protected function __conVrMask():void{
vrMask_mc = null;
vrMask_mc = new Shape();
vrMask_mc.graphics.beginFill(0xFF0000);
vrMask_mc.graphics.drawRect(0, 0, __imageWidth, __imageHeight);
addChild(vrMask_mc);
vr_mc.mask = vrMask_mc;
}
public function loadVR(_arg1:String):void{
loadInit(_arg1);
}
public function get progressFont():String{
return (__progressFont);
}
protected function __loadImage(_arg1):void{
__images_mcl[_arg1] = new Loader();
__images_mcl[_arg1].name = _arg1;
__images_mcl[_arg1].contentLoaderInfo.addEventListener(Event.COMPLETE, __iCHanler);
__images_mcl[_arg1].contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, passEvent);
__images_mcl[_arg1].load(new URLRequest(__images[_arg1]));
vr_mc.addChild(__images_mcl[_arg1]);
if (_arg1 != __activeImage){
__images_mcl[_arg1].x = __park;
} else {
__images_mcl[_arg1].alpha = 0.2;
};
}
public function set source(_arg1:String):void{
__xFile = _arg1;
}
protected function onComplete(){
passEvent(new Event(Event.COMPLETE, false, false));
}
public function set progressFont(_arg1:String):void{
__progressFont = _arg1;
}
public function moveUp():void{
__masterY = (__masterY - (__imageHeight / __imageYCount));
if (!__rotating){
__autoControl();
};
}
public function zoomIn():void{
if (__masterZoom < 2){
__zoom((__masterZoom = (__masterZoom + 0.1)));
};
}
public function setActiveImage(_arg1:Number):void{
var _local2:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
_arg1 = Math.round(_arg1);
_arg1--;
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > (__imageCount - 1)){
_arg1 = (__imageCount - 1);
};
};
_local2 = Math.floor(((_arg1 * __imageYCount) / __imageCount));
__masterY = (_local2 * __nodeHeight);
__masterX = (((_local2 * __imageXCount) - _arg1) * __nodeWidth);
__setActiveImage(_arg1);
}
protected function __spinner(_arg1:TimerEvent):void{
if (__objectLoaded){
__autoControl();
};
_arg1.updateAfterEvent();
}
public function get title():String{
return (__title);
}
public function set progressColor(_arg1:Number):void{
__progressColor = _arg1;
}
public function get imageCount():Number{
return (__imageCount);
}
public function zoomOut():void{
if (__masterZoom > 0.5){
__zoom((__masterZoom = (__masterZoom - 0.1)));
};
}
protected function __calcNextX(_arg1:Number):Number{
var _local2:Number;
_local2 = -(Math.round((_arg1 / __nodeWidth)));
if (_local2 < 0){
_local2 = (__imageXCount + _local2);
} else {
if (_local2 > (__imageXCount - 1)){
_local2 = (_local2 - __imageXCount);
};
};
return (_local2);
}
protected function __calcNextY(_arg1:Number):Number{
var _local2:Number;
_local2 = Math.round((_arg1 / __nodeHeight));
if (_local2 < 1){
_local2 = 0;
} else {
if (_local2 >= __imageYCount){
_local2 = (__imageYCount - 1);
};
};
return (_local2);
}
protected function __stageMouseMove(_arg1):void{
if (__isDragging){
__control(stage.mouseX, stage.mouseY);
};
cursor_mc.x = vr_mc.mouseX;
cursor_mc.y = vr_mc.mouseY;
_arg1.updateAfterEvent();
}
public function get imageXCount():Number{
return (__imageXCount);
}
protected function __conRollOver(_arg1):void{
Mouse.hide();
cursor_mc.mouseEnabled = false;
cursor_mc.mouseChildren = false;
this.addChild(cursor_mc);
cursor_mc.x = vr_mc.mouseX;
cursor_mc.y = vr_mc.mouseY;
__doMouseOut = false;
}
public function removeControl():void{
__deconController();
}
public function getActiveImage():Number{
return ((__activeImage + 1));
}
protected function onLoadProgress(_arg1:Number, _arg2:Number){
passEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _arg1, _arg2));
}
public function moveRight():void{
__direction = "CCW";
__masterX = (__masterX + (__imageWidth / __imageXCount));
if (!__rotating){
__autoControl();
};
}
protected function __autoControl():void{
var _local1:Number;
var _local2:Number;
if (__rotating){
if (__direction == "CCW"){
__masterX = (__masterX + (__nodeWidth * __rotating));
} else {
__masterX = (__masterX - (__nodeWidth * __rotating));
};
};
if (__masterX > __imageWidth){
__masterX = __nodeWidth;
} else {
if (__masterX < -(__imageWidth)){
__masterX = -(__nodeWidth);
};
};
if (__masterY > __imageHeight){
__masterY = __imageHeight;
} else {
if (__masterY < 0){
__masterY = 0;
};
};
_local1 = __calcNextX(__masterX);
_local2 = __calcNextY(__masterY);
__turner(_local1, _local2);
}
protected function __consProgressBar():void{
intro_txt = new TextField();
intro_txt.autoSize = TextFieldAutoSize.LEFT;
intro_txt.border = false;
intro_txt.selectable = false;
progBar_mc = new Sprite();
progBar_mc.addChild(intro_txt);
this.addChild(progBar_mc);
if (__progressFont != ""){
intro_txt.embedFonts = true;
__calcFont = __progressFont;
} else {
intro_txt.embedFonts = false;
__calcFont = "Arial";
};
}
protected function __loadImages():void{
vr_mc = null;
vr_mc = new Sprite();
addChildAt(vr_mc, 0);
__images_mcl = new Array();
__loadNextImage(0);
}
protected function __iCHanler(_arg1):void{
var _local2:*;
_local2 = _arg1.target.content.parent.name;
__loadNextImage((parseInt(_local2) + 1));
__clearLoadEvents(__images_mcl[_local2]);
if (_local2 == __activeImage){
__imageWidth = __images_mcl[_local2].width;
__imageHeight = __images_mcl[_local2].height;
__nodeWidth = (__imageWidth / __imageXCount);
__nodeHeight = (__imageHeight / __imageYCount);
__conVrMask();
__masterY = ((__imageHeight * (__activeLayer - 1)) / __imageYCount);
};
__imagesLoaded = (__imagesLoaded + 1);
if (__progressBar){
__setStatus(Math.round(((100 * __imagesLoaded) / __imageCount)));
};
onLoadProgress(__imagesLoaded, __imageCount);
if (__imagesLoaded == __imageCount){
__images_mcl[__activeImage].alpha = 1;
if (this.contains(progBar_mc)){
this.removeChild(progBar_mc);
};
__objectLoaded = true;
onComplete();
__initStart();
};
}
protected function __conMouseWheel(_arg1){
if ((((stage.focus == focus_txt)) && (__zoomable))){
if (_arg1.delta < 0){
zoomIn();
} else {
zoomOut();
};
};
}
protected function init(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, init);
this.scaleY = 1;
this.scaleX = 1;
if (__xFile){
loadInit(__xFile);
};
}
protected function __setStatus(_arg1:Number):void{
var _local2:TextFormat;
var _local3:TextFormat;
var _local4:String;
_local2 = new TextFormat();
_local2.bold = true;
_local2.size = 14;
_local2.color = __titleColor;
_local2.font = __calcFont;
_local3 = new TextFormat();
_local3.size = 14;
_local3.color = __progressColor;
_local3.font = __calcFont;
_local4 = ((__title + "\nxml : ") + __xmlStatus);
if (_arg1 != 100){
if (_arg1){
_local4 = (_local4 + (("\nobj : " + _arg1) + "%"));
};
} else {
_local4 = (_local4 + "\nobj : ok");
};
_local4 = (_local4 + "\n ");
intro_txt.text = _local4;
intro_txt.setTextFormat(_local2, 0, __title.length);
intro_txt.setTextFormat(_local3, __title.length, _local4.length);
}
public function giveControl():void{
__deconController();
__controller();
}
protected function loadInit(_arg1:String):void{
__deconstructVR();
__imageXCount = 0;
__imageYCount = 0;
__imageCount = 0;
__imageWidth = 0;
__imageHeight = 0;
__imagesLoaded = 0;
__park = -9000;
__objectLoaded = false;
__isDragging = false;
__activeImage = 0;
__masterX = 0;
__masterY = 0;
__controllerPriorX = 0;
__controllerPriorY = 0;
__masterZoom = 1;
__zoomX = 1;
__zoomY = 1;
__doMouseOut = true;
__xFile = _arg1;
if (_arg1 != ""){
__loadXML(__xFile);
};
}
override public function get height():Number{
return (__imageHeight);
}
protected function passEvent(_arg1):void{
dispatchEvent(_arg1);
}
public function get progressColor():Number{
return (__progressColor);
}
public function zoomReset():void{
__masterZoom = 1;
__zoom(__masterZoom);
}
protected function __stopSpin(){
__spinTimer.stop();
__spinTimer.removeEventListener(TimerEvent.TIMER, __spinner);
}
public function spinStart():void{
if (!__rotating){
__rotating = 1;
__startSpin();
};
}
public function get imageYCount():Number{
return (__imageYCount);
}
public function spinStop():void{
__rotating = 0;
__stopSpin();
}
protected function __conMouseDown(_arg1):void{
__controllerPriorX = stage.mouseX;
__controllerPriorY = stage.mouseY;
stage.addEventListener(MouseEvent.MOUSE_UP, __conMouseUp);
if (cursor_mc.contains(oCursor_mc)){
cursor_mc.removeChild(oCursor_mc);
};
cursor_mc.addChild(cCursor_mc);
__isDragging = true;
__stopSpin();
}
protected function __parseVRObjData(_arg1):void{
__imageYCount = parseInt(_arg1.layers);
if (isNaN(__imageYCount)){
__imageYCount = 1;
};
__activeLayer = parseInt(_arg1.activelayer);
if (((((isNaN(__activeLayer)) || ((__activeLayer <= 0)))) || ((__activeLayer > __imageYCount)))){
__activeLayer = 1;
};
__progressBar = parseInt(_arg1.progress);
if (isNaN(__progressBar)){
__progressBar = 1;
};
__title = _arg1.title;
if (!__title){
__title = " ";
};
__rotating = parseInt(_arg1.rotating);
if (!__rotating){
__rotating = 0;
};
__tempo = parseInt(_arg1.tempo);
if (isNaN(__tempo)){
__tempo = 50;
};
__controllable = parseInt(_arg1.controllable);
if (((isNaN(__controllable)) || ((__controllable > 1)))){
__controllable = 1;
};
__keyboard = parseInt(_arg1.keyboard);
if (((isNaN(__keyboard)) || ((__keyboard > 1)))){
__keyboard = 1;
};
__zoomable = parseInt(_arg1.zoom);
if (((isNaN(__zoomable)) || ((__zoomable > 1)))){
__zoomable = 1;
};
__direction = _arg1.direction;
if (((!((__direction == "CW"))) && (!((__direction == "CCW"))))){
__direction = "CW";
};
}
protected function __loadXML(_arg1):void{
__xmlLoader.addEventListener(Event.COMPLETE, __xCHanler);
__xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, passEvent);
__xmlLoader.load(new URLRequest(_arg1));
}
protected function __controller():void{
focus_txt = new TextField();
focus_txt.type = "input";
focus_txt.border = false;
focus_txt.focusRect = false;
focus_txt.x = __park;
focus_txt.y = __park;
stage.addEventListener(MouseEvent.MOUSE_MOVE, __stageMouseMove);
vr_mc.addEventListener(MouseEvent.ROLL_OUT, __conRollOut);
vr_mc.addEventListener(MouseEvent.ROLL_OVER, __conRollOver);
vr_mc.addEventListener(MouseEvent.MOUSE_OVER, __conMouseOver);
vr_mc.addEventListener(MouseEvent.MOUSE_DOWN, __conMouseDown);
vr_mc.addEventListener(MouseEvent.MOUSE_UP, __conMouseUp);
vr_mc.addEventListener(MouseEvent.MOUSE_WHEEL, __conMouseWheel);
focus_txt.addEventListener(KeyboardEvent.KEY_DOWN, __conKeyDown);
this.addChild(focus_txt);
cursor_mc.addChild(oCursor_mc);
}
protected function __control(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
__masterX = (__masterX + (_arg1 - __controllerPriorX));
__masterY = (__masterY + (_arg2 - __controllerPriorY));
__direction = ((_arg1)<__controllerPriorX) ? "CW" : "CCW";
if ((((__masterX > __imageWidth)) || ((__masterX < -(__imageWidth))))){
__masterX = 0;
};
if (__masterY > __imageHeight){
__masterY = __imageHeight;
} else {
if (__masterY < 0){
__masterY = 0;
};
};
_local3 = __calcNextX(__masterX);
_local4 = __calcNextY(__masterY);
__controllerPriorX = _arg1;
__controllerPriorY = _arg2;
__turner(_local3, _local4);
}
protected function __loadImageData():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = __imageDP.firstChild.childNodes;
_local2 = __imageDP.firstChild.attributes;
for (_local3 in _local2) {
_local2[_local3.toLowerCase()] = _local2[_local3];
};
__parseVRObjData(_local2);
__images = new Array();
_local4 = 0;
while (_local4 < _local1.length) {
__images[_local4] = _local1[_local4].attributes.src;
_local4++;
};
}
public function moveLeft():void{
__direction = "CW";
__masterX = (__masterX - (__imageWidth / __imageXCount));
if (!__rotating){
__autoControl();
};
}
protected function __initStart():void{
if (__controllable){
__controller();
};
if (__rotating){
__startSpin();
};
}
protected function __conRollOut(_arg1){
if (!__isDragging){
Mouse.show();
if (contains(cursor_mc)){
removeChild(cursor_mc);
};
} else {
__doMouseOut = true;
};
}
protected function __conMouseOver(_arg1):void{
if (__doMouseOut){
__conRollOver(1);
};
}
protected function __conKeyDown(_arg1):void{
if ((((stage.focus == focus_txt)) && (__keyboard))){
switch (_arg1.keyCode){
case Keyboard.LEFT:
moveLeft();
break;
case Keyboard.RIGHT:
moveRight();
break;
case Keyboard.UP:
moveUp();
break;
case Keyboard.DOWN:
moveDown();
break;
case 65:
if (__zoomable){
zoomIn();
};
break;
case 90:
if (__zoomable){
zoomOut();
};
break;
case 81:
zoomReset();
break;
case 83:
if (__tempo >= 3){
setTempo((__tempo = (__tempo - 2)));
};
break;
case 88:
if (__tempo <= 300){
setTempo((__tempo = (__tempo + 2)));
};
break;
case Keyboard.SPACE:
if (__rotating){
__rotating = 0;
__stopSpin();
} else {
__rotating = 1;
__startSpin();
};
break;
};
};
}
protected function __clearXmlLoadEvents():void{
__xmlLoader.removeEventListener(Event.COMPLETE, __xCHanler);
__xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR, passEvent);
}
protected function __zoom(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
__zoomX = _arg1;
__zoomY = _arg1;
_local2 = __calcNextX(__masterX);
_local3 = __calcNextY(__masterY);
__turner(_local2, _local3);
}
override public function get width():Number{
return (__imageWidth);
}
protected function __turner(_arg1:Number, _arg2:Number):void{
var _local3:Number;
_local3 = (_arg1 + (__imageXCount * _arg2));
__setActiveImage(_local3);
}
public function set titleColor(_arg1:Number):void{
__titleColor = _arg1;
}
protected function __deconstructVR():void{
var i:*;
__spinTimer.stop();
__spinTimer.removeEventListener(TimerEvent.TIMER, __spinner);
__clearXmlLoadEvents();
__deconController();
for (i in __images_mcl) {
if (vr_mc.contains(__images_mcl[i])){
vr_mc.removeChild(__images_mcl[i]);
};
__clearLoadEvents(__images_mcl[i]);
try {
__images_mcl[i].close();
} catch(error:Error) {
};
__images_mcl[i].unload();
};
if (progBar_mc.contains(intro_txt)){
progBar_mc.removeChild(intro_txt);
};
if (this.contains(progBar_mc)){
this.removeChild(progBar_mc);
};
if (this.contains(vr_mc)){
this.removeChild(vr_mc);
};
if (this.contains(vrMask_mc)){
this.removeChild(vrMask_mc);
};
}
public function setTempo(_arg1:Number):void{
__tempo = _arg1;
if (__rotating){
__stopSpin();
__startSpin();
};
}
protected function __startSpin():void{
if (__rotating){
__spinTimer.delay = __tempo;
__spinTimer.addEventListener(TimerEvent.TIMER, __spinner);
__spinTimer.start();
};
}
public function get titleColor():Number{
return (__titleColor);
}
protected function __xCHanler(_arg1):void{
var evt = _arg1;
__clearXmlLoadEvents();
__imageDP = new XMLDocument();
__imageDP.ignoreWhite = true;
try {
__imageDP.parseXML(evt.target.data);
} catch(error) {
trace("XML parser failure");
__xmlStatus = "error";
};
if (__xmlStatus != "error"){
__loadImageData();
__imageCount = __images.length;
__imageXCount = (__imageCount / __imageYCount);
__activeImage = (__imageXCount * (__activeLayer - 1));
__xmlStatus = "ok";
if ((__imageCount % __imageYCount)){
__xmlStatus = "error";
};
if (__progressBar){
__consProgressBar();
__setStatus(0);
};
if (__xmlStatus != "error"){
__loadImages();
} else {
__title = " ";
__consProgressBar();
__setStatus(0);
};
} else {
__title = " ";
__consProgressBar();
__setStatus(0);
};
}
protected function __clearLoadEvents(_arg1):void{
_arg1.contentLoaderInfo.removeEventListener(Event.COMPLETE, __iCHanler);
_arg1.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, passEvent);
}
protected function __deconController():void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, __stageMouseMove);
vr_mc.removeEventListener(MouseEvent.ROLL_OUT, __conRollOut);
vr_mc.removeEventListener(MouseEvent.ROLL_OVER, __conRollOver);
vr_mc.removeEventListener(MouseEvent.MOUSE_OVER, __conMouseOver);
vr_mc.removeEventListener(MouseEvent.MOUSE_DOWN, __conMouseDown);
vr_mc.removeEventListener(MouseEvent.MOUSE_UP, __conMouseUp);
vr_mc.removeEventListener(MouseEvent.MOUSE_WHEEL, __conMouseWheel);
focus_txt.removeEventListener(KeyboardEvent.KEY_DOWN, __conKeyDown);
if (this.contains(focus_txt)){
this.removeChild(focus_txt);
};
}
}
}//package
Section 4
//open_mc (open_mc)
package {
import flash.display.*;
public dynamic class open_mc extends MovieClip {
}
}//package