Frame 1
function loadXML() {
xml_obj = new XML();
xml_obj.ignoreWhite = true;
xml_obj.onLoad = com.webeyestudio.Delegate.create(this, parseXMLObj);
xml_obj.load("banner.xml");
}
function parseXMLObj(success) {
if (success) {
var _local6 = xml_obj.firstChild.childNodes[0].childNodes;
auto_play_speed = _local6[0].firstChild.nodeValue;
background_color = Number(_local6[1].firstChild.nodeValue);
title_text_color = Number(_local6[2].firstChild.nodeValue);
title_background_color = Number(_local6[3].firstChild.nodeValue);
description_text_color = Number(_local6[4].firstChild.nodeValue);
description_background_color = Number(_local6[5].firstChild.nodeValue);
next_color = (previous_color = (playPause_color = Number(_local6[6].firstChild.nodeValue)));
next_rollover_color = (previous_rollover_color = (playPause_rollover_color = Number(_local6[7].firstChild.nodeValue)));
are_images_clickable = Boolean(Number(_local6[8].firstChild.nodeValue));
image_effects = new Array();
var _local5 = xml_obj.firstChild.childNodes[1].childNodes;
var _local2 = 0;
while (_local2 < _local5.length) {
var _local1 = _local5[_local2];
image_effects.push(_local1.firstChild.nodeValue);
_local2++;
}
xml_nodes = new Array();
var _local4 = xml_obj.firstChild.childNodes[2].childNodes;
var _local3 = 0;
while (_local3 < _local4.length) {
var _local1 = _local4[_local3];
xml_nodes.push(new com.webeyestudio.Slides(_local1.childNodes[0].firstChild.nodeValue, _local1.childNodes[1].firstChild.nodeValue, _local1.childNodes[2].firstChild.nodeValue, _local1.childNodes[3].firstChild.nodeValue, _local1.childNodes[4].firstChild.nodeValue));
total_images = xml_nodes.length - 1;
_local3++;
}
initializeSlideShow();
}
}
function initializeSlideShow() {
bg_color_obj = new Color(background_mc);
bg_color_obj.setRGB(background_color);
title_color_obj = new Color(title_bg_mc);
title_color_obj.setRGB(title_background_color);
description_color_obj = new Color(description_bg_mc);
description_color_obj.setRGB(description_background_color);
next_color_obj = new Color(controls_mc.next_mc);
next_color_obj.setRGB(next_color);
next_rollover_color_obj = new Color(controls_mc.next_mc);
previous_color_obj = new Color(controls_mc.previous_mc);
previous_color_obj.setRGB(previous_color);
previous_rollover_color_obj = new Color(controls_mc.previous_mc);
playPause_color_obj = new Color(controls_mc.play_pause_mc);
playPause_color_obj.setRGB(playPause_color);
playPause_rollover_color_obj = new Color(controls_mc.play_pause_mc);
controls_mc.next_mc.onRelease = com.webeyestudio.Delegate.create(this, nextButtonClicked);
controls_mc.next_mc.onRollOver = (controls_mc.previous_mc.onRollOver = function () {
next_rollover_color_obj.setRGB(next_rollover_color);
});
controls_mc.next_mc.onRollOut = (controls_mc.next_mc.onDragOut = (controls_mc.next_mc.onReleaseOutside = function () {
next_color_obj.setRGB(next_color);
}));
controls_mc.previous_mc.onRelease = com.webeyestudio.Delegate.create(this, previousButtonClicked);
controls_mc.previous_mc.onRollOver = function () {
previous_rollover_color_obj.setRGB(previous_rollover_color);
};
controls_mc.previous_mc.onRollOut = (controls_mc.previous_mc.onDragOut = (controls_mc.previous_mc.onReleaseOutside = function () {
previous_color_obj.setRGB(previous_color);
}));
controls_mc.play_pause_mc.onRelease = com.webeyestudio.Delegate.create(this, playPauseButtonClicked);
controls_mc.play_pause_mc.onRollOver = function () {
if (is_auto_play) {
this.gotoAndStop("pauseOver");
} else {
this.gotoAndStop("playOver");
}
playPause_rollover_color_obj.setRGB(playPause_rollover_color);
};
controls_mc.play_pause_mc.onRollOut = (controls_mc.play_pause_mc.onDragOut = (controls_mc.play_pause_mc.onReleaseOutside = function () {
if (is_auto_play) {
this.gotoAndStop("pause");
} else {
this.gotoAndStop("play");
}
playPause_color_obj.setRGB(playPause_color);
}));
loadImage(++current_image_id);
}
function loadImage(id) {
mc_loader.loadClip(xml_nodes[id].slide_pic, images_holder_mc.image_holder_1_mc);
}
function nextButtonClicked() {
if (is_auto_play) {
controls_mc.play_pause_mc.gotoAndStop("play");
clearImageLoadInterval();
is_auto_play = false;
}
loadNextImage();
}
function previousButtonClicked() {
if (is_auto_play) {
controls_mc.play_pause_mc.gotoAndStop("play");
clearImageLoadInterval();
is_auto_play = false;
}
loadPreviousImage();
}
function playPauseButtonClicked() {
if (is_auto_play) {
controls_mc.play_pause_mc.gotoAndStop("playOver");
clearImageLoadInterval();
is_auto_play = false;
} else {
controls_mc.play_pause_mc.gotoAndStop("pauseOver");
is_auto_play = true;
loadNextImage();
}
}
function loadNextImage() {
var _local1 = current_image_id + 1;
if (_local1 > total_images) {
current_image_id = 0;
loadImage(0);
} else {
loadImage(++current_image_id);
}
}
function loadPreviousImage() {
if (is_auto_play) {
clearImageLoadInterval();
is_auto_play = false;
}
var _local1 = current_image_id - 1;
if (_local1 < 0) {
current_image_id = total_images;
loadImage(total_images);
} else {
loadImage(--current_image_id);
}
}
function setImageLoadInterval() {
auto_play_interval_id = setInterval(this, "loadNextImage", auto_play_speed * 1000);
}
function clearImageLoadInterval() {
clearInterval(auto_play_interval_id);
}
function centerImagePosition() {
if (images_holder_mc.image_holder_1_mc._width > 1980) {
images_holder_mc.image_holder_1_mc._x = images_holder_mc.image_holder_1_mc._x - Math.floor((images_holder_mc.image_holder_1_mc._width - 1860) / 2);
}
if (images_holder_mc.image_holder_1_mc._height > 211) {
images_holder_mc.image_holder_1_mc._y = images_holder_mc.image_holder_1_mc._y - Math.floor((images_holder_mc.image_holder_1_mc._height - 150) / 2);
}
}
function resetImagePosition() {
images_holder_mc.image_holder_1_mc._x = 0;
images_holder_mc.image_holder_1_mc._y = 0;
}
function updateTextFields() {
title_txt_format.color = title_text_color;
subtitle_txt_format.color = title_text_color;
desc_txt_format.color = description_text_color;
title_txt.text = xml_nodes[current_image_id].slide_title;
subtitle_txt.text = xml_nodes[current_image_id].slide_subtitle;
description_txt.text = xml_nodes[current_image_id].slide_description;
title_txt.setTextFormat(title_txt_format);
subtitle_txt.setTextFormat(subtitle_txt_format);
description_txt.setTextFormat(desc_txt_format);
}
function gotoURL() {
getURL (xml_nodes[current_image_id].slide_url, "_self");
}
function applyImageEffect() {
images_holder_mc.image_holder_1_mask_mc.gotoAndPlay("dummy_effect");
var _local1 = new mx.transitions.Tween(images_holder_mc.image_holder_1_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 0.5, true);
}
title_txt.tabIndex = 11;
controls_mc.previous_mc.tabIndex = 8;
controls_mc.previous_mc._accProps = new Object();
controls_mc.previous_mc._accProps.name = "Previous Slide";
controls_mc.play_pause_mc.tabIndex = 9;
controls_mc.play_pause_mc._accProps = new Object();
controls_mc.play_pause_mc._accProps.name = "Toggle Play Pause";
controls_mc.next_mc.tabIndex = 10;
controls_mc.next_mc._accProps = new Object();
controls_mc.next_mc._accProps.name = "Next";
this.controls_mc.play_pause_mc.gotoAndStop("pause");
images_holder_mask_mc._alpha = 0;
preloader_indicator_mc._visible = false;
var mc_loader = new MovieClipLoader();
var mc_loader_listener = new Object();
mc_loader.addListener(mc_loader_listener);
var xml_obj;
var xml_nodes;
var total_images;
var current_image_id = -1;
var is_movie_initialized = false;
var is_auto_play = true;
var auto_play_interval_id;
var auto_play_speed = 6;
var title_color_obj;
var title_text_color;
var title_background_color;
var description_color_obj;
var description_text_color;
var description_background_color;
var next_color_obj;
var next_color;
var next_rollover_color;
var previous_color_obj;
var previous_color;
var previous_rollover_color;
var playPause_color_obj;
var playPause_color;
var playPause_rollover_color;
var are_images_clickable = false;
var image_effects;
var random_number;
var x_lower_limit = 0;
var x_upper_limit = images_holder_mask_mc._width;
var y_lower_limit = 0;
var y_upper_limit = images_holder_mask_mc._height;
var controls_initial_position = controls_mc._y;
var controls_target_position = ((images_holder_mask_mc._height - controls_mc._height) - 20);
var title_txt_format = new TextFormat();
title_txt_format.size = 18;
title_txt_format.bold = false;
var subtitle_txt_format = new TextFormat();
subtitle_txt_format.size = 11;
subtitle_txt_format.bold = false;
var desc_txt_format = new TextFormat();
desc_txt_format.size = 10;
desc_txt_format.leading = 2;
desc_txt_format.bold = false;
mc_loader_listener.onLoadStart = function () {
resetImagePosition();
if (!preloader_indicator_mc._visible) {
preloader_indicator_mc._visible = true;
}
if (is_auto_play) {
clearImageLoadInterval();
}
images_holder_mc.image_holder_1_mask_mc.gotoAndStop("stop");
};
mc_loader_listener.onLoadInit = function () {
centerImagePosition();
applyImageEffect();
updateTextFields();
if (are_images_clickable) {
images_holder_mc.image_holder_1_mc.onRelease = com.webeyestudio.Delegate.create(this, gotoURL);
}
if (is_auto_play) {
setImageLoadInterval();
}
};
mc_loader_listener.onLoadComplete = function () {
if (preloader_indicator_mc._visible) {
preloader_indicator_mc._visible = false;
}
};
fmi.onRelease = function () {
gotoURL();
};
loadXML();
stop();
Symbol 6 MovieClip Frame 35
gotoAndPlay (1);
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 24
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 1
stop();
Symbol 42 MovieClip [__Packages.com.webeyestudio.Delegate] Frame 0
class com.webeyestudio.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local3 = arguments.callee.args;
return(_local4.apply(_local2, _local3.concat(arguments)));
};
_local2.target = arguments.shift();
_local2.func = arguments.shift();
_local2.args = arguments;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 43 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 44 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 45 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 46 MovieClip [__Packages.com.webeyestudio.Slides] Frame 0
class com.webeyestudio.Slides
{
var slide_pic, slide_title, slide_subtitle, slide_description, slide_url;
function Slides (pic, title, subtitle, description, url) {
slide_pic = pic;
slide_title = title;
slide_subtitle = subtitle;
slide_description = description;
slide_url = url;
}
}
Symbol 47 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}