Combined Code
movieClip 2 {
}
movieClip 4 {
}
movieClip 9 {
}
movieClip 11 {
}
movieClip 14 {
}
movieClip 15 {
}
movieClip 16 {
frame 1 {
stop();
}
instance swfloader of movieClip 15 {
onClipEvent (load) {
function strip_spaces(str) {
var v2 = str;
var v3 = new String('');
var v1 = 0;
while (v1 < v2.length) {
if (v2.charAt(v1) != ' ' && v2.charAt(v1) != ';') {
v3 += v2.charAt(v1);
}
++v1;
}
return v3;
}
function simple_script(action, timeline) {
action = strip_spaces(action);
if (action.length > 0 && (action.indexOf(')') != -1 && action.indexOf('(') != -1)) {
var v3 = action.split('.');
var timeline_action = v3.pop();
var first_paren = timeline_action.indexOf('(');
var second_paren = timeline_action.indexOf(')');
var timeline_function = timeline_action.substr(0, first_paren);
var function_parameter = timeline_action.substr(first_paren + 1, second_paren - (first_paren + 1));
var v2 = timeline;
var v1 = 0;
while (v1 < v3.length) {
v2 = v2[v3[v1]];
++v1;
}
if (function_parameter.indexOf('"') != -1) {
function_parameter = function_parameter.substr(1, function_parameter.length - 2);
}
v2[timeline_function](function_parameter);
}
}
function execute_action() {
var v1 = _parent;
unloaded = true;
v1._visible = false;
simple_script(v1.play_action_val, v1);
}
_parent.anim.gotoAndStop(1);
simple_script(_parent.init_action_val, _parent);
var done = false;
var unloaded = false;
var orig_x = _parent._x;
var orig_y = _parent._y;
var dist_x = _parent._x + _parent._width * 2 / 3;
var dist_y = _parent._y + _parent._height * 2 / 3;
var orig_a = _parent._alpha;
var accel_jump = 0.75;
var slow_factor = _parent.slow_factor_val;
var speed_factor = 1 + slow_factor / (1 - slow_factor);
var ready = false;
var perc_fadeout = 0;
_parent.perc._x = _parent.anim._x - _parent.perc._width / 2;
_parent.perc._y = _parent.anim._y - _parent.perc._height / 2;
if (slow_factor < 1) {
switch (_parent.xin_motion_val) {
case 'Up':
_parent._y = orig_y + dist_y * 2;
break;
case 'Down':
_parent._y = orig_y - dist_y * 2;
break;
case 'Left':
_parent._x = orig_x + dist_x * 2;
break;
case 'Right':
_parent._x = orig_x - dist_x * 2;
break;
case 'Toward':
_parent._yscale = 1;
_parent._xscale = 1;
break;
case 'None':
_parent._alpha = 0;
}
} else {
ready = true;
}
}
onClipEvent (enterFrame) {
if (unloaded) {
return undefined;
}
if (!ready) {
switch (_parent.xin_motion_val) {
case 'Toward':
_parent._xscale += (100 - _parent._xscale) * slow_factor;
_parent._yscale = _parent._xscale;
if (_parent.xin_alphatype_val == 'Yes') {
_parent._alpha = Math.round((orig_a / 100) * Math.max(0, Math.min(_parent._xscale, 100)));
}
if (Math.abs(100 - _parent._xscale) < 0.5) {
_parent._yscale = 100;
_parent._xscale = 100;
_parent._alpha = orig_a;
ready = true;
}
break;
default:
_parent._x += (orig_x - _parent._x) * slow_factor;
_parent._y += (orig_y - _parent._y) * slow_factor;
if (_parent.xin_alphatype_val == 'Yes') {
if (_parent.xin_motion_val == 'None') {
_parent._alpha += (orig_a - _parent._alpha) * slow_factor;
} else {
if (Math.abs(orig_x - _parent._x) > Math.abs(orig_y - _parent._y)) {
_parent._alpha = 100 - Math.round((orig_a / 100) * (Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
} else {
_parent._alpha = 100 - Math.round((orig_a / 100) * (Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
}
}
}
if (_parent.xin_motion_val == 'None' && Math.abs(_parent._alpha - orig_a) <= 1 || _parent.xin_motion_val != 'None' && Math.abs(_parent._y - orig_y) < 0.5 && Math.abs(_parent._x - orig_x) < 0.5) {
_parent._x = orig_x;
_parent._y = orig_y;
_parent._alpha = orig_a;
ready = true;
}
}
} else {
if (!done) {
var rl = _root.getBytesLoaded();
var rt = _root.getBytesTotal() * (_parent.perc_req_val / 100);
if (rl > 10 && rt > 10) {
rl = Math.min(rl, rt);
var new_frame = _parent.anim._currentframe + Math.ceil((_parent.anim._totalframes * (rl / rt) - _parent.anim._currentframe) / 4);
new_frame = Math.max(1, new_frame);
if (_parent.show_perc_val == 'Yes') {
_parent.perc.text = Math.round(((new_frame - 1) / (_parent.anim._totalframes - 1)) * 100) + ' %';
}
if (new_frame != _parent.anim._currentframe) {
_parent.anim.gotoAndStop(new_frame);
}
if (_parent.anim._totalframes == _parent.anim._currentframe && rl >= rt) {
done = true;
}
}
} else {
if (slow_factor < 1) {
switch (_parent.xout_motion_val) {
case 'Down':
if (_parent._y <= orig_y) {
_parent._y = orig_y + accel_jump;
}
_parent._y = orig_y + Math.abs(_parent._y - orig_y) * speed_factor;
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y > orig_y + dist_y * 2) {
execute_action();
}
break;
case 'Up':
if (_parent._y >= orig_y) {
_parent._y = orig_y - accel_jump;
}
_parent._y = orig_y - Math.abs(_parent._y - orig_y) * speed_factor;
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y < orig_y - dist_y * 2) {
execute_action();
}
break;
case 'Right':
if (_parent._x <= orig_x) {
_parent._x = orig_x + accel_jump;
}
_parent._x = orig_x + Math.abs(_parent._x - orig_x) * speed_factor;
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x > orig_x + dist_x * 2) {
execute_action();
}
break;
case 'Left':
if (_parent._x >= orig_x) {
_parent._x = orig_x - accel_jump;
}
_parent._x = orig_x - Math.abs(_parent._x - orig_x) * speed_factor;
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x < orig_x - dist_x * 2) {
execute_action();
}
break;
case 'Away':
if (_parent._xscale >= 100 || _parent._yscale >= 100) {
_parent._yscale = 100 - accel_jump;
_parent._xscale = _parent._yscale;
}
_parent._yscale = Math.max(0.5, 100 - (100 - _parent._yscale) * speed_factor);
_parent._xscale = _parent._yscale;
perc_fadeout = 100 - Math.round(Math.max(0, Math.min(_parent._xscale, 100)));
if (_parent._xscale < 1) {
execute_action();
}
break;
default:
perc_fadeout += (100 - perc_fadeout) * slow_factor;
if (Math.abs(perc_fadeout - 100) <= 1) {
execute_action();
}
}
if (_parent.xout_alphatype_val !== 'Yes') {
} else {
_parent._alpha = (orig_a / 100) * (100 - perc_fadeout);
}
} else {
execute_action();
}
}
}
}
}
}
instance of movieClip 16 {
onClipEvent (initialize) {
xin_motion_val = 'Toward';
xin_alphatype_val = 'No';
xout_motion_val = 'None';
xout_alphatype_val = 'No';
perc_req_val = 80;
show_perc_val = 'Yes';
slow_factor_val = 0.2;
init_action_val = '_root.stop();';
play_action_val = '_root.play();';
}
}