[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (269 B)
stop();
stop();
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.getBytesLoaded() == _local1.getBytesTotal()) {
delete _local1.onEnterFrame;
_local1.play();
}
};
this.clickTAG_mc.onRelease = function () {
getURL (_root.clickTAG);
};
Frame 2 (1.47 KiB) ●
function slideIn(path, offset, delay, fadeDelay) {
var _local1 = path;
_local1._alpha = 0;
_local1.initX = _local1._x;
_local1._x = _local1._x + offset;
_local1.tweenObj = new adTween(_local1);
_local1.tweenObj.tween("_x", _local1.initX, 1, null, delay);
_local1.tweenObj.tween("_alpha", 100, 1.4, null, delay);
if (!(fadeDelay === undefined)) {
_local1.tweenObj.tween("_alpha", 0, 0.4, null, fadeDelay);
}
}
stop();
_root.pauseClipArray = new Array();
_root.pauser = function (mcName, secondsToPause, endFunction) {
function donePausing() {
if (endFunction == undefined) {
mcName.play();
} else {
endFunction();
}
}
p++;
var startTime = getTimer();
var pauseTime = (secondsToPause * 1000);
if (endFunction == undefined) {
mcName.stop();
}
mcName.createEmptyMovieClip(("timer" + p) + "_mc", p);
_root.pauseClipArray.push(mcName[("timer" + p) + "_mc"]);
mcName[("timer" + p) + "_mc"].onEnterFrame = function () {
if ((getTimer() - startTime) > pauseTime) {
donePausing();
removeMovieClip(this);
}
};
};
_root.killAllPauses = function () {
var _local1 = _root;
for (mc in _local1.pauseClipArray) {
removeMovieClip(_local1.pauseClipArray[mc]);
}
};
slideIn(text1_mc, 50, 0.3, 2.1);
slideIn(text1b_mc, -50, 0.3, 2.1);
_root.pauser(this, 1.2, function () {
anim_mc.play();
});
initX = anim_mc._x;
anim = new adTween(anim_mc);
anim.scaleTo(90, null, null, 2);
anim.tween("_x", initX + 10, 12, "linear", 2);
Frame 3 (70 B)
stop();
slideIn(text2_mc, 50, 0, 3);
slideIn(text2b_mc, -50, 0, 3);
Frame 4 (75 B)
stop();
slideIn(text3a_mc, 50, 0, 2.8);
slideIn(text3b_mc, -50, 0, 2.8);
Frame 5 (901 B)
function enableRollOver(path) {
delete path.onEnterFrame;
cta_btn.onRollOver = function () {
this._parent.anim_mc.gotoAndPlay("loop");
delete this.onRollOver;
};
}
function enableRollOut(path) {
var _local1 = this;
cta_btn.onRollOut = (cta_btn.onDragOut = function () {
var _local1 = this;
delete _local1.onRollOut;
delete _local1.onDragOut;
path.onEnterFrame = function () {
this.prevFrame();
};
});
}
stop();
anim.scaleTo(90, 2);
slideIn(text4_mc, 50);
cta_btn._alpha = (replay_mc._alpha = (logo_mc._alpha = 0));
cta = new adTween(cta_btn);
logo = new adTween(logo_mc);
replay = new adTween(replay_mc);
cta.tween("_alpha", 100, 0.8, null, 0.3);
logo.tween("_alpha", 100, 0.8, null, 0.5);
replay.tween("_alpha", 100, 0.8, null, 0.5);
replay_mc.onRelease = function () {
this._parent.gotoAndStop(1);
};
cta_btn.onRelease = clickTAG_mc.onRelease;
Symbol 96 MovieClip Frame 9 (8 B)
stop();
Symbol 96 MovieClip Frame 95 (21 B)
this._parent.play();
Symbol 96 MovieClip Frame 124 (23 B)
_root.pauser(this, 2);
Symbol 96 MovieClip Frame 125 (21 B)
this._parent.play();
Symbol 96 MovieClip Frame 140 (25 B)
_root.pauser(this, 0.1);
Symbol 96 MovieClip Frame 187 (21 B)
this._parent.play();
Symbol 96 MovieClip Frame 205 (64 B)
stop();
this._parent.enableRollOver(this);
trace(getTimer());
Symbol 96 MovieClip Frame 231 (43 B)
stop();
this._parent.enableRollOut(this);
Symbol 125 MovieClip [__Packages.adTween] Frame 0 (6.73 KiB) ● ●
class adTween
{
var clip;
function adTween (mcRef) {
clip = mcRef;
}
function tween(prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = this;
if (timeSeconds < 0.001) {
timeSeconds = 0.5;
}
if ((animType == undefined) || (animType == "")) {
animType = "easeOutExpo";
}
if (delay == undefined) {
delay = 0;
}
if (typeof(prop) == "string") {
var properties = [prop];
var oldProperties = [_local3.clip[prop]];
var newProperties = [propDest];
} else {
var properties = [];
var oldProperties = [];
var newProperties = [];
for (var i in prop) {
oldProperties.push(_local3.clip[prop[i]]);
}
for (var i in prop) {
properties.push(prop[i]);
}
for (var i in propDest) {
newProperties.push(propDest[i]);
}
}
var $_callback_assigned = false;
if (_root.__tweenController__ == undefined) {
var tweenHolder = _root.createEmptyMovieClip("__tweenController__", 123432);
tweenHolder.$_tweenPropList = new Array();
tweenHolder.classRef = _local3;
tweenHolder.onEnterFrame = function () {
var _local3 = this;
var tTime = getTimer();
var _local2 = 0;
while (_local2 < _local3.$_tweenPropList.length) {
var _local1 = _local3.$_tweenPropList[_local2];
if ((_local1._timeStart + (_local1._delay * 1000)) <= tTime) {
if ((_local1._timeDest + (_local1._delay * 1000)) <= tTime) {
_local1._targ[_local1._prop] = _local1._propDest;
_local3.$_tweenPropList.splice(_local2, 1);
_local2--;
_local1._targ.$_tweenCount--;
if (_local1._targ.$_tweenCount == 0) {
delete _local1._targ.$_tweenCount;
}
if (_local1._callback != undefined) {
if (_global.backwardCallbackTweening) {
var childMC = _local1._targ.createEmptyMovieClip("__child__", 122344);
_local1._callback.apply(childMC, null);
childMC.removeMovieClip();
} else {
_local1._callback.apply(_local1._targ, null);
}
}
if (_local3.$_tweenPropList.length == 0) {
_local3.removeMovieClip();
}
} else {
if (_local1._propStart == undefined) {
_local1._propStart = _local1._targ[_local1._prop];
}
_local1._targ[_local1._prop] = _local3.classRef.findTweenValue(_local1._propStart, _local1._propDest, _local1._timeStart, tTime - (_local1._delay * 1000), _local1._timeDest, _local1._animType, _local1._extra1, _local1._extra2);
}
}
_local2++;
}
};
}
var tweenPropList = _root.__tweenController__.$_tweenPropList;
var tTime = getTimer();
for (var i in oldProperties) {
if ((newProperties[i] != undefined) && (!_local3.clip.$_isTweenLocked)) {
if (_local3.clip.$_tweenCount > 0) {
var _local2 = 0;
while (_local2 < tweenPropList.length) {
if ((tweenPropList[_local2]._targ == _local3.clip) && (tweenPropList[_local2]._prop == properties[i])) {
if ((tTime + (delay * 1000)) < tweenPropList[_local2]._timeDest) {
tweenPropList.splice(_local2, 1);
_local2--;
_local3.clip.$_tweenCount--;
}
}
_local2++;
}
}
tweenPropList.push({_prop:properties[i], _targ:_local3.clip, _propStart:undefined, _propDest:newProperties[i], _timeStart:tTime, _timeDest:tTime + (timeSeconds * 1000), _animType:animType, _extra1:extra1, _extra2:extra2, _delay:delay, _callback:($_callback_assigned ? undefined : (callback))});
_local3.clip.$_tweenCount = ((_local3.clip.$_tweenCount > 0) ? (_local3.clip.$_tweenCount + 1) : 1);
$_callback_assigned = true;
}
}
}
function stopAllTweens() {
_root.__tweenController__.removeMovieClip();
}
function lockTween() {
clip.$_isTweenLocked = true;
}
function unlockTween() {
delete clip.$_isTweenLocked;
}
function getTweens() {
return(clip.$_tweenCount);
}
function isTweening() {
return(((clip.$_tweenCount > 0) ? true : false));
}
function stopTween(props) {
var _local2 = this;
var _local3 = props;
var _local1 = _root.__tweenController__.$_tweenPropList;
switch (typeof(_local3)) {
case "string" :
_local3 = [_local3];
case "object" :
for (var i in _local3) {
for (var pti in _local1) {
if ((_local1[pti]._targ == _local2.clip) && (_local1[pti]._prop == _local3[i])) {
_local1.splice(pti, 1);
}
}
}
_local2.clip.$_tweenCount = 0;
for (var pti in _local1) {
if (_local1[pti]._targ == _local2.clip) {
_local2.clip.$_tweenCount++;
}
}
if (_local2.clip.$_tweenCount == 0) {
delete _local2.clip.$_tweenCount;
}
break;
default :
for (var pti in _local1) {
if (_local1[pti]._targ == _local2.clip) {
_local1.splice(pti, 1);
}
}
delete _local2.clip.$_tweenCount;
}
if (_local1.length == 0) {
_root.__tweenController__.removeMovieClip();
_local2.clip.__tweenController_ADVhelper__.removeMovieClip();
}
}
function scaleTo(propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
tween(["_xscale", "_yscale"], [propDest_scale, propDest_scale], timeSeconds, animType, delay, callback, extra1, extra2);
}
function slideTo(propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
tween(["_x", "_y"], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2);
}
function findTweenValue(_propStart, _propDest, _timeStart, _timeNow, _timeDest, _animType, _extra1, _extra2) {
var _local1 = _timeNow - _timeStart;
var _local3 = _propStart;
var _local2 = _propDest - _propStart;
var d = (_timeDest - _timeStart);
var a = _extra1;
var p = _extra2;
var s = _extra1;
switch (_animType.toLowerCase()) {
case "easeoutexpo" :
return(((_local1 == d) ? (_local3 + _local2) : ((_local2 * ((-Math.pow(2, (-10 * _local1) / d)) + 1)) + _local3)));
case "linear" :
return(((_local2 * _local1) / d) + _local3);
case "easeoutelastic" :
if (a == undefined) {
a = 0;
}
if (_local1 == 0) {
return(_local3);
}
_local1 = _local1 / d;
if (_local1 == 1) {
return(_local3 + _local2);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(_local2)) {
a = _local2;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(_local2 / a));
}
return((((a * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / p)) + _local2) + _local3);
case "easeinexpo" :
return(((_local1 == 0) ? (_local3) : ((_local2 * Math.pow(2, 10 * ((_local1 / d) - 1))) + _local3)));
}
return(undefined);
}
}