flash on 2012-5-13
www.flashxml.net/photo-gallery.html";
package classes
package classes
package com.gskinner.motion
www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
package com.gskinner.motion.easing
") == -1){
") != -1){
www.flashxml.net") == 0)) || (!((stage.loaderInfo.loaderURL.indexOf("http://u1.flashcomponents.net") == -1))))))){
") != -1){
package net.flas
/**
* Copyright magical ( http://wonderfl.net/user/magical )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/meyR
*/
package classes {
import net.flashXML.gallery.galleryConnector.*;
public class PhotoGallery extends OverlapGalleryConnector {
public function PhotoGallery(){
_contextMenuText = "About Photo Gallery FX";
_contextMenuLink = "http://www.flashxml.net/photo-gallery.html";
}
}
}//package classes
package classes {
public class PhotoGalleryFree extends PhotoGallery {
public function PhotoGalleryFree(){
_showLogo = false;
}
}
}//package classes
package com.gskinner.motion {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class GTween {
protected static var plugins:Object = {};
protected static var shape:Shape;
public static var timeScaleAll:Number = 1;
protected static var gcLockList:Dictionary = new Dictionary(false);
public static var pauseAll:Boolean = false;
protected static var time:Number;
public static var defaultEase:Function = linearEase;
protected static var hasStarPlugins:Boolean = false;
protected static var tickList:Dictionary = new Dictionary(true);
protected var _rangeValues:Object;
public var autoPlay:Boolean = true;
protected var _delay:Number = 0;
public var ratio:Number;
public var pluginData:Object;
public var useFrames:Boolean;
protected var _position:Number = 0;
public var target:Object;
public var duration:Number;
public var onInit:Function;
public var calculatedPosition:Number;
public var calculatedPositionOld:Number;
public var ratioOld:Number;
public var data;
public var suppressEvents:Boolean;
public var repeatCount:int = 1;
public var nextTween:GTween;
protected var _referenceTime:Number;
public var reflect:Boolean;
public var positionOld:Number;
protected var _values:Object;
public var onComplete:Function;
protected var _paused:Boolean = true;
protected var _inited:Boolean;
public var ease:Function;
protected var _proxy:TargetProxy;
protected var _initValues:Object;
public var onChange:Function;
public var timeScale:Number = 1;
public function GTween(_arg1:Object=null, _arg2:Number=1, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null){
var _local6:Boolean;
super();
this.ease = defaultEase;
this.target = _arg1;
this.duration = _arg2;
this.pluginData = this.copy(_arg5, {});
if (_arg4){
_local6 = _arg4.swapValues;
delete _arg4.swapValues;
};
this.copy(_arg4, this);
this.resetValues(_arg3);
if (_local6){
this.swapValues();
};
if ((((((this.duration == 0)) && ((this.delay == 0)))) && (this.autoPlay))){
this.position = 0;
};
}
public static function installPlugin(_arg1:Object, _arg2:Array, _arg3:Boolean=false):void{
var _local5:String;
var _local4:uint;
while (_local4 < _arg2.length) {
_local5 = _arg2[_local4];
if (_local5 == "*"){
hasStarPlugins = true;
};
if (plugins[_local5] == null){
plugins[_local5] = [_arg1];
} else {
if (_arg3){
plugins[_local5].unshift(_arg1);
} else {
plugins[_local5].push(_arg1);
};
};
_local4++;
};
}
protected static function staticTick(_arg1:Event):void{
var _local4:Object;
var _local5:GTween;
var _local2:Number = time;
time = (getTimer() / 1000);
if (pauseAll){
return;
};
var _local3:Number = ((time - _local2) * timeScaleAll);
for (_local4 in tickList) {
_local5 = (_local4 as GTween);
(_local4 as GTween).position = (_local5._position + (((_local5.useFrames) ? timeScaleAll : _local3) * _local5.timeScale));
};
}
public static function linearEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (_arg1);
}
protected static function staticInit():void{
(shape = new Shape()).addEventListener(Event.ENTER_FRAME, staticTick);
time = (getTimer() / 1000);
}
public function get delay():Number{
return (this._delay);
}
public function getInitValue(_arg1:String):Number{
return (this._initValues[_arg1]);
}
public function set delay(_arg1:Number):void{
if (this._position <= 0){
this._position = -(_arg1);
};
this._delay = _arg1;
}
public function init():void{
var _local1:String;
var _local2:Array;
var _local3:uint;
var _local4:Number;
var _local5:uint;
this._inited = true;
this._initValues = {};
this._rangeValues = {};
for (_local1 in this._values) {
if (plugins[_local1]){
_local2 = plugins[_local1];
_local3 = _local2.length;
_local4 = (((_local1 in this.target)) ? this.target[_local1] : NaN);
_local5 = 0;
while (_local5 < _local3) {
_local4 = _local2[_local5].init(this, _local1, _local4);
_local5++;
};
if (!isNaN(_local4)){
this._rangeValues[_local1] = (this._values[_local1] - (this._initValues[_local1] = _local4));
};
} else {
this._rangeValues[_local1] = (this._values[_local1] - (this._initValues[_local1] = this.target[_local1]));
};
};
if (hasStarPlugins){
_local2 = plugins["*"];
_local3 = _local2.length;
_local5 = 0;
while (_local5 < _local3) {
_local2[_local5].init(this, "*", NaN);
_local5++;
};
};
if (((!((this.onInit == null))) && (!(this.suppressEvents)))){
this.onInit(this);
};
}
public function getValues():Object{
return (this.copy(this._values, {}));
}
public function setValues(_arg1:Object):void{
this.copy(_arg1, this._values, true);
this.invalidate();
}
public function get position():Number{
return (this._position);
}
protected function setGCLock(_arg1:Boolean):void{
if (_arg1){
if ((this.target is IEventDispatcher)){
this.target.addEventListener("_", this.setGCLock);
} else {
gcLockList[this] = true;
};
} else {
if ((this.target is IEventDispatcher)){
this.target.removeEventListener("_", this.setGCLock);
};
delete gcLockList[this];
};
}
public function swapValues():void{
var _local2:String;
var _local3:Number;
if (!this._inited){
this.init();
};
var _local1:Object = this._values;
this._values = this._initValues;
this._initValues = _local1;
for (_local2 in this._rangeValues) {
this._rangeValues[_local2] = (this._rangeValues[_local2] * -1);
};
if (this._position < 0){
_local3 = this.positionOld;
this.position = 0;
this._position = this.positionOld;
this.positionOld = _local3;
} else {
this.position = this._position;
};
}
public function setValue(_arg1:String, _arg2:Number):void{
this._values[_arg1] = _arg2;
this.invalidate();
}
public function get paused():Boolean{
return (this._paused);
}
public function getValue(_arg1:String):Number{
return (this._values[_arg1]);
}
protected function invalidate():void{
this._inited = false;
if (this._position > 0){
this._position = 0;
};
if (this.autoPlay){
this.paused = false;
};
}
protected function copy(_arg1:Object, _arg2:Object, _arg3:Boolean=false):Object{
var _local4:String;
for (_local4 in _arg1) {
if (((_arg3) && ((_arg1[_local4] == null)))){
delete _arg2[_local4];
} else {
_arg2[_local4] = _arg1[_local4];
};
};
return (_arg2);
}
public function deleteValue(_arg1:String):Boolean{
delete this._rangeValues[_arg1];
delete this._initValues[_arg1];
return (delete this._values[_arg1]);
}
public function resetValues(_arg1:Object=null):void{
this._values = {};
this.setValues(_arg1);
}
public function set position(_arg1:Number):void{
var _local4:String;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local9:uint;
var _local10:uint;
this.positionOld = this._position;
this.ratioOld = this.ratio;
this.calculatedPositionOld = this.calculatedPosition;
var _local2:Number = (this.repeatCount * this.duration);
var _local3:Boolean = (((_arg1 >= _local2)) && ((this.repeatCount > 0)));
if (_local3){
if (this.calculatedPositionOld == _local2){
return;
};
this._position = _local2;
this.calculatedPosition = ((((this.reflect) && (!((this.repeatCount & 1))))) ? 0 : this.duration);
} else {
this._position = ((_arg1)<-(this._delay)) ? -(this._delay) : _arg1;
this.calculatedPosition = (((this._position < 0)) ? 0 : (this._position % this.duration));
if (((this.reflect) && (((this._position / this.duration) & 1)))){
this.calculatedPosition = (this.duration - this.calculatedPosition);
};
};
this.ratio = (((((this.duration == 0)) && ((this._position >= 0)))) ? 1 : this.ease((this.calculatedPosition / this.duration), 0, 1, 1));
if (((((this.target) && ((((this._position >= 0)) || ((this.positionOld >= 0)))))) && (!((this._position == this.positionOld))))){
if (!this._inited){
this.init();
};
for (_local4 in this._values) {
_local5 = this._initValues[_local4];
_local6 = this._rangeValues[_local4];
_local7 = (_local5 + (_local6 * this.ratio));
_local8 = plugins[_local4];
if (_local8){
_local9 = _local8.length;
_local10 = 0;
while (_local10 < _local9) {
_local7 = _local8[_local10].tween(this, _local4, _local7, _local5, _local6, this.ratio, _local3);
_local10++;
};
if (!isNaN(_local7)){
this.target[_local4] = _local7;
};
} else {
this.target[_local4] = _local7;
};
};
};
if (hasStarPlugins){
_local8 = plugins["*"];
_local9 = _local8.length;
_local10 = 0;
while (_local10 < _local9) {
_local8[_local10].tween(this, "*", NaN, NaN, NaN, this.ratio, _local3);
_local10++;
};
};
if (((!((this.onChange == null))) && (!(this.suppressEvents)))){
this.onChange(this);
};
if (_local3){
this.paused = true;
if (this.nextTween){
this.nextTween.paused = false;
};
if (((!((this.onComplete == null))) && (!(this.suppressEvents)))){
this.onComplete(this);
};
};
}
public function end():void{
this.position = ((this.repeatCount)>0) ? (this.repeatCount * this.duration) : this.duration;
}
public function beginning():void{
this.position = 0;
this.paused = true;
}
public function set paused(_arg1:Boolean):void{
if (_arg1 == this._paused){
return;
};
this._paused = _arg1;
if (this._paused){
delete tickList[this];
this.setGCLock(false);
} else {
if (((!((this.repeatCount == 0))) && ((this._position >= (this.repeatCount * this.duration))))){
this._inited = false;
this._position = -(this.delay);
};
tickList[this] = true;
this.setGCLock(true);
};
}
public function get proxy():TargetProxy{
if (this._proxy == null){
this._proxy = new TargetProxy(this);
};
return (this._proxy);
}
staticInit();
}
}//package com.gskinner.motion
import flash.utils.*;
dynamic class TargetProxy extends Proxy {
private var tween:GTween;
public function TargetProxy(_arg1:GTween):void{
this.tween = _arg1;
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{
this.tween.deleteValue(_arg1);
return (true);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
if ((((((_arg2 is Boolean)) || ((_arg2 is String)))) || (isNaN(_arg2)))){
this.tween.target[_arg1] = _arg2;
} else {
this.tween.setValue(String(_arg1), Number(_arg2));
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function callProperty(_arg1, ... _args){
return (this.tween.target[_arg1].apply(null, _args));
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
var _local2:Number = this.tween.getValue(_arg1);
return (((isNaN(_local2)) ? this.tween.target[_arg1] : _local2));
}
}
package com.gskinner.motion.easing {
public class Quintic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
--_arg1;
return ((1 + ((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1)));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)<0.5) ? (((((16 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) : --_arg1;
((((((16 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + 1));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Circular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((1 - ((_arg1 - 1) * (_arg1 - 1)))));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (-((Math.sqrt((1 - (_arg1 * _arg1))) - 1)));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 * 2);
return (((_arg1)<1) ? (-0.5 * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) : _arg1 = (_arg1 - 2);
(0.5 * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Back {
protected static var s:Number = 1.70158;
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
--_arg1;
return ((((_arg1 * _arg1) * (((s + 1) * _arg1) + s)) + 1));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 * 2);
return (((_arg1)<1) ? (0.5 * ((_arg1 * _arg1) * ((((s * 1.525) + 1) * _arg1) - (s * 1.525)))) : _arg1 = (_arg1 - 2);
(0.5 * (((_arg1 * _arg1) * ((((s * 1.525) + 1) * _arg1) + (s * 1.525))) + 2)));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1 * _arg1) * (((s + 1) * _arg1) - s)));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Quadratic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((-(_arg1) * (_arg1 - 2)));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((_arg1 * _arg1));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)<0.5) ? ((2 * _arg1) * _arg1) : (((-2 * _arg1) * (_arg1 - 2)) - 1));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Exponential {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==1) ? 1 : (1 - Math.pow(2, (-10 * _arg1))));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==0) ? 0 : Math.pow(2, (10 * (_arg1 - 1))));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if ((((_arg1 == 0)) || ((_arg1 == 1)))){
return (_arg1);
};
_arg1 = ((_arg1 * 2) - 1);
if (0 > _arg1){
return ((0.5 * Math.pow(2, (10 * _arg1))));
};
return ((1 - (0.5 * Math.pow(2, (-10 * _arg1)))));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Quartic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
--_arg1;
return ((1 - (((_arg1 * _arg1) * _arg1) * _arg1)));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg1 * _arg1) * _arg1) * _arg1));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)<0.5) ? ((((8 * _arg1) * _arg1) * _arg1) * _arg1) : --_arg1;
(((((-8 * _arg1) * _arg1) * _arg1) * _arg1) + 1));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (1 / 2.75)){
return (((7.5625 * _arg1) * _arg1));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return ((((7.5625 * _arg1) * _arg1) + 0.75));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return ((((7.5625 * _arg1) * _arg1) + 0.9375));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return ((((7.5625 * _arg1) * _arg1) + 0.984375));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((1 - easeOut((1 - _arg1), 0, 0, 0)));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 * 2);
return (((_arg1)<1) ? (0.5 * easeIn(_arg1, 0, 0, 0)) : ((0.5 * easeOut((_arg1 - 1), 0, 0, 0)) + 0.5));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Cubic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
--_arg1;
return ((((_arg1 * _arg1) * _arg1) + 1));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1 * _arg1) * _arg1));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)<0.5) ? (((4 * _arg1) * _arg1) * _arg1) : --_arg1;
((((4 * _arg1) * _arg1) * _arg1) + 1));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Elastic {
protected static var p:Number = 0.3;
protected static var a:Number = 1;
protected static var s:Number = (p / 4);
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if ((((_arg1 == 0)) || ((_arg1 == 1)))){
return (_arg1);
};
--_arg1;
return (-(((a * Math.pow(2, (10 * _arg1))) * Math.sin((((_arg1 - s) * (2 * Math.PI)) / p)))));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if ((((_arg1 == 0)) || ((_arg1 == 1)))){
return (_arg1);
};
_arg1 = ((_arg1 * 2) - 1);
if (_arg1 < 0){
return ((-0.5 * ((a * Math.pow(2, (10 * _arg1))) * Math.sin((((_arg1 - (s * 1.5)) * (2 * Math.PI)) / (p * 1.5))))));
};
return (((((0.5 * a) * Math.pow(2, (-10 * _arg1))) * Math.sin((((_arg1 - (s * 1.5)) * (2 * Math.PI)) / (p * 1.5)))) + 1));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if ((((_arg1 == 0)) || ((_arg1 == 1)))){
return (_arg1);
};
return ((((a * Math.pow(2, (-10 * _arg1))) * Math.sin((((_arg1 - s) * (2 * Math.PI)) / p))) + 1));
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Linear {
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (_arg1);
}
}
}//package com.gskinner.motion.easing
package com.gskinner.motion.easing {
public class Sine {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sin((_arg1 * (Math.PI / 2))));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((1 - Math.cos((_arg1 * (Math.PI / 2)))));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((-0.5 * (Math.cos((_arg1 * Math.PI)) - 1)));
}
}
}//package com.gskinner.motion.easing
package net.flashXML {
import flash.display.*;
import flash.events.*;
import net.flashXML.event.*;
import net.flashXML.utils.*;
import net.flashXML.utils.math.*;
import flash.utils.*;
import flash.net.*;
import net.flashXML.external.*;
import net.flashXML.logo.*;
import flash.ui.*;
import flash.system.*;
import flash.geom.*;
public class FXComponent extends MovieClip implements IFXComponent {
protected var _assetsXML:String = "assets.xml";
private var _settingsLoaded:Boolean = false;
protected var _bgShadeHeight:Number = 300;
protected var _backgroundImageLoader:Loader;
protected var _componentHeight:Number = 300;
private var _bitmapOriginalHeight:Number;
protected var _useShade:Boolean = false;
protected var _backgroundColor1:String = "0x000000";
protected var _backgroundColor2:String = "0x000000";
protected var _assetsXMLLoader:XMLLoader;
protected var _contextMenuLink:String;
private var _stretchHeight:Boolean = false;
protected var _backgroundImage:String = "";
protected var _logo:Logo;
protected var _backBitmap:Bitmap;
protected var _backgroundAlpha:Number = 0;
protected var _backgroundCornerRadius:Number = 0;
protected var _fillType:String = "solid";
protected var _gradientRatio:Number = 0;
private var _bitmapOriginalWidth:Number;
protected var _background:Sprite;
protected var _shadeColor:String = "0xffffff";
protected var _shadeAlpha:Number = 1;
protected var _customPath:String = "";
protected var _componentWidth:Number = 600;
protected var _settingsFlashVarName:String = "settingsXML";
private var _backgroundFitting:String = "repeat";
protected var _preloader:Sprite;
private var _swfOriginalHeight:Number;
protected var _useBgShade:Boolean = false;
protected var _showAbout:Boolean = true;
private var _previousWidth:Number = 600;
private var _templateMode:String = "false";
private var _previousHeight:Number = 300;
protected var _gradientRotation:Number = 0;
private var _shade:Shape;
protected var _settingsXML:String = "settings.xml";
protected var _shadeWidth:Number = 600;
protected var _bgShadeColor:String = "0xffffff";
protected var _bgShadeAlpha:Number = 1;
private var _maximumStretchWidth:Number;
private var _errorPopUp:PopUp;
private var _xmlFromAssets:XML;
protected var _folderPath:String = "";
private var _backgroundShade:Shape;
protected var _focusedItem:String;
private var _swfOriginalWidth:Number;
protected var _shadeRatio:Number = 0;
private var _settings:XML;
protected var _componentMask:Shape;
protected var _preloaderLink:String = "assets/preloader.swf";
protected var _bgShadeWidth:Number = 600;
private var _settingsXMLLoader:XMLLoader;
protected var _showLogo:Boolean = false;
private var _stretchWidth:Boolean = false;
protected var _gradientPosY:Number = 0;
private var _backgroundType:String;
protected var _gradientPosX:Number = 0;
private var _bgImageLoaded:Boolean = false;
protected var _imagesXMLFetcher:ImagesFetcher;
private var _swf:DisplayObject;
protected var _contextMenuText:String;
private var _imageFromContentUsed:Boolean = false;
protected var _shouldLoadBack:Boolean = false;
protected var _bgShadeRatio:Number = 0;
protected var _preloaderLoader:Loader;
private var _contextMenu:ContextMenu;
protected var _shadeHeight:Number = 300;
public function FXComponent(){
if (stage){
this._contextMenu = new ContextMenu();
this._contextMenu.hideBuiltInItems();
this.contextMenu = this._contextMenu;
};
this.init();
}
public function get bgShadeRatio():Number{
return (this._bgShadeRatio);
}
public function get settingsFlashVarName():String{
return (this._settingsFlashVarName);
}
public function set bgShadeRatio(_arg1:Number):void{
this._bgShadeRatio = _arg1;
this.drawBackgroundShade();
}
private function settingsLoaded(_arg1:Event):void{
this._settingsXMLLoader.removeEventListener(Event.COMPLETE, this.settingsLoaded);
if (_arg1 != null){
this._settings = _arg1.currentTarget.xml;
};
if (String(this._settings.General_Properties.showAbout.@value).length > 1){
this.showAbout = this._settings.General_Properties.showAbout.@value;
} else {
this.showAbout = "true";
};
if (!this._imageFromContentUsed){
this._assetsXML = this._settings.General_Properties.assets.@value;
};
this._preloaderLink = this._settings.General_Properties.preloader.@value;
this._customPath = this._settings.General_Properties.customPath.@value;
this._backgroundColor1 = this._settings.Background_Properties.backgroundColor1.@value;
this._backgroundColor2 = this._settings.Background_Properties.backgroundColor2.@value;
this._fillType = (((String(this._settings.Background_Properties.fillType.@value) == "")) ? "solid" : this._settings.Background_Properties.fillType.@value);
this._backgroundImage = (((String(this._settings.Background_Properties.backgroundImage.@value) == "")) ? "" : this._settings.Background_Properties.backgroundImage.@value);
this._gradientRotation = this._settings.Background_Properties.gradientRotation.@value;
this._gradientRatio = this._settings.Background_Properties.gradientRatio.@value;
this._gradientPosX = this._settings.Background_Properties.gradientPosX.@value;
this._gradientPosY = this._settings.Background_Properties.gradientPosY.@value;
this._backgroundCornerRadius = this._settings.Background_Properties.bgCornerRadius.@value;
this._backgroundAlpha = this._settings.Background_Properties.backgroundAlpha.@value;
this._backgroundFitting = this._settings.Background_Properties.backgroundFitting.@value;
this.useBgShade = this._settings.Background_Properties.useShade.@value;
this._bgShadeColor = this._settings.Background_Properties.shadeColor.@value;
this._bgShadeAlpha = this._settings.Background_Properties.shadeAlpha.@value;
this._bgShadeRatio = this._settings.Background_Properties.shadeRatio.@value;
this._bgShadeWidth = this._settings.Background_Properties.shadeWidth.@value;
this._bgShadeHeight = this._settings.Background_Properties.shadeHeight.@value;
this.useShade = this._settings.Shade_Properties.useShade.@value;
this._shadeColor = this._settings.Shade_Properties.shadeColor.@value;
this._shadeAlpha = this._settings.Shade_Properties.shadeAlpha.@value;
this._shadeRatio = this._settings.Shade_Properties.shadeRatio.@value;
this._shadeWidth = this._settings.Shade_Properties.shadeWidth.@value;
this._shadeHeight = this._settings.Shade_Properties.shadeHeight.@value;
this.replaceContextMenu();
this.parseSettings(this._settings);
if (String(this._settings.General_Properties.stretchWidth.@value) != ""){
this.stretchWidth = this._settings.General_Properties.stretchWidth.@value;
};
if (String(this._settings.General_Properties.stretchHeight.@value) != ""){
this.stretchHeight = this._settings.General_Properties.stretchHeight.@value;
};
dispatchEvent(new Event(Event.COMPLETE));
this.updateLogo();
if (this._preloaderLink != ""){
this.loadPreloader();
} else {
this.loadAssets(this._assetsXML);
};
this._shouldLoadBack = true;
this.drawBackground();
this._settingsLoaded = true;
if (this._useShade){
this.drawShade();
};
}
protected function loadAssets(_arg1:String):void{
if ((((_arg1 == "")) || ((_arg1 == " ")))){
return;
};
if (((((((((((!((_arg1.indexOf("api.flickr.com") == -1))) || (!((_arg1.indexOf("picasaweb.google.com") == -1))))) || (!((_arg1.indexOf("photobucket.com") == -1))))) || (!((_arg1.indexOf("backend.deviantart.com") == -1))))) || (!((_arg1.indexOf("www.mobypicture.com") == -1))))) || (!((_arg1.indexOf("tumblr.com/rss") == -1))))){
this._imagesXMLFetcher = new ImagesFetcher("FXComponent");
this._imagesXMLFetcher.load(_arg1);
this._imagesXMLFetcher.addEventListener(Event.COMPLETE, this.assetsLoaded);
this._imagesXMLFetcher.addEventListener(FXEvent.CUSTOM_ERROR, this.exernalXMLNotFound);
} else {
if (_arg1.indexOf("http://") == -1){
_arg1 = (this._customPath + _arg1);
};
if (stage){
if (stage.loaderInfo.url.indexOf("http://") != -1){
_arg1 = ParsingUtils.uId(_arg1);
};
};
this._assetsXMLLoader = new XMLLoader();
if (!this._imageFromContentUsed){
this._assetsXMLLoader.load(Path.createRelativePath(_arg1));
this._assetsXMLLoader.addEventListener(FXEvent.CUSTOM_ERROR, this.assetsXMLNotFound);
this._assetsXMLLoader.addEventListener(Event.COMPLETE, this.assetsLoaded);
} else {
this.fakeXMLLoading(this._xmlFromAssets);
};
};
}
public function set settingsFlashVarName(_arg1:String):void{
this._settingsFlashVarName = _arg1;
}
public function set contextMenuText(_arg1:String):void{
this._contextMenuText = _arg1;
this.replaceContextMenu();
}
private function removeShade():void{
if (this._shade){
if (contains(this._shade)){
removeChild(this._shade);
this._shade = null;
};
};
}
protected function componentRemovedFromStage(_arg1:Event):void{
}
protected function updateLogo():void{
if (this._logo){
this.setChildIndex(this._logo, (numChildren - 1));
if (this._templateMode == "true"){
this._logo.visible = false;
};
if (((stage) && ((((stage.loaderInfo.loaderURL.indexOf("http://www.flashxml.net") == 0)) || (!((stage.loaderInfo.loaderURL.indexOf("http://u1.flashcomponents.net") == -1))))))){
this._logo.visible = false;
};
};
}
protected function parseSettings(_arg1:XML):void{
}
private function preloaderLoaded(_arg1:Event):void{
if (_arg1){
this._preloader = new Sprite();
this._preloader.addChild(_arg1.currentTarget.loader);
};
if (this._preloaderLoader){
this._preloaderLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.preloaderLoaded);
this._preloaderLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, this.preloaderNotFound);
this.addPreloader();
};
this.loadAssets(this._assetsXML);
}
private function addSWF():void{
if (!this._background.contains(this._swf)){
this._background.addChild(this._swf);
if (this._backgroundShade){
this._background.setChildIndex(this._swf, 0);
};
};
}
private function assetsXMLNotFound(_arg1:Event):void{
trace("FXComponent assetsXML not found");
}
public function set useMask(_arg1:Boolean):void{
if (_arg1){
if (this._componentMask == null){
this.addMask();
};
} else {
if (this._componentMask != null){
this.removeMask();
};
};
}
public function get bgShadeHeight():Number{
return (this._bgShadeHeight);
}
private function drawVectorBackground():void{
this._background.graphics.clear();
this._background.graphics.lineStyle(0, 0, 0);
var _local1:Matrix = new Matrix();
_local1.createGradientBox(this._componentWidth, this._componentHeight, FXMath.degreesToRadians(this._gradientRotation), this._gradientPosX, this._gradientPosY);
if (this._fillType != "solid"){
this._background.graphics.beginGradientFill(this._fillType, [uint(this._backgroundColor1), uint(this._backgroundColor2)], [this._backgroundAlpha, this._backgroundAlpha], [this._gradientRatio, 0xFF], _local1);
} else {
this._background.graphics.beginFill(uint(this._backgroundColor1), this._backgroundAlpha);
};
this._background.graphics.drawRoundRect(0, 0, this._componentWidth, this._componentHeight, this._backgroundCornerRadius, this._backgroundCornerRadius);
}
private function loadPreloader():void{
if (this._preloader){
this.removePreloader();
};
this._preloader = null;
this._preloaderLoader = new Loader();
this._preloaderLoader.load(new URLRequest(Path.createRelativePath((this._customPath + this._preloaderLink))));
this._preloaderLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.preloaderLoaded);
this._preloaderLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.preloaderNotFound);
}
private function switchPreloaderLoaded(_arg1:Event):void{
this._preloader = new Sprite();
this._preloader.addChild(_arg1.currentTarget.loader);
this._preloader.x = ((this._componentWidth / 2) - (this._preloaderLoader.width / 2));
this._preloader.y = ((this._componentHeight / 2) - (this._preloaderLoader.height / 2));
}
public function clearStageTemplate():void{
}
protected function removePreloader():void{
if (this._preloader){
if (contains(this._preloader)){
removeChild(this._preloader);
};
};
}
public function set bgShadeHeight(_arg1:Number):void{
this._bgShadeHeight = _arg1;
this.drawBackgroundShade();
}
public function fakeXMLLoading(_arg1:String):void{
var _local2:FakeLoader = new FakeLoader(_arg1);
_local2.addEventListener(Event.COMPLETE, this.assetsLoaded);
}
public function set shadeAlpha(_arg1:Number):void{
this._shadeAlpha = _arg1;
this.drawShade();
}
private function replaceContextMenu():void{
var cItem:* = null;
try {
if (stage){
this._contextMenu = new ContextMenu();
this._contextMenu.hideBuiltInItems();
this.contextMenu = this._contextMenu;
if (this._showAbout){
cItem = new ContextMenuItem(this._contextMenuText, true, true, true);
this._contextMenu.customItems.push(cItem);
cItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.aboutComponent);
this.contextMenu = this._contextMenu;
} else {
if (this._showLogo){
cItem = new ContextMenuItem(this._contextMenuText, true, true, true);
this._contextMenu.customItems.push(cItem);
cItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.aboutComponent);
this.contextMenu = this._contextMenu;
};
};
};
} catch(e:Error) {
trace(("ContextMenu Error " + e));
};
}
protected function backgroundImageNotFound(_arg1:IOErrorEvent):void{
trace("FXComponent: background image not found");
}
public function set customPath(_arg1:String):void{
this._customPath = _arg1;
}
public function set shadeColor(_arg1:String):void{
this._shadeColor = _arg1;
this.drawShade();
}
public function set templateMode(_arg1:String):void{
this._templateMode = _arg1;
this.updateLogo();
}
private function removeBackgroundShade():void{
if (this._backgroundShade){
if (this._background.contains(this._backgroundShade)){
this._background.removeChild(this._backgroundShade);
this._backgroundShade = null;
};
};
}
protected function startLoading():void{
if (this._showLogo){
if (!this._logo){
this._logo = new Logo();
addChild(this._logo);
};
this.updateLogo();
};
if (stage){
this._folderPath = ((stage.loaderInfo.parameters.folderPath) ? stage.loaderInfo.parameters.folderPath : "");
};
Path.appendPath = this._folderPath;
this.loadSettings(this._settingsXML);
}
public function get componentHeight():Number{
return (this._componentHeight);
}
public function get showAbout():String{
return (String(this._showAbout));
}
public function get stretchHeight():String{
return (String(this._stretchHeight));
}
protected function onBackgroundImageLoaded(_arg1:Event):void{
var _local2:Bitmap;
if (this._backgroundImageLoader.content){
this._bgImageLoaded = true;
this._backgroundImageLoader.content.cacheAsBitmap = true;
if ((this._backgroundImageLoader.content is Bitmap)){
this._backgroundType = "bitmap";
_local2 = new Bitmap(Bitmap(this._backgroundImageLoader.content).bitmapData.clone());
_local2.smoothing = true;
this._backBitmap = _local2;
this._bitmapOriginalWidth = this._backBitmap.width;
this._bitmapOriginalHeight = this._backBitmap.height;
} else {
this._backgroundType = "swf";
this._swf = this._backgroundImageLoader.content;
this._swfOriginalWidth = this._swf.width;
this._swfOriginalHeight = this._swf.height;
};
this.drawImageBackground();
this._shouldLoadBack = false;
};
}
private function removeImageOrSWF():void{
if (this._backBitmap){
if (this._background.contains(this._backBitmap)){
this._background.removeChild(this._backBitmap);
};
};
if (this._swf){
if (this._background.contains(this._swf)){
this._background.removeChild(this._swf);
};
};
}
public function set bgShadeAlpha(_arg1:Number):void{
this._bgShadeAlpha = _arg1;
this.drawBackgroundShade();
}
protected function clearStage():void{
trace("in clear stage");
}
private function resetSWF():void{
this._swf.x = 0;
this._swf.y = 0;
this._swf.width = this._swfOriginalWidth;
this._swf.height = this._swfOriginalHeight;
}
public function set fillType(_arg1:String):void{
this._fillType = _arg1;
this.drawBackground();
}
public function get gradientRatio():Number{
return (this._gradientRatio);
}
public function set bgShadeColor(_arg1:String):void{
this._bgShadeColor = _arg1;
this.drawBackgroundShade();
}
public function set useBgShade(_arg1:String):void{
if ((_arg1 == "true")){
this._useBgShade = true;
} else {
this._useBgShade = false;
};
if (((this._useBgShade) && (this._background))){
this.drawBackgroundShade();
} else {
this.removeBackgroundShade();
};
}
public function get maximumStretch():Number{
return (this._maximumStretchWidth);
}
public function get componentWidth():Number{
return (this._componentWidth);
}
public function get gradientRotation():Number{
return (this._gradientRotation);
}
public function get backgroundAlpha():Number{
return (this._backgroundAlpha);
}
public function get backgroundImage():String{
return (this._backgroundImage);
}
public function set backgroundFitting(_arg1:String):void{
this._backgroundFitting = _arg1;
this.drawBackground();
}
public function get useShade():String{
return (String(this._useShade));
}
protected function addPreloader():void{
addChild(this._preloader);
this._preloader.x = ((this._componentWidth / 2) - (this._preloaderLoader.width / 2));
this._preloader.y = ((this._componentHeight / 2) - (this._preloaderLoader.height / 2));
}
public function get settingsXML():String{
return (this._settingsXML);
}
public function replaceSettings(_arg1:XML):void{
this.clearStage();
this._settings = _arg1;
this.settingsLoaded(null);
}
private function preloaderNotFound(_arg1:IOErrorEvent):void{
trace("FXComponent: preloader not found assets/preloader.swf");
this._preloaderLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.preloaderLoaded);
this.loadAssets(this._assetsXML);
}
public function set componentHeight(_arg1:Number):void{
this._componentHeight = _arg1;
this._previousHeight = this._componentHeight;
this.drawBackground();
dispatchEvent(new Event(FXEvent.COMPONENT_RESIZE, true, false));
if (this._useShade){
this.drawShade();
};
}
private function drawImageBackground():void{
var _local1:Object;
this._background.graphics.clear();
if (this._backgroundType == "bitmap"){
switch (this._backgroundFitting.toLowerCase()){
case "repeat":
this.removeImageOrSWF();
this._background.graphics.clear();
this._background.graphics.lineStyle(0, 0, 0);
this._background.graphics.beginBitmapFill(this._backBitmap.bitmapData);
this._background.graphics.drawRoundRect(0, 0, this._componentWidth, this._componentHeight, this._backgroundCornerRadius, this._backgroundCornerRadius);
this._background.graphics.endFill();
break;
case "bestfit":
_local1 = AspectRatio.bestFit(this._bitmapOriginalWidth, this._bitmapOriginalHeight, this._componentWidth, this._componentHeight);
this._backBitmap.width = _local1.width;
this._backBitmap.height = _local1.height;
this._backBitmap.x = ((this._componentWidth / 2) - (this._backBitmap.width / 2));
this._backBitmap.y = ((this._componentHeight / 2) - (this._backBitmap.height / 2));
this.addBitmap();
break;
case "noscale":
this._backBitmap.x = 0;
this._backBitmap.y = 0;
this._backBitmap.width = this._bitmapOriginalWidth;
this._backBitmap.height = this._bitmapOriginalHeight;
this.addBitmap();
break;
};
} else {
switch (this._backgroundFitting){
case "repeat":
this.resetSWF();
this.addSWF();
break;
case "bestfit":
_local1 = AspectRatio.bestFit(this._swfOriginalWidth, this._swfOriginalHeight, this._componentWidth, this._componentHeight);
this._swf.width = _local1.width;
this._swf.height = _local1.height;
this.addSWF();
this._swf.x = ((this._componentWidth / 2) - (this._swf.width / 2));
this._swf.y = ((this._componentHeight / 2) - (this._swf.height / 2));
break;
case "noscale":
this.resetSWF();
this.addSWF();
break;
};
};
if (this._backgroundShade){
this._background.setChildIndex(this._backgroundShade, (this._background.numChildren - 1));
};
this._background.alpha = this._backgroundAlpha;
}
public function set stretchHeight(_arg1:String):void{
var _local2:Number;
if ((_arg1 == "true")){
this._stretchHeight = true;
} else {
this._stretchHeight = false;
};
if (this._stretchHeight){
if (stage){
_local2 = this._componentHeight;
this.componentHeight = stage.stageHeight;
this._previousHeight = _local2;
};
} else {
this.componentHeight = this._previousHeight;
};
}
private function init():void{
addEventListener(Event.REMOVED_FROM_STAGE, this.componentRemovedFromStage);
if (this._background == null){
this._background = new Sprite();
addChild(this._background);
};
if (this._settingsXMLLoader == null){
this._settingsXMLLoader = new XMLLoader();
};
setTimeout(this.startLoading, 10);
}
public function set showAbout(_arg1:String):void{
if ((_arg1 == "true")){
this._showAbout = true;
} else {
this._showAbout = false;
};
}
protected function clearImages():void{
}
public function set preloaderLink(_arg1:String):void{
this._preloaderLink = _arg1;
this.switchPreloader();
}
public function set assetsXML(_arg1:String):void{
this._assetsXML = _arg1;
this.preloaderLoaded(null);
}
private function addErrorPopUp(_arg1:String="An error has appeared"):void{
this._errorPopUp = new PopUp(300, 100, 1);
addChild(this._errorPopUp);
this._errorPopUp.text = _arg1;
this._errorPopUp.x = ((this._componentWidth / 2) - (this._errorPopUp.width / 2));
this._errorPopUp.y = ((this._componentHeight / 2) - (this._errorPopUp.height / 2));
this._errorPopUp.show();
this._errorPopUp.addEventListener("hideComplete", this.popHideComplete);
}
private function loadSettings(_arg1:String):void{
var _local2:String;
if (loaderInfo.url.indexOf("http://") != -1){
_arg1 = ParsingUtils.uId(_arg1);
};
if (stage){
_local2 = ((stage.loaderInfo.parameters[this._settingsFlashVarName]) ? stage.loaderInfo.parameters[this._settingsFlashVarName] : "");
} else {
_local2 = "";
};
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
if ((((_local2 == "")) || ((_local2 == " ")))){
this._settingsXMLLoader.load(Path.createRelativePath(_arg1));
} else {
this._settingsXMLLoader.load(Path.createRelativePath(_local2));
};
this._settingsXMLLoader.addEventListener(Event.COMPLETE, this.settingsLoaded);
} else {
this.loadAssets(this._assetsXML);
};
}
public function set backgroundCornerRadius(_arg1:Number):void{
this._backgroundCornerRadius = _arg1;
this.drawBackground();
}
public function set shadeWidth(_arg1:Number):void{
this._shadeWidth = _arg1;
this.drawShade();
}
private function addMask():void{
this._componentMask = new Shape();
addChild(this._componentMask);
this._componentMask.graphics.clear();
this._componentMask.graphics.lineStyle(0, 0, 0);
this._componentMask.graphics.beginFill(Number(this._backgroundColor1), 1);
this._componentMask.graphics.drawRoundRect(0, 0, this._componentWidth, this._componentHeight, this._backgroundCornerRadius);
this.mask = this._componentMask;
}
public function get customPath():String{
return (this._customPath);
}
private function addBitmap():void{
if (!this._background.contains(this._backBitmap)){
this._background.addChild(this._backBitmap);
};
if (this._backgroundShade){
this._background.setChildIndex(this._backBitmap, 0);
};
}
public function get focusedItem():String{
return (this._focusedItem);
}
private function loadImageBackground():void{
var _local1:URLRequest;
var _local2:LoaderContext;
if (((((!((this._backgroundImage == ""))) && (!((this._backgroundImage == " "))))) && (!((this._backgroundImage == "none"))))){
if (this._shouldLoadBack){
this.removeImageOrSWF();
_local1 = new URLRequest(Path.createRelativePath((this._customPath + this._backgroundImage)));
_local2 = new LoaderContext();
_local2.checkPolicyFile = true;
this._backgroundImageLoader = new Loader();
this._backgroundImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onBackgroundImageLoaded);
this._backgroundImageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.backgroundImageNotFound);
this._backgroundImageLoader.load(_local1, _local2);
this._shouldLoadBack = false;
} else {
if (this._bgImageLoaded){
this.drawImageBackground();
};
};
};
}
public function get templateMode():String{
return (this._templateMode);
}
public function killComponent():void{
this.clearStage();
}
public function get xmlFromAssets():XML{
return (this._xmlFromAssets);
}
public function get background():Sprite{
return (this._background);
}
public function get shadeAlpha():Number{
return (this._shadeAlpha);
}
public function get bgShadeAlpha():Number{
return (this._bgShadeAlpha);
}
public function get shadeColor():String{
return (this._shadeColor);
}
public function get bgShadeColor():String{
return (this._bgShadeColor);
}
public function get fillType():String{
return (this._fillType);
}
public function get useBgShade():String{
return (String(this._useBgShade));
}
public function set folderPath(_arg1:String):void{
this._folderPath = _arg1;
Path.appendPath = _arg1;
}
public function set assetsWithoutLoading(_arg1:String):void{
this._assetsXML = _arg1;
this._imageFromContentUsed = true;
}
public function get backgroundFitting():String{
return (this._backgroundFitting);
}
private function exernalXMLNotFound(_arg1:Event):void{
dispatchEvent(new Event(FXEvent.XML_NOT_FOUND_ERROR));
this.addErrorPopUp("Link from assetsXML not found.");
this.removePreloader();
}
public function set gradientRatio(_arg1:Number):void{
this._gradientRatio = _arg1;
this.drawBackground();
}
public function set shadeHeight(_arg1:Number):void{
this._shadeHeight = _arg1;
this.drawShade();
}
public function set bgShadeWidth(_arg1:Number):void{
this._bgShadeWidth = _arg1;
this.drawBackgroundShade();
}
public function forceResize():void{
this._componentWidth = ((isNaN(this._maximumStretchWidth)) ? stage.stageWidth : this._maximumStretchWidth);
this.drawBackground();
if (this._useShade){
this.drawShade();
};
}
protected function assetsLoaded(_arg1:Event):void{
this.clearImages();
this.removePreloader();
this._xmlFromAssets = XML(_arg1.currentTarget.xml).copy();
if (this._assetsXMLLoader){
this._assetsXMLLoader.removeEventListener(Event.COMPLETE, this.assetsLoaded);
};
if (this._imagesXMLFetcher){
this._imagesXMLFetcher.removeEventListener(Event.COMPLETE, this.assetsLoaded);
};
}
public function set stretchWidth(_arg1:String):void{
var _local2:Number;
if ((_arg1 == "true")){
this._stretchWidth = true;
} else {
this._stretchWidth = false;
};
if (this._stretchWidth){
if (stage){
_local2 = this._componentWidth;
this.componentWidth = ((isNaN(this._maximumStretchWidth)) ? stage.stageWidth : this._maximumStretchWidth);
this._previousWidth = _local2;
};
} else {
this.componentWidth = this._previousWidth;
};
}
private function popHideComplete(_arg1:Event):void{
this._errorPopUp.removeEventListener("hideComplete", this.popHideComplete);
removeChild(this._errorPopUp);
this._errorPopUp = null;
}
protected function drawShade():void{
if (!this._shade){
this._shade = new Shape();
addChild(this._shade);
};
this._shade.graphics.clear();
this._shade.graphics.lineStyle(0, 0, 0);
var _local1:Matrix = new Matrix();
_local1.createGradientBox((this._componentWidth + this._shadeWidth), (this._componentHeight + this._shadeHeight), 0, (-(this._shadeWidth) / 2), (-(this.shadeHeight) / 2));
this._shade.graphics.beginGradientFill("radial", [uint(this._shadeColor), uint(this._shadeColor)], [0, this._shadeAlpha], [this._shadeRatio, 0xFF], _local1);
this._shade.graphics.drawRoundRect(0, 0, this._componentWidth, this._componentHeight, this._backgroundCornerRadius, this._backgroundCornerRadius);
this.updateLogo();
}
public function get preloaderLink():String{
return (this._preloaderLink);
}
public function set componentWidth(_arg1:Number):void{
this._componentWidth = _arg1;
this._previousWidth = this._componentWidth;
this.drawBackground();
if (this._useShade){
this.drawShade();
};
dispatchEvent(new Event(FXEvent.COMPONENT_RESIZE, true, false));
}
public function get assetsXML():String{
return (this._assetsXML);
}
public function set maximumStretch(_arg1:Number):void{
this._maximumStretchWidth = _arg1;
}
public function set gradientRotation(_arg1:Number):void{
this._gradientRotation = _arg1;
this.drawBackground();
}
public function set contextMenuLink(_arg1:String):void{
this._contextMenuLink = _arg1;
}
public function set backgroundImage(_arg1:String):void{
this._backgroundImage = _arg1;
this._shouldLoadBack = true;
this.drawBackground();
}
private function switchPreloader():void{
if (this._preloader){
this.removePreloader();
};
this._preloader = null;
this._preloaderLoader = new Loader();
this._preloaderLoader.load(new URLRequest(Path.createRelativePath((this._customPath + this._preloaderLink))));
this._preloaderLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.switchPreloaderLoaded);
this._preloaderLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.preloaderNotFound);
}
public function get backgroundCornerRadius():Number{
return (this._backgroundCornerRadius);
}
public function set gradientPosY(_arg1:Number):void{
this._gradientPosY = _arg1;
this.drawBackground();
}
private function removeMask():void{
this.mask = null;
removeChild(this._componentMask);
this._componentMask.graphics.clear();
this._componentMask = null;
}
public function get folderPath():String{
return (this._folderPath);
}
protected function updateStage():void{
}
public function set gradientPosX(_arg1:Number):void{
this._gradientPosX = _arg1;
this.drawBackground();
}
public function set backgroundAlpha(_arg1:Number):void{
this._backgroundAlpha = _arg1;
this.drawBackground();
}
public function get shadeWidth():Number{
return (this._shadeWidth);
}
public function set shadeRatio(_arg1:Number):void{
this._shadeRatio = _arg1;
this.drawShade();
}
protected function drawBackground():void{
switch (this._fillType){
case "image":
this.loadImageBackground();
break;
default:
this.useBgShade = "false";
this.removeImageOrSWF();
this.drawVectorBackground();
};
if (this._useShade){
this.drawShade();
};
if (this._useBgShade){
this.drawBackgroundShade();
};
if (this._componentMask != null){
this._componentMask.graphics.clear();
this._componentMask.graphics.lineStyle(0, 0xFF0000, 0);
this._componentMask.graphics.beginFill(0xFF0000, 1);
this._componentMask.graphics.drawRoundRect(0, 0, this._componentWidth, this._componentHeight, this._backgroundCornerRadius, this._backgroundCornerRadius);
};
this.updateStage();
this.updateLogo();
}
public function get stretchWidth():String{
return (String(this._stretchWidth));
}
private function drawBackgroundShade():void{
if (!this._backgroundShade){
this._backgroundShade = new Shape();
this._background.addChild(this._backgroundShade);
};
this._backgroundShade.graphics.clear();
this._backgroundShade.graphics.lineStyle(0, 0, 0);
var _local1:Matrix = new Matrix();
_local1.createGradientBox((this._componentWidth + this._bgShadeWidth), (this._componentHeight + this._bgShadeHeight), 0, (-(this._bgShadeWidth) / 2), (-(this.bgShadeHeight) / 2));
this._backgroundShade.graphics.beginGradientFill("radial", [uint(this._bgShadeColor), uint(this._bgShadeColor)], [0, this._bgShadeAlpha], [this._bgShadeRatio, 0xFF], _local1);
this._backgroundShade.graphics.drawRoundRect(0, 0, this._componentWidth, this._componentHeight, this._backgroundCornerRadius, this._backgroundCornerRadius);
}
public function get bgShadeWidth():Number{
return (this._bgShadeWidth);
}
public function get loadedXML():XML{
return (this._settings);
}
public function set useShade(_arg1:String):void{
if ((_arg1 == "true")){
this._useShade = true;
} else {
this._useShade = false;
};
if (this._useShade){
this.drawShade();
} else {
this.removeShade();
};
}
public function get gradientPosY():Number{
return (this._gradientPosY);
}
public function get shadeHeight():Number{
return (this._shadeHeight);
}
public function get gradientPosX():Number{
return (this._gradientPosX);
}
public function get shadeRatio():Number{
return (this._shadeRatio);
}
protected function bringShadeToTop():void{
if (this._shade){
setChildIndex(this._shade, (numChildren - 1));
this.updateLogo();
};
}
public function set settingsXML(_arg1:String):void{
this._settingsXML = _arg1;
if (this._settingsLoaded){
this.clearStage();
this.startLoading();
};
}
protected function aboutComponent(_arg1:Event):void{
navigateToURL(new URLRequest(this._contextMenuLink), "_blank");
}
public function set backgroundColor1(_arg1:String):void{
this._backgroundColor1 = _arg1;
this.drawBackground();
}
public function set backgroundColor2(_arg1:String):void{
this._backgroundColor2 = _arg1;
this.drawBackground();
}
public function get backgroundColor1():String{
return (this._backgroundColor1);
}
public function get backgroundColor2():String{
return (this._backgroundColor2);
}
}
}//package net.flashXML
package net.flashXML.image {
import flash.display.*;
import flash.events.*;
import net.flashXML.event.*;
import net.flashXML.utils.*;
import flash.net.*;
import flash.system.*;
public class MinimalImage extends Sprite {
protected var _holder:Sprite;
private var _url:String;
private var _image:Loader;
public function MinimalImage(_arg1:String=null){
this._image = new Loader();
super();
this._holder = new Sprite();
addChild(this._holder);
if (_arg1){
this._url = _arg1;
this.load(this._url);
};
}
protected function onImageLoaded(_arg1:Event):void{
var _local2:Bitmap;
if (this._url.substr((this._url.length - 4), this._url.length) != ".swf"){
this._image.cacheAsBitmap = true;
_local2 = Bitmap(this._image.content);
_local2.smoothing = true;
this._holder.addChild(_local2);
} else {
this._holder.addChild(this._image);
};
this._image.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.onImageLoaded);
this._image.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, this.onImageLoadFail);
dispatchEvent(new FXEvent(FXEvent.LOADED));
}
public function get contentHolder():Sprite{
return (this._holder);
}
public function load(_arg1:String):void{
this._url = _arg1;
var _local2:LoaderContext = new LoaderContext();
_local2.checkPolicyFile = true;
var _local3:URLRequest = new URLRequest(Path.createRelativePath(_arg1));
this._image.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onImageLoaded);
this._image.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onImageLoadFail);
this._image.load(_local3, _local2);
}
private function onImageLoadFail(_arg1:IOErrorEvent):void{
trace(("Minimal Image: Cannot load image: " + this._url));
dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
}
public function set contentHolder(_arg1:Sprite):void{
this._holder = _arg1;
}
public function clone():MinimalImage{
var _local1:MinimalImage = new MinimalImage();
if ((((this._holder.width > 0)) && ((this._holder.height > 0)))){
_local1.removeChild(_local1._holder);
_local1._holder = BitmapFunctions.duplicateDisplayObject(this._holder);
_local1.addChild(_local1._holder);
};
_local1.width = this.width;
_local1.height = this.height;
return (_local1);
}
}
}//package net.flashXML.image
package net.flashXML.external {
import flash.events.*;
import net.flashXML.event.*;
import flash.net.*;
public class ImagesFetcher extends EventDispatcher {
private var _urlLoader:URLLoader;
private var _componentName:String = "";
private var _stringForError:String;
private var _xml:XML;
private var _url:String = "";
public function ImagesFetcher(_arg1:String=""){
this._componentName = _arg1;
}
public function load(_arg1:String):void{
this._url = _arg1;
var _local2 = (("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%22" + escape(this._url)) + "%22&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys");
this._urlLoader = new URLLoader();
this._urlLoader.addEventListener(Event.COMPLETE, this.xmlLoaded);
this._urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.xmlNotFound);
this._stringForError = _arg1;
this._urlLoader.load(new URLRequest(_local2));
}
private function xmlNotFound(_arg1:IOErrorEvent):void{
trace(((this._componentName + "xml not found: ") + this._stringForError));
dispatchEvent(new Event(FXEvent.CUSTOM_ERROR));
}
public function get xml():XML{
return (this._xml);
}
private function createXML(_arg1:Array):void{
var _local5:Object;
var _local2 = "";
_local2 = (_local2 + "<images>\n");
var _local3:int = _arg1.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _arg1[_local4];
_local2 = (_local2 + (((((("\t<photo image=\"" + _local5.link) + "\" url=\"") + _local5.url) + "\" target=\"_blank\"> <![CDATA[") + _local5.description) + "]]></photo> \n\n"));
_local4++;
};
_local2 = (_local2 + "</images>");
this._xml = XML(_local2);
dispatchEvent(new Event(Event.COMPLETE));
}
private function xmlLoaded(_arg1:Event):void{
var _local6:XML;
var _local10:Object;
var _local11:String;
var _local12:Number;
var _local13:String;
this._urlLoader.removeEventListener(Event.COMPLETE, this.xmlLoaded);
this._urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.xmlNotFound);
var _local2:XML = XML(_arg1.currentTarget.data);
var _local3:Namespace = new Namespace("media", "http://search.yahoo.com/mrss/");
var _local4:XMLList = _local2.results.rss.channel;
var _local5:Number = _local4.item.length();
var _local7:Array = new Array();
var _local8:Boolean;
if (((!((this._url.indexOf("&size=small") == -1))) || (!((this._url.indexOf("?size=small") == -1))))){
_local8 = true;
};
var _local9:int;
while (_local9 < _local5) {
if (this._url.indexOf("api.flickr.com") != -1){
_local6 = _local4.item[_local9];
_local10 = new Object();
if (!_local8){
_local10.link = _local6._local3::content.@url;
} else {
_local10.link = _local6._local3::thumbnail.@url;
};
_local10.title = _local6.title;
_local10.description = _local6._local3::description;
_local10.url = _local6.link;
_local7.push(_local10);
} else {
if (this._url.indexOf("picasaweb.google.com") != -1){
_local6 = _local4.item[_local9];
_local10 = new Object();
if (!_local8){
_local10.link = _local6._local3::group._local3::content.@url;
} else {
_local10.link = _local6._local3::group._local3::thumbnail[1].@url;
};
_local10.title = _local6.title;
_local10.description = _local6._local3::group._local3::description;
_local10.url = _local6.link;
_local7.push(_local10);
} else {
if (this._url.indexOf("photobucket.com") != -1){
_local6 = _local4.item[_local9];
_local10 = new Object();
if (!_local8){
_local10.link = _local6._local3::content.@url;
} else {
_local6._local3::content._local3::thumbnail.@url;
};
_local10.title = _local6.title;
_local10.description = _local6._local3::content._local3::description;
_local10.url = _local6.link;
_local7.push(_local10);
} else {
if (this._url.indexOf("backend.deviantart.com") != -1){
_local6 = _local4.item[_local9];
_local10 = new Object();
if (!_local8){
_local10.link = _local6._local3::content[0].@url;
} else {
_local10.link = _local6._local3::thumbnail[0].@url;
};
_local10.title = _local6.title;
_local10.description = _local6._local3::description;
_local10.url = _local6.link;
_local7.push(_local10);
} else {
if (this._url.indexOf("www.mobypicture.com/rss/") != -1){
_local6 = _local4.item[_local9];
_local10 = new Object();
if (!_local8){
_local10.link = _local6._local3::content[0].@url;
} else {
_local10.link = _local6._local3::thumbnail[0].@url;
};
_local10.title = _local6.title;
_local10.description = _local6._local3::description;
_local10.url = _local6.link;
_local11 = _local10.link;
if (((((((!((_local11.indexOf(".jpg") == -1))) || (!((_local11.indexOf(".png") == -1))))) || (!((_local11.indexOf(".jpen") == -1))))) || (!((_local11.indexOf(".gif") == -1))))){
_local7.push(_local10);
};
} else {
if (this._url.indexOf(".tumblr.com/rss") != -1){
_local6 = _local4.item[_local9];
_local10 = new Object();
_local10.title = _local6.title;
_local10.description = "";
if (_local10.title == "Photo"){
_local11 = _local6.description;
if (_local11.indexOf("src=") != -1){
_local12 = (_local11.indexOf("src=") + 5);
_local13 = _local11.substr(_local12, (_local11.indexOf("\"", (_local12 + 1)) - _local12));
_local10.link = _local13;
_local10.url = _local6.link;
_local7.push(_local10);
};
};
};
};
};
};
};
};
_local9++;
};
this.createXML(_local7);
}
}
}//package net.flashXML.external
package net.flashXML.utils {
import flash.display.*;
public class BitmapFunctions {
public static function duplicateObject(_arg1:Bitmap):Sprite{
var _local2:Sprite = new Sprite();
var _local3:Bitmap = new Bitmap(_arg1.bitmapData.clone());
_local3.smoothing = true;
_local2.addChild(_local3);
return (_local2);
}
public static function getAvrageColor(_arg1:BitmapData):Number{
var _local6:Number;
var _local9:Number;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:Number = 0;
var _local7:Number = 1;
while (_local7 < _arg1.width) {
_local9 = 1;
while (_local9 < _arg1.height) {
_local6 = _arg1.getPixel(_local7, _local9);
_local2 = (_local2 + ((_local6 >> 16) & 0xFF));
_local3 = (_local3 + ((_local6 >> 8) & 0xFF));
_local4 = (_local4 + (_local6 & 0xFF));
_local5++;
_local9++;
};
_local7++;
};
_local2 = (_local2 / _local5);
_local3 = (_local3 / _local5);
_local4 = (_local4 / _local5);
var _local8:uint = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local8);
}
public static function duplicateDisplayObject(_arg1:DisplayObject):Sprite{
var _local3:BitmapData;
var _local4:Bitmap;
var _local2:Sprite = new Sprite();
if ((((_arg1.width > 0)) && ((_arg1.height > 0)))){
_local3 = new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF);
_local3.draw(_arg1);
_local4 = new Bitmap(_local3);
_local4.smoothing = true;
_local2.addChild(_local4);
};
return (_local2);
}
}
}//package net.flashXML.utils
package net.flashXML.utils.math {
public class FXMath {
public static function percentFromNumber(_arg1:Number, _arg2:Number):Number{
return (((_arg1 * 100) / _arg2));
}
public static function numberFromPercent(_arg1:Number, _arg2:Number):Number{
return (((_arg1 * _arg2) / 100));
}
public static function radiansToDegrees(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function degreesToRadians(_arg1:Number):Number{
return (((_arg1 * Math.PI) / 180));
}
}
}//package net.flashXML.utils.math
package net.flashXML.utils {
import flash.events.*;
import flash.utils.*;
public class FakeLoader extends EventDispatcher {
private var _xml:String;
public function FakeLoader(_arg1:String){
this._xml = _arg1;
setTimeout(this.dispatchEvents, 10);
}
private function dispatchEvents():void{
if (this._xml){
dispatchEvent(new Event(Event.COMPLETE));
} else {
dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
};
}
public function get xml():XML{
return (XML(this._xml));
}
}
}//package net.flashXML.utils
package net.flashXML.utils {
import flash.display.*;
import flash.events.*;
import com.gskinner.motion.*;
import com.gskinner.motion.easing.*;
import flash.utils.*;
import flash.text.*;
public class PopUp extends Sprite {
private var _borderWidth:uint = 2;
private var _textColor:uint = 0xFFFFFF;
private var _background:Shape;
private var _tween:GTween;
private var _windowHeight:uint;
private var _backgroundColor:uint = 0xDFDFDF;
private var _borderColor:uint = 0x404040;
private var _removeTimer:Timer;
private var _messageTextField:TextField;
private var _messageTextFormat:TextFormat;
private var _textSize:uint = 14;
private var _displayTime:uint = 0;
private var _textFont:String = "Myriad Pro";
private var _windowWidth:uint;
public function PopUp(_arg1:uint=300, _arg2:uint=100, _arg3:uint=0){
this._windowWidth = _arg1;
this._windowHeight = _arg2;
this._displayTime = _arg3;
this.mouseChildren = false;
this.alpha = 0;
this.init();
}
private function removeTimerComplete(_arg1:TimerEvent):void{
this.hide();
}
public function get windowWidth():uint{
return (this._windowWidth);
}
public function hide():void{
this.mouseChildren = false;
this._tween.paused = true;
this._tween = new GTween(this, 0.5, {alpha:0}, {ease:Cubic.easeOut});
this._tween.onComplete = this.hideComplete;
}
public function show():void{
if (this._tween){
this._tween.paused = true;
};
this._tween = new GTween(this, 0.5, {alpha:1}, {ease:Cubic.easeOut});
this._tween.onComplete = this.showComplete;
}
public function get windowHeight():uint{
return (this._windowHeight);
}
public function set windowHeight(_arg1:uint):void{
this._windowHeight = _arg1;
}
private function drawBackground():void{
this._background.graphics.lineStyle(0, 0, 0);
this._background.graphics.beginFill(this._borderColor, 1);
this._background.graphics.drawRect(0, 0, this._windowWidth, this._windowHeight);
this._background.graphics.beginFill(this._backgroundColor, 1);
this._background.graphics.drawRect(this._borderWidth, this._borderWidth, (this._windowWidth - (this._borderWidth * 2)), (this._windowHeight - (this._borderWidth * 2)));
}
private function init():void{
this._background = new Shape();
addChild(this._background);
this.drawBackground();
this.addTextField();
}
public function set windowWidth(_arg1:uint):void{
this._windowWidth = _arg1;
}
private function hideComplete(_arg1:GTween):void{
dispatchEvent(new Event("hideComplete"));
}
public function set displayTime(_arg1:uint):void{
this._displayTime = _arg1;
}
private function positionTextField():void{
this._messageTextField.x = ((this._windowWidth / 2) - (this._messageTextField.width / 2));
this._messageTextField.y = ((this._windowHeight / 2) - this._messageTextField.height);
}
public function set text(_arg1:String):void{
this._messageTextField.text = _arg1;
this._messageTextField.setTextFormat(this._messageTextFormat);
this.positionTextField();
}
public function get displayTime():uint{
return (this._displayTime);
}
private function addTextField():void{
this._messageTextField = new TextField();
addChild(this._messageTextField);
this._messageTextField.width = (this._windowWidth - 40);
this._messageTextField.multiline = true;
this._messageTextField.autoSize = TextFieldAutoSize.LEFT;
this._messageTextField.wordWrap = true;
this.positionTextField();
this._messageTextFormat = new TextFormat();
this._messageTextFormat.font = this._textFont;
this._messageTextFormat.color = this._textColor;
this._messageTextFormat.size = this._textSize;
this._messageTextFormat.align = "center";
}
private function showComplete(_arg1:GTween):void{
this.mouseChildren = true;
dispatchEvent(new Event("showComplete"));
if (this._displayTime > 0){
this._removeTimer = new Timer((this._displayTime * 1000), 1);
this._removeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.removeTimerComplete);
this._removeTimer.start();
};
}
}
}//package net.flashXML.utils
package net.flashXML.utils {
public class Path {
private static var _appendPath:String = "";
public static function createRelativePath(_arg1:String, _arg2:String=""):String{
if (_arg1.length < 4){
return (_arg1);
};
if (_arg1.indexOf(appendPath) == -1){
if (_arg1.indexOf("http://") == -1){
return (((appendPath + _arg2) + _arg1));
};
};
return (_arg1);
}
public static function set appendPath(_arg1:String):void{
if (((!((_arg1 == ""))) && (!((_arg1 == _appendPath))))){
_appendPath = _arg1;
};
}
public static function get appendPath():String{
return (_appendPath);
}
}
}//package net.flashXML.utils
package net.flashXML.utils {
import com.gskinner.motion.easing.*;
public class MotionType {
public static function motionType(_arg1:String):Function{
switch (_arg1.toLocaleLowerCase()){
case "back.easein":
return (Back.easeIn);
case "back.easeout":
return (Back.easeOut);
case "back.easeinout":
return (Back.easeInOut);
case "bounce.easein":
return (Bounce.easeIn);
case "bounce.easeout":
return (Bounce.easeOut);
case "bounce.easeinout":
return (Bounce.easeInOut);
case "circular.easein":
return (Circular.easeIn);
case "circular.easeout":
return (Circular.easeOut);
case "circular.easeinout":
return (Circular.easeInOut);
case "cubic.easein":
return (Cubic.easeIn);
case "cubic.easeout":
return (Cubic.easeOut);
case "cubic.easeinout":
return (Cubic.easeInOut);
case "elastic.easein":
return (Elastic.easeIn);
case "elastic.easeout":
return (Elastic.easeOut);
case "elastic.easeinout":
return (Elastic.easeInOut);
case "exponential.easein":
return (Exponential.easeIn);
case "exponential.easeout":
return (Exponential.easeOut);
case "exponential.easeinout":
return (Exponential.easeInOut);
case "linear.easein":
return (Linear.easeNone);
case "linear.easeout":
return (Linear.easeNone);
case "linear.easeinout":
return (Linear.easeNone);
case "quadratic.easein":
return (Quadratic.easeIn);
case "quadratic.easeout":
return (Quadratic.easeOut);
case "quadratic.easeinout":
return (Quadratic.easeInOut);
case "quartic.easein":
return (Quartic.easeIn);
case "quartic.easeout":
return (Quartic.easeOut);
case "quartic.easeinout":
return (Quartic.easeInOut);
case "quintic.easein":
return (Quintic.easeIn);
case "quintic.easeout":
return (Quintic.easeOut);
case "quintic.easeinout":
return (Quintic.easeInOut);
case "sine.easein":
return (Sine.easeIn);
case "sine.easeout":
return (Sine.easeOut);
case "sine.easeinout":
return (Sine.easeInOut);
};
return (new Function());
}
}
}//package net.flashXML.utils
package net.flashXML.utils {
import flash.events.*;
import net.flashXML.event.*;
import flash.net.*;
public class XMLLoader extends EventDispatcher {
private var _urlLoader:URLLoader;
private var _componentName:String = "";
private var _stringForError:String;
private var _xml:XML;
public function XMLLoader(_arg1:String=""){
this._componentName = _arg1;
this._xml = new XML();
}
private function xmlNotFound(_arg1:IOErrorEvent):void{
trace(((this._componentName + "xml not found: ") + this._stringForError));
dispatchEvent(new Event(FXEvent.CUSTOM_ERROR));
}
public function load(_arg1:String):void{
this._urlLoader = new URLLoader();
this._urlLoader.addEventListener(Event.COMPLETE, this.xmlLoaded);
this._urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.xmlNotFound);
this._stringForError = _arg1;
this._urlLoader.load(new URLRequest(_arg1));
}
public function get xml():XML{
return (this._xml);
}
private function xmlLoaded(_arg1:Event):void{
this._xml = XML(_arg1.currentTarget.data);
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package net.flashXML.utils
package net.flashXML.utils {
public class ParsingUtils {
public static function uId(_arg1:String):String{
if (_arg1.indexOf("?uid=") != -1){
_arg1 = _arg1.substr(0, _arg1.indexOf("?uid="));
};
return (((_arg1 + "?uid=") + String(new Date().getTime())));
}
public static function convertToBoolean(_arg1:String):Boolean{
if (_arg1 == "true"){
return (true);
};
return (false);
}
public static function appendTextInTags(_arg1:String, _arg2:String):String{
var _local6:String;
var _local7:RegExp;
var _local8:*;
var _local3 = "";
var _local4:Number = _arg1.indexOf("<");
var _local5:Number = 0;
while (_local4 != -1) {
_local3 = (_local3 + _arg1.substr(0, _local4));
_arg1 = _arg1.substr(_local4);
_local5 = _arg1.indexOf(">");
_local6 = _arg1.substr(0, _local5);
_local7 = /<\/?(i|b|u|font|br|a|img|li|p|span|textformat) *( [^>]+)?>/;
_local8 = _local7.test((_local6 + ">"));
if (!_local8){
_local6 = (_local6 + (_arg2 + ">"));
_local3 = (_local3 + _local6);
_arg1 = _arg1.substr((_local5 + 1));
} else {
_local3 = (_local3 + (_local6 + ">"));
_arg1 = _arg1.substr((_local5 + 1));
};
_local4 = _arg1.indexOf("<");
};
return (_local3);
}
public static function getFieldFromString(_arg1:String, _arg2:String):String{
var _local4:String;
var _local3 = "";
if (_arg1.indexOf((_arg2 + "=")) != -1){
_local4 = _arg1.substr(_arg1.indexOf((_arg2 + "=")));
_local4 = _arg1.substr(_arg1.indexOf((_arg2 + "="))).substr((_local4.indexOf("=") + 1));
if (_local4.indexOf("&") != -1){
_local3 = _local4.substr(0, _local4.indexOf("&"));
} else {
_local3 = _local4;
};
} else {
if (_arg1.indexOf((_arg2 + "%3D")) != -1){
_local4 = _arg1.substr(_arg1.indexOf((_arg2 + "%3D")));
_local4 = _arg1.substr(_arg1.indexOf((_arg2 + "%3D"))).substr((_local4.indexOf("%3D") + 1));
if (_local4.indexOf("%26") != -1){
_local3 = _local4.substr(0, _local4.indexOf("%26"));
} else {
_local3 = _local4;
};
};
};
return (_local3);
}
}
}//package net.flashXML.utils
package net.flashXML.utils {
public class AspectRatio {
public static function customFit(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String):Object{
var _local6:Number;
var _local7:Number;
var _local8:Array = _arg5.split(":");
var _local9:Number = Number(_local8[1]);
var _local10:Number = Number(_local8[0]);
_local6 = _arg1;
_local7 = ((_arg1 / _local10) * _local9);
var _local11:Object = boxFit(_local6, _local7, _arg3, _arg4);
return (_local11);
}
public static function bestFit(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Number;
var _local6:Number;
_local5 = _arg3;
_local6 = ((_arg2 * _local5) / _arg1);
if (_local6 < _arg4){
_local6 = _arg4;
_local5 = ((_arg1 * _local6) / _arg2);
};
var _local7:Object = new Object();
_local7.width = _local5;
_local7.height = _local6;
return (_local7);
}
public static function boxFit(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Number;
var _local6:Number;
_local5 = _arg3;
_local6 = ((_arg2 * _local5) / _arg1);
if (_local6 > _arg4){
_local6 = _arg4;
_local5 = ((_arg1 * _local6) / _arg2);
};
var _local7:Object = new Object();
_local7.width = _local5;
_local7.height = _local6;
return (_local7);
}
}
}//package net.flashXML.utils
package net.flashXML.event {
import flash.events.*;
public class FXEvent extends Event {
public static const REMOVE:String = "onRemoveItem";
public static const LOADED:String = "onLoaded";
public static const IMAGE_LOADED:String = "onImageLoad";
public static const BUTTON_DOWN:String = "onButtonDown";
public static const SHRINK:String = "shrink";
public static const ACTIVATE_COMPONENT:String = "activateComponent";
public static const LIGHTBOX_CLOSE:String = "lightboxClose";
public static const BEST_FIT:String = "bestfit";
public static const CUSTOM_ERROR:String = "customError";
public static const SETTINGS_LOADED:String = "onSettingsLoaded";
public static const START_3D_TRANSITION:String = "start3DTransition";
public static const START_TIMER:String = "startTimer";
public static const PREV_IMAGE:String = "previmage";
public static const IMAGES_PRELOAD:String = "onImagesPreLoad";
public static const MENU_EVENT:String = "menuEvent";
public static const NO_SCALE:String = "noscale";
public static const STOP_TIMER:String = "stopTimer";
public static const MENU_UPDATE:String = "menuUpdate";
public static const FORCE_IMAGE:String = "forceimage";
public static const UPDATE:String = "onUpdate";
public static const OPEN:String = "onImageOpen";
public static const ACTIVATE_SUBMENU:String = "activateSubmenu";
public static const MENU_OVER:String = "menuOver";
public static const MENU_OUT:String = "menuOut";
public static const LIGHTBOX_OPEN:String = "lightboxOpen";
public static const EFFECT_READY:String = "imageEffectReady";
public static const COMPONENT_RESIZE:String = "componentResize";
public static const CLOSE:String = "onImageClose";
public static const LOADING_TRANSITION_READY:String = "loadingTransitionReady";
public static const BOX_FIT:String = "boxfit";
public static const IMAGE_CLICK:String = "imageClick";
public static const DEACTIVATE_MENU_ITEM:String = "deactivateMenuItem";
public static const DEZACTIVATE:String = "dezactivate";
public static const NEXT_IMAGE:String = "nextimage";
public static const CUSTOM:String = "custom";
public static const XML_NOT_FOUND_ERROR:String = "xmlNotFoundError";
public static const SET_SELECTED:String = "setSelected";
public static const FORCE_FIT:String = "forcefit";
public var data;
public function FXEvent(_arg1:String, _arg2=null, _arg3:Boolean=false, _arg4:Boolean=false){
this.data = _arg2;
super(_arg1, _arg3, _arg4);
}
}
}//package net.flashXML.event
package net.flashXML.event {
import flash.events.*;
public class FXEventManager extends EventDispatcher {
private static var _fxEventManager:FXEventManager;
public static function getInstance():FXEventManager{
if (_fxEventManager == null){
_fxEventManager = new (FXEventManager)();
};
return (_fxEventManager);
}
}
}//package net.flashXML.event
package net.flashXML.gallery.galleryConnector {
import flash.display.*;
import flash.events.*;
import com.gskinner.motion.*;
import net.flashXML.event.*;
import net.flashXML.image.*;
import net.flashXML.*;
import net.flashXML.utils.*;
import com.gskinner.motion.easing.*;
import flash.utils.*;
import flash.net.*;
public class OverlapGalleryConnector extends FXComponent {
private var _galleryLoader:Loader;
private var _galleryLoaded:Boolean = false;
private var _arrow:String = "assets/arrow5.gif";
private var _customWidth:Number = 600;
private var _useButton:Boolean = false;
private var _galleryHeight:Number;
private var _gallery:MovieClip;
private var _originalX:Number;
private var _originalY:Number;
private var _resizable:Boolean = true;
private var _settingsLoader:XMLLoader;
private var _navigationMargin:Number = 0;
private var _timer:Timer;
private var _alphaTween:GTween;
private var _mouseIsOver:Boolean = false;
private var _galleryWidth:Number;
private var _originalWidth:Number;
private var _originalHeight:Number;
private var _navigationPath:String = "pyramid";
private var _prevY:Number = 0;
private var _buttonImage:MinimalImage;
private var _prevX:Number = 0;
private var _navigationLoaded:Boolean = false;
private var _navigationLoader:Loader;
private var _time:Number = 1;
private var _navigation:MovieClip;
private var _holderSWF:String = "";
private var _buttonClick:Number = 0;
private var _positionTween:GTween;
private var _navigationSWF:String = "";
private var _index:uint;
private var _ease:String = "easeOut";
private var _navigationHideMethod:String = "alpha";
private var _customHeight:Number = 300;
private var _mouseOnStage:Boolean = false;
private var _motion:String = "Cubic";
private var _slideDirection:String = "leftright";
private var _navigationPosition:String = "top";
public function OverlapGalleryConnector(){
this._navigation = new MovieClip();
super();
useMask = true;
_folderPath = ((root.loaderInfo.parameters.folderPath) ? root.loaderInfo.parameters.folderPath : "");
Path.appendPath = _folderPath;
if (stage){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, this.stageResize);
} else {
addEventListener(Event.ADDED_TO_STAGE, this.addedToStage);
};
FXEventManager.getInstance().addEventListener(FXEvent.NEXT_IMAGE, this.forceNextImage);
}
private function slideOff():void{
if (this._navigation){
this.getWidthAndHeight();
this._positionTween.paused = true;
switch (this._navigationPosition){
case "topright":
if (this._slideDirection == "topbottom"){
this._positionTween.setValues({
x:this._originalX,
y:-(this._navigation.background.height)
});
} else {
this._positionTween.setValues({
x:(this._galleryWidth + this._navigation.background.width),
y:this._originalY
});
};
break;
case "top":
this._positionTween.setValues({
x:this._originalX,
y:-(this._navigation.background.height)
});
break;
case "topleft":
if (this._slideDirection == "topbottom"){
this._positionTween.setValues({
x:this._originalX,
y:-(this._navigation.background.height)
});
} else {
this._positionTween.setValues({
x:-(this._navigation.background.width),
y:this._originalY
});
};
break;
case "left":
this._positionTween.setValues({
x:-(this._navigation.background.width),
y:this._originalY
});
break;
case "right":
this._positionTween.setValues({
x:(this._galleryWidth + this._navigation.background.width),
y:this._originalY
});
break;
case "bottomright":
if (this._slideDirection == "topbottom"){
this._positionTween.setValues({
x:this._originalX,
y:this._galleryHeight
});
} else {
this._positionTween.setValues({
x:(this._galleryWidth + this._navigation.background.width),
y:this._originalY
});
};
break;
case "bottom":
this._positionTween.setValues({
x:this._originalX,
y:this._galleryHeight
});
break;
case "bottomleft":
if (this._slideDirection == "topbottom"){
this._positionTween.setValues({
x:this._originalX,
y:this._galleryHeight
});
} else {
this._positionTween.setValues({
x:-(this._navigation.background.width),
y:this._originalY
});
};
break;
};
};
}
public function set customHeight(_arg1:Number):void{
this._customHeight = _arg1;
}
public function get arrow():String{
return (this._arrow);
}
private function galleryLoaded(_arg1:Event):void{
this._gallery = _arg1.currentTarget.loader.content;
this._gallery.folderPath = _folderPath;
this._galleryLoaded = true;
dispatchEvent(new Event("galleryLoaded"));
this._gallery.addEventListener(Event.COMPLETE, this.gallerySettingsLoaded);
addChild(this._gallery);
updateLogo();
this._gallery.contextMenuText = _contextMenuText;
this._gallery.contextMenuLink = _contextMenuLink;
this.start();
}
private function init(_arg1:Event=null):void{
if (this._timer != null){
this._timer.stop();
this._timer.removeEventListener(TimerEvent.TIMER, this.timerComplete);
this._timer = null;
};
this._timer = new Timer(500);
this._timer.start();
this._timer.addEventListener(TimerEvent.TIMER, this.timerComplete);
}
private function Bool(_arg1:String):Boolean{
if (_arg1 == "true"){
return (true);
};
return (false);
}
public function set arrow(_arg1:String):void{
this._arrow = _arg1;
this.loadButtons();
}
private function mouseLeave(_arg1:Event):void{
this._mouseOnStage = false;
if (!this._useButton){
if (this._navigationHideMethod == "alpha"){
this.alphaZero();
} else {
if (this._navigationHideMethod == "slide"){
this.slideOff();
};
};
this._mouseIsOver = false;
};
}
public function get navigation():MovieClip{
return (this._navigation);
}
private function addedToStage(_arg1:Event):void{
stage.addEventListener(Event.RESIZE, this.stageResize);
}
private function alphaZero():void{
this._alphaTween.setValues({alpha:0});
this._navigation.mouseChildren = false;
this._navigation.mouseEnabled = false;
}
private function alphaOne():void{
this._alphaTween.setValues({alpha:1});
this._navigation.mouseChildren = true;
this._navigation.mouseEnabled = true;
}
public function set useButton(_arg1:String):void{
this._useButton = this.Bool(_arg1);
if (this._useButton == false){
if (this._buttonImage){
if (this.contains(this._buttonImage)){
this.removeChild(this._buttonImage);
this._buttonImage.removeEventListener(MouseEvent.CLICK, this.buttonImageClick);
this._buttonImage = null;
this.addInteractivity();
};
};
} else {
if (((this._navigation) && (this._navigation.background))){
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
};
this.loadButtons();
};
}
public function get holderSWF():String{
return (this._holderSWF);
}
private function navigationLoaded(_arg1:Event):void{
var e:* = _arg1;
this._navigation = e.currentTarget.loader.content.men;
this._navigation.addEventListener(FXEvent.COMPONENT_RESIZE, this.navigationResize);
this._navigationLoaded = true;
addChild(this._navigation);
dispatchEvent(new Event("navigationLoaded"));
try {
this._navigation.contextMenuText = _contextMenuText;
this._navigation.contextMenuLink = _contextMenuLink;
} catch(e:Error) {
trace("FXConnector: we have no contextMenu for navigation");
};
this._navigation.addEventListener(Event.COMPLETE, this.navigationXMLLoaded);
updateLogo();
this.start();
}
private function navigationXMLLoaded(_arg1:Event):void{
this.stageResize();
}
public function set resizable(_arg1:Boolean):void{
this._resizable = _arg1;
}
public function get navigationPath():String{
return (this._navigationPath);
}
public function get navigationPosition():String{
return (this._navigationPosition);
}
private function positionButtonImage(_arg1:Event=null):void{
if (this._buttonImage != null){
this._buttonImage.rotation = 0;
if ((((this._navigationPosition == null)) || ((this._navigationPosition == "top")))){
this._buttonImage.rotation = -90;
this._buttonImage.x = ((this._galleryWidth / 2) - (this._buttonImage.width / 2));
this._buttonImage.y = this._buttonImage.height;
} else {
if (this._navigationPosition == "topleft"){
if (this._slideDirection == "topbottom"){
this._buttonImage.rotation = -90;
this._buttonImage.x = ((this._navigation.background.width / 2) - (this._buttonImage.width / 2));
this._buttonImage.y = this._buttonImage.height;
} else {
this._buttonImage.rotation = -180;
this._buttonImage.x = this._buttonImage.width;
this._buttonImage.y = ((this._navigation.background.height / 2) - (this._buttonImage.height / 2));
};
} else {
if (this._navigationPosition == "topright"){
if (this._slideDirection == "topbottom"){
this._buttonImage.rotation = -90;
this._buttonImage.x = ((this._galleryWidth - (this._navigation.background.width / 2)) - (this._buttonImage.width / 2));
this._buttonImage.y = this._buttonImage.height;
} else {
this._buttonImage.rotation = 0;
this._buttonImage.x = (this._galleryWidth - this._buttonImage.width);
this._buttonImage.y = ((this._navigation.background.height / 2) - (this._buttonImage.height / 2));
};
} else {
if (this._navigationPosition == "right"){
this._buttonImage.rotation = 0;
this._buttonImage.x = (this._galleryWidth - this._buttonImage.width);
this._buttonImage.y = ((this._galleryHeight / 2) - (this._buttonImage.height / 2));
} else {
if (this._navigationPosition == "bottom"){
this._buttonImage.rotation = 90;
this._buttonImage.x = ((this._galleryWidth / 2) + (this._buttonImage.width / 2));
this._buttonImage.y = (this._galleryHeight - this._buttonImage.height);
} else {
if (this._navigationPosition == "bottomleft"){
if (this._slideDirection == "topbottom"){
this._buttonImage.rotation = 90;
this._buttonImage.x = ((this._navigation.background.width / 2) - (this._buttonImage.width / 2));
this._buttonImage.y = (this._galleryHeight - this._buttonImage.height);
} else {
this._buttonImage.rotation = 180;
this._buttonImage.x = this._buttonImage.width;
this._buttonImage.y = ((this._navigation.y + (this._navigation.background.height / 2)) + (this._buttonImage.height / 2));
};
} else {
if (this._navigationPosition == "bottomright"){
if (this._slideDirection == "topbottom"){
this._buttonImage.rotation = 90;
this._buttonImage.x = ((this._galleryWidth - (this._navigation.background.width / 2)) - (this._buttonImage.width / 2));
this._buttonImage.y = (this._galleryHeight - this._buttonImage.height);
} else {
this._buttonImage.rotation = 0;
this._buttonImage.x = (this._galleryWidth - this._buttonImage.width);
this._buttonImage.y = ((this._navigation.y + (this._navigation.background.height / 2)) + (this._buttonImage.height / 2));
};
} else {
if (this._navigationPosition == "left"){
this._buttonImage.x = this._buttonImage.width;
this._buttonImage.y = ((this._galleryHeight / 2) + (this._buttonImage.height / 2));
this._buttonImage.rotation = 180;
};
};
};
};
};
};
};
};
this.setChildIndex(DisplayObject(this._buttonImage), (this.numChildren - 1));
updateLogo();
this._buttonImage.removeEventListener(FXEvent.IMAGE_LOADED, this.positionButtonImage);
if ((((this._navigationHideMethod == "alpha")) || ((this._navigationHideMethod == "slide")))){
this._buttonImage.visible = true;
this._mouseIsOver = true;
if (this._navigationHideMethod == "alpha"){
this.alphaOne();
} else {
this.slideOn();
};
this._buttonImage.addEventListener(MouseEvent.CLICK, this.buttonImageClick);
} else {
this._buttonImage.removeEventListener(MouseEvent.CLICK, this.buttonImageClick);
this._buttonImage.visible = false;
};
};
}
public function get gallery():MovieClip{
return (this._gallery);
}
private function start():void{
if (((this._navigationLoaded) && (this._galleryLoaded))){
updateLogo();
this._gallery.alpha = 0;
this.getWidthAndHeight();
this._gallery.componentWidth = this._galleryWidth;
this._gallery.componentHeight = this._galleryHeight;
if (getChildByName("preloader") != null){
removeChild(getChildByName("preloader"));
};
dispatchEvent(new Event("navigationAndGalleryLoaded", true));
dispatchEvent(new Event("componentLoaded", true));
dispatchEvent(new Event(Event.COMPLETE, true));
new GTween(this._gallery, 1, {alpha:1}, {ease:Sine.easeOut});
this.stageResize();
this.init();
};
}
public function set holderSWF(_arg1:String):void{
trace("--------------------SET HOLDER SWF");
this._holderSWF = _arg1;
}
private function onChange(_arg1:GTween):void{
}
private function slideOn():void{
if (((this._navigation) && (this._positionTween))){
this._positionTween.paused = true;
this._navigation.mouseChildren = true;
this._navigation.mouseEnabled = true;
this._positionTween.setValues({
x:this._originalX,
y:this._originalY
});
};
}
public function updateSize():void{
_componentWidth = this._customWidth;
_componentHeight = this._customHeight;
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
this.stageResize();
}
public function get custonWidth():Number{
return (this._customWidth);
}
public function set motion(_arg1:String):void{
this._motion = _arg1;
if (this._positionTween){
this._positionTween.ease = MotionType.motionType(((this._motion + ".") + this._ease));
};
if (this._alphaTween){
this._alphaTween.ease = MotionType.motionType(((this._motion + ".") + this._ease));
};
}
private function forceNextImage(_arg1:FXEvent):void{
}
private function stageResize(_arg1:Event=null):void{
this.getWidthAndHeight();
if (((((this._navigation) && (this._navigation.background))) && ((this._navigation.background.width > 0)))){
if (this.Bool(this._navigation.stretchWidth)){
this._navigation.componentWidth = this._galleryWidth;
};
if (this.Bool(this._navigation.stretchHeight)){
this._navigation.componentHeight = this._galleryHeight;
};
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
this.positionButtonImage();
};
if (_arg1 != null){
if (this._gallery != null){
this._gallery.componentWidth = this._galleryWidth;
this._gallery.componentHeight = this._galleryHeight;
};
} else {
if (this._gallery){
this._gallery.componentWidth = this._galleryWidth;
this._gallery.componentHeight = this._galleryHeight;
};
};
componentWidth = this._galleryWidth;
componentHeight = this._galleryHeight;
}
private function proximity(_arg1:Event):void{
if (this._mouseOnStage){
if ((((((((this.mouseX > this._originalX)) && (((this.mouseX - this._originalX) < this._navigation.background.width)))) && ((this.mouseY > this._originalY)))) && (((this.mouseY - this._originalY) < this._navigation.background.height)))){
if (!this._mouseIsOver){
if (this._navigationHideMethod == "alpha"){
this.alphaOne();
} else {
if (this._navigationHideMethod == "slide"){
this.slideOn();
};
};
};
this._mouseIsOver = true;
} else {
if ((((((((this.mouseX < this._originalX)) || (((this.mouseX - this._originalX) > this._navigation.background.width)))) || ((this.mouseY < this._originalY)))) || (((this.mouseY - this._originalY) > this._navigation.background.height)))){
if (this._mouseIsOver){
if (this._navigationHideMethod == "alpha"){
this.alphaZero();
} else {
if (this._navigationHideMethod == "slide"){
this.slideOff();
};
};
};
this._mouseIsOver = false;
};
};
};
if (((((!((this._prevX == this.mouseX))) && (!((this._prevY == this.mouseY))))) && (!(this._mouseOnStage)))){
this._mouseOnStage = true;
};
this._prevX = this.mouseX;
this._prevY = this.mouseY;
}
public function get useButton():String{
return (String(this._useButton));
}
public function set time(_arg1:Number):void{
this._time = _arg1;
if (this._positionTween){
this._positionTween.duration = this._time;
};
if (this._alphaTween){
this._alphaTween.duration = this._time;
};
}
public function set slideDirection(_arg1:String):void{
this._slideDirection = _arg1;
this.positionButtonImage();
}
public function set navigationSWF(_arg1:String):void{
trace("--------------------SET NAVIGATION SWF");
this._navigationSWF = _arg1;
}
public function set index(_arg1:uint):void{
this._index = _arg1;
}
private function timerComplete(_arg1:TimerEvent):void{
if (this._navigation.background != null){
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
this._navigation.visible = true;
if (this._useButton == true){
this.loadButtons();
};
setChildIndex(this._navigation, (numChildren - 1));
updateLogo();
this._timer.stop();
};
}
public function set customWidth(_arg1:Number):void{
this._customWidth = _arg1;
}
public function get resizable():Boolean{
return (this._resizable);
}
private function loadNavigationAndGallery():void{
if (((!(this._navigationLoaded)) && (!(this._galleryLoaded)))){
this._navigationLoader = new Loader();
if (this._navigationSWF == ""){
trace("---- incarc navigation.swf");
this._navigationLoader.load(new URLRequest(Path.createRelativePath((this._navigationPath + "/navigation.swf"))));
} else {
trace(("---------- NAV SWF " + this._navigationSWF));
this._navigationLoader.load(new URLRequest(Path.createRelativePath(this._navigationSWF)));
};
this._navigationLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.navigationLoaded);
this._navigationLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.navigationNotFound);
this._galleryLoader = new Loader();
trace((("&&&&&&&&&&&&&&&&&&& " + this._holderSWF) + "&&&&&&&&&&&"));
if (this._holderSWF == ""){
trace("HOLDER/HOLDER.swf **************************");
this._galleryLoader.load(new URLRequest(Path.createRelativePath("holder/holder.swf")));
} else {
trace(("---------- HOLDER SWF " + this._holderSWF));
this._galleryLoader.load(new URLRequest(Path.createRelativePath(this._holderSWF)));
};
this._galleryLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.galleryLoaded);
this._galleryLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.galleryNotFound);
} else {
this.start();
};
}
public function get motion():String{
return (this._motion);
}
public function set navigationPath(_arg1:String):void{
this._navigationPath = _arg1;
}
public function set navigationPosition(_arg1:String):void{
this._navigationPosition = _arg1;
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
this.positionButtonImage();
}
private function getWidthAndHeight():void{
if (this._resizable){
this._galleryWidth = stage.stageWidth;
this._galleryHeight = stage.stageHeight;
} else {
this._galleryWidth = this._customWidth;
this._galleryHeight = this._customHeight;
};
}
private function buttonImageClick(_arg1:MouseEvent):void{
if (!this._mouseIsOver){
if (this._navigationHideMethod == "alpha"){
this.alphaOne();
} else {
if (this._navigationHideMethod == "slide"){
this.slideOn();
};
};
this._mouseIsOver = true;
} else {
if (this._navigationHideMethod == "alpha"){
this.alphaZero();
} else {
if (this._navigationHideMethod == "slide"){
this.slideOff();
};
};
this._mouseIsOver = false;
};
}
private function loadButtons():void{
if (this._useButton){
if (this._buttonImage != null){
if (contains(this._buttonImage)){
removeChild(this._buttonImage);
};
};
this._buttonImage = null;
this._buttonImage = new MinimalImage(this._arrow);
this._buttonImage.buttonMode = true;
addChild(this._buttonImage);
updateLogo();
this._buttonImage.addEventListener(FXEvent.LOADED, this.positionButtonImage);
};
}
public function set navigationMargin(_arg1:Number):void{
this._navigationMargin = _arg1;
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
}
private function navigationNotFound(_arg1:IOErrorEvent):void{
trace(("OverlapGalleryConnector: navigation not found: " + String((this._navigationPath + "/navigation.swf"))));
}
private function addInteractivity():void{
if (((this._navigation) && (this._navigation.background))){
removeEventListener(Event.ENTER_FRAME, this.proximity);
stage.removeEventListener(Event.MOUSE_LEAVE, this.mouseLeave);
};
if (((this._buttonImage) && (this._navigation.background))){
this._buttonImage.removeEventListener(MouseEvent.CLICK, this.buttonImageClick);
};
if (this._useButton){
if (this._buttonImage){
this._buttonImage.addEventListener(MouseEvent.CLICK, this.buttonImageClick);
};
} else {
if (((this._navigation) && (this._navigation.background))){
addEventListener(Event.ENTER_FRAME, this.proximity);
stage.addEventListener(Event.MOUSE_LEAVE, this.mouseLeave);
};
};
this._mouseIsOver = false;
}
public function get time():Number{
return (this._time);
}
public function get navigationSWF():String{
return (this._navigationSWF);
}
public function get index():uint{
return (this._index);
}
public function get slideDirection():String{
return (this._slideDirection);
}
private function positionComponent(_arg1:MovieClip, _arg2:String=null, _arg3:String=null):void{
this.getWidthAndHeight();
if (_arg1.alpha == 0){
_arg1.alpha = 1;
};
if (_arg2 == "top"){
_arg1.x = ((this._galleryWidth / 2) - (_arg1.background.width / 2));
_arg1.y = (0 + this._navigationMargin);
} else {
if ((((_arg2 == "topright")) || ((_arg2 == "righttop")))){
_arg1.x = ((this._galleryWidth - _arg1.background.width) - this._navigationMargin);
_arg1.y = (0 + this._navigationMargin);
} else {
if ((((_arg2 == "topleft")) || ((_arg2 == "lefttop")))){
_arg1.x = (0 + this._navigationMargin);
_arg1.y = (0 + this._navigationMargin);
} else {
if (_arg2 == "bottom"){
_arg1.x = ((this._galleryWidth / 2) - (_arg1.background.width / 2));
_arg1.y = ((this._galleryHeight - _arg1.background.height) - this._navigationMargin);
} else {
if ((((_arg2 == "bottomright")) || ((_arg2 == "rightbottom")))){
_arg1.x = ((this._galleryWidth - _arg1.background.width) - this._navigationMargin);
_arg1.y = ((this._galleryHeight - _arg1.background.height) - this._navigationMargin);
} else {
if ((((_arg2 == "bottomleft")) || ((_arg2 == "leftbottom")))){
_arg1.x = (0 + this._navigationMargin);
_arg1.y = ((this._galleryHeight - _arg1.background.height) - this._navigationMargin);
} else {
if (_arg2 == "right"){
_arg1.x = ((this._galleryWidth - _arg1.background.width) - this._navigationMargin);
_arg1.y = ((this._galleryHeight / 2) - (_arg1.background.height / 2));
} else {
if (_arg2 == "left"){
_arg1.x = (0 + this._navigationMargin);
_arg1.y = ((this._galleryHeight / 2) - (_arg1.background.height / 2));
};
};
};
};
};
};
};
};
this._originalX = _arg1.x;
this._originalY = _arg1.y;
switch (_arg3){
case "alpha":
this._alphaTween = new GTween(this._navigation, this._time, {}, {ease:MotionType.motionType(((this._motion + ".") + this._ease))});
this.addInteractivity();
break;
case "slide":
if (this._positionTween == null){
this._positionTween = new GTween(this._navigation, this._time, {}, {ease:MotionType.motionType(((this._motion + ".") + this._ease))});
this._positionTween.onChange = this.onChange;
};
this.addInteractivity();
break;
default:
removeEventListener(Event.ENTER_FRAME, this.proximity);
stage.removeEventListener(Event.MOUSE_LEAVE, this.mouseLeave);
this._navigation.mouseChildren = true;
this._navigation.mouseEnabled = true;
};
}
private function galleryNotFound(_arg1:IOErrorEvent):void{
trace("OverlapGalleryConnector: gallery not found: holder/holder.swf");
}
public function get navigationMargin():Number{
return (this._navigationMargin);
}
public function set ease(_arg1:String):void{
this._ease = _arg1;
if (this._positionTween){
this._positionTween.ease = MotionType.motionType(((this._motion + ".") + this._ease));
};
if (this._alphaTween){
this._alphaTween.ease = MotionType.motionType(((this._motion + ".") + this._ease));
};
}
private function navigationResize(_arg1:Event):void{
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
this.positionButtonImage();
}
public function fullScreen(_arg1:MouseEvent=null):void{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
if (stage.displayState == StageDisplayState.NORMAL){
stage.displayState = StageDisplayState.FULL_SCREEN;
} else {
stage.displayState = StageDisplayState.NORMAL;
};
}
public function set navigationHideMethod(_arg1:String):void{
this._navigationHideMethod = _arg1;
this.positionComponent(this._navigation, this._navigationPosition, this._navigationHideMethod);
this.positionButtonImage();
}
override protected function parseSettings(_arg1:XML):void{
super.parseSettings(_arg1);
this._navigationPath = _arg1.General_Properties.path.@value;
this._navigationPosition = _arg1.General_Properties.position.@value;
this._navigationHideMethod = _arg1.General_Properties.hide.@value;
this._slideDirection = _arg1.General_Properties.slideDirection.@value;
this._navigationMargin = _arg1.General_Properties.margin.@value;
this._arrow = _arg1.General_Properties.arrow.@value;
if (this._navigationSWF == ""){
this._navigationSWF = _arg1.General_Properties.navigationSWF.@value;
} else {
this._navigationSWF = this._navigationSWF;
};
if (this._holderSWF == ""){
this._holderSWF = _arg1.General_Properties.holderSWF.@value;
} else {
this._holderSWF = this._holderSWF;
};
this.useButton = _arg1.General_Properties.useButton.@value;
setTimeout(this.loadNavigationAndGallery, 10);
}
public function get customHeight():Number{
return (this._customHeight);
}
private function gallerySettingsLoaded(_arg1:Event){
this.getWidthAndHeight();
this._gallery.componentWidth = this._galleryWidth;
this._gallery.componentHeight = this._galleryHeight;
this._gallery.removeEventListener(Event.COMPLETE, this.gallerySettingsLoaded);
}
public function get ease():String{
return (this._ease);
}
public function get navigationHideMethod():String{
return (this._navigationHideMethod);
}
}
}//package net.flashXML.gallery.galleryConnector
package net.flashXML.logo {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class Logo extends Sprite {
public function Logo(){
addEventListener(MouseEvent.CLICK, this.click);
buttonMode = true;
}
private function click(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.flashxml.net"), "_blank");
}
}
}//package net.flashXML.logo
package net.flashXML {
public interface IFXComponent {
function get stretchWidth():String;
function forceResize():void;
}
}//package net.flashXML