Frame 1
function db(str) {
fscommand ("db", str);
}
function funcList(propName, oldVal, newVal) {
switch (newVal) {
case "avatarPutAvatar" :
avatarPutAvatar();
break;
case "avatarSize" :
avatarSize();
break;
case "avatarDynamicMood" :
avatarDynamicMood();
break;
}
YMSGR.Exec = "";
return(undefined);
}
function avatarPutAvatar() {
loadNewAvatar();
var _local1 = 1;
if (YMSGR.zoom == null) {
_local1 = 0;
}
if (_local1) {
zoomAvatar(YMSGR.zoom);
Stage.scaleMode = "exactFit";
} else {
Stage.scaleMode = "noScale";
Stage.align = "TL";
avatar._xscale = (avatar._yscale = 100);
avatar._x = 0;
avatar._y = 0;
}
avatarSize();
}
function zoomAvatar(factor) {
var _local1 = factor.split(",");
var _local3 = 0;
var _local2 = 0;
avatarZoom = 100;
if (_local1[0] != null) {
_local3 = parseInt(_local1[0]);
}
if (_local1[1] != null) {
_local2 = parseInt(_local1[1]);
}
if (_local1[2] != null) {
avatarZoom = parseInt(_local1[2]);
}
if (avatarZoom == 100) {
_local2 = 0;
_local3 = _local2;
}
avatar._xscale = (avatar._yscale = avatarZoom);
avatar._x = _local3;
avatar._y = _local2;
YMSGR.zoom = null;
}
function loadNewAvatar() {
_root.avatar.createEmptyMovieClip("avatar_0", 0);
unloadMovie ("avatar/avatar_0");
loadMovie (YMSGR.file, "avatar/avatar_0");
resetAvatar();
}
function resetAvatar() {
avatar._xscale = (avatar._yscale = 100);
}
function avatarSize() {
return(false);
}
function avatarDynamicMood() {
var _local1 = getMoodFromText(YMSGR.text);
if (_local1 != null) {
YMSGR.curMood = _local1;
if (YMSGR.dbfaces) {
setMoodFace(YMSGR.curMood);
}
eControl.gotoAndPlay("active");
}
}
function setMoodFace(md) {
faces.gotoAndPlay(md);
avatar.avatar_0.setMood(md);
}
function showMood() {
mood = YMSGR.curMood;
}
function hideMood() {
mood = "";
}
function showPath() {
mood = YMSGR.file;
}
function hidePath() {
mood = "";
}
function showZoom() {
mood = YMSGR.zoom;
}
function hideZoom() {
mood = "";
}
function getMoodFromText(txt) {
var returner = null;
var idx = -1;
for (var nm in emotions.names) {
var _local2 = emotions.names[nm];
if (typeof(emotions[_local2]) == "object") {
for (var j in emotions[_local2]) {
var _local3 = emotions[_local2][j];
var _local1 = txt.toLowerCase().lastIndexOf(_local3);
if (((_local1 != null) && (_local1 >= 0)) && (_local1 > idx)) {
returner = _local2;
idx = _local1;
}
}
}
}
return(returner);
}
var target = avatar;
YMSGR._visible = false;
YMSGR.watch("Exec", funcList);
stop();
var emotions = new Object();
emotions.names = ["a", "b", "c", "d", "e"];
emotions.a = ["(*)"];
emotions.b = [":)", "-)", ";)", ";-)", ";;)", ":x", ":-x", ":\">", ":p", ":-p", ":*", ":-*", ":>", ":->", "=d>", ":@)", "3:-o", "3:-0", ":(|)", "~:>", "@};-", "&&-", "~o)", "*-:)", ">-)", "<):)", ":-\"", ":)>-", "happy", "nice"];
emotions.c = [":d", ":-d", ">:)", ":))", ":-))", "8-}", "=p~", "=:)", "$-)", ":^o", "\\:d/", ">:d<", "excited", "hehe", "haha", "lol", "rotf", "wow", "misha"];
emotions.d = [":(", ":((", ":-s", ":((", ":-((", "boo hoo"];
emotions.e = ["x(", "x-(", ":-l", "angry", "grr", "hmmph"];
Symbol 4 MovieClip Frame 1
var text = "default text";
var size = "1";
var curMood = "a";
Symbol 6 MovieClip Frame 1
_root.faceObj.gotoAndPlay(1);
stop();
Symbol 6 MovieClip Frame 10
var f = 1;
switch (_root.YMSGR.curMood) {
case "a" :
f = 10;
break;
case "b" :
f = 20;
break;
case "c" :
f = 30;
break;
case "d" :
f = 40;
break;
case "e" :
f = 50;
break;
}
_root.faceObj.gotoAndPlay(f);