[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 (37.03 KiB) ● ● ● ●
function preload() {
this.onEnterFrame = function () {
var _local2 = this.getBytesLoaded();
var _local3 = this.getBytesTotal();
if ((_local2 / _local3) == 1) {
delete this.onEnterFrame;
this.gotoAndStop("init");
}
};
this.stop();
}
function hideButtons() {
if (lang == "fr") {
help_btn.label = "Aide";
} else {
help_btn.label = "Help";
}
disable(save_btn);
langToggle(save_btn.save_mc);
disable(undo_btn);
disable(redo_btn);
disable(help_btn);
disable(play_btn);
disable(pause_btn);
disable(rewind_btn);
disable(scrubBar_mc.thumb_mc);
disable(soundOn_btn);
disable(soundOff_btn);
soundOff_btn._visible = false;
disable(prevClip_btn);
disable(nextClip_btn);
disable(playhead_mc);
disable(library_mc.up_btn);
disable(library_mc.down_btn);
disable(library_mc.scrollbar_mc.thumb_mc);
}
function initVars() {
if (!baseurl) {
baseurl = "";
if (!asseturl) {
asseturl = "../assets";
}
if (!movieid) {
movieid = 0;
}
if (!userid) {
userid = 0;
}
if (!playhelpmovie) {
playhelpmovie = 0;
}
}
if (lang != "fr") {
lang = "en";
}
initApi();
}
function initApi() {
api = new Api();
Movie.api = api;
Scene.api = api;
Timeline.api = api;
Renderer.api = api;
api.onLoad = function (success) {
if (success) {
initPreview();
}
};
if ((apiurl == undefined) || (apiurl.length == 0)) {
apiurl = getAssetPath() + "api.xml";
}
api.load(apiurl);
}
function initPreview() {
var _local8 = previewMask_mc._width;
var _local1 = 720;
var _local5 = 540;
var _local4 = _local1 / _local5;
var _local2 = 0.9;
var _local3 = _local8 / _local2;
var _local11 = _local3 / _local4;
preview_mc._xscale = (preview_mc._yscale = (100 * _local3) / _local1);
var _local6 = (_local1 * (1 - _local2)) / 2;
var _local7 = _local6 / _local4;
var _local10 = _local1 * _local2;
var _local9 = _local5 * _local2;
preview_mc.scrollRect = new flash.geom.Rectangle(_local6, _local7, _local10, _local9);
loadBackgrounds();
}
function loadBackgrounds() {
bg_mcl = new MovieClipLoader();
bgListener = new Object();
bgListener.onLoadInit = function (target_mc) {
target_mc._xscale = (target_mc._yscale = preview_mc._xscale);
target_mc.scrollRect = preview_mc.scrollRect;
fg_mcl.loadClip(getAssetPath() + "backgrounds.swf", fg_mc);
};
bg_mcl.addListener(bgListener);
fg_mcl = new MovieClipLoader();
fgListener = new Object();
fgListener.onLoadInit = function (target_mc) {
target_mc._xscale = (target_mc._yscale = preview_mc._xscale);
target_mc.scrollRect = preview_mc.scrollRect;
delete bg_mcl;
delete fg_mcl;
delete bgListener;
delete fgListener;
initRenderer();
};
fg_mcl.addListener(fgListener);
bg_mcl.loadClip(getAssetPath() + "backgrounds.swf", bg_mc);
}
function initRenderer() {
var _local2 = new Object();
_local2.bg_mc = bg_mc;
_local2.fg_mc = fg_mc;
_local2.preview_mc = preview_mc;
_local2.root_mc = this;
renderer = new Renderer(_local2);
Timeline.renderer = renderer;
init();
}
function init() {
var _local2 = new Object();
_local2.root_mc = this;
_local2.timeline_mc = timeline_mc;
_local2.playhead_mc = playhead_mc;
_local2.dragContainer_mc = dragContainer_mc;
_local2.scrubBar_mc = scrubBar_mc;
_local2.prev_btn = prevClip_btn;
_local2.next_btn = nextClip_btn;
timeline = new Timeline(api.getTimelineLength(), _local2);
Renderer.timeline = timeline;
locale = new Locale(lang);
Scene.locale = locale;
Timeline.locale = locale;
Renderer.locale = locale;
wordFilter = new WordFilter(lang);
Renderer.wordFilter = wordFilter;
clipCategories = api.getCategories();
library = new Object();
library.width = 311;
library.height = 293;
library.scrollSpeed = 10;
library.maxscroll = 0;
library.thumbRange = 210;
library_mc.window_mc.scrollRect = new flash.geom.Rectangle(0, 0, library.width, library.height);
library_mc.window_mc.cacheAsBitmap = true;
library_mc.window_mc.createEmptyMovieClip("clips_mc", 1);
library_mc.up_btn.onPress = (library_mc.up_btn.onDragOver = function () {
startScrollLibrary(library.scrollSpeed);
});
library_mc.up_btn.onRelease = (library_mc.up_btn.onDragOut = function () {
stopScrollLibrary();
});
library_mc.down_btn.onPress = (library_mc.down_btn.onDragOver = function () {
startScrollLibrary(-library.scrollSpeed);
});
library_mc.down_btn.onRelease = (library_mc.down_btn.onDragOut = function () {
stopScrollLibrary();
});
library_mc.scrollbar_mc.thumb_mc.onPress = function () {
startDraggingScrollThumb(this);
};
library_mc.scrollbar_mc.thumb_mc.onRelease = (library_mc.scrollbar_mc.thumb_mc.onReleaseOutside = function () {
stopDraggingScrollThumb(this);
});
library_mc.tabs_mc.dialog_btn.onRelease = function () {
displayLibraryClips("dialog", this);
};
library_mc.tabs_mc.action_btn.onRelease = function () {
displayLibraryClips("action", this);
};
library_mc.tabs_mc.closeup_btn.onRelease = function () {
displayLibraryClips("closeup", this);
};
library_mc.tabs_mc.other_btn.onRelease = function () {
displayLibraryClips("other", this);
};
displayLibraryClips("dialog", library_mc.tabs_mc.dialog_btn);
playhead_mc.btn.onPress = function () {
playhead_mc.gotoAndStop("down");
stopPlayback();
timeline.pressPlayhead();
};
playhead_mc.btn.onRelease = function () {
playhead_mc.gotoAndStop("up");
timeline.releasePlayhead();
};
playhead_mc.btn.onReleaseOutside = playhead_mc.btn.onRelease;
playhead_mc.btn2.onPress = playhead_mc.btn.onPress;
playhead_mc.btn2.onRelease = playhead_mc.btn.onRelease;
playhead_mc.btn2.onReleaseOutside = playhead_mc.btn.onRelease;
scrubBar_mc.thumb_mc.onPress = function () {
this.gotoAndStop("down");
stopPlayback();
timeline.pressScrubBar();
};
scrubBar_mc.thumb_mc.onRelease = (scrubBar_mc.thumb_mc.onReleaseOutside = function () {
this.gotoAndStop("up");
timeline.releaseScrubBar();
});
help_btn.onRelease = function () {
openHelp();
};
timeline.disableScrubbing();
timeline.disablePlayback();
play_btn.onRelease = function () {
startPlayback();
};
pause_btn.onRelease = function () {
stopPlayback();
};
rewind_btn.onRelease = function () {
timeline.rewind();
};
prevClip_btn.onRelease = function () {
stopPlayback();
timeline.prevScene();
};
nextClip_btn.onRelease = function () {
stopPlayback();
timeline.nextScene();
};
save_btn.onRelease = function () {
openSaveWindow();
};
soundOn_btn.onRelease = function () {
toggleAudio();
};
soundOff_btn.onRelease = function () {
toggleAudio();
};
enable(help_btn);
enable(soundOn_btn);
initToolTips();
initKeyListener();
initUndo();
loadingIcon_mc._visible = false;
loadingIcon_mc.stop();
if (movieid) {
return(fetchMovie(movieid));
}
if (playhelpmovie) {
return(openHelp());
}
initAudio();
}
function initToolTips() {
toolTip_mc.onMouseDown = function () {
closeToolTip();
};
if (lang == "fr") {
setToolTip(undo_btn, "Annuler");
setToolTip(redo_btn, "R\u00E9tablir");
setToolTip(help_btn, "Aide");
setToolTip(play_btn, "Jouer le film");
setToolTip(pause_btn, "Pause");
setToolTip(scrubBar_mc.thumb_mc, "Regarder \u00E0 partir d'ici");
setToolTip(soundOn_btn, "\u00C9teindre le son");
setToolTip(soundOff_btn, "Allumer le son");
setToolTip(prevClip_btn, "S\u00E9quence pr\u00E9c\u00E9dente");
setToolTip(nextClip_btn, "Prochaine s\u00E9quence");
setToolTip(playhead_mc.btn, "Regarder \u00E0 partir d'ici");
setToolTip(playhead_mc.btn2, "Regarder \u00E0 partir d'ici");
setToolTip(library_mc.tabs_mc.dialog_btn, "S\u00E9quences bulle");
setToolTip(library_mc.tabs_mc.action_btn, "S\u00E9quneces d'action");
setToolTip(library_mc.tabs_mc.closeup_btn, "S\u00E9quences gros plan");
setToolTip(library_mc.tabs_mc.other_btn, "S\u00E9quences \u00E9toile");
setToolTip(library_mc.up_btn, "D\u00E9filer vers le haut");
setToolTip(library_mc.down_btn, "D\u00E9filer vers le bas");
setToolTip(library_mc.scrollbar_mc.thumb_mc, "Faire d\u00E9filer");
} else if (lang == "en") {
setToolTip(undo_btn, "Undo");
setToolTip(redo_btn, "Redo");
setToolTip(help_btn, "Help");
setToolTip(play_btn, "Play movie");
setToolTip(pause_btn, "Pause movie");
setToolTip(rewind_btn, "Rewind movie");
setToolTip(scrubBar_mc.thumb_mc, "Move playhead");
setToolTip(soundOn_btn, "Turn sound off");
setToolTip(soundOff_btn, "Turn sound on");
setToolTip(prevClip_btn, "Previous clip");
setToolTip(nextClip_btn, "Next clip");
setToolTip(playhead_mc.btn, "Move playhead");
setToolTip(playhead_mc.btn2, "Move playhead");
setToolTip(library_mc.tabs_mc.dialog_btn, "Talk bubble clips");
setToolTip(library_mc.tabs_mc.action_btn, "Action clips");
setToolTip(library_mc.tabs_mc.closeup_btn, "Close-up clips");
setToolTip(library_mc.tabs_mc.other_btn, "Star clips");
setToolTip(library_mc.up_btn, "Scroll up");
setToolTip(library_mc.down_btn, "Scroll down");
setToolTip(library_mc.scrollbar_mc.thumb_mc, "Scroll");
}
}
function initKeyListener() {
kl = new Object();
kl.onKeyDown = function () {
if (Selection.getFocus()) {
return(undefined);
}
if (window_mc) {
return(undefined);
}
this["onKeyDown" + Key.getCode()]();
};
kl.onKeyDown32 = function () {
togglePlayback();
};
kl.onKeyDown37 = function () {
stopPlayback();
timeline.prevScene();
};
kl.onKeyDown39 = function () {
stopPlayback();
timeline.nextScene();
};
kl.onKeyDown90 = function () {
undo();
};
kl.onKeyDown89 = function () {
redo();
};
kl.onKeyDown88 = function () {
if (!timeline.getCurrentScene()) {
return(undefined);
}
timeline.pressDelete(timeline_mc.clips_mc[("clip" + timeline.getCurrentIndex()) + "_mc"]);
};
Key.addListener(kl);
}
function initUndo() {
undo_btn.onRelease = function () {
undo();
};
redo_btn.onRelease = function () {
redo();
};
undoQueue = new Array();
redoQueue = new Array();
if (!movieid) {
pushUndoState();
}
}
function initAudio() {
audio = new Sound(this);
audio.setVolume(0);
toggleAudio();
soundPref = SharedObject.getLocal("zimmerSoundPref", "/");
if (soundPref.data._muted) {
toggleAudio();
}
loadBgAudio();
}
function loadBgAudio() {
bga_mcl = new MovieClipLoader();
bgaListener = new Object();
bgaListener.onLoadInit = function (target_mc) {
bgAudio = new Sound(target_mc);
bgAudio.setVolume(50);
delete bga_mcl;
delete bgaListener;
};
bga_mcl.addListener(bgaListener);
bga_mcl.loadClip(getAssetPath() + "bgAudio.swf", bgAudio_mc);
}
function createNewScene(clipId, scene) {
stopPlayback();
var _local8 = timeline.getCurrentIndex() + 1;
var _local9;
var _local4;
var _local7;
var _local5;
var _local10 = new Object();
var _local6;
if (!scene) {
if (_local8 > 0) {
api.getActors(clipId);
var _local2 = timeline.getScene(_local8 - 1);
if (api.isAllowedActee(clipId, _local2.actee)) {
_local9 = _local2.actee;
}
if (api.isAllowedActor(clipId, _local2.actor)) {
_local4 = _local2.actor;
}
if (api.isAllowedLocation(clipId, _local2.location)) {
_local7 = _local2.location;
}
if (api.isAllowedProp(clipId, _local2.prop)) {
_local5 = _local2.prop;
}
}
if (!_local4) {
_local4 = api.getActors(clipId)[0];
}
if (!_local9) {
_local9 = api.getActees(clipId, _local4)[0];
}
if (!_local7) {
_local7 = api.getLocations(clipId)[0];
}
if (!_local5) {
_local5 = api.getProps(clipId)[0];
}
} else {
_local9 = scene.actee;
_local4 = scene.actor;
_local7 = scene.location;
_local5 = scene.prop;
_local10 = scene.text;
_local6 = scene.duration;
}
if (_local6 == undefined) {
var _local12 = _local10.bubble_txt;
if (_local12) {
_local6 = 2;
} else {
_local6 = api.getDuration(clipId);
}
}
var _local11 = new Scene(_local9, _local4, clipId, _local7, _local5, _local10, _local8, _local6);
var _local13 = timeline.addScene(_local11, _local8);
if (!_local13) {
return(undefined);
}
timeline.setCurrentTime(_local11.startTime);
timeline.updateCurrentIndex();
timeline.updatePlayhead();
if (!scene) {
timeline.center();
timeline.render();
renderer.render();
displaySentence();
pushUndoState();
}
}
function displayLibraryClips(categoryId, tab_btn) {
library.currentTab.scrollPos = library_mc.window_mc.clips_mc._y;
library.currentTab = tab_btn;
for (var _local4 in library_mc.window_mc.clips_mc) {
library_mc.window_mc.clips_mc[_local4].removeMovieClip();
}
for (var _local4 in library_mc.tabs_mc) {
library_mc.tabs_mc[_local4].enabled = true;
}
tab_btn.enabled = false;
library_mc.tabs_mc.gotoAndStop(categoryId);
var _local2 = api.getClipsByCategory(categoryId);
var _local1 = 0;
while (_local1 < _local2.length) {
attachLibraryClip(_local2[_local1], _local1, categoryId);
_local1++;
}
if (library.currentTab.scrollPos) {
library_mc.window_mc.clips_mc._y = library.currentTab.scrollPos;
} else {
library_mc.window_mc.clips_mc._y = 0;
}
updateScrollbar();
disable(library_mc.up_btn);
disable(library_mc.down_btn);
library_mc.scrollbar_mc.thumb_mc.enabled = false;
library_mc.scrollbar_mc.thumb_mc.gotoAndStop("off");
if (library.maxscroll) {
library_mc.scrollbar_mc.thumb_mc.enabled = true;
library_mc.scrollbar_mc.thumb_mc.gotoAndStop("up");
if (library_mc.window_mc.clips_mc._y < 0) {
enable(library_mc.up_btn);
}
if (library_mc.window_mc.clips_mc._y > library.maxscroll) {
enable(library_mc.down_btn);
}
}
}
function attachLibraryClip(id, i, categoryId) {
var _local2 = library_mc.window_mc.clips_mc.attachMovie("libraryClip", ("clip" + i) + "_mc", i);
_local2.id = id;
_local2.label_txt.text = locale.getLabel(id);
applyDropShadow(_local2.label_txt);
attachThumb(id, _local2.thumb_mc);
_local2.gotoAndStop(categoryId);
var _local7 = 5;
var _local8 = 5;
var _local6 = _local2._width;
var _local5 = _local2._height;
var _local4 = 4;
_local2._x = _local7 + (_local6 * (i % _local4));
_local2._y = _local8 + (_local5 * Math.floor(i / _local4));
_local2.hitArea = _local2.hit_mc;
_local2.hit_mc._visible = false;
_local2.onPress = function () {
createNewScene(this.id);
loadPreviewClip(this.id);
};
library.maxscroll = library.height - (_local2._y + _local2._height);
library.maxscroll = Math.min(library.maxscroll, 0);
if (lang == "en") {
setToolTip(_local2, ("Add \"" + _local2.label_txt.text) + "\" to your movie.");
} else if (lang == "fr") {
setToolTip(_local2, ("Ajoute \"" + _local2.label_txt.text) + "\" \u00E0 ton film.");
}
}
function attachThumb(id, target_mc) {
var _local1 = target_mc.attachMovie(id, id + "_mc", 1);
langToggle(_local1);
}
function startScrollLibrary(step) {
if (scrollLibrary.interval) {
clearInterval(scrollLibrary.interval);
}
var _local2 = 30;
scrollLibrary.interval = setInterval(this, "scrollLibrary", _local2, step);
}
function stopScrollLibrary() {
clearInterval(scrollLibrary.interval);
delete scrollLibrary.interval;
}
function scrollLibrary(step) {
if (!library.maxscroll) {
stopScrollLibrary();
}
var _local1 = library_mc.window_mc.clips_mc;
_local1._y = _local1._y + step;
enable(library_mc.up_btn);
enable(library_mc.down_btn);
if (_local1._y >= 0) {
_local1._y = 0;
stopScrollLibrary();
disable(library_mc.up_btn);
} else if (_local1._y <= library.maxscroll) {
_local1._y = library.maxscroll;
stopScrollLibrary();
disable(library_mc.down_btn);
}
if (!library_mc.scrollbar_mc.thumb_mc.onMouseMove) {
updateScrollbar();
}
updateAfterEvent();
}
function updateScrollbar() {
var _local2 = library_mc.window_mc.clips_mc;
var _local1 = _local2._y / library.maxscroll;
if (!library.maxscroll) {
_local1 = 0;
}
library_mc.scrollbar_mc.thumb_mc._y = Math.round(_local1 * library.thumbRange);
}
function dragScrollThumb(ygrab) {
var _local2 = library_mc.scrollbar_mc;
var _local3 = _local2.thumb_mc;
var _local4 = library_mc.window_mc.clips_mc;
var _local1 = _local2._ymouse - ygrab;
_local1 = Math.max(0, _local1);
_local1 = Math.min(_local1, library.thumbRange);
_local3._y = _local1;
var _local5 = _local1 / library.thumbRange;
var _local6 = _local5 * library.maxscroll;
scrollLibrary(_local6 - _local4._y);
}
function startDraggingScrollThumb(thumb_mc) {
stopPlayback();
thumb_mc.gotoAndStop("down");
thumb_mc.ygrab = thumb_mc._ymouse;
thumb_mc.onMouseMove = function () {
dragScrollThumb(this.ygrab);
};
}
function stopDraggingScrollThumb(thumb_mc) {
thumb_mc.gotoAndStop("up");
delete thumb_mc.ygrab;
delete thumb_mc.onMouseMove;
}
function loadQueuedPreviewClip() {
var _local2 = arguments.callee.queue;
var _local3 = _local2.shift();
loadPreviewClip(_local3);
if (!_local2.length) {
clearInterval(arguments.callee.interval);
delete arguments.callee.interval;
delete arguments.callee.queue;
}
}
function loadPreviewClip(clipId) {
if (!clipId) {
return(undefined);
}
var _local5 = api.getFileName(clipId);
var _local1 = clipId + "_mc";
if (preview_mc[_local1]) {
return(undefined);
}
preview_mc.createEmptyMovieClip(_local1, preview_mc.getNextHighestDepth());
var _local2 = clipId + "_mcl";
preview_mc[_local2] = new MovieClipLoader();
var _local3 = new Object();
_local3.onLoadInit = function (target_mc) {
renderer.render();
};
preview_mc[_local2].addListener(_local3);
preview_mc[_local2].loadClip(getAssetPath() + _local5, preview_mc[_local1]);
}
function displaySentence() {
closeDropdown();
var _local2 = timeline.getCurrentScene();
var _local1 = locale.getSentence(_local2);
if (!_local2) {
_local1 = "";
}
sentence_txt.htmlText = _local1.toString();
sentence_txt.autoSize = "center";
placeTriangles(_local1, sentence_txt);
}
function placeTriangles(sentence, sentence_txt) {
for (var _local1 in triangles_mc) {
triangles_mc[_local1].removeMovieClip();
}
temp_txt._visible = false;
temp_txt.autoSize = "center";
attachTriangle("actor", sentence, sentence_txt);
attachTriangle("actee", sentence, sentence_txt);
attachTriangle("location", sentence, sentence_txt);
attachTriangle("prop", sentence, sentence_txt);
}
function attachTriangle(param, sentence, sentence_txt) {
if (!sentence[param]) {
return(undefined);
}
var _local1 = sentence_txt.text;
var _local6 = _local1.indexOf(sentence[param]);
_local1 = _local1.substring(0, _local6);
temp_txt.text = _local1;
var _local3 = temp_txt._width;
temp_txt.text = temp_txt.text + sentence[param];
var _local8 = temp_txt._width - _local3;
var _local7 = (sentence_txt._x + _local3) + (_local8 / 2);
var _local4 = triangles_mc.attachMovie("triangle", param + "_mc", triangles_mc.getNextHighestDepth());
_local4._x = _local7;
}
function choose(param) {
stopPlayback();
closeDropdown();
var _local9 = (("get" + param.charAt(0).toUpperCase()) + param.substring(1, param.length)) + "s";
var _local8 = timeline.getCurrentScene();
var _local3;
if (param == "actee") {
_local3 = api[_local9](_local8.clip, _local8.actor);
} else {
_local3 = api[_local9](_local8.clip);
}
var _local5 = 0;
var _local7 = 0;
var _local1 = 0;
while (_local1 < _local3.length) {
var _local4 = locale.translateForMenu(param, _local3[_local1]);
var _local2 = attachMenuItem(_local4, _local1, param, _local3[_local1]);
_local7 = _local2.height;
_local5 = Math.max(_local2.width, _local5);
_local1++;
}
dropdown_mc.container_mc[("item" + (_local1 - 1)) + "_mc"].line_mc._visible = false;
var _local10 = triangles_mc[param + "_mc"]._x;
_local5 = Math.max(60, _local5);
openDropdown(_local10, _local5, _local7);
}
function attachMenuItem(label, i, param, id) {
var _local2 = dropdown_mc.container_mc.attachMovie("menuItem", ("item" + i) + "_mc", i);
_local2.hitArea = _local2.hit_mc;
_local2.hit_mc._visible = false;
var _local4 = 20;
_local2._y = i * _local4;
_local2.label_txt.text = label;
_local2.label_txt.autoSize = "left";
applyDropShadow(_local2.label_txt);
_local2.param = param;
_local2.id = id;
_local2.onPress = function () {
var _local2 = timeline.getCurrentScene();
if (_local2[this.param] == this.id) {
return(undefined);
}
_local2[this.param] = this.id;
if ((this.param == "actor") && (_local2.actee.indexOf(_local2.actor) > -1)) {
_local2.actee = api.getActees(_local2.clip, _local2.actor)[0];
}
renderer.render();
displaySentence();
timeline.selectScene(timeline.getCurrentIndex());
timeline.center();
pushUndoState();
};
var _local7 = Math.ceil(_local2._width);
var _local6 = _local4 * (i + 1);
return({width:_local7, height:_local6});
}
function openDropdown(x, xsize, ysize) {
with (dropdown_mc) {
_visible = true;
fill_mc._width = xsize + 2;
fill_mc._height = ysize + 2;
top_mc._width = (bottom_mc._width = xsize);
left_mc._height = (right_mc._height = ysize);
var margin = 8;
right_mc._x = (tr_mc._x = (br_mc._x = xsize + margin));
v_mask_mc._height = ysize;
bottom_mc._y = (bl_mc._y = (br_mc._y = ysize + margin));
arrow_mc._x = 1 + Math.round(xsize / 2);
_x = Math.floor(x - ((xsize + (2 * margin)) / 2));
_y = 407;
if (ysize > 100) {
_y = _y - (ysize - 100);
}
}
for (var thing in dropdown_mc.container_mc) {
var item_mc = dropdown_mc.container_mc[thing];
item_mc.line_mc._width = xsize + 12;
item_mc.hit_mc._width = xsize + 12;
}
dropdown_mc.bodyWidth = xsize;
dropdown_mc.bodyHeight = ysize;
dropdown_mc.onMouseUp = function () {
closeDropdown();
delete dropdown_mc.onMouseUp;
};
}
function closeDropdown() {
dropdown_mc._visible = false;
for (var _local1 in dropdown_mc.container_mc) {
dropdown_mc.container_mc[_local1].removeMovieClip();
}
}
function getAssetPath() {
return(asseturl + "/");
}
function applyDropShadow(target) {
var _local1 = new flash.filters.DropShadowFilter();
_local1.distance = 0;
_local1.alpha = 0.8;
target.filters = [_local1];
}
function disable(btn) {
if (!btn.enabled) {
return(undefined);
}
btn.enabled = false;
btn.gotoAndStop("off");
}
function enable(btn) {
if (btn.enabled) {
return(undefined);
}
btn.enabled = true;
btn.gotoAndStop(1);
btn._visible = true;
}
function getThumbId(movie) {
var _local4 = movie.getScenes();
for (var _local5 in _local4) {
var _local1 = _local4[_local5];
var _local2 = api.getCategory(_local1.clip);
var _local3 = api.hasJointActors(_local1);
if (((_local2 == "action") || (_local2 == "closeup")) && (!_local3)) {
break;
}
_local1 = null;
}
if (!_local1) {
var _local6 = "default";
} else {
var _local6 = (((_local1.actor + "_") + _local1.clip) + "_") + _local1.location;
}
return(_local6);
}
function setToolTip(btn, tip) {
btn.onRollOver = function () {
openToolTip(tip);
};
btn.onRollOut = function () {
closeToolTip();
};
}
function setToolTip(btn, tip) {
btn.onRollOver = function () {
openToolTip(tip);
};
btn.onRollOut = function () {
closeToolTip();
};
}
function openToolTip(tip) {
toolTip_mc.onEnterFrame = function () {
if (!this.label_txt) {
return(undefined);
}
this._x = _xmouse;
this._y = _ymouse;
var _local2 = this.getBounds(this._parent);
var _local3 = 10;
var _local6 = _local2.xMin - _local3;
var _local7 = _local2.yMin - _local3;
var _local4 = _local2.xMax - (Stage.width - _local3);
var _local5 = _local2.yMax - (Stage.height - _local3);
if (_local4 > 0) {
this._x = this._x - _local4;
} else if (_local6 < 0) {
this._x = this._x - _local6;
}
if (_local5 > 0) {
this._y = this._y - _local5;
} else if (_local7 < 0) {
this._y = this._y - _local7;
}
};
toolTip_mc.tip = tip;
toolTip_mc.gotoAndPlay(2);
}
function closeToolTip() {
delete toolTip_mc.onEnterFrame;
toolTip_mc._visible = false;
toolTip_mc.gotoAndStop(2);
}
function togglePlayback() {
if (this.onEnterFrame) {
stopPlayback();
} else {
startPlayback();
}
}
function startPlayback() {
if (timeline.getCurrentFrame() == timeline.getLastFrame()) {
timeline.setCurrentFrame(0);
timeline.jumpToCenter();
}
disable(play_btn);
enable(pause_btn);
this.onEnterFrame = function () {
playBgLoop();
if (!timeline.playback()) {
stopPlayback();
}
};
renderer.render();
}
function stopPlayback() {
if (!isPlaying()) {
return(undefined);
}
delete this.onEnterFrame;
if (timeline.getLastScene()) {
enable(play_btn);
disable(pause_btn);
pause_btn._visible = false;
}
renderer.render();
stopBgLoop();
}
function isPlaying() {
if (this.onEnterFrame) {
return(true);
}
return(false);
}
function buildMovie(movie, frame) {
var _local4 = movie.getScenes();
timeline.clear();
loadQueuedPreviewClip.queue = new Array();
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3];
if (!api.getDuration(_local2.clip)) {
} else {
createNewScene(_local2.clip, _local2);
loadQueuedPreviewClip.queue.push(_local2.clip);
}
_local3++;
}
timeline.setCurrentFrame(frame);
timeline.updatePlayhead();
timeline.updateCurrentIndex();
timeline.jumpToCenter();
timeline.render();
renderer.render();
displaySentence();
loadQueuedPreviewClip();
loadQueuedPreviewClip.interval = setInterval(this, "loadQueuedPreviewClip", 1000);
}
function updateTextSceneDuration(scene, newText) {
var _local3 = scene.duration;
var _local1 = 3;
if (newText.length < 40) {
_local1 = 2;
}
if (newText.length < 15) {
_local1 = 1;
}
if (_local1 < _local3) {
scene.duration = _local1;
timeline.updateSceneIndexes();
timeline.render();
if (timeline.getCurrentTime() >= (scene.startTime + scene.duration)) {
timeline.setCurrentTime(scene.startTime + scene.duration);
timeline.setCurrentFrame(timeline.getCurrentFrame() - 1);
timeline.updatePlayhead();
timeline.updateCurrentIndex();
}
} else if (_local1 > _local3) {
var _local5 = timeline.maxLength - timeline.getTotalTime();
var _local4 = Math.min(_local1 - _local3, _local5);
scene.duration = scene.duration + _local4;
timeline.updateSceneIndexes();
timeline.render();
}
}
function pushUndoState() {
var _local1 = new Movie();
_local1.setScenes(timeline.scenes);
var _local2 = {movie:_local1, frame:timeline.getCurrentFrame()};
if (_local1.toString() == undoQueue[undoQueue.length - 1].movie.toString()) {
return(undefined);
}
undoQueue.push(_local2);
redoQueue = new Array();
if (undoQueue.length > 1) {
enable(undo_btn);
}
disable(redo_btn);
updateSaveButton(_local1);
}
function undo() {
if (undoQueue.length < 2) {
return(undefined);
}
var _local2 = undoQueue.pop();
var _local1 = undoQueue[undoQueue.length - 1];
redoQueue.push(_local2);
enable(redo_btn);
if (undoQueue.length < 2) {
disable(undo_btn);
}
buildMovie(_local1.movie, _local1.frame);
updateSaveButton(_local1.movie);
}
function redo() {
if (!redoQueue.length) {
return(undefined);
}
var _local1 = redoQueue.pop();
undoQueue.push(_local1);
enable(undo_btn);
if (!redoQueue.length) {
disable(redo_btn);
}
buildMovie(_local1.movie, _local1.frame);
updateSaveButton(_local1.movie);
}
function updateSaveButton(movie) {
if ((!timeline.scenes.length) || (getVars.moviexml == movie.toString())) {
disable(save_btn);
} else {
enable(save_btn);
}
langToggle(save_btn.save_mc);
}
function fetchMovie(movieid) {
getVars = new LoadVars();
var _local3 = baseurl + "/movie/fetch";
if (baseurl == "") {
_local3 = "http://www.zimmertwins.ca/movie/fetch";
}
var _local2 = new LoadVars();
_local2.movieid = movieid;
getVars.onLoad = function () {
starterid = this.starterid;
var _local2 = new Movie(this.moviexml);
buildMovie(_local2, 0);
pushUndoState();
initAudio();
};
_local2.sendAndLoad(_local3, getVars, "POST");
}
function openSaveWindow() {
stopPlayback();
var window_mc = this.attachMovie("saveWindow", "window_mc", this.getNextHighestDepth());
langToggle(window_mc);
window_mc.blocker_btn.useHandCursor = false;
if (!userid) {
window_mc.nextFrame();
}
window_mc.spin_mc._visible = false;
if (getVars) {
window_mc.title_txt.text = getVars.title;
window_mc.desc_txt.text = getVars.description;
}
if (lang == "en") {
window_mc.save_btn.label = "Save";
window_mc.login_btn.label = "Log in";
window_mc.register_btn.label = "Join";
window_mc.cancel_btn.label = "Cancel";
} else if (lang == "fr") {
window_mc.save_btn.label = "Sauvegarder";
window_mc.login_btn.label = "Entrer";
window_mc.register_btn.label = "Inscris-toi";
window_mc.cancel_btn.label = "Annuler";
}
window_mc.save_btn.onRelease = function () {
saveMovie("");
disable(this);
};
window_mc.login_btn.onRelease = function () {
saveMovie("login");
};
window_mc.register_btn.onRelease = function () {
saveMovie("register");
};
window_mc.cancel_btn.onRelease = function () {
closeSaveWindow();
};
if (!window_mc.title_txt.text.length) {
disable(window_mc.save_btn);
disable(window_mc.login_btn);
disable(window_mc.register_btn);
}
window_mc.title_txt.tabIndex = 1;
window_mc.desc_txt.tabIndex = 2;
Selection.setFocus("window_mc.title_txt");
window_mc.title_txt.onChanged = function () {
var _local2 = false;
if (isValidTitle(this.text)) {
enable(window_mc.save_btn);
enable(window_mc.login_btn);
enable(window_mc.register_btn);
} else {
disable(window_mc.save_btn);
disable(window_mc.login_btn);
disable(window_mc.register_btn);
}
};
}
function disableSaveWindow() {
disable(window_mc.save_btn);
disable(window_mc.login_btn);
disable(window_mc.register_btn);
disable(window_mc.cancel_btn);
window_mc.spin_mc._visible = true;
}
function closeSaveWindow() {
window_mc.removeMovieClip();
}
function saveMovie(action) {
disableSaveWindow();
var _local4 = processTitle(window_mc.title_txt.text);
var _local6 = wordFilter.filterWords(window_mc.desc_txt.text);
var _local2 = new Movie();
_local2.setScenes(timeline.scenes);
trace(_local2);
var _local5 = baseurl + "/movie/save";
var _local1 = new LoadVars();
_local1.userid = userid;
_local1.movieid = movieid;
_local1.lang = lang;
_local1.moviexml = _local2.toString();
_local1.title = _local4;
_local1.description = _local6;
_local1.starterid = starterid;
_local1.thumbid = getThumbId(_local2);
_local1.action = action;
var _local3 = new LoadVars();
_local3.onLoad = confirmSave;
_local1.sendAndLoad(_local5, _local3, "POST");
}
function confirmSave(success) {
if (!success) {
if (baseurl == "") {
return(undefined);
}
return(undefined);
}
completeSave(this.watchurl);
}
function completeSave(watchurl) {
window_mc.spin_mc._visible = false;
if (watchurl) {
getURL (watchurl);
}
}
function isValidTitle(titleString) {
titleString = wordFilter.filterWords(titleString);
var _local6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u00E0\u00E2\u00C0\u00C2\u00E9\u00E8\u00EA\u00EB\u00C9\u00C8\u00CA\u00CB\u00EE\u00EF\u00CE\u00CF\u00F4\u0153\u00D4\u0152\u00F9\u00FB\u00D9\u00DB\u00E7\u00C7\u00DC\u00FC";
var _local5 = 0;
var _local1 = 0;
while (_local1 < titleString.length) {
var _local3 = titleString.charAt(_local1);
var _local2 = _local6.indexOf(_local3);
if (_local2 > -1) {
_local5++;
}
_local1++;
}
return(_local5 > 2);
}
function processTitle(titleString) {
titleString = wordFilter.filterWords(titleString);
var _local4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u00E0\u00E2\u00C0\u00C2\u00E9\u00E8\u00EA\u00EB\u00C9\u00C8\u00CA\u00CB\u00EE\u00EF\u00CE\u00CF\u00F4\u0153\u00D4\u0152\u00F9\u00FB\u00D9\u00DB\u00E7\u00C7\u00DC\u00FC";
var _local1 = 0;
while (_local1 < titleString.length) {
var _local2 = titleString.charAt(_local1);
if (_local4.indexOf(_local2) > -1) {
break;
}
_local1++;
}
titleString = titleString.substring(_local1);
return(titleString);
}
function toggleAudio() {
var _local1 = audio.getVolume();
if (_local1) {
audio.setVolume(0);
disable(soundOn_btn);
enable(soundOff_btn);
soundOff_btn._visible = true;
soundPref.data._muted = true;
soundPref.flush();
} else {
audio.setVolume(125);
enable(soundOn_btn);
disable(soundOff_btn);
soundOff_btn._visible = false;
soundPref.data._muted = false;
soundPref.flush();
}
}
function playBgLoop() {
var _local1 = timeline.getCurrentScene().location;
if (bgAudio.loopId != _local1) {
stopBgLoop();
bgAudio.loopId = _local1;
if (_local1) {
bgAudio.attachSound(_local1 + ".wav");
bgAudio.start(0, 10);
}
}
}
function stopBgLoop() {
bgAudio.stop();
bgAudio.loopId = undefined;
}
function openHelp() {
stopPlayback();
if (!audio.getVolume()) {
toggleAudio();
}
var window_mc = this.attachMovie("helpWindow", "window_mc", this.getNextHighestDepth());
window_mc.blocker_btn.useHandCursor = false;
disable(window_mc.play_btn);
disable(window_mc.pause_btn);
disable(window_mc.rewind_btn);
disable(window_mc.scrubBar_mc.thumb_mc);
window_mc.play_btn.onRelease = function () {
playFLV();
};
window_mc.pause_btn.onRelease = function () {
pauseFLV();
};
window_mc.rewind_btn.onRelease = function () {
rewindFLV();
};
window_mc.close_btn.onRelease = function () {
closeHelp();
};
window_mc.scrubBar_mc.thumb_mc.onPress = function () {
startScrubFLV(this._xmouse);
};
window_mc.scrubBar_mc.thumb_mc.onRelease = (window_mc.scrubBar_mc.thumb_mc.onReleaseOutside = function () {
stopScrubFLV();
});
window_mc.scrubBar_mc.track_mc.onPress = function () {
jumpScrubFLV(this._xmouse / this._width);
};
if (!netConn) {
netConn = new NetConnection();
netConn.connect(null);
}
if (!stream) {
stream = new NetStream(netConn);
}
window_mc.video.attachVideo(stream);
stream.setBufferTime(5);
var _local2 = getAssetPath() + "help.flv";
stream.play(_local2);
stream.onStatus = function (info) {
switch (info.code) {
case "NetStream.Play.StreamNotFound" :
closeHelp();
break;
case "NetStream.Buffer.Empty" :
if (this.finishedStreaming) {
return(closeHelp());
}
disable(window_mc.play_btn);
disable(window_mc.pause_btn);
break;
case "NetStream.Buffer.Full" :
case "NetStream.Play.Start" :
disable(window_mc.play_btn);
enable(window_mc.pause_btn);
enable(window_mc.rewind_btn);
enable(window_mc.scrubBar_mc.thumb_mc);
break;
case "NetStream.Play.Stop" :
break;
case "NetStream.Buffer.Flush" :
this.finishedStreaming = true;
}
};
window_mc.onEnterFrame = function () {
updateScrubBarFLV();
};
}
function closeHelp() {
if (playhelpmovie) {
initAudio();
playHelpMovie = 0;
}
pauseFLV();
window_mc.removeMovieClip();
}
function playFLV() {
stream.pause(false);
disable(window_mc.play_btn);
enable(window_mc.pause_btn);
}
function pauseFLV() {
stream.pause(true);
enable(window_mc.play_btn);
disable(window_mc.pause_btn);
window_mc.pause_btn._visible = false;
}
function rewindFLV() {
stream.seek(0);
}
function updateScrubBarFLV() {
var _local1 = window_mc.scrubBar_mc.thumb_mc;
var _local3 = window_mc.scrubBar_mc.track_mc;
var _local4 = window_mc.scrubBar_mc.bar_mc;
var _local2 = stream.time / api.getDuration("help_" + lang);
_local1._x = ((_local3._width - _local1._width) + 4) * _local2;
_local4._x = _local1._x + (_local1._width / 2);
}
function startScrubFLV(xgrab) {
pauseFLV();
window_mc.scrubBar_mc.thumb_mc.gotoAndStop("down");
delete window_mc.onEnterFrame;
if (scrubFLV.interval) {
clearInterval(scrubFLV.interval);
}
scrubFLV.interval = setInterval(this, "scrubFLV", 35, xgrab);
}
function stopScrubFLV() {
playFLV();
window_mc.scrubBar_mc.thumb_mc.gotoAndStop("up");
clearInterval(scrubFLV.interval);
delete scrubFLV.interval;
window_mc.onEnterFrame = function () {
updateScrubBarFLV();
};
}
function scrubFLV(xgrab) {
var _local2 = window_mc.scrubBar_mc.thumb_mc;
var _local5 = window_mc.scrubBar_mc.track_mc;
var _local7 = window_mc.scrubBar_mc.bar_mc;
var _local6 = 0;
var _local3 = (_local5._width - _local2._width) + 4;
var _local1 = window_mc.scrubBar_mc._xmouse - xgrab;
_local1 = Math.max(_local6, _local1);
_local1 = Math.min(_local1, _local3);
_local2._x = _local1;
_local7._x = _local2._x + (_local2._width / 2);
var _local4 = (api.getDuration("help_" + lang) * _local1) / _local3;
stream.seek(_local4);
updateAfterEvent();
}
function jumpScrubFLV(ratio) {
var _local1 = api.getDuration("help_" + lang) * ratio;
stream.seek(_local1);
}
function langToggle(mc) {
switch (lang) {
case "fr" :
mc.gotoAndStop("fr");
break;
default :
mc.stop();
}
}
if (parseInt($version.toString().split(" ")[1].split(",")[0]) >= 8) {
if (this._framesloaded >= 2) {
nextFrame();
}
this.onEnterFrame = function () {
if (this._framesloaded < 2) {
return(undefined);
}
delete this.onEnterFrame;
nextFrame();
};
}
stop();
Frame 2 (62 B)
preload();
Stage.scaleMode = "noscale";
Stage.align = "TL";
Frame 4 (28 B)
initVars();
hideButtons();
Symbol 98 MovieClip Frame 1 (844 B)
function checkLoaded() {
if (loaderClip.startUpdate.toString() == "[type Function]") {
clearInterval(id);
loadComplete();
}
}
function loadComplete() {
loaderClip.redirectURL = _root.MMredirectURL;
loaderClip.MMplayerType = _root.MMplayerType;
loaderClip.MMdoctitle = _root.MMdoctitle;
loaderClip.startUpdate();
}
function installStatus(statusValue) {
if (statusValue == "Download.Complete") {
_root.gotoAndStop("load");
} else if (statusValue == "Download.Cancelled") {
} else if (statusValue == "Download.Failed") {
}
}
System.security.allowDomain("fpdownload.macromedia.com");
var cacheBuster = Math.random();
var updateSWF = ("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + cacheBuster);
loaderClip.loadMovie(updateSWF);
var id = setInterval(checkLoaded, 10);
Symbol 664 MovieClip [__Packages.Locale] Frame 0 (38.36 KiB) ● ● ● ●
class Locale
{
var lang, actor, verb, actee, location, prop, holding;
function Locale (lang) {
this.lang = lang;
}
function getActee(scene) {
if (!(lang === "fr")) {
} else {
return(getActeeFr(scene));
}
return(getActeeEn(scene));
}
function getActor(scene) {
if (!(lang === "fr")) {
} else {
return(getActorFr(scene));
}
return(getActorEn(scene));
}
function getLabel(id) {
if (id instanceof Scene) {
id = id.clip;
}
if (!(lang === "fr")) {
} else {
return(getLabelFr(id));
}
return(getLabelEn(id));
}
function getLocation(scene) {
if (!(lang === "fr")) {
} else {
return(getLocationFr(scene));
}
return(getLocationEn(scene));
}
function getProp(scene) {
if (!(lang === "fr")) {
} else {
return(getPropFr(scene));
}
return(getPropEn(scene));
}
function getHolding(scene) {
if (!(lang === "fr")) {
} else {
return(getHoldingFr(scene));
}
return("holding");
}
function getSentence(scene) {
var _local2 = {actee:getActee(scene), actor:getActor(scene), location:getLocation(scene), prop:getProp(scene), verb:getVerb(scene), holding:getHolding(scene)};
switch (scene.clip) {
case "finds" :
case "gives" :
case "drops" :
case "examines" :
case "throws" :
_local2.toString = toStringFunctions[1];
break;
case "steals" :
case "plays" :
_local2.toString = toStringFunctions[2];
break;
case "panics" :
case "sleep_walks" :
if (lang == "fr") {
_local2.toString = toStringFunctions[4];
} else {
_local2.toString = toStringFunctions[0];
}
break;
case "blimp" :
case "boom" :
case "card" :
case "cellphone" :
case "changing_channels" :
case "clapboard" :
case "computer" :
case "clock" :
case "crash" :
case "crowd" :
case "crystalball" :
case "cookie" :
case "earlier" :
case "idolbase" :
case "later" :
case "map" :
case "meanwhile" :
case "newspaper" :
case "notepad" :
case "package" :
case "poster" :
case "sandwich" :
case "textcard1" :
case "textcard2" :
case "textcard3" :
case "ticket" :
case "tv" :
case "topsecret" :
case "zimmercircles" :
_local2.toString = toStringFunctions[3];
break;
case "teleports_out" :
_local2.toString = toStringFunctions[5];
break;
default :
_local2.toString = toStringFunctions[0];
}
return(_local2);
}
function getVerb(scene) {
if (!(lang === "fr")) {
} else {
return(getVerbFr(scene));
}
return(getVerbEn(scene));
}
function translateForMenu(param, id) {
if (!(lang === "fr")) {
} else {
return(translateForMenuFr(param, id));
}
return(translateForMenuEn(param, id));
}
function getActeeEn(scene) {
switch (scene.clip) {
case "steals" :
switch (scene.actee) {
case "edgar" :
return("from Edgar");
case "eva" :
return("from Eva");
case "thirteen" :
return("from 13");
}
case "annoys" :
case "begs" :
case "discovers" :
case "gives" :
case "fetches" :
case "hugs" :
case "meets" :
case "chases" :
case "leaves" :
switch (scene.actee) {
case "none" :
return("nobody");
case "edgar" :
return("Edgar");
case "eva" :
return("Eva");
case "thirteen" :
return("13");
case "edgar_eva" :
return("Edgar and Eva");
case "edgar_thirteen" :
return("Edgar and 13");
case "eva_thirteen" :
return("Eva and 13");
}
}
switch (scene.actee) {
case "none" :
return("alone");
case "edgar" :
return("with Edgar");
case "eva" :
return("with Eva");
case "thirteen" :
return("with 13");
case "edgar_eva" :
return("with Edgar and Eva");
case "edgar_thirteen" :
return("with Edgar and 13");
case "eva_thirteen" :
return("with Eva and 13");
}
}
function getActorEn(scene) {
switch (scene.clip) {
case "mmepsycho" :
if (!(scene.actor === "edgar")) {
} else {
return("Mme Psycho");
}
case "wizard" :
if (!(scene.actor === "edgar")) {
} else {
return("Wizard");
}
case "deliveryboy" :
if (!(scene.actor === "edgar")) {
} else {
return("Delivery Boy");
}
}
switch (scene.actor) {
case "edgar" :
return("Edgar");
case "eva" :
return("Eva");
case "thirteen" :
return("13");
}
}
function getPropEn(scene) {
switch (scene.prop) {
case "none" :
return("nothing");
case "camera" :
return("a video camera");
case "stinky_sack" :
return("a stinky sack");
case "potion" :
return("a potion");
case "trophy" :
return("a trophy");
case "present" :
return("a present");
case "crystal" :
return("a crystal");
case "mystery_box" :
return("a mystery box");
case "bunny" :
return("a bunny");
case "book" :
return("a book");
case "helmet" :
return("a helmet");
case "flowers" :
return("flowers");
case "idol" :
return("an idol");
case "letter" :
return("a letter");
case "card" :
return("a card");
case "map" :
return("a map");
case "newspaper" :
return("a newspaper");
}
}
function getLocationEn(scene) {
var _local1;
switch (scene.location) {
case "alley" :
_local1 = "in the alley";
break;
case "backyard" :
_local1 = "in the backyard";
break;
case "backstage" :
_local1 = "backstage";
break;
case "cave" :
_local1 = "in the cave";
break;
case "desert" :
_local1 = "in the desert";
break;
case "edgar_bedroom" :
_local1 = "in Edgar's bedroom";
break;
case "eva_bedroom" :
_local1 = "in Eva's bedroom";
break;
case "forest" :
_local1 = "in the forest";
break;
case "kitchen" :
_local1 = "in the kitchen";
break;
case "living_room" :
_local1 = "in the living room";
break;
case "museum" :
_local1 = "in the museum";
break;
case "outerspace" :
_local1 = "in outerspace";
break;
case "park" :
_local1 = "in the park";
break;
case "planet" :
_local1 = "on Zimbiru";
break;
case "restaurant" :
_local1 = "in the Chinese restaurant";
break;
case "salon" :
_local1 = "in the Psychic Salon";
break;
case "seventeenth_parallel" :
_local1 = "in the 17th parallel";
break;
case "sky" :
_local1 = "in the sky";
break;
case "stage" :
_local1 = "on the stage";
break;
case "store" :
_local1 = "in the Occult-o-mart";
break;
case "street" :
_local1 = "on the street";
break;
case "thirteenth_dimension" :
_local1 = "in the 13th dimension";
break;
case "jungle" :
_local1 = "in the jungle";
}
switch (scene.clip) {
case "teleports" :
var _local4 = _local1.indexOf(" ");
var _local3;
switch (scene.location) {
case "stage" :
case "street" :
_local3 = "onto";
break;
case "backstage" :
_local3 = "";
break;
default :
_local3 = "into";
}
_local1 = _local3 + _local1.substring(_local4, _local1.length);
break;
case "teleports_out" :
_local4 = _local1.indexOf(" ");
switch (scene.location) {
case "backstage" :
_local3 = "of ";
break;
default :
_local3 = "of";
}
_local1 = _local3 + _local1.substring(_local4, _local1.length);
break;
}
return(_local1);
}
function getVerbEn(scene) {
var _local4;
switch (scene.clip) {
case "reads_aloud" :
case "reads2" :
return("reads aloud");
case "crowd_surfs" :
return("crowd surfs");
case "ride_wagon" :
return("rides a wagon");
case "rocks" :
return("rocks out");
case "plugs_ears" :
var _local2 = "his";
if (getActorEn(scene) == "Eva") {
_local2 = "her";
}
return(("plugs " + _local2) + " ears");
case "wakes" :
return("wakes up");
case "tease" :
return("teases");
case "plays" :
return("plays with");
case "angry" :
case "bored" :
case "confused" :
case "dizzy" :
case "happy" :
case "impressed" :
case "relieved" :
case "scared" :
case "surprised" :
case "suspicious" :
return("is " + scene.clip);
case "talks2" :
case "talks3" :
case "talks4" :
return("talks");
case "mmepsycho" :
return("Mme Psycho talks");
case "deliveryboy" :
return("Delivery Boy talks");
case "wizard" :
return("Wizard talks");
case "alien" :
return("Alien talks");
case "waitress" :
return("Waitress talks");
case "sleep_walks" :
return("sleep walks");
case "yells2" :
return("yells");
case "dances2" :
return("dances");
case "cellphone_call" :
return("talks on the phone");
case "calls" :
return("makes a call");
case "karatechop" :
return("karate-chops");
case "teleports_out" :
return("teleports out");
case "uses_computer" :
return("uses the computer");
case "watches_tv" :
return("watches TV");
case "admires" :
return("admires something");
case "cooking" :
return("cooks");
case "crying" :
return("cries");
case "blimp" :
return("Blimp");
case "boom" :
return("Boom");
case "card" :
return("Card");
case "cellphone" :
return("Cell Phone");
case "changing_channels" :
return("TV");
case "clapboard" :
return("Clapboard");
case "clock" :
return("Clock");
case "computer" :
return("Computer");
case "crash" :
return("Crash");
case "crowd" :
return("Crowd");
case "crystalball" :
return("Crystal Ball");
case "cookie" :
return("Fortune Cookie");
case "earlier" :
return("Earlier");
case "idolbase" :
return("Idol");
case "later" :
return("Later");
case "map" :
return("Map");
case "meanwhile" :
return("Meanwhile");
case "newspaper" :
return("Newspaper");
case "notepad" :
return("Notepad");
case "package" :
return("Package");
case "poster" :
return("Poster");
case "sandwich" :
return("Sandwich Board");
case "textcard1" :
case "textcard2" :
case "textcard3" :
return("Text");
case "ticket" :
return("Ticket");
case "topsecret" :
return("Top Secret Document");
case "tv" :
return("Television");
case "zimmercircles" :
return("Zimmercircles");
}
return(scene.clip);
}
function getLabelEn(id) {
switch (id) {
case "reads_aloud" :
case "reads2" :
return("Reads Aloud");
case "crowd_surfs" :
return("Crowd Surfs");
case "cooking" :
return("Cooks");
case "ride_wagon" :
return("Rides Wagon");
case "plugs_ears" :
return("Plugs Ears");
case "cookie" :
return("Fortune");
case "changing_channels" :
return("TV");
case "crystalball" :
return("Crystal Ball");
case "deliveryboy" :
return("Delivery Boy");
case "mmepsycho" :
return("Mme Psycho");
case "uses_computer" :
return("Uses Computer");
case "crying" :
return("Cries");
case "textcard1" :
case "textcard2" :
case "textcard3" :
return("Text");
case "sandwich" :
return("Board");
case "idolbase" :
return("Idol");
case "topsecret" :
return("Top Secret");
case "talks2" :
case "talks3" :
case "talks4" :
return("Talks");
case "sleep_walks" :
return("Sleep Walks");
case "yells2" :
return("Yells");
case "dances2" :
return("Dances");
case "karatechop" :
return("Karate-chop");
case "cellphone_call" :
return("Cellphone");
case "teleports_out" :
return("Teleports Out");
case "watches_tv" :
return("Watches TV");
}
return(id.charAt(0).toUpperCase() + id.substring(1, id.length));
}
function translateForMenuEn(param, id, scene) {
switch (param) {
case "actor" :
switch (id) {
case "edgar" :
case "edgar_eva" :
case "edgar_thirteen" :
return("Edgar");
case "eva" :
case "eva_edgar" :
case "eva_thirteen" :
return("Eva");
case "thirteen" :
case "thirteen_edgar" :
case "thirteen_eva" :
return("13");
}
case "actee" :
switch (id) {
case "none" :
return("Nobody");
case "edgar" :
return("Edgar");
case "eva" :
return("Eva");
case "thirteen" :
return("13");
case "edgar_eva" :
return("Edgar and Eva");
case "edgar_thirteen" :
return("Edgar and 13");
case "eva_thirteen" :
return("Eva and 13");
}
case "location" :
switch (id) {
case "living_room" :
return("Living Room");
case "edgar_bedroom" :
return("Edgar's Bedroom");
case "eva_bedroom" :
return("Eva's Bedroom");
case "planet" :
return("Zimbiru");
case "restaurant" :
return("Chinese Restaurant");
case "seventeenth_parallel" :
return("17th Parallel");
case "thirteenth_dimension" :
return("13th Dimension");
case "store" :
return("Occult-o-mart");
}
return(id.charAt(0).toUpperCase() + id.substring(1, id.length));
case "prop" :
switch (id) {
case "none" :
return("Nothing");
case "camera" :
return("Video Camera");
case "stinky_sack" :
return("Stinky Sack");
case "mystery_box" :
return("Mystery Box");
}
return(id.charAt(0).toUpperCase() + id.substring(1, id.length));
}
}
function getActeeFr(scene) {
switch (scene.clip) {
case "gives" :
case "steals" :
switch (scene.actee) {
case "none" :
return(".....");
case "edgar" :
return("\u00E0 Edgar");
case "eva" :
return("\u00E0 \u00C9va");
case "thirteen" :
return("\u00E0 13");
case "edgar_eva" :
return("\u00E0 Edgar et \u00C9va");
case "edgar_thirteen" :
return("\u00E0 Edgar et 13");
case "eva_thirteen" :
return("\u00E0 \u00C9va et 13");
}
case "annoys" :
case "begs" :
case "discovers" :
case "chases" :
case "fetches" :
case "hugs" :
case "meets" :
case "leaves" :
switch (scene.actee) {
case "none" :
return(".....");
case "edgar" :
return("Edgar");
case "eva" :
return("\u00C9va");
case "thirteen" :
return("13");
case "edgar_eva" :
return("Edgar et \u00C9va");
case "edgar_thirteen" :
return("Edgar et 13");
case "eva_thirteen" :
return("\u00C9va et 13");
}
case "panics" :
case "sleep_walks" :
switch (scene.actee) {
case "none" :
return(".....");
case "edgar" :
return("et Edgar");
case "eva" :
return("et \u00C9va");
case "thirteen" :
return("et 13");
case "edgar_eva" :
return("Edgar et \u00C9va");
case "edgar_thirteen" :
return("Edgar et 13");
case "eva_thirteen" :
return("\u00C9va et 13");
}
case "exercises" :
if (scene.actee != "none") {
break;
}
if (scene.actor == "eva") {
return("seule");
}
return("seul");
}
switch (scene.actee) {
case "none" :
return(".....");
case "edgar" :
return("avec Edgar");
case "eva" :
return("avec \u00C9va");
case "thirteen" :
return("avec 13");
case "edgar_eva" :
return("avec Edgar et \u00C9va");
case "edgar_thirteen" :
return("avec Edgar et 13");
case "eva_thirteen" :
return("avec \u00C9va et 13");
}
}
function getActorFr(scene) {
var _local1 = "";
switch (scene.actor) {
case "edgar" :
_local1 = "Edgar";
break;
case "eva" :
_local1 = "\u00C9va";
break;
case "thirteen" :
_local1 = "13";
}
if ((scene.clip == "panics") || (scene.clip == "sleep_walks")) {
switch (scene.actee) {
case "edgar_eva" :
case "edgar_thirteen" :
case "eva_thirteen" :
_local1 = _local1 + ",";
}
}
return(_local1);
}
function getPropFr(scene) {
switch (scene.prop) {
case "none" :
switch (scene.clip) {
case "steals" :
case "gives" :
case "finds" :
case "drops" :
case "plays" :
case "ride_wagon" :
case "throws" :
return("rien");
}
return("les main vides");
case "stinky_sack" :
return("un sac puant");
case "camera" :
return("une cam\u00E9ra");
case "potion" :
return("une potion");
case "trophy" :
return("un troph\u00E9e");
case "present" :
return("un cadeau");
case "crystal" :
return("un cristal");
case "mystery_box" :
return("une bo\u00EEte myst\u00E9rieuse");
case "bunny" :
return("un lapin");
case "book" :
return("un livre");
case "helmet" :
return("un casque");
case "flowers" :
return("des fleurs");
case "idol" :
return("une statuette");
case "letter" :
return("une lettre");
case "card" :
return("une carte de f\u00EAte");
case "map" :
return("une carte");
case "newspaper" :
return("un journal");
}
}
function getLocationFr(scene) {
if (scene.clip == "teleports_out") {
switch (scene.location) {
case "alley" :
return("de la ruelle");
case "backstage" :
return("des coulisses");
case "backyard" :
return("de la cour");
case "cave" :
return("de la caverne");
case "desert" :
return("du d\u00E9sert");
case "forest" :
return("de la for\u00EAt");
case "living_room" :
return("de la maison");
case "museum" :
return("du mus\u00E9e");
case "outerspace" :
return("de l'espace");
case "park" :
return("du parc");
case "restaurant" :
return("du restaurant");
case "salon" :
return("de chez Mme Psycho");
case "seventeenth_parallel" :
return("du 17e parall\u00E8le");
case "sky" :
return("du ciel");
case "stage" :
return("de l'estrade");
case "store" :
return("de l'Occulte & cie");
case "street" :
return("du trottoir");
case "thirteenth_dimension" :
return("de la 13e dimension");
case "jungle" :
return("de la jungle");
}
}
var _local1;
switch (scene.location) {
case "alley" :
_local1 = "dans la ruelle";
break;
case "backstage" :
_local1 = "dans les coulisses";
break;
case "backyard" :
_local1 = "dans la cour";
break;
case "cave" :
_local1 = "dans la caverne";
break;
case "desert" :
_local1 = "dans le d\u00E9sert";
break;
case "forest" :
_local1 = "dans la for\u00EAt";
break;
case "living_room" :
_local1 = "dans la maison";
break;
case "museum" :
_local1 = "dans le mus\u00E9e";
break;
case "outerspace" :
_local1 = "dans l'espace";
break;
case "park" :
_local1 = "dans le parc";
break;
case "restaurant" :
_local1 = "dans le restaurant";
break;
case "salon" :
_local1 = "chez Mme Psycho";
break;
case "seventeenth_parallel" :
_local1 = "dans le 17e parall\u00E8le";
break;
case "sky" :
_local1 = "dans le ciel";
break;
case "stage" :
_local1 = "sur l'estrade";
break;
case "store" :
_local1 = "chez Occulte & cie";
break;
case "street" :
_local1 = "sur le trottoir";
break;
case "thirteenth_dimension" :
_local1 = "dans la 13e dimension";
break;
case "jungle" :
_local1 = "dans la jungle";
}
return(_local1);
}
function getVerbFr(scene) {
switch (scene.clip) {
case "announces" :
return("proclame");
case "begs" :
return("supplie");
case "cellphone_call" :
return("t\u00E9l\u00E9phone");
case "lectures" :
return("r\u00E9primande");
case "reads_aloud" :
case "reads2" :
return("lit");
case "reports" :
return("annonce");
case "sings" :
return("chante");
case "talks" :
case "talks2" :
case "talks3" :
case "talks4" :
return("parle");
case "thinks" :
return("pense");
case "whispers" :
return("chuchote");
case "yells" :
case "yells2" :
return("crie");
case "protests" :
return("proteste");
case "admires" :
return("admire quelque chose");
case "annoys" :
return("\u00E9nerve");
case "blushes" :
return("rougie");
case "celebrates" :
return("c\u00E9l\u00E8bre");
case "chases" :
return("poursuit");
case "crowd_surfs" :
return("surf la foule");
case "dances" :
case "dances2" :
return("danse");
case "discovers" :
return("d\u00E9couvre");
case "drops" :
return("jette");
case "eats" :
return("mange");
case "examines" :
return("examine");
case "exercises" :
if (scene.actor == "eva") {
return("fait de l'exercice");
}
return("fait de l'exercice");
case "faints" :
return("s'\u00E9vanouie");
case "falls" :
return("tombe");
case "fetches" :
return("va chercher");
case "films" :
return("filme");
case "finds" :
if (scene.prop == "none") {
return("ne trouve");
}
return("trouve");
case "flies" :
return("plane");
case "floats" :
return("flotte");
case "gives" :
if (scene.prop == "none") {
return("ne donne");
}
return("donne");
case "hides" :
return("se cache");
case "hugs" :
return("embrasse");
case "karatechop" :
return("donne un coup de karat\u00E9");
case "lands" :
return("atterri");
case "laughs" :
return("ri");
case "leaves" :
return("quitte");
case "levitates" :
return("l\u00E9vite");
case "meets" :
return("rencontre");
case "panics" :
if (scene.actee == "none") {
return("panique");
}
return("paniquent");
case "plays" :
if (scene.prop == "none") {
return("ne joue avec");
}
return("joue avec");
case "ride_wagon" :
return("fait un tour de chariot");
case "rocks" :
return("tripe");
case "runs" :
return("court");
case "seeks" :
return("cherche");
case "sits" :
return("s'assoit");
case "sneaks" :
return("fouine");
case "sleeps" :
return("dort");
case "sleep_walks" :
if (scene.actee == "none") {
return("est somnambule");
}
return("sont somnambules");
case "stands" :
return("se tient debout");
case "steals" :
if (scene.prop == "none") {
return("ne vole");
}
return("vole");
case "struts" :
return("se pavane");
case "teleports" :
return("se t\u00E9l\u00E9porte");
case "teleports_out" :
return("se t\u00E9l\u00E9porte hors");
case "throws" :
if (scene.prop == "none") {
return("ne lance");
}
return("lance");
case "wakes" :
return("se r\u00E9veille");
case "walks" :
return("marche");
case "watches_tv" :
return("\u00E9coute la t\u00E9l\u00E9");
case "agrees" :
return("est d'accord");
case "angry" :
if (scene.actor == "eva") {
return("est f\u00E2ch\u00E9e");
}
return("est f\u00E2ch\u00E9");
case "bored" :
return("s'ennuie");
case "calls" :
return("fait un appel");
case "confused" :
return("est perplexe");
case "disagrees" :
return("n'est pas d'accord");
case "dizzy" :
if (scene.actor == "eva") {
return("est \u00E9tourdie");
}
return("est \u00E9tourdi");
case "happy" :
if (scene.actor == "eva") {
return("est heureuse");
}
return("est heureux");
case "impressed" :
if (scene.actor == "eva") {
return("est impressionn\u00E9e");
}
return("est impressionn\u00E9");
case "plots" :
return("complote");
case "plugs_ears" :
return("se bouche les oreilles");
case "preens" :
return("se pomponne");
case "relieved" :
if (scene.actor == "eva") {
return("est soulag\u00E9e");
}
return("est soulag\u00E9");
case "scared" :
return("a peur");
case "surprised" :
if (scene.actor == "eva") {
return("est surprise");
}
return("est surpris");
case "suspicious" :
if (scene.actor == "eva") {
return("est douteuse");
}
return("est douteux");
case "tease" :
return("taquine");
case "writes" :
return("\u00E9crit");
case "zimmerizes" :
return("zimmerise");
case "blimp" :
return("Ballon");
case "boom" :
return("Boum");
case "card" :
return("Carte de f\u00EAte");
case "changing_channels" :
return("T\u00E9l\u00E9");
case "clapboard" :
return("Claquette");
case "clock" :
return("Horloge");
case "crash" :
return("Krach");
case "crowd" :
return("Foule");
case "crystalball" :
return("Boule de cristal");
case "cookie" :
return("Message");
case "earlier" :
return("Plus t\u00F4t");
case "idolbase" :
return("Statuette");
case "later" :
return("Plus tard");
case "map" :
return("Carte");
case "meanwhile" :
return("Pendant ce temps");
case "newspaper" :
return("Journal");
case "notepad" :
return("Bloc-notes");
case "poster" :
return("Poster");
case "sandwich" :
return("Affiche");
case "textcard1" :
case "textcard2" :
case "textcard3" :
return("Texte");
case "ticket" :
return("Billet");
case "topsecret" :
return("Top secret");
case "tv" :
return("T\u00E9l\u00E9");
case "zimmercircles" :
return("Zimmercercle");
}
}
function getLabelFr(id) {
switch (id) {
case "announces" :
return("Proclame");
case "begs" :
return("Supplie");
case "cellphone_call" :
return("T\u00E9l\u00E9phone");
case "lectures" :
return("R\u00E9primande");
case "reads_aloud" :
case "reads2" :
return("Lit");
case "reports" :
return("Annonce");
case "sings" :
return("Chante");
case "talks" :
case "talks2" :
case "talks3" :
case "talks4" :
return("Parle");
case "thinks" :
return("Pense");
case "whispers" :
return("Chuchote");
case "yells" :
case "yells2" :
return("Crie");
case "protests" :
return("Proteste");
case "admires" :
return("Admire");
case "annoys" :
return("\u00C9nerve");
case "blushes" :
return("Rougie");
case "celebrates" :
return("C\u00E9l\u00E8bre");
case "chases" :
return("Poursuit");
case "crowd_surfs" :
return("Surf la foule");
case "dances" :
case "dances2" :
return("Danse");
case "discovers" :
return("D\u00E9couvre");
case "drops" :
return("Jette");
case "eats" :
return("Mange");
case "examines" :
return("Examine");
case "exercises" :
return("Exercice");
case "faints" :
return("S'\u00E9vanouie");
case "falls" :
return("Tombe");
case "fetches" :
return("Va chercher");
case "films" :
return("Filme");
case "finds" :
return("Trouve");
case "flies" :
return("Plane");
case "floats" :
return("Flotte");
case "gives" :
return("Donne");
case "hides" :
return("Cache");
case "hugs" :
return("Embrasse");
case "karatechop" :
return("Karat\u00E9");
case "lands" :
return("Atterri");
case "laughs" :
return("Ri");
case "leaves" :
return("Quitte");
case "levitates" :
return("L\u00E9vite");
case "meets" :
return("Rencontre");
case "plays" :
return("Joue");
case "panics" :
return("Panique");
case "ride_wagon" :
return("Chariot");
case "rocks" :
return("Tripe");
case "runs" :
return("Court");
case "seeks" :
return("Cherche");
case "sits" :
return("S'assoit");
case "sneaks" :
return("Fouine");
case "sleeps" :
return("Dort");
case "sleep_walks" :
return("Somnambule");
case "stands" :
return("Debout");
case "steals" :
return("Vole");
case "struts" :
return("Se pavane");
case "teleports" :
return("T\u00E9l\u00E9porte");
case "teleports_out" :
return("T\u00E9l\u00E9porte");
case "throws" :
return("Lance");
case "wakes" :
return("R\u00E9veille");
case "walks" :
return("Marche");
case "watches_tv" :
return("\u00C9coute la t\u00E9l\u00E9");
case "agrees" :
return("Est d'accord");
case "angry" :
return("F\u00E2ch\u00E9");
case "bored" :
return("S'ennuie");
case "calls" :
return("Fait un appel");
case "confused" :
return("Perplexe");
case "disagrees" :
return("N'est pas d'accord");
case "dizzy" :
return("\u00C9tourdi");
case "happy" :
return("Heureux");
case "impressed" :
return("Impressionn\u00E9");
case "plots" :
return("Complote");
case "plugs_ears" :
return("Se bouche les oreilles");
case "preens" :
return("Pomponne");
case "relieved" :
return("Soulag\u00E9");
case "scared" :
return("Peur");
case "surprised" :
return("Surpris");
case "suspicious" :
return("Douteux");
case "tease" :
return("Taquine");
case "writes" :
return("\u00C9crit");
case "zimmerizes" :
return("Zimmerise");
case "blimp" :
return("Ballon");
case "boom" :
return("Boum");
case "card" :
return("Carte de f\u00EAte");
case "changing_channels" :
return("T\u00E9l\u00E9");
case "clapboard" :
return("Claquette");
case "clock" :
return("Horloge");
case "crash" :
return("Krach");
case "crowd" :
return("Foule");
case "crystalball" :
return("Boule de cristal");
case "cookie" :
return("Message");
case "earlier" :
return("Plus t\u00F4t");
case "idolbase" :
return("Statuette");
case "later" :
return("Plus tard");
case "map" :
return("Carte");
case "meanwhile" :
return("Pendant ce temps");
case "newspaper" :
return("Journal");
case "notepad" :
return("Bloc-notes");
case "poster" :
return("Poster");
case "sandwich" :
return("Affiche");
case "textcard1" :
case "textcard2" :
case "textcard3" :
return("Texte");
case "ticket" :
return("Billet");
case "topsecret" :
return("Top secret");
case "tv" :
return("T\u00E9l\u00E9");
case "zimmercircles" :
return("Zimmercercle");
}
}
function translateForMenuFr(param, id) {
switch (param) {
case "actor" :
switch (id) {
case "edgar" :
case "edgar_eva" :
case "edgar_thirteen" :
return("Edgar");
case "eva" :
case "eva_edgar" :
case "eva_thirteen" :
return("\u00C9va");
case "thirteen" :
case "thirteen_edgar" :
case "thirteen_eva" :
return("13");
}
case "actee" :
switch (id) {
case "none" :
return(".....");
case "edgar" :
return("Edgar");
case "eva" :
return("\u00C9va");
case "thirteen" :
return("13");
case "edgar_eva" :
return("Edgar et \u00C9va");
case "edgar_thirteen" :
return("Edgar et 13");
case "eva_thirteen" :
return("\u00C9va et 13");
}
case "location" :
switch (id) {
case "alley" :
return("Ruelle");
case "backstage" :
return("Coulisses");
case "backyard" :
return("Cour");
case "cave" :
return("Caverne");
case "desert" :
return("D\u00E9sert");
case "forest" :
return("For\u00EAt");
case "living_room" :
return("Maison");
case "museum" :
return("Mus\u00E9e");
case "outerspace" :
return("Espace");
case "park" :
return("Parc");
case "restaurant" :
return("Restaurant");
case "salon" :
return("Mme Psycho");
case "seventeenth_parallel" :
return("17e parall\u00E8le");
case "sky" :
return("Ciel");
case "stage" :
return("Estrade");
case "store" :
return("Occulte & cie");
case "street" :
return("Trottoir");
case "thirteenth_dimension" :
return("13e dimension");
case "jungle" :
return("Jungle");
}
case "prop" :
switch (id) {
case "none" :
return("Rien");
case "camera" :
return("Cam\u00E9ra");
case "stinky_sack" :
return("Sac puant");
case "potion" :
return("Potion");
case "trophy" :
return("Troph\u00E9e");
case "present" :
return("Cadeau");
case "crystal" :
return("Cristal");
case "mystery_box" :
return("Bo\u00EEte myst\u00E9rieuse");
case "bunny" :
return("Lapin");
case "book" :
return("Livre");
case "helmet" :
return("Casque");
case "flowers" :
return("Fleurs");
case "idol" :
return("Statuette");
case "letter" :
return("Lettre");
case "card" :
return("Carte de f\u00EAte");
case "map" :
return("Carte");
case "newspaper" :
return("Journal");
}
}
}
function getHoldingFr(scene) {
if (!(scene.prop === "none")) {
} else {
if (!(scene.clip === "ride_wagon")) {
} else {
return("en ne tenant");
}
return("");
}
return("en tenant");
}
var toStringFunctions = [function () {
var _local2 = "";
if (actor) {
_local2 = _local2 + (("<a href=\"asfunction:choose,actor\"><u>" + actor) + "</u></a>");
}
_local2 = _local2 + (("<font color=\"#FFFFFF\"> " + verb) + "</font>");
if (actee) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,actee\"><u>" + actee) + "</u></a>");
}
if (location) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,location\"><u>" + location) + "</u></a>");
}
if (prop) {
_local2 = _local2 + (((("<font color=\"#FFFFFF\"> " + holding) + " </font><a href=\"asfunction:choose,prop\"><u>") + prop) + "</u></a>");
}
_local2 = _local2 + "<font color=\"#FFFFFF\">.</font>";
return(_local2);
}, function () {
var _local2 = "";
if (actor) {
_local2 = _local2 + (("<a href=\"asfunction:choose,actor\"><u>" + actor) + "</u></a>");
}
_local2 = _local2 + (("<font color=\"#FFFFFF\"> " + verb) + "</font>");
if (actee) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,actee\"><u>" + actee) + "</u></a>");
}
if (prop) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,prop\"><u>" + prop) + "</u></a>");
}
if (location) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,location\"><u>" + location) + "</u></a>");
}
_local2 = _local2 + "<font color=\"#FFFFFF\">.</font>";
return(_local2);
}, function () {
var _local2 = "";
if (actor) {
_local2 = _local2 + (("<a href=\"asfunction:choose,actor\"><u>" + actor) + "</u></a>");
}
_local2 = _local2 + (("<font color=\"#FFFFFF\"> " + verb) + "</font>");
if (prop) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,prop\"><u>" + prop) + "</u></a>");
}
if (actee) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,actee\"><u>" + actee) + "</u></a>");
}
if (location) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,location\"><u>" + location) + "</u></a>");
}
_local2 = _local2 + "<font color=\"#FFFFFF\">.</font>";
return(_local2);
}, function () {
return(("<font color=\"#FFFFFF\"> " + verb) + "</font>");
}, function () {
var _local2 = "";
if (actor) {
_local2 = _local2 + (("<a href=\"asfunction:choose,actor\"><u>" + actor) + "</u></a>");
}
if (actee) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,actee\"><u>" + actee) + "</u></a>");
}
_local2 = _local2 + (("<font color=\"#FFFFFF\"> " + verb) + "</font>");
if (location) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,location\"><u>" + location) + "</u></a>");
}
if (prop) {
_local2 = _local2 + (((("<font color=\"#FFFFFF\"> " + holding) + " </font><a href=\"asfunction:choose,prop\"><u>") + prop) + "</u></a>");
}
_local2 = _local2 + "<font color=\"#FFFFFF\">.</font>";
return(_local2);
}, function () {
var _local2 = "";
if (actor) {
_local2 = _local2 + (("<a href=\"asfunction:choose,actor\"><u>" + actor) + "</u></a>");
}
_local2 = _local2 + (("<font color=\"#FFFFFF\"> " + verb) + "</font>");
if (location) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,location\"><u>" + location) + "</u></a>");
}
if (actee) {
_local2 = _local2 + ((" <a href=\"asfunction:choose,actee\"><u>" + actee) + "</u></a>");
}
if (prop) {
_local2 = _local2 + (((("<font color=\"#FFFFFF\"> " + holding) + " </font><a href=\"asfunction:choose,prop\"><u>") + prop) + "</u></a>");
}
_local2 = _local2 + "<font color=\"#FFFFFF\">.</font>";
return(_local2);
}];
}
Symbol 665 MovieClip [__Packages.Scene] Frame 0 (1.8 KiB) ●
class Scene
{
static var timeline, api;
var actee, actor, clip, location, prop, text, index, dur, startTime, frameOffset;
function Scene (actee, actor, clip, location, prop, text, index, duration) {
this.actee = actee;
this.actor = actor;
this.clip = clip;
this.location = location;
this.prop = prop;
this.text = text;
if (!this.text) {
this.text = new Object();
}
this.index = index;
dur = duration;
}
function updateIndex(i) {
index = i;
}
function updateStartTime(t) {
startTime = t;
}
function updateFrameOffset(f) {
frameOffset = f;
}
function get duration() {
if ((actor == "starter") && (timeline.getLastScene() == this)) {
return(api.getDuration(clip) + 4);
}
return(dur);
}
function set duration(seconds) {
dur = seconds;
//return(duration);
}
function writeText(textId, textContent) {
text[textId] = textContent;
}
function toString() {
var _local3 = "\t";
var _local2 = "";
_local2 = _local2 + "Scene: {\r";
if (actee != undefined) {
_local2 = _local2 + (((_local3 + "actee: ") + actee) + newline);
}
if (actor != undefined) {
_local2 = _local2 + (((_local3 + "actor: ") + actor) + newline);
}
if (clip != undefined) {
_local2 = _local2 + (((_local3 + "clip: ") + clip) + newline);
}
if (location != undefined) {
_local2 = _local2 + (((_local3 + "location: ") + location) + newline);
}
if (prop != undefined) {
_local2 = _local2 + (((_local3 + "prop: ") + prop) + newline);
}
if ((text != undefined) && (text.length)) {
_local2 = _local2 + (((_local3 + "text: ") + text) + newline);
}
if (index != undefined) {
_local2 = _local2 + (((_local3 + "index: ") + index) + newline);
}
_local2 = _local2 + "};";
return(_local2);
}
}
Symbol 666 MovieClip [__Packages.Renderer] Frame 0 (9.03 KiB) ● ●
class Renderer
{
static var timeline, api;
var movieclips, readOnly, currentPreview;
function Renderer (clips, readOnly) {
movieclips = clips;
this.readOnly = readOnly;
}
function get preview_mc() {
return(movieclips.preview_mc);
}
function get root_mc() {
return(movieclips.root_mc);
}
function get bg_mc() {
return(movieclips.bg_mc);
}
function get fg_mc() {
return(movieclips.fg_mc);
}
function render() {
var scene = timeline.getCurrentScene();
var _local8 = timeline.getSceneFrame(scene);
var _local4 = preview_mc[scene.clip + "_mc"];
if (!scene) {
clearPreview(currentPreview);
clearBackground();
return(undefined);
}
if ((!_local4) || ((_local4.getBytesLoaded() / _local4.getBytesTotal()) != 1)) {
clearPreview(currentPreview);
clearBackground();
showLoadingIcon();
return(undefined);
}
hideLoadingIcon();
if (getCurrentPreview() != _local4) {
clearPreview(currentPreview);
setCurrentPreview(_local4);
clearBackground();
}
if (scene.actor == "starter") {
return(renderStarter(scene, _local8, _local4));
}
if (!api.getActors(scene.clip).length) {
return(renderTextcard(scene, _local8, _local4));
}
if (!_local4.fg_mc) {
_local4.attachMovie("foreground", "fg_mc", 6);
}
setFrame(_local4.fg_mc, _local8);
_local4.fg_mc._visible = false;
var _local11 = getFirstInstance(_local4.fg_mc);
if (_local11) {
if (fg_mc.mc.id != scene.location) {
fg_mc.attachMovie(scene.location + "_fg", "mc", 1);
fg_mc.mc.id = scene.location;
}
fg_mc.mc.cacheAsBitmap = true;
mirrorClip(fg_mc.mc, _local11);
} else {
fg_mc.mc.removeMovieClip();
}
var _local12 = scene.actor;
if (_local4.actor_mc.id != api.getLinkage("actor", scene)) {
_local4.actor_mc.removeMovieClip();
_local4.attachMovie(api.getLinkage("actor", scene), "actor_mc", 5);
_local4.actor_mc.id = api.getLinkage("actor", scene);
_local4.actor_mc.audio_mc.stop();
}
setFrame(_local4.actor_mc, _local8);
var _local13 = scene.actee;
if ((scene.actee && (!api.hasJointActors(scene))) && (_local4.actee_mc.id != api.getLinkage("actee", scene))) {
_local4.actee_mc.removeMovieClip();
_local4.attachMovie(api.getLinkage("actee", scene), "actee_mc", 4);
_local4.actee_mc.id = api.getLinkage("actee", scene);
_local4.actee_mc.audio_mc.stop();
}
setFrame(_local4.actee_mc, _local8);
var _local10 = scene.prop;
var _local9 = _local4.actor_mc.prop_mc;
if (!_local9) {
_local9 = _local4.actee_mc.prop_mc;
}
_local9.gotoAndStop(_local10);
_local9._visible = true;
if ((_local10 == "none") || (!_local10)) {
_local9._visible = false;
}
if (!_local4.mg_mc) {
_local4.attachMovie("midground", "mg_mc", 2);
}
setFrame(_local4.mg_mc, _local8);
_local4.mg_mc._visible = false;
_local11 = getFirstInstance(_local4.mg_mc);
if (_local11) {
if (bg_mc.mid_mc.id != scene.location) {
bg_mc.attachMovie(scene.location + "_mg", "mid_mc", 2);
bg_mc.mid_mc.id = scene.location;
}
bg_mc.mid_mc.cacheAsBitmap = true;
mirrorClip(bg_mc.mid_mc, _local11);
} else {
bg_mc.mid_mc.removeMovieClip();
}
if (!_local4.bg_mc) {
_local4.attachMovie("background", "bg_mc", 1);
}
setFrame(_local4.bg_mc, _local8);
_local4.bg_mc._visible = false;
_local11 = getFirstInstance(_local4.bg_mc);
if (_local11) {
if (bg_mc.back_mc.id != scene.location) {
bg_mc.attachMovie(scene.location + "_bg", "back_mc", 1);
bg_mc.back_mc.id = scene.location;
}
bg_mc.back_mc.cacheAsBitmap = true;
mirrorClip(bg_mc.back_mc, _local11);
} else {
if (bg_mc.back_mc.id != "solid") {
bg_mc.attachMovie("solid", "back_mc", 1);
}
bg_mc.back_mc.gotoAndStop(scene.location);
if (scene.location == undefined) {
bg_mc.back_mc.stop();
bg_mc.back_mc._visible = false;
}
}
var _local7 = api.getTexts(scene.clip);
var _local5 = 0;
while (_local5 < int(_local7.length)) {
var _local3 = _local7[_local5];
var _local2 = _local4.actor_mc[_local3];
if (readOnly && (_local2.type == "input")) {
_local2.type = "dynamic";
_local2.selectable = false;
}
if (scene.text[_local3] == undefined) {
scene.text[_local3] = "";
}
if (!(_local2.scaler instanceof Object)) {
_local2.scaler = new TextScaler(_local2, 72, 32);
}
if (_local2.text != scene.text[_local3]) {
_local2.text = scene.text[_local3];
_local2.scaler.scaleToFit();
}
_local2.scene = scene;
if (_local2.id == _local3) {
} else {
_local2.id = _local3;
_local2.root_mc = root_mc;
_local2.onChanged = function () {
this.scaler.scaleToFit();
this.scene.writeText(this.id, this.text);
if (this.onKillFocus) {
return(undefined);
}
this.onKillFocus = function () {
var _local2 = this.text;
this.scene.writeText(this.id, _local2);
this.root_mc.updateTextSceneDuration(this.scene, _local2);
this.root_mc.pushUndoState();
delete this.onKillFocus;
};
};
}
_local5++;
}
if (timeline.enteredNewScene()) {
root_mc.displaySentence();
}
}
function renderTextcard(scene, frame, mc) {
if (!mc.textcard_mc) {
var _local8 = "textcard";
if (root_mc.lang == "fr") {
_local8 = "textcard_fr";
}
var _local9 = mc.attachMovie(_local8, "textcard_mc", 1);
if (!_local9) {
mc.attachMovie("textcard", "textcard_mc", 1);
}
}
setFrame(mc.textcard_mc, frame);
var _local6 = api.getTexts(scene.clip);
var _local5 = 0;
while (_local5 < int(_local6.length)) {
var _local3 = _local6[_local5];
var _local2 = mc.textcard_mc[_local3];
if (!(_local2 instanceof TextField)) {
do {
if ((in mc.textcard_mc) == null) {
break;
}
var _local7 = in mc.textcard_mc;
_local2 = mc.textcard_mc[_local7][_local3];
} while (!(_local2 instanceof TextField));
do {
} while ("renderTextcard" != null);
}
if (readOnly && (_local2.type == "input")) {
_local2.type = "dynamic";
_local2.selectable = false;
}
if (scene.text[_local3] == undefined) {
scene.text[_local3] = "";
}
if (!(_local2.scaler instanceof Object)) {
_local2.scaler = new TextScaler(_local2, 72, 32);
}
if (_local2.text != scene.text[_local3]) {
_local2.text = scene.text[_local3];
_local2.scaler.scaleToFit();
}
_local2.scene = scene;
if (_local2.id == _local3) {
} else {
_local2.id = _local3;
_local2.root_mc = root_mc;
_local2.onChanged = function () {
this.scaler.scaleToFit();
this.scene.writeText(this.id, this.text);
if (this.onKillFocus) {
return(undefined);
}
this.onKillFocus = function () {
this.scene.writeText(this.id, this.text);
this.root_mc.pushUndoState();
delete this.onKillFocus;
};
};
}
_local5++;
}
if (timeline.enteredNewScene()) {
root_mc.displaySentence();
}
}
function renderStarter(scene, frame, mc) {
if (!mc.starter_mc) {
mc.attachMovie("starter", "starter_mc", 1);
}
setFrame(mc.starter_mc, frame);
for (var _local4 in mc.starter_mc) {
var _local2 = mc.starter_mc[_local4];
if (_local2._totalframes > 1) {
_local2.gotoAndStop(root_mc.lang);
}
}
}
function clearPreview(previewClip_mc) {
for (var _local2 in previewClip_mc) {
previewClip_mc[_local2].removeMovieClip();
}
}
function setCurrentPreview(mc) {
currentPreview = mc;
return(currentPreview);
}
function getCurrentPreview(mc) {
return(currentPreview);
}
function clearBackground() {
for (var _local2 in bg_mc) {
bg_mc[_local2].removeMovieClip();
}
for (var _local2 in fg_mc) {
fg_mc[_local2].removeMovieClip();
}
}
function setFrame(anim_mc, frame) {
var _local3 = (frame % anim_mc._totalframes) + 1;
anim_mc.gotoAndStop(_local3);
if (root_mc.isPlaying()) {
startAudio(anim_mc.audio_mc, frame);
} else {
stopAudio(anim_mc.audio_mc);
}
}
function startAudio(audio_mc, frame) {
if (audio_mc.isPlaying || (!audio_mc)) {
return(undefined);
}
audio_mc.isPlaying = true;
var _local2 = (frame % audio_mc._totalframes) + 1;
audio_mc.gotoAndPlay(_local2);
audio_mc.play();
}
function stopAudio(audio_mc) {
audio_mc.isPlaying = false;
audio_mc.stop();
}
function getFirstInstance(target_mc) {
for (var _local2 in target_mc) {
if (target_mc[_local2] instanceof MovieClip) {
return(target_mc[_local2]);
}
}
}
function mirrorClip(target_mc, source_mc) {
target_mc._x = source_mc._x;
target_mc._y = source_mc._y;
target_mc._xscale = source_mc._xscale;
target_mc._yscale = source_mc._yscale;
target_mc._rotation = source_mc._rotation;
}
function showLoadingIcon() {
root_mc.loadingIcon_mc.play();
root_mc.loadingIcon_mc._visible = true;
}
function hideLoadingIcon() {
root_mc.loadingIcon_mc._visible = false;
root_mc.loadingIcon_mc.stop();
}
}
Symbol 667 MovieClip [__Packages.TextScaler] Frame 0 (3.08 KiB) ●
class TextScaler
{
var tf, maxSize, minSize, fittedText, fittedFormat;
function TextScaler (tf, maxSize, minSize) {
this.tf = tf;
this.maxSize = maxSize;
this.minSize = minSize;
scaleToFit();
}
function scaleToFit() {
if ((((tf == undefined) || (minSize == undefined)) || (maxSize == undefined)) || (tf.text.length == 0)) {
return(undefined);
}
tf.multiline = true;
tf.wordWrap = true;
var _local2 = tf.getTextFormat();
_local2.leading = 0;
tf.setTextFormat(_local2);
_local2.size = findInRange(maxSize, minSize, this, "fitsAtSize");
tf.setTextFormat(_local2);
if (fitsAtSize(_local2.size)) {
adjustLeading();
save();
} else {
revert();
}
}
function onChanged() {
scaleToFit();
}
function cropToFit() {
tf.text = tf.text.substring(0, findInRange(tf.text.length, 0, this, "fitsAtLength"));
}
function adjustLeading() {
var _local2 = tf.getTextFormat();
_local2.leading = findInRange(_local2.size / 3, 0, this, "fitsAtLeading");
tf.setTextFormat(_local2);
}
function save() {
fittedText = tf.text;
fittedFormat = tf.getTextFormat();
}
function revert() {
if ((!fittedText) || (!fittedFormat)) {
cropToFit();
adjustLeading();
save();
} else {
var _local2 = Selection.getCaretIndex() - (tf.text.length - fittedText.length);
tf.text = fittedText;
tf.setTextFormat(fittedFormat);
if (Selection.getFocus() == String(tf)) {
Selection.setSelection(_local2, _local2);
}
}
}
function findInRange(max, min, obj, method, range, size) {
if (range == undefined) {
range = max - min;
}
if (size == undefined) {
size = max;
}
if (range == 0) {
if (!obj[method](size)) {
size--;
}
return(Math.max(min, Math.min(max, size)));
}
(obj[method](size) ? (size = size + range) : (size = size - range));
if (range == 1) {
return(findInRange(max, min, obj, method, 0, size));
}
return(findInRange(max, min, obj, method, Math.ceil(range / 2), size));
}
function fitsAtSize(size) {
if ((size < minSize) || (size > maxSize)) {
return(false);
}
var _local3 = tf._height;
var _local5 = tf.getTextFormat();
var _local2 = tf.getTextFormat();
_local2.size = size;
tf.autoSize = "center";
tf.setTextFormat(_local2);
var _local6 = tf._height <= _local3;
tf.autoSize = false;
tf._height = _local3;
tf.setTextFormat(_local5);
return(_local6);
}
function fitsAtLength(length) {
var _local4 = tf.text;
var _local2 = tf._height;
tf.autoSize = "center";
tf.text = tf.text.substring(0, length);
var _local3 = tf._height <= _local2;
tf.autoSize = false;
tf._height = _local2;
tf.text = _local4;
return(_local3);
}
function fitsAtLeading(leading) {
var _local3 = tf._height;
var _local4 = tf.getTextFormat();
var _local2 = tf.getTextFormat();
_local2.leading = leading;
tf.autoSize = "center";
tf.setTextFormat(_local2);
var _local5 = tf._height <= _local3;
tf.autoSize = false;
tf._height = _local3;
tf.setTextFormat(_local4);
return(_local5);
}
}
Symbol 668 MovieClip [__Packages.Timeline] Frame 0 (23.91 KiB) ● ● ●
class Timeline
{
static var renderer, api, locale;
var scenes, fps, pxPerSec, pxPerFrame, width, height, maxLength, currentFrame, currentIndex, maxSceneLength, movieclips, prevIndex;
function Timeline (lngth, clips) {
scenes = new Array();
fps = 15;
pxPerSec = 60;
pxPerFrame = pxPerSec / fps;
width = 660;
height = 75;
maxLength = Math.max(lngth, Math.floor(width / pxPerSec));
currentFrame = 0;
currentIndex = -1;
maxSceneLength = 3;
movieclips = clips;
timeline_mc.scrollRect = new flash.geom.Rectangle(0, 0, width, height);
attachVisibleCells();
}
function setCurrentIndex(i) {
i = int(i);
prevIndex = currentIndex;
var _local3 = i != prevIndex;
currentIndex = i;
return(_local3);
}
function setCurrentFrame(f) {
f = int(f);
f = Math.min(f, getLastFrame());
var _local3 = f != getCurrentFrame();
currentFrame = f;
if (_local3) {
updateSceneArrows();
if (!scrub.interval) {
updateScrubBar();
}
if ((!dragPlayhead.interval) && (!dragClip.interval)) {
updatePlayhead();
}
renderer.render();
}
return(_local3);
}
function setCurrentTime(t) {
return(setCurrentFrame(t * fps));
}
function getCurrentTime() {
return(currentFrame / fps);
}
function getScene(i) {
return(scenes[i]);
}
function getSceneAtTime(seconds) {
if (seconds >= getTotalTime()) {
return(getLastScene());
}
var _local3 = 0;
while (_local3 <= Math.floor(seconds)) {
var _local2 = getScene(_local3);
var _local5 = _local2.startTime;
var _local6 = _local2.startTime + _local2.duration;
if ((seconds >= _local5) && (seconds < _local6)) {
return(_local2);
}
_local3++;
}
}
function getSceneAtFrame(frame) {
var _local2 = frame / fps;
return(getSceneAtTime(_local2));
}
function getCurrentScene() {
return(getSceneAtFrame(getCurrentFrame()));
}
function updateCurrentIndex() {
return(setCurrentIndex(getCurrentScene().index));
}
function getLastScene() {
return(scenes[scenes.length - 1]);
}
function getLastFrame() {
var _local2 = getTotalTime();
if (_local2 < 1) {
return(0);
}
return((_local2 * fps) - 1);
}
function getTotalTime() {
var _local2 = getLastScene();
if (!_local2) {
return(0);
}
return(_local2.startTime + _local2.duration);
}
function getCurrentFrame() {
return(currentFrame);
}
function getCurrentIndex() {
return(currentIndex);
}
function getSceneFrame(scene) {
return(getCurrentFrame() - scene.frameOffset);
}
function getTimelinePosition() {
return(clips_mc._x);
}
function get playhead_mc() {
return(movieclips.playhead_mc);
}
function get timeline_mc() {
return(movieclips.timeline_mc);
}
function get clips_mc() {
return(movieclips.timeline_mc.clips_mc);
}
function get cells_mc() {
return(movieclips.timeline_mc.cells_mc);
}
function get endclips_mc() {
return(movieclips.timeline_mc.endclips_mc);
}
function get dragContainer_mc() {
movieclips.dragContainer_mc._x = 0;
movieclips.dragContainer_mc._y = 0;
return(movieclips.dragContainer_mc);
}
function get scrubBar_mc() {
return(movieclips.scrubBar_mc);
}
function get root_mc() {
return(movieclips.root_mc);
}
function get prev_btn() {
return(movieclips.prev_btn);
}
function get next_btn() {
return(movieclips.next_btn);
}
function addScene(scene, index) {
if (((getTotalTime() + scene.duration) > maxLength) && (timeline_mc)) {
return(false);
}
scenes.splice(index, 0, scene);
updateSceneIndexes();
updateSceneArrows();
enableScrubbing();
enablePlayback();
return(scene);
}
function removeScene(scene) {
scenes.splice(scene.index, 1);
updateSceneIndexes();
updateSceneArrows();
if (!scenes.length) {
disableScrubbing();
disablePlayback();
}
}
function clear() {
scenes = new Array();
setCurrentIndex(-1);
setCurrentFrame(-1);
clearInterval(scrollTowardCenter.interval);
delete scrollTowardCenter.interval;
positionTimeline(0);
render();
renderer.render();
}
function updateSceneIndexes() {
var _local4 = 0;
var _local3 = 0;
while (_local3 < scenes.length) {
var _local2 = getScene(_local3);
_local2.updateIndex(_local3);
_local2.updateFrameOffset(_local4 * fps);
if (_local2.clip == getScene(_local3 - 1).clip) {
_local2.updateFrameOffset(getScene(_local3 - 1).frameOffset);
}
_local2.updateStartTime(_local4);
_local4 = _local4 + _local2.duration;
_local3++;
}
}
function render() {
if (!timeline_mc) {
return(undefined);
}
clearClips();
clearCells();
attachVisibleCells();
attachVisibleClips();
}
function clearClips() {
for (var _local2 in clips_mc) {
clips_mc[_local2].removeMovieClip();
}
for (var _local2 in endclips_mc) {
endclips_mc[_local2].removeMovieClip();
}
}
function clearCells() {
for (var _local2 in cells_mc) {
cells_mc[_local2].removeMovieClip();
}
}
function attachVisibleCells(x) {
if (!timeline_mc) {
return(undefined);
}
var _local5 = pxPerSec;
if (x == undefined) {
x = cells_mc._x;
}
var _local4 = Math.floor((-x) / _local5) - maxSceneLength;
_local4 = Math.max(0, _local4);
var _local3 = Math.floor((width - x) / _local5) + maxSceneLength;
_local3 = Math.min(_local3, maxLength - 1);
var _local2 = _local4;
while (_local2 <= _local3) {
attachCell(_local2);
_local2++;
}
}
function attachVisibleClips(x) {
if (x == undefined) {
x = clips_mc._x;
}
var _local3 = getVisibleClipIndexes(x);
if (!_local3) {
return(undefined);
}
var _local2 = _local3.imin;
while (_local2 <= _local3.imax) {
if (dragContainer_mc.drag_mc.scene == getScene(_local2)) {
} else {
attachClip(_local2);
}
_local2++;
}
}
function getVisibleClipIndexes(x) {
if (!getLastScene()) {
return(false);
}
var _local2 = ((-x) / pxPerSec) - maxSceneLength;
var _local6 = getSceneAtTime(_local2).index;
_local6 = Math.max(0, int(_local6));
var _local3 = ((width - x) / pxPerSec) + maxSceneLength;
var _local4 = getSceneAtTime(_local3).index;
return({imin:_local6, imax:_local4});
}
function attachCell(seconds) {
var _local4 = ("cell" + seconds) + "_mc";
if (cells_mc[_local4]) {
return(undefined);
}
var _local3 = cells_mc.attachMovie("cell", _local4, seconds);
_local3._x = pxPerSec * seconds;
_local3.label_txt.text = seconds;
}
function attachClip(i, host_mc) {
if (!host_mc) {
host_mc = clips_mc;
}
var _local3 = getScene(i);
if (host_mc[("clip" + _local3.index) + "_mc"]) {
return(undefined);
}
var _local2 = host_mc.attachMovie("clip", ("clip" + _local3.index) + "_mc", _local3.index);
_local2._x = _local3.startTime * pxPerSec;
labelClip(_local3, _local2);
_local2.gotoAndStop("off" + (i % 2));
_local2.bar_mc.gotoAndStop(api.getCategory(_local3.clip));
attachThumb(_local3, _local2);
_local2.cacheAsBitmap = true;
_local2.scrollRect = new flash.geom.Rectangle(0, 0, (pxPerSec * _local3.duration) - 1, height);
_local2.scene = _local3;
_local2.timeline = this;
_local2.onPress = function () {
this.timeline.pressClip(this);
};
if (_local3.index == currentIndex) {
highlightClip(_local2);
}
}
function removeClip(i) {
clips_mc[("clip" + i) + "_mc"].removeMovieClip();
}
function highlightClip(clip_mc) {
clip_mc.gotoAndStop(api.getCategory(clip_mc.scene.clip));
clip_mc.thumbWindow_mc.gotoAndStop("on");
applyDropShadow(clip_mc.label_txt);
}
function dehighlightAllClips() {
for (var _local2 in clips_mc) {
clips_mc[_local2].gotoAndStop("off" + (clips_mc[_local2].scene.index % 2));
clips_mc[_local2].thumbWindow_mc.gotoAndStop("off");
applyDropShadow(clips_mc[_local2].label_txt);
}
for (var _local2 in endclips_mc) {
endclips_mc[_local2].gotoAndStop("off" + (clips_mc[_local2].scene.index % 2));
endclips_mc[_local2].thumbWindow_mc.gotoAndStop("off");
applyDropShadow(endclips_mc[_local2].label_txt);
}
}
function attachThumb(scene, clip_mc) {
clip_mc.thumbWindow_mc._x = (scene.duration * pxPerSec) / 2;
var _local2 = clip_mc.thumbWindow_mc.thumb_mc.attachMovie(scene.clip, scene.clip + "_mc", 1);
root_mc.langToggle(_local2);
var _local4 = 46;
var _local3 = 36;
var _local6 = _local2._width - _local4;
var _local5 = _local2._height - _local3;
_local2.cacheAsBitmap = true;
_local2.scrollRect = new flash.geom.Rectangle(_local6 / 2, _local5 / 2, _local4, _local3);
}
function labelClip(scene, clip_mc) {
clip_mc.label_txt.text = locale.getLabel(scene);
clip_mc.label_txt.autoSize = "center";
clip_mc.label_txt._x = Math.max(0, ((pxPerSec * scene.duration) - clip_mc.label_txt._width) / 2);
applyDropShadow(clip_mc.label_txt);
}
function selectClip(clip_mc) {
setCurrentFrame(clip_mc.scene.startTime * fps);
updateCurrentIndex();
maskPlayhead();
dehighlightAllClips();
highlightClip(clip_mc);
if (enteredNewScene()) {
renderer.render();
}
}
function selectScene(i) {
var _local2 = timeline_mc.clips_mc[("clip" + i) + "_mc"];
selectClip(_local2);
}
function pressDelete(clip_mc) {
root_mc.stopPlayback();
if (scrollTowardCenter.interval) {
clearInterval(scrollTowardCenter.interval);
delete scrollTowardCenter.interval;
jumpToCenter();
}
selectClip(clip_mc);
dragClipOut(clip_mc);
releaseDrag(clip_mc);
}
function pressClip(clip_mc) {
root_mc.stopPlayback();
if (clip_mc.thumbWindow_mc.delete_mc.hitTest(root_mc._xmouse, root_mc._ymouse, true)) {
return(pressDelete(clip_mc));
}
selectClip(clip_mc);
clip_mc.xgrab = clip_mc._xmouse;
clip_mc.ygrab = clip_mc._ymouse;
clip_mc.onMouseMove = function () {
var _local3 = this._xmouse - this.xgrab;
var _local2 = this._ymouse - this.ygrab;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local5 = this.timeline.height / 3;
if (_local4 < _local5) {
return(undefined);
}
this.timeline.startDraggingClip(this);
};
clip_mc.onRelease = (clip_mc.onReleaseOutside = function () {
this.timeline.releaseClip(this);
delete this.onRelease;
delete this.onReleaseOutside;
});
}
function releaseClip(clip_mc) {
if (!closeGap.interval) {
render();
center();
}
}
function startDraggingClip(clip_mc) {
var _local5 = clip_mc.xgrab;
var _local4 = clip_mc.ygrab;
var _local2 = dragContainer_mc.attachMovie("clip", "drag_mc", 1);
_local2._alpha = 0;
_local2._x = dragContainer_mc._xmouse - _local5;
_local2._y = dragContainer_mc._ymouse - _local4;
_local2.onRelease = (_local2.onReleaseOutside = function () {
this.timeline.releaseDrag(this);
});
_local2._focusrect = false;
Selection.setFocus(_local2);
_local2.scene = clip_mc.scene;
_local2.timeline = this;
_local2.bar_mc.gotoAndStop(api.getCategory(_local2.scene.clip));
attachThumb(_local2.scene, _local2);
highlightClip(_local2);
labelClip(_local2.scene, _local2);
_local2.cacheAsBitmap = true;
_local2.scrollRect = new flash.geom.Rectangle(0, 0, clip_mc.scene.duration * pxPerSec, height);
_local2._alpha = 80;
removeClip(clip_mc.scene.index);
if (dragClip.interval) {
clearInterval(dragClip.interval);
}
dragClip.interval = setInterval(this, "dragClip", 35, _local2, _local5, _local4);
}
function dragClip(drag_mc, xgrab, ygrab) {
drag_mc._x = dragContainer_mc._xmouse - xgrab;
drag_mc._y = dragContainer_mc._ymouse - ygrab;
var _local6 = snapDragClip(drag_mc);
if (!_local6) {
return(dragClipOut(drag_mc));
}
scrollDragClip(drag_mc);
positionPlayhead((drag_mc._x - timeline_mc._x) - clips_mc._x);
var _local4 = getMoveIndex(drag_mc);
var _local3 = drag_mc.scene;
if (_local4 == _local3.index) {
return(undefined);
}
if (_local3.index == null) {
addScene(_local3, _local4);
highlightClip(drag_mc);
var _local5 = true;
} else {
removeScene(_local3);
addScene(_local3, _local4);
}
removeClip(_local3.index);
setCurrentIndex(_local4);
var _local7 = setCurrentFrame(_local3.startTime * fps);
render();
if (_local5 && (!_local7)) {
root_mc.displaySentence();
renderer.render();
}
updateAfterEvent();
}
function snapDragClip(drag_mc) {
var _local2 = {x:drag_mc._x, y:drag_mc._y};
clips_mc.globalToLocal(_local2);
var _local4 = height / 3;
if (Math.abs(_local2.y) >= _local4) {
return(false);
}
drag_mc._y = drag_mc._y - _local2.y;
return(true);
}
function dragClipOut(drag_mc) {
var _local2 = drag_mc.scene;
if (_local2.index == null) {
return(undefined);
}
if (_local2.index < getLastScene().index) {
renderSplit(_local2.index);
var _local5 = clips_mc._x - (_local2.duration * pxPerSec);
if (closeGap.interval) {
clearInterval(closeGap.interval);
}
closeGap.interval = setInterval(this, "closeGap", 35, _local5);
} else {
var _local4 = true;
}
if (_local4) {
setCurrentFrame(getScene(_local2.index - 1).startTime * fps);
}
updatePlayhead();
updateCurrentIndex();
drag_mc.gotoAndStop("off0");
applyDropShadow(drag_mc.label_txt);
drag_mc.thumbWindow_mc.gotoAndStop("off");
removeScene(_local2);
_local2.index = null;
if (_local4) {
render();
}
root_mc.displaySentence();
renderer.render();
}
function scrollDragClip(drag_mc) {
var _local4 = width - (pxPerSec * getTotalTime());
var _local3 = 0;
var _local2 = timeline_mc._parent._xmouse;
if (_local2 < timeline_mc._x) {
scroll(10, _local4, _local3);
} else if (_local2 > (timeline_mc._x + width)) {
var _local6 = width - clips_mc._x;
var _local5 = _local6 / pxPerSec;
if (_local5 < getTotalTime()) {
scroll(-10, _local4, _local3);
}
}
}
function getMoveIndex(drag_mc) {
var _local2;
var _local5 = drag_mc.scene;
var _local4 = (((drag_mc._x - timeline_mc._x) - clips_mc._x) / pxPerSec) + (_local5.duration / 2);
var _local3 = getSceneAtTime(_local4);
var _local6 = _local3.startTime + (_local3.duration / 2);
if (_local5.index == null) {
_local2 = _local3.index;
_local2 = _local2 + (_local4 > _local6);
} else {
_local2 = _local5.index;
var _local7 = _local3.index - _local5.index;
if (_local7 > 0) {
if (_local4 > _local6) {
_local2++;
}
} else if (_local7 < 0) {
if (_local4 < _local6) {
_local2--;
}
}
}
return(_local2);
}
function releaseDrag(drag_mc) {
clearInterval(dragClip.interval);
delete dragClip.interval;
drag_mc.removeMovieClip();
updatePlayhead();
updateScrubBar();
if (!closeGap.interval) {
render();
center();
}
renderer.render();
root_mc.pushUndoState();
}
function calcScrollTarget() {
var _local3 = timeline_mc._x + Math.floor(width / 2);
var _local4 = _local3 - playhead_mc._x;
var _local2 = clips_mc._x + _local4;
_local2 = Math.min(_local2, 0);
_local2 = Math.max(width - (maxLength * pxPerSec), _local2);
return(_local2);
}
function center() {
var _local2 = calcScrollTarget();
if (_local2 == clips_mc._x) {
return(undefined);
}
attachVisibleCells(_local2);
attachVisibleClips(_local2);
if (scrollTowardCenter.interval) {
clearInterval(scrollTowardCenter.interval);
}
scrollTowardCenter.interval = setInterval(this, "scrollTowardCenter", 35, _local2);
}
function positionTimeline(x) {
clips_mc._x = x;
endclips_mc._x = x;
cells_mc._x = x;
}
function jumpToCenter() {
clearInterval(scrollTowardCenter.interval);
delete scrollTowardCenter.interval;
clearInterval(closeGap.interval);
delete closeGap.interval;
positionTimeline(calcScrollTarget());
updatePlayhead();
render();
}
function scrollTowardCenter(x, skipRender) {
if (!timeline_mc) {
return(undefined);
}
if (x == undefined) {
x = calcScrollTarget();
}
var _local3 = x - clips_mc._x;
var _local6 = 2;
var _local4 = Math.round(_local3 / _local6);
if (Math.abs(_local4) < pxPerFrame) {
if (Math.abs(_local3) > pxPerFrame) {
_local4 = (pxPerFrame * Math.abs(_local3)) / _local3;
} else {
positionTimeline(x);
updatePlayhead();
maskPlayhead();
if (!skipRender) {
render();
}
clearInterval(arguments.callee.interval);
delete arguments.callee.interval;
updateAfterEvent();
return(undefined);
}
}
positionTimeline(getTimelinePosition() + _local4);
playhead_mc._x = playhead_mc._x + _local4;
maskPlayhead();
updateAfterEvent();
}
function scroll(step, xmin, xmax) {
var _local2 = cells_mc._x + step;
if (Math.abs(xmin) > (pxPerSec * (maxLength - 1))) {
xmin = xmin + (width - pxPerFrame);
}
if (step > 0) {
_local2 = Math.min(_local2, xmax);
} else {
_local2 = Math.max(_local2, xmin);
}
positionTimeline(_local2);
}
function pressPlayhead() {
if (dragPlayhead.interval) {
clearInterval(dragPlayhead.interval);
}
var _local2 = playhead_mc._xmouse;
dragPlayhead.interval = setInterval(this, "dragPlayhead", 35, _local2);
}
function releasePlayhead() {
clearInterval(dragPlayhead.interval);
delete dragPlayhead.interval;
snapPlayhead();
center();
}
function dragPlayhead(xgrab) {
var _local6 = getLastFrame();
if (!_local6) {
return(undefined);
}
var _local5 = _local6 * pxPerFrame;
var _local3 = 0;
var _local11 = (width - clips_mc._x) - pxPerFrame;
var _local16 = -clips_mc._x;
var _local13 = Math.min(_local5, _local11);
var _local15 = Math.max(_local3, _local16);
var _local8 = clips_mc._xmouse - xgrab;
var _local2 = Math.max(_local15, Math.min(_local8, _local13));
var _local9 = positionPlayhead(_local2);
var _local4 = false;
if ((_local2 + clips_mc._x) < (pxPerSec / 2)) {
scroll(15, -_local5, _local3);
_local4 = -1;
} else if ((_local2 + clips_mc._x) > (width - (pxPerSec / 2))) {
scroll(-15, -_local5, _local3);
_local4 = 1;
}
if ((!_local9) && (!_local4)) {
return(undefined);
}
var _local7 = Math.floor(_local2 / pxPerFrame);
var _local14 = setCurrentFrame(_local7);
if (!_local14) {
updateAfterEvent();
return(false);
}
var _local12 = getSceneAtFrame(_local7);
var _local17 = _local12.index;
var _local10 = updateCurrentIndex();
if (_local10) {
render();
root_mc.displaySentence();
}
updateAfterEvent();
return(true);
}
function updatePlayhead() {
var _local2 = getCurrentFrame() * pxPerFrame;
positionPlayhead(_local2);
}
function positionPlayhead(pixels) {
var _local2 = (timeline_mc._x + clips_mc._x) + pixels;
var _local3 = playhead_mc._x != _local2;
playhead_mc._x = _local2;
maskPlayhead();
return(_local3);
}
function snapPlayhead() {
var _local2 = getCurrentFrame() * pxPerFrame;
positionPlayhead(_local2);
}
function maskPlayhead() {
if ((playhead_mc._x < timeline_mc._x) || (playhead_mc._x > (timeline_mc._x + width))) {
playhead_mc._visible = false;
} else {
playhead_mc._visible = true;
}
}
function updateScrubBar() {
var _local2 = (scrubBar_mc.scrubTrack_mc._width - scrubBar_mc.thumb_mc._width) + 2;
scrubBar_mc.thumb_mc._x = Math.round((_local2 * getCurrentFrame()) / getLastFrame());
scrubBar_mc.bar_mc._x = scrubBar_mc.thumb_mc._x + (scrubBar_mc.thumb_mc._width / 2);
}
function pressScrubBar() {
var _local2 = scrubBar_mc.thumb_mc._xmouse;
if (scrub.interval) {
clearInterval(scrub.interval);
}
scrub.interval = setInterval(this, "scrub", 35, _local2);
}
function scrub(xgrab) {
var _local5 = 0;
var _local3 = (scrubBar_mc.scrubTrack_mc._width - scrubBar_mc.thumb_mc._width) + 2;
var _local2 = scrubBar_mc._xmouse - xgrab;
_local2 = Math.max(_local5, _local2);
_local2 = Math.min(_local2, _local3);
scrubBar_mc.thumb_mc._x = _local2;
scrubBar_mc.bar_mc._x = scrubBar_mc.thumb_mc._x + (scrubBar_mc.thumb_mc._width / 2);
var _local4 = (_local2 / _local3) * getLastFrame();
setCurrentFrame(_local4);
jumpToCenter();
if (updateCurrentIndex()) {
render();
root_mc.displaySentence();
}
updateAfterEvent();
}
function releaseScrubBar() {
clearInterval(scrub.interval);
delete scrub.interval;
updateScrubBar();
}
function disableScrubbing() {
scrubBar_mc.thumb_mc.enabled = false;
scrubBar_mc.thumb_mc.gotoAndStop("off");
playhead_mc.btn.enabled = false;
playhead_mc.btn2.enabled = false;
playhead_mc.gotoAndStop("off");
}
function enableScrubbing() {
scrubBar_mc.thumb_mc.enabled = true;
scrubBar_mc.thumb_mc.gotoAndStop("up");
playhead_mc.btn.enabled = true;
playhead_mc.btn2.enabled = true;
playhead_mc.gotoAndStop("up");
}
function renderSplit(index) {
clearClips();
var _local3 = getVisibleClipIndexes(clips_mc._x);
var _local2 = _local3.imin;
while (_local2 < index) {
attachClip(_local2);
_local2++;
}
endclips_mc._x = clips_mc._x;
_local2 = index + 1;
while (_local2 <= _local3.imax) {
attachClip(_local2, endclips_mc);
_local2++;
}
}
function closeGap(x) {
var _local3 = x - endclips_mc._x;
endclips_mc._x = endclips_mc._x + Math.floor(_local3 / 2);
if (endclips_mc._x <= x) {
clearInterval(arguments.callee.interval);
delete arguments.callee.interval;
endclips_mc._x = x;
render();
if (!dragContainer_mc.drag_mc) {
center();
}
}
}
function playback() {
var _local3 = setCurrentFrame(getCurrentFrame() + 1);
if (!_local3) {
return(false);
}
var _local2 = updateCurrentIndex();
if (_local2) {
render();
}
if (scrollTowardCenter.interval) {
clearInterval(scrollTowardCenter.interval);
delete scrollTowardCenter.interval;
}
scrollTowardCenter(null, true);
return(true);
}
function nextScene() {
var _local3 = getCurrentIndex() + 1;
var _local2 = getScene(_local3);
if (!_local2) {
_local2 = getCurrentScene();
setCurrentFrame(((_local2.startTime + _local2.duration) * fps) - 1);
} else {
setCurrentFrame(_local2.startTime * fps);
updateCurrentIndex();
root_mc.displaySentence();
}
if (!closeGap.interval) {
render();
center();
}
}
function prevScene() {
var _local3 = getCurrentIndex();
if (getCurrentFrame() == (getCurrentScene().startTime * fps)) {
_local3--;
}
var _local2 = getScene(_local3);
if (!_local2) {
return(undefined);
}
setCurrentFrame(_local2.startTime * fps);
updateCurrentIndex();
if (enteredNewScene()) {
root_mc.displaySentence();
}
if (!closeGap.interval) {
render();
center();
}
}
function rewind() {
root_mc.stopPlayback();
setCurrentFrame(0);
updateCurrentIndex();
jumpToCenter();
}
function disablePlayback() {
root_mc.stopPlayback();
disable(root_mc.play_btn);
disable(root_mc.pause_btn);
root_mc.pause_btn._visible = true;
}
function enablePlayback() {
root_mc.stopPlayback();
enable(root_mc.play_btn);
root_mc.pause_btn._visible = false;
}
function gotoMiddleFrame() {
var _local2 = getCurrentScene();
var _local3 = (_local2.startTime * fps) + Math.floor((_local2.duration * fps) / 2);
setCurrentFrame(_local3);
updateCurrentIndex();
}
function enteredNewScene() {
return(currentIndex != prevIndex);
}
function updateSceneArrows() {
if (getCurrentFrame() > 0) {
enable(prev_btn);
enable(root_mc.rewind_btn);
} else {
disable(prev_btn);
disable(root_mc.rewind_btn);
}
if (getCurrentFrame() < getLastFrame()) {
enable(next_btn);
} else {
disable(next_btn);
}
}
function applyDropShadow(target) {
var _local1 = new flash.filters.DropShadowFilter();
_local1.distance = 0;
_local1.alpha = 0.8;
target.filters = [_local1];
}
function disable(btn) {
root_mc.disable(btn);
}
function enable(btn) {
root_mc.enable(btn);
}
}
Symbol 669 MovieClip [__Packages.Api] Frame 0 (8.53 KiB) ● ●
class Api extends XML
{
var ignoreWhite, parseXML, status, firstChild, categoriesByIndex, clipsByIndex, acteesByIndex, actorsByIndex, locationsByIndex, propsByIndex, acteesById, actorsById, locationsById, propsById, categoriesById, clipsByCategory, propertiesById, version, timelineLength, loaded;
function Api (src) {
super();
ignoreWhite = true;
init(src);
}
function init(src) {
parseXML(src);
if (status != 0) {
return(false);
}
if (firstChild.nodeName.toLowerCase() != "api") {
return(false);
}
categoriesByIndex = new Array();
clipsByIndex = new Array();
acteesByIndex = new Array();
actorsByIndex = new Array();
locationsByIndex = new Array();
propsByIndex = new Array();
acteesById = new Object();
actorsById = new Object();
locationsById = new Object();
propsById = new Object();
categoriesById = new Object();
clipsByCategory = new Object();
propertiesById = new Object();
version = int(firstChild.attributes.version);
timelineLength = int(firstChild.attributes.timelineLength);
if (!timelineLength) {
timelineLength = 60;
}
var _local3 = firstChild.childNodes;
var _local2 = 0;
while (_local2 < _local3.length) {
switch (_local3[_local2].nodeName) {
case "actee" :
addActee(_local3[_local2]);
break;
case "actor" :
addActor(_local3[_local2]);
break;
case "category" :
addCategory(_local3[_local2]);
break;
case "clip" :
addClip(_local3[_local2]);
break;
case "location" :
addLocation(_local3[_local2]);
break;
case "prop" :
addProp(_local3[_local2]);
}
_local2++;
}
return(true);
}
function onData(src) {
loaded = init(src);
onLoad(loaded);
}
function onLoad(success) {
}
function getTimelineLength() {
return(timelineLength);
}
function addActee(node) {
acteesByIndex.push(unescape(node.attributes.id));
}
function addActor(node) {
actorsByIndex.push(unescape(node.attributes.id));
}
function addCategory(node) {
var _local4 = unescape(node.attributes.id);
categoriesByIndex.push(_local4);
clipsByCategory[_local4] = new Array();
var _local2 = 0;
while (_local2 < node.childNodes.length) {
var _local3 = unescape(node.childNodes[_local2].attributes.id);
clipsByCategory[_local4].push(_local3);
categoriesById[_local3] = _local4;
_local2++;
}
quicksort(clipsByCategory[_local4], alphabeticalCompare);
}
function addClip(node) {
var _local2 = unescape(node.attributes.id);
clipsByIndex.push(_local2);
acteesById[_local2] = new Object();
actorsById[_local2] = new Object();
locationsById[_local2] = new Object();
propsById[_local2] = new Object();
propertiesById[_local2] = node;
}
function addLocation(node) {
locationsByIndex.push(unescape(node.attributes.id));
}
function addProp(node) {
propsByIndex.push(unescape(node.attributes.id));
}
function quicksort(list, compare) {
var _local5 = function (a, l, r) {
var _local2 = l;
var _local1 = r;
var _local5;
var _local4 = a[int((l + r) / 2)];
do {
while (compare(a[_local2], _local4)) {
_local2++;
}
while (compare(_local4, a[_local1])) {
_local1--;
}
if (_local2 <= _local1) {
_local5 = a[_local2];
a[_local2++] = a[_local1];
a[_local1--] = _local5;
}
} while (_local2 <= _local1);
if (l < _local1) {
list(a, l, _local1);
}
if (_local2 < r) {
list(a, _local2, r);
}
};
_local5(list, 0, list.length - 1);
}
function alphabeticalCompare(a, b) {
return(a.toUpperCase() < b.toUpperCase());
}
function getActees(id, actor) {
var _local3 = getPropertiesById(id).actees.slice(0);
if (actor) {
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].indexOf(actor) != -1) {
_local3.splice(_local2--, 1);
}
_local2++;
}
}
return(_local3);
}
function getActors(id) {
return(getPropertiesById(id).actors.slice(0));
}
function getCategory(id) {
return(categoriesById[id]);
}
function getCategories() {
return(categoriesByIndex.slice(0));
}
function getClipsByCategory(categoryId) {
return(clipsByCategory[categoryId].slice(0));
}
function getClips() {
return(clipsByIndex.slice(0));
}
function getDuration(id) {
return(getPropertiesById(id).duration);
}
function getFileName(id) {
return(id + ".swf");
}
function getLocations(id) {
return(getPropertiesById(id).locations.slice(0));
}
function getProperties(scene) {
return({actees:getActees(scene.clip, scene.actor), actors:getActors(scene.clip), categories:getCategories(scene.clip), duration:getDuration(scene.clip), filename:getFileName(scene.clip), locations:getLocations(scene.clip), props:getProps(scene.clip), texts:getTexts(scene.clip)});
}
function getPropertiesById(id) {
if (propertiesById[id] instanceof XMLNode) {
var _local7 = propertiesById[id];
var _local2 = {id:unescape(_local7.attributes.id), duration:Number(_local7.attributes.duration), jointActors:Boolean(_local7.attributes.joint)};
var _local5 = _local7.childNodes;
var _local3 = 0;
while (_local3 < _local5.length) {
switch (_local5[_local3].nodeName) {
case "actor" :
if (!_local2.actors) {
_local2.actors = new Array();
}
_local2.actors.push(unescape(_local5[_local3].attributes.id));
actorsById[id][unescape(_local5[_local3].attributes.id)] = true;
break;
case "actee" :
if (!_local2.actees) {
_local2.actees = new Array();
}
_local2.actees.push(unescape(_local5[_local3].attributes.id));
acteesById[id][unescape(_local5[_local3].attributes.id)] = true;
break;
case "category" :
if (!_local2.categories) {
_local2.categories = new Array();
}
_local2.categories.push(unescape(_local5[_local3].attributes.id));
break;
case "location" :
if (!_local2.locations) {
_local2.locations = new Array();
}
_local2.locations.push(unescape(_local5[_local3].attributes.id));
locationsById[id][unescape(_local5[_local3].attributes.id)] = true;
break;
case "prop" :
if (!_local2.props) {
_local2.props = new Array();
}
_local2.props.push(unescape(_local5[_local3].attributes.id));
propsById[id][unescape(_local5[_local3].attributes.id)] = true;
break;
case "default-actors" :
_local2.actors = actorsByIndex;
var _local6 = 0;
while (_local6 < actorsByIndex.length) {
actorsById[id][actorsByIndex[_local6]] = true;
_local6++;
}
break;
case "default-actees" :
_local2.actees = acteesByIndex;
_local6 = 0;
while (_local6 < acteesByIndex.length) {
acteesById[id][acteesByIndex[_local6]] = true;
_local6++;
}
break;
case "default-locations" :
_local2.locations = locationsByIndex;
_local6 = 0;
while (_local6 < locationsByIndex.length) {
locationsById[id][locationsByIndex[_local6]] = true;
_local6++;
}
break;
case "default-props" :
_local2.props = propsByIndex;
_local6 = 0;
while (_local6 < propsByIndex.length) {
propsById[id][propsByIndex[_local6]] = true;
_local6++;
}
break;
case "text" :
if (!_local2.texts) {
_local2.texts = new Array();
}
_local2.texts.push(unescape(_local5[_local3].attributes.id));
}
_local3++;
}
propertiesById[id] = _local2;
}
return(propertiesById[id]);
}
function getProps(id) {
return(getPropertiesById(id).props.slice(0));
}
function getTexts(id) {
return(getPropertiesById(id).texts);
}
function getVersion() {
return(version);
}
function isAllowedActee(id, actee) {
return(acteesById[id][actee]);
}
function isAllowedActor(id, actor) {
return(actorsById[id][actor]);
}
function isAllowedLocation(id, location) {
return(locationsById[id][location]);
}
function isAllowedProp(id, prop) {
return(propsById[id][prop]);
}
function hasJointActors(scene) {
if (typeof(scene) == "string") {
scene = {clip:scene};
}
return(getPropertiesById(scene.clip).jointActors);
}
function getLinkage(param, scene) {
var _local2 = (param + "_") + scene[param];
if (hasJointActors(scene)) {
_local2 = (("actor_" + scene.actor) + "_") + scene.actee;
}
return(_local2);
}
}
Symbol 670 MovieClip [__Packages.Movie] Frame 0 (3.96 KiB) ●
class Movie extends XML
{
static var api;
var ignoreWhite, firstChild, parseXML, createElement, createTextNode;
function Movie (xml) {
super(xml);
ignoreWhite = true;
}
function getScenes() {
var _local9 = new Array();
var _local3 = firstChild.childNodes.slice(0);
if (_local3.length > 0) {
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = new Scene();
if (_local3[_local2].attributes.actee) {
_local4.actee = unescape(_local3[_local2].attributes.actee);
}
if (_local3[_local2].attributes.actor) {
_local4.actor = unescape(_local3[_local2].attributes.actor);
}
if (_local3[_local2].attributes.clip) {
_local4.clip = unescape(_local3[_local2].attributes.clip);
}
if (_local3[_local2].attributes.location) {
_local4.location = unescape(_local3[_local2].attributes.location);
}
if (_local3[_local2].attributes.prop) {
_local4.prop = unescape(_local3[_local2].attributes.prop);
}
if (_local3[_local2].childNodes.length > 0) {
var _local6 = 0;
while (_local6 < _local3[_local2].childNodes.length) {
var _local5 = _local3[_local2].childNodes[_local6];
if (!(_local5.nodeName === "text")) {
} else {
if (!_local4.text) {
_local4.text = new Object();
}
var _local7 = _local5.firstChild.nodeValue;
if (_local7) {
_local4.text[unescape(_local5.attributes.id)] = unescape(_local7);
}
}
_local6++;
}
}
if (_local3[_local2].attributes.duration) {
_local4.duration = int(_local3[_local2].attributes.duration);
}
var _local8 = int(_local3[_local2].attributes.index);
_local9[_local8] = _local4;
_local2++;
}
}
return(_local9);
}
function getVersion() {
if (firstChild.attributes.version != undefined) {
return(int(firstChild.attributes.version));
}
}
function setScenes(scenes) {
parseXML("<movie></movie>");
setVersion(api.getVersion());
var _local6 = 0;
while (_local6 < scenes.length) {
var _local2 = scenes[_local6];
var _local3 = createElement("scene");
_local3.attributes.clip = _local2.clip;
_local3.attributes.index = _local6;
if (_local2.actee != undefined) {
_local3.attributes.actee = _local2.actee;
}
if (_local2.actor != undefined) {
_local3.attributes.actor = _local2.actor;
}
if (_local2.location != undefined) {
_local3.attributes.location = _local2.location;
}
if (_local2.prop != undefined) {
_local3.attributes.prop = _local2.prop;
}
if (_local2.text != undefined) {
for (var _local8 in _local2.text) {
var _local5 = escape(_local2.text[_local8]);
var _local4 = createElement("text");
_local4.appendChild(createTextNode(_local5));
_local4.attributes.id = _local8;
_local3.appendChild(_local4);
}
}
_local3.attributes.duration = _local2.duration;
firstChild.appendChild(_local3);
_local6++;
}
}
function setVersion(n) {
if (n != undefined) {
firstChild.attributes.version = int(n);
}
}
function quicksort(nodes, compare) {
var qsort = function (a, l, r) {
var _local2 = l;
var _local1 = r;
var _local5;
var _local4 = a[int((l + r) / 2)];
do {
while (compare(a[_local2], _local4)) {
_local2++;
}
while (compare(_local4, a[_local1])) {
_local1--;
}
if (_local2 <= _local1) {
_local5 = a[_local2];
a[_local2++] = a[_local1];
a[_local1--] = _local5;
}
} while (_local2 <= _local1);
if (l < _local1) {
qsort(a, l, _local1);
}
if (_local2 < r) {
qsort(a, _local2, r);
}
};
qsort(nodes, 0, nodes.length - 1);
}
function byIndex(a, b) {
return(int(a.attributes.index) > int(b.attributes.index));
}
var xmlDecl = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
var contentType = "text/xml;charset=utf-8";
}
Symbol 671 MovieClip [__Packages.WordFilter] Frame 0 (1.22 KiB) ●
class WordFilter
{
var languages, delimiter, replacement, words;
function WordFilter (active_language) {
languages = new Array();
delimiter = ",";
replacement = "$!*#*&!?*#$*&*?!*#$*";
languages.en = new String("anus,asshole,bastard,bitch,blowjob,boner,browneye,bullshit,clit,cock,cum,cunnilingus,cunt,dildo,dumbass,fag,faggot,fuck,gonads,gook,nigger,penis,pussy,shit,slut,twat,vibrator,wanker,whore,fart");
languages.fr = new String("merde,putain,chier,zob,connard,pute,connasse,salope,salaud,fils de pute,fille de pute,chiotte,esgourde,roubignolle,couille,putasse,putassi\u00E9re,bordel,jacqueter,jaffer,baiser,niquer,enculer,encule,enfoire,foutre,tabarnac,crisse,calisse,estie,ciboire,st-vierge,sacrament,sacrement,enfoirer,emmerder,emmerde");
var _local2 = new String();
if (languages[active_language]) {
_local2 = languages[active_language].toLowerCase();
} else {
for (var _local3 in languages) {
_local2 = _local2 + (languages[_local3].toLowerCase() + delimiter);
}
_local2 = _local2.substring(0, _local2.length - 1);
}
words = _local2.split(delimiter);
}
function filterWordsSimple(input) {
return(input);
}
function filterWords(input) {
return(input);
}
}
Symbol 150 MovieClip [meanwhile] Frame 1 (8 B)
stop();
Symbol 173 MovieClip Frame 1 (8 B)
stop();
Symbol 193 MovieClip [menuItem] Frame 1 (66 B)
_parent._parent._parent.applyDropShadow(this.label_txt);
stop();
Symbol 193 MovieClip [menuItem] Frame 2 (47 B)
hl_mc._width = _parent._parent.bodyWidth + 12;
Symbol 251 MovieClip [earlier] Frame 1 (8 B)
stop();
Symbol 292 MovieClip [later] Frame 1 (8 B)
stop();
Symbol 435 MovieClip [libraryClip] Frame 1 (8 B)
stop();
Symbol 444 MovieClip Frame 1 (8 B)
stop();
Symbol 453 MovieClip Frame 1 (8 B)
stop();
Symbol 465 MovieClip [clip] Frame 1 (8 B)
stop();
Symbol 477 MovieClip Frame 1 (8 B)
stop();
Symbol 484 MovieClip Frame 1 (8 B)
stop();
Symbol 489 MovieClip Frame 1 (8 B)
stop();
Symbol 496 MovieClip Frame 1 (8 B)
stop();
Symbol 508 MovieClip Frame 1 (8 B)
stop();
Symbol 520 MovieClip Frame 1 (8 B)
stop();
Symbol 527 MovieClip Frame 1 (8 B)
stop();
Symbol 534 MovieClip Frame 1 (8 B)
stop();
Symbol 541 MovieClip Frame 1 (8 B)
stop();
Symbol 558 MovieClip Frame 1 (8 B)
stop();
Symbol 571 MovieClip Frame 1 (8 B)
stop();
Symbol 590 MovieClip Frame 1 (8 B)
stop();
Symbol 597 MovieClip Frame 1 (8 B)
stop();
Symbol 609 MovieClip Frame 1 (8 B)
stop();
Symbol 621 MovieClip Frame 1 (8 B)
stop();
Symbol 629 MovieClip Frame 1 (8 B)
stop();
Symbol 663 MovieClip Frame 1 (8 B)
stop();
Symbol 663 MovieClip Frame 19 (115 B)
label_txt.text = tip;
label_txt.autoSize = "center";
box_mc._width = (shadow_mc._width = label_txt._width + 10);
Symbol 663 MovieClip Frame 20 (31 B)
this._visible = true;
stop();