Frame 1
objTime = new Date();
varStartSeconds = objTime.getSeconds();
varStartMinutes = objTime.getMinutes();
varStartHours = objTime.getHours();
varStartDays = objTime.getDay();
Frame 2
objNewTime = new Date();
varBytes = _root.getBytesLoaded();
varKbytes = Math.round((_root.getBytesLoaded() / 1024) * 100) / 100;
varTotalBytes = Math.round((_root.getBytesTotal() / 1024) * 100) / 100;
if (varBytes > 1024) {
txtBytes = ((varKbytes add " Kbytes of ") add varTotalBytes) add " Kbytes";
} else {
txtBytes = ((varBytes add " Bytes of ") add varTotalBytes) add " Kbytes";
}
txtPercentage = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) add "%";
Frame 3
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay (4);
} else {
gotoAndPlay (2);
}
Frame 56
stop();
Frame 1052
stop();
Frame 1142
stop();
Symbol 58 MovieClip Frame 1
function makePage(targ, xQuadrant) {
with (targ) {
beginFill(pageColor, 100);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
}
}
function makeShade(targ, xQuadrant) {
with (targ) {
var colors = [0, 0, 0, 0, 0, 0, 0];
var alphas = [10, 5, 2, 1, 0, 1, 3];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var matrix = {matrixType:"box", x:0, y:pageWi, w:xQuadrant * pageWi, h:pageHi, r:0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
}
}
function makeShadow(targ, xQuadrant) {
with (targ) {
var colors = [0, 0, 0, 0, 0, 0, 0];
var alphas = [10, 5, 2, 1, 0, 1, 3];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var maxLength = Math.sqrt((pageWi * pageWi) + (pageWIHi * pageWiHi));
var matrix = {matrixType:"box", x:0, y:-maxLength, w:xQuadrant * pageWi, h:maxLength - pageWi, r:0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -maxLength);
lineto(xQuadrant * pageWi, -maxLength);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
}
}
function setStationary() {
createEmptyMovieClip("SLPage", 1);
if (flipPage != 1.5) {
makePage(SLPage, -1);
SLPage.attachMovie("print" + (flipPage - 1.5), "print", 1);
with (SLPage.print) {
_x = (-pageWi) / 2;
_y = -pivotY;
}
}
createEmptyMovieClip("SRPage", 2);
if (flipPage != (maxPages - 0.5)) {
makePage(SRPage, 1);
SRPage.attachMovie("print" + (flipPage + 1.5), "print", 1);
with (SRPage.print) {
_x = pageWi / 2;
_y = -pivotY;
}
}
var targ = ((dir > 0) ? (SLPage) : (SRPage));
targ.createEmptyMovieClip("Shade", 2);
makeShade(targ.Shade, -dir);
}
function setFlipping() {
var targ;
createEmptyMovieClip("FTPage", 3);
makePage(FTPage, dir);
with (FTPage) {
attachMovie("print" + (flipPage - (dir * 0.5)), "print", 1);
with (print) {
_x = (dir * pageWi) / 2;
_y = -pivotY;
}
}
FTPage.createEmptyMovieClip("Shade", 2);
makeShade(FTPage.Shade, dir);
createEmptyMovieClip("FBPage", 4);
makePage(FBPage, -dir);
FBPage.attachMovie("print" + (flipPage + (dir * 0.5)), "print", 1);
with (FBPage.print) {
_x = ((-dir) * pageWi) / 2;
_y = -pivotY;
}
FBPage._rotation = dir * 90;
}
function setShadows() {
var targ;
this.createEmptyMovieClip("FShadow", 5);
makeShadow(FShadow, -dir);
FShadow._rotation = dir * 45;
this.createEmptyMovieClip("SShadow", 6);
makeShadow(SShadow, dir);
SShadow._rotation = dir * 45;
}
function makeMasks() {
this.createEmptyMovieClip("FBPageMask", 7);
with (FBPageMask) {
beginFill(21760, 100);
lineto(pageWiHi, -PageWiHi);
curveto(0, -2 * PageWiHi, -pageWiHi, -pageWiHi);
endFill();
}
FBPageMask.duplicateMovieClip("FTPageMask", 8);
this.createEmptyMovieClip("FShadowMask", 9);
makePage(FShadowMask, -dir);
FShadowMask._rotation = dir * 90;
this.createEmptyMovieClip("SShadowMask", 10);
makePage(SShadowMask, dir);
FBPage.setMask(FBPageMask);
FTPage.setMask(FTPageMask);
FShadow.setMask(FShadowMask);
SShadow.setMask(SShadowMask);
}
function limitBook() {
if (flipPage == 1.5) {
SLPage._visible = 0;
LButton._visible = 0;
SShadow._visible = 0;
if (dir == 1) {
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
} else {
FShadow._alpha = 67;
}
} else if (flipPage == (maxPages - 0.5)) {
SRPage._visible = 0;
RButton._visible = 0;
SShadow._visible = 0;
if (dir == -1) {
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
} else {
FShadow._alpha = 67;
}
}
}
function pageInit(cp, d) {
flipPage = cp;
dir = d;
setStationary();
setFlipping();
setShadows();
makeMasks();
limitBook();
}
function flip(curVal) {
var rot = ((dir * 45) * curVal);
FBPageMask._rotation = (FTPageMask._rotation = -rot);
FBPage._rotation = (FShadowMask._rotation = (dir * 90) - (rot * 2));
FShadow._rotation = (SShadow._rotation = (dir * 45) - rot);
}
function getPageRatio() {
if (dragging) {
pageRatio = ((-dir) * ((_xmouse - startX) - (dir * 20))) / (2 * pageWi);
} else {
((pageRatio > 0.666667) ? ((pageRatio = pageRatio + autoStep)(pageRatio = pageRatio + autoStep)) : ((pageRatio = pageRatio - autoStep)));
}
if (pageRatio <= 0) {
pageRatio = 0;
if (!dragging) {
flipDone();
}
} else if (pageRatio >= 1) {
pageRatio = 1;
if (!dragging) {
flipDone();
}
}
return(pageRatio);
}
function startFlip(dir) {
pageInit(curPage + dir, dir);
startX = dir * pageWi;
dragging = true;
RButton._alpha = 0;
Lbutton._alpha = 0;
pageRatio = 0;
transInterval = setInterval(function () {
pageRatio = pageRatio + pageVelocity;
flip(pageRatio);
if (pageRatio >= 1) {
flipRelease();
flipDone();
}
}, 100);
}
function flipRelease() {
dragging = false;
if (pageRatio > 0.666667) {
curPage = curPage + (2 * dir);
}
}
function terminar() {
clearInterval(terminarInterval);
_root.gotoAndPlay("maquina");
}
function flipDone() {
clearInterval(transInterval);
if (curPage >= maxPages) {
clearInterval(pageInterval);
terminarInterval = setInterval(terminar, stepVelocity);
}
RButton._alpha = 100;
LButton._alpha = 100;
if (curPage != 0.5) {
LButton._visible = 1;
}
if (curPage != (maxPages + 0.5)) {
RButton._visible = 1;
}
if (pageRatio == 0) {
FShadow.removeMovieClip();
FShadowMask.removeMovieClip();
SShadow.removeMovieClip();
SShadowMask.removeMovieClip();
FBPage.removeMovieClip();
FBPageMask.removeMovieClip();
if (dir == 1) {
SRPage.removeMovieClip();
} else {
SLPage.removeMovieClip();
}
} else {
FTPage.removeMovieClip();
if (dir == -1) {
SRPage.removeMovieClip();
} else {
SLPage.removeMovieClip();
}
}
FTPageMask.removeMovieClip();
}
stop();
_level0.pagesAbs = this;
var pageWi = 340;
var PageHi = 500;
var pageWiHi = (pageWi + pageHi);
var pivotY = ((pageHi / 2) + pageWi);
var pageColor = 16777215;
var dir = 1;
var flipPage = 1.5;
var curPage = 0.5;
var maxPages = 6;
var autoStep = 0.05;
var dragging = false;
var pageVelocity = 0.05;
var stepVelocity = 6000;
soundPagina = new Sound(pasaPagina);
soundPagina.setVolume(80);
soundPagina.attachSound("pasaPagina");
this.attachMovie("cornerButton", "RButton", 11);
with (RButton) {
_x = pageWi;
_y = -pageWi;
}
this.attachMovie("cornerButton", "LButton", 12);
with (LButton) {
_x = -pageWi;
_y = -pageWi;
_xscale = -100;
}
pageInit(flipPage, dir);
_y = (_y + pivotY);
LButton.onPress = function () {
startFlip(-1);
};
LButton.onReleaseOutside = function () {
flipRelease();
};
LButton.onRelease = function () {
flipRelease();
};
RButton.onPress = function () {
startFlip(1);
};
RButton.onReleaseOutside = function () {
flipRelease();
};
RButton.onRelease = function () {
flipRelease();
};
pageInterval = setInterval(function () {
startFlip(1);
soundPagina.start();
}, stepVelocity);
Symbol 152 MovieClip Frame 14
stop();
Symbol 223 MovieClip Frame 1
function makePage(targ, xQuadrant) {
with (targ) {
beginFill(pageColor, 100);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
}
}
function makeShade(targ, xQuadrant) {
with (targ) {
var colors = [0, 0, 0, 0, 0, 0, 0];
var alphas = [10, 5, 2, 1, 0, 1, 3];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var matrix = {matrixType:"box", x:0, y:pageWi, w:xQuadrant * pageWi, h:pageHi, r:0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
}
}
function makeShadow(targ, xQuadrant) {
with (targ) {
var colors = [0, 0, 0, 0, 0, 0, 0];
var alphas = [10, 5, 2, 1, 0, 1, 3];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var maxLength = Math.sqrt((pageWi * pageWi) + (pageWIHi * pageWiHi));
var matrix = {matrixType:"box", x:0, y:-maxLength, w:xQuadrant * pageWi, h:maxLength - pageWi, r:0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -maxLength);
lineto(xQuadrant * pageWi, -maxLength);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
}
}
function setStationary() {
createEmptyMovieClip("SLPage", 1);
if (flipPage != 1.5) {
makePage(SLPage, -1);
SLPage.attachMovie("printf" + (flipPage - 1.5), "printf", 1);
with (SLPage.printf) {
_x = (-pageWi) / 2;
_y = -pivotY;
}
}
createEmptyMovieClip("SRPage", 2);
if (flipPage != (maxPages - 0.5)) {
makePage(SRPage, 1);
SRPage.attachMovie("printf" + (flipPage + 1.5), "printf", 1);
with (SRPage.printf) {
_x = pageWi / 2;
_y = -pivotY;
}
}
var targ = ((dir > 0) ? (SLPage) : (SRPage));
targ.createEmptyMovieClip("Shade", 2);
makeShade(targ.Shade, -dir);
}
function setFlipping() {
var targ;
createEmptyMovieClip("FTPage", 3);
makePage(FTPage, dir);
with (FTPage) {
attachMovie("printf" + (flipPage - (dir * 0.5)), "printf", 1);
with (printf) {
_x = (dir * pageWi) / 2;
_y = -pivotY;
}
}
FTPage.createEmptyMovieClip("Shade", 2);
makeShade(FTPage.Shade, dir);
createEmptyMovieClip("FBPage", 4);
makePage(FBPage, -dir);
FBPage.attachMovie("printf" + (flipPage + (dir * 0.5)), "printf", 1);
with (FBPage.printf) {
_x = ((-dir) * pageWi) / 2;
_y = -pivotY;
}
FBPage._rotation = dir * 90;
}
function setShadows() {
var targ;
this.createEmptyMovieClip("FShadow", 5);
makeShadow(FShadow, -dir);
FShadow._rotation = dir * 45;
this.createEmptyMovieClip("SShadow", 6);
makeShadow(SShadow, dir);
SShadow._rotation = dir * 45;
}
function makeMasks() {
this.createEmptyMovieClip("FBPageMask", 7);
with (FBPageMask) {
beginFill(21760, 100);
lineto(pageWiHi, -PageWiHi);
curveto(0, -2 * PageWiHi, -pageWiHi, -pageWiHi);
endFill();
}
FBPageMask.duplicateMovieClip("FTPageMask", 8);
this.createEmptyMovieClip("FShadowMask", 9);
makePage(FShadowMask, -dir);
FShadowMask._rotation = dir * 90;
this.createEmptyMovieClip("SShadowMask", 10);
makePage(SShadowMask, dir);
FBPage.setMask(FBPageMask);
FTPage.setMask(FTPageMask);
FShadow.setMask(FShadowMask);
SShadow.setMask(SShadowMask);
}
function limitBook() {
if (flipPage == 1.5) {
SLPage._visible = 0;
LButton._visible = 0;
SShadow._visible = 0;
if (dir == 1) {
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
} else {
FShadow._alpha = 67;
}
} else if (flipPage == (maxPages - 0.5)) {
SRPage._visible = 0;
RButton._visible = 0;
SShadow._visible = 0;
if (dir == -1) {
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
} else {
FShadow._alpha = 67;
}
}
}
function pageInit(cp, d) {
flipPage = cp;
dir = d;
setStationary();
setFlipping();
setShadows();
makeMasks();
limitBook();
}
function flip(curVal) {
var rot = ((dir * 45) * curVal);
FBPageMask._rotation = (FTPageMask._rotation = -rot);
FBPage._rotation = (FShadowMask._rotation = (dir * 90) - (rot * 2));
FShadow._rotation = (SShadow._rotation = (dir * 45) - rot);
}
function getPageRatio() {
if (dragging) {
pageRatio = ((-dir) * ((_xmouse - startX) - (dir * 20))) / (2 * pageWi);
} else {
((pageRatio > 0.666667) ? ((pageRatio = pageRatio + autoStep)(pageRatio = pageRatio + autoStep)) : ((pageRatio = pageRatio - autoStep)));
}
if (pageRatio <= 0) {
pageRatio = 0;
if (!dragging) {
flipDone();
}
} else if (pageRatio >= 1) {
pageRatio = 1;
if (!dragging) {
flipDone();
}
}
return(pageRatio);
}
function startFlip(dir) {
pageInit(curPage + dir, dir);
startX = dir * pageWi;
dragging = true;
RButton._alpha = 0;
Lbutton._alpha = 0;
pageRatio = 0;
transInterval = setInterval(function () {
pageRatio = pageRatio + pageVelocity;
flip(pageRatio);
if (pageRatio >= 1) {
flipRelease();
flipDone();
}
}, 100);
}
function flipRelease() {
dragging = false;
if (pageRatio > 0.666667) {
curPage = curPage + (2 * dir);
}
}
function terminar() {
clearInterval(terminarInterval);
_root.gotoAndPlay("fin");
}
function flipDone() {
clearInterval(transInterval);
if (curPage >= maxPages) {
clearInterval(pageInterval);
terminarInterval = setInterval(terminar, stepVelocity);
}
RButton._alpha = 100;
LButton._alpha = 100;
if (curPage != 0.5) {
LButton._visible = 1;
}
if (curPage != (maxPages + 0.5)) {
RButton._visible = 1;
}
if (pageRatio == 0) {
FShadow.removeMovieClip();
FShadowMask.removeMovieClip();
SShadow.removeMovieClip();
SShadowMask.removeMovieClip();
FBPage.removeMovieClip();
FBPageMask.removeMovieClip();
if (dir == 1) {
SRPage.removeMovieClip();
} else {
SLPage.removeMovieClip();
}
} else {
FTPage.removeMovieClip();
if (dir == -1) {
SRPage.removeMovieClip();
} else {
SLPage.removeMovieClip();
}
}
FTPageMask.removeMovieClip();
}
stop();
_level0.pagesAbs = this;
var pageWi = 340;
var PageHi = 500;
var pageWiHi = (pageWi + pageHi);
var pivotY = ((pageHi / 2) + pageWi);
var pageColor = 16777215;
var dir = 1;
var flipPage = 1.5;
var curPage = 0.5;
var maxPages = 4;
var autoStep = 0.05;
var dragging = false;
var pageVelocity = 0.05;
var stepVelocity = 8000;
soundPagina = new Sound(pasaPagina);
soundPagina.setVolume(80);
soundPagina.attachSound("pasaPagina");
this.attachMovie("cornerButton", "RButton", 11);
with (RButton) {
_x = pageWi;
_y = -pageWi;
}
this.attachMovie("cornerButton", "LButton", 12);
with (LButton) {
_x = -pageWi;
_y = -pageWi;
_xscale = -100;
}
pageInit(flipPage, dir);
_y = (_y + pivotY);
LButton.onPress = function () {
startFlip(-1);
};
LButton.onReleaseOutside = function () {
flipRelease();
};
LButton.onRelease = function () {
flipRelease();
};
RButton.onPress = function () {
startFlip(1);
};
RButton.onReleaseOutside = function () {
flipRelease();
};
RButton.onRelease = function () {
flipRelease();
};
pageInterval = setInterval(function () {
startFlip(1);
soundPagina.start();
}, stepVelocity);
Symbol 233 Button
on (release) {
gotoAndPlay (1);
}