Frame 1
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Frame 4
stop();
Instance of Symbol 19 MovieClip in Frame 4
//component parameters
onClipEvent (construct) {
delay = 4;
}
Symbol 6 Button
on (release) {
gotoAndPlay (4);
}
Symbol 13 Button
on (release, keyPress "<Left>") {
_parent.updateFrame(-1);
}
on (keyPress "<Up>") {
_root.gotoAndStop(1);
_parent.updateFrame();
}
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 2
stop();
Symbol 16 Button
on (release, keyPress "<Right>") {
_parent.updateFrame(1);
}
on (keyPress "<Down>") {
_root.gotoAndStop(_root._totalFrames);
_parent.updateFrame();
}
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 2
stop();
Symbol 19 MovieClip Frame 1
function updateFrame(inc) {
newFrame = _root._currentFrame + inc;
_root.gotoAndStop(newFrame);
updateStatus();
if (_root._currentFrame == 4) {
prevBtn.gotoAndStop(2);
} else {
prevBtn.gotoAndStop(1);
}
if (_root._currentFrame == _root._totalFrames) {
nextBtn.gotoAndStop(2);
} else {
nextBtn.gotoAndStop(1);
}
}
function updateStatus() {
_root.statusField = (_root._currentFrame + " of ") + _root._totalFrames;
}
function autoplayInit() {
startTime = getTimer();
hideControls();
updateStatus();
}
function autoplay() {
if (autoplayStatus != 0) {
curTime = getTimer();
elapsedTime = curTime - startTime;
indicatorFrame = int(4 / (delay / (elapsedTime / 1000)));
indicator.gotoAndStop(indicatorFrame + 1);
if (elapsedTime >= (delay * 1000)) {
if (_root._currentframe == _root._totalframes) {
_root.gotoAndStop(1);
} else {
_root.nextFrame();
}
autoplayInit();
}
}
}
function hideControls() {
nextBtn.gotoAndStop(2);
prevBtn.gotoAndStop(2);
}
updateFrame();
autoplayStatus = 0;