Frame 1
fontwidthratio = " `0.42`\u0421`0.60`\u0432`0.48`\u0435`0.54`\u043B`0.62`\u043E`0.57`\u0442`0.45`\u044F`0.49";
propertydata = "<PropertyData><Movie.Width>650</Movie.Width><Movie.Height>300</Movie.Height><Movie.ShowBorder>False</Movie.ShowBorder><Movie.ShowMenu>False</Movie.ShowMenu><Movie.BackMode>Gradient</Movie.BackMode><Movie.BackColor>#000000</Movie.BackColor><Movie.BackStartColor>#000000</Movie.BackStartColor><Movie.BackEndColor>#000000</Movie.BackEndColor><Movie.BackRotation>0</Movie.BackRotation><Movie.BackType>Radial</Movie.BackType><Movie.BackAlpha>100</Movie.BackAlpha><Movie.Text>\u0421\u0432\u044F\u0442\u043E\u0435 \u0421\u043B\u043E\u0432\u043E</Movie.Text><Text.EnterDelay>1</Text.EnterDelay><Text.LeaveDelay>1</Text.LeaveDelay><Movie.LetterDelay>10</Movie.LetterDelay><Movie.PageDelay>0</Movie.PageDelay><Movie.SyncLine>True</Movie.SyncLine><Movie.ReverseLetter>False</Movie.ReverseLetter><Movie.TextBold>True</Movie.TextBold><Movie.TextItalic>True</Movie.TextItalic><Movie.TextUnderline>False</Movie.TextUnderline><Movie.TextColor>#8b8b00</Movie.TextColor><Movie.TextAlpha>100</Movie.TextAlpha><Movie.TextSize>51</Movie.TextSize><Movie.TextRotation>0</Movie.TextRotation><Movie.TextHAlign>Center</Movie.TextHAlign><Movie.TextHOffset>0</Movie.TextHOffset><Movie.TextVAlign>Middle</Movie.TextVAlign><Movie.TextVOffset>0</Movie.TextVOffset><Movie.TextCharWidth>126</Movie.TextCharWidth><Movie.TextCharHeight>107</Movie.TextCharHeight><Movie.TextCharSpace>94</Movie.TextCharSpace><Movie.TextLineSpace>100</Movie.TextLineSpace><Movie.Loop>-1</Movie.Loop><Movie.EndNoLeave>False</Movie.EndNoLeave><Movie.ClosePlayer>False</Movie.ClosePlayer><Movie.ClickLinkUrl/><Movie.ClickLinkTarget/><Movie.ClickOnText>False</Movie.ClickOnText><Movie.EndLinkUrl/><Movie.EndLinkTarget/><Movie.SoundLoop>-1</Movie.SoundLoop></PropertyData>";
inXML = new XML(propertydata);
inXML.ignoreWhite = true;
outXML = new XML();
outXML.ignoreWhite = true;
outXMLLoaded = true;
if (xmldata != null) {
outXML.parseXML(xmldata);
} else if (xmlfile != null) {
outXMLLoaded = false;
outXML.load(xmlfile);
outXML.onLoad = function (success) {
outXMLLoaded = true;
};
}
Frame 2
if (outXMLLoaded) {
gotoAndPlay(_currentframe + 2);
}
Frame 3
gotoAndPlay(_currentframe - 1);
Frame 4
_global.param = new Array();
var i = 0;
while (i < inXML.childNodes[0].childNodes.length) {
node = inXML.childNodes[0].childNodes[i];
param[node.nodeName] = node.childNodes[0].nodeValue;
i++;
}
var i = 0;
while (i < outXML.childNodes[0].childNodes.length) {
node = outXML.childNodes[0].childNodes[i];
param[node.nodeName] = node.childNodes[0].nodeValue;
i++;
}
param["Movie.Width"] = parseInt(param["Movie.Width"]);
param["Movie.Height"] = parseInt(param["Movie.Height"]);
param["Movie.BackMode"] = param["Movie.BackMode"].toLowerCase();
param["Movie.BackColor"] = parseInt("0x" + param["Movie.BackColor"].substring(1));
param["Movie.BackStartColor"] = parseInt("0x" + param["Movie.BackStartColor"].substring(1));
param["Movie.BackEndColor"] = parseInt("0x" + param["Movie.BackEndColor"].substring(1));
param["Movie.BackType"] = param["Movie.BackType"].toLowerCase();
param["Movie.BackRotation"] = parseInt(param["Movie.BackRotation"]);
param["Movie.BackAlpha"] = parseInt(param["Movie.BackAlpha"]);
param["Movie.Loop"] = parseInt(param["Movie.Loop"]);
param["Movie.EndNoLeave"] = param["Movie.EndNoLeave"].toLowerCase() == "true";
param["Movie.ClosePlayer"] = param["Movie.ClosePlayer"].toLowerCase() == "true";
param["Movie.SoundLoop"] = parseInt(param["Movie.SoundLoop"]);
param["Movie.TextBold"] = param["Movie.TextBold"].toLowerCase() == "true";
param["Movie.TextItalic"] = param["Movie.TextItalic"].toLowerCase() == "true";
param["Movie.TextUnderline"] = param["Movie.TextUnderline"].toLowerCase() == "true";
param["Movie.TextSize"] = parseInt(param["Movie.TextSize"]);
param["Movie.TextColor"] = parseInt("0x" + param["Movie.TextColor"].substring(1));
param["Movie.TextAlpha"] = parseInt(param["Movie.TextAlpha"]);
param["Movie.TextHAlign"] = param["Movie.TextHAlign"].toLowerCase();
param["Movie.TextVAlign"] = param["Movie.TextVAlign"].toLowerCase();
param["Movie.TextHOffset"] = parseInt(param["Movie.TextHOffset"]);
param["Movie.TextVOffset"] = parseInt(param["Movie.TextVOffset"]);
param["Movie.TextRotation"] = parseInt(param["Movie.TextRotation"]);
param["Movie.TextCharWidth"] = parseInt(param["Movie.TextCharWidth"]);
param["Movie.TextCharHeight"] = parseInt(param["Movie.TextCharHeight"]);
param["Movie.TextCharSpace"] = parseInt(param["Movie.TextCharSpace"]);
param["Movie.TextLineSpace"] = parseInt(param["Movie.TextLineSpace"]);
param["Movie.ClickOnText"] = param["Movie.ClickOnText"].toLowerCase() == "true";
param["Movie.ShowBorder"] = param["Movie.ShowBorder"].toLowerCase() == "true";
param["Movie.ShowMenu"] = param["Movie.ShowMenu"].toLowerCase() == "true";
param["Movie.LetterDelay"] = parseInt(param["Movie.LetterDelay"]);
param["Movie.PageDelay"] = parseInt(param["Movie.PageDelay"]);
param["Movie.SyncLine"] = param["Movie.SyncLine"].toLowerCase() == "true";
param["Movie.ReverseLetter"] = param["Movie.ReverseLetter"].toLowerCase() == "true";
param["Text.EnterDelay"] = parseInt(param["Text.EnterDelay"]);
param["Text.LeaveDelay"] = parseInt(param["Text.LeaveDelay"]);
if (clickTAG != null) {
param["Movie.ClickLinkUrl"] = clickTAG;
}
_global.ratiotable = fontwidthratio.split("`");
Stage.scaleMode = "exactfit";
Stage.showMenu = param["Movie.ShowMenu"];
createEmptyMovieClip("background", 1);
with (background) {
if (param["Movie.BackMode"] == "pure") {
beginFill(param["Movie.BackColor"]);
moveto(0, 0);
lineto(0, param["Movie.Height"]);
lineto(param["Movie.Width"], param["Movie.Height"]);
lineto(param["Movie.Width"], 0);
lineto(0, 0);
endFill();
} else if (param["Movie.BackMode"] == "gradient") {
colors = [param["Movie.BackStartColor"], param["Movie.BackEndColor"]];
alphas = [100, 100];
ratios = [0, 255];
if (param["Movie.BackType"] == "linear") {
matrix = {matrixType:"box", x:0, y:0, w:param["Movie.Width"], h:param["Movie.Height"], r:(Number(param["Movie.BackRotation"]) / 180) * Math.PI};
beginGradientFill("linear", colors, alphas, ratios, matrix);
} else if (param["Movie.BackType"] == "radial") {
matrix = {matrixType:"box", x:-0.5 * param["Movie.Width"], y:-0.5 * param["Movie.Height"], w:2 * param["Movie.Width"], h:2 * param["Movie.Height"], r:0};
beginGradientFill("radial", colors, alphas, ratios, matrix);
}
moveto(0, 0);
lineto(0, param["Movie.Height"]);
lineto(param["Movie.Width"], param["Movie.Height"]);
lineto(param["Movie.Width"], 0);
lineto(0, 0);
endFill();
} else if (param["Movie.BackMode"] == "image") {
attachMovie("backimage", "backimage", 1);
backimage._x = 0;
backimage._y = 0;
}
}
if ((param["Movie.ClickLinkUrl"] != null) && (!param["Movie.ClickOnText"])) {
background.onPress = function () {
getURL (param["Movie.ClickLinkUrl"], param["Movie.ClickLinkTarget"]);
};
}
attachMovie("backeffect", "bg", 2);
bg._alpha = param["Movie.BackAlpha"];
attachMovie("canvas", "canvas", 3);
canvas._alpha = param["Movie.TextAlpha"];
canvas._rotation = param["Movie.TextRotation"];
if ((param["Movie.ClickLinkUrl"] != null) && (param["Movie.ClickOnText"])) {
canvas.onPress = function () {
getURL (param["Movie.ClickLinkUrl"], param["Movie.ClickLinkTarget"]);
};
}
if (param["Movie.DemoLinkUrl"] != null) {
attachMovie("demo", "demo", 4);
demo._x = 2;
demo._y = 2;
demo.onPress = function () {
getURL (param["Movie.DemoLinkUrl"]);
};
}
if (param["Movie.ShowBorder"]) {
createEmptyMovieClip("box", 5);
with (box) {
lineStyle(0, 0);
moveto(0, 0);
lineto(0, param["Movie.Height"] - 1);
lineto(param["Movie.Width"] - 1, param["Movie.Height"] - 1);
lineto(param["Movie.Width"] - 1, 0);
lineto(0, 0);
}
}
globalsound = new Sound();
globalsound.attachSound("sound");
globalsound.start();
globalsound.onSoundComplete = function () {
if (param["Movie.SoundLoop"] != -1) {
param["Movie.SoundLoop"]--;
}
if (param["Movie.SoundLoop"] != 0) {
globalsound.start();
}
};
createEmptyMovieClip("mask", 6);
mask.beginFill(16777215);
mask.moveto(0, 0);
mask.lineto(0, param["Movie.Height"]);
mask.lineto(param["Movie.Width"], param["Movie.Height"]);
mask.lineto(param["Movie.Width"], 0);
mask.lineto(0, 0);
mask.endFill();
setMask(mask);
Frame 6
gotoAndPlay(_currentframe - 1);
Symbol 4 MovieClip [letter] Frame 1
textFormat = new TextFormat();
textFormat.bold = param["Movie.TextBold"];
textFormat.italic = param["Movie.TextItalic"];
textFormat.underline = param["Movie.TextUnderline"];
textFormat.color = param["Movie.TextColor"];
char_txt.setTextFormat(textFormat);
stop();
Symbol 8 MovieClip [texteffect] Frame 1
propertydefine = "<PropertyDefine><property name=\"Text.EnterDelay\" hint=\"Delay between two letter animations when entering stage\" type=\"integer\" min=\"0\" max=\"100\" default=\"5\"/><property name=\"Text.LeaveDelay\" hint=\"Delay between two letter animations when leaving stage\" type=\"integer\" min=\"0\" max=\"100\" default=\"1\"/></PropertyDefine>";
var char;
letter.char = char;
Symbol 8 MovieClip [texteffect] Frame 31
_global.numStarted++;
stop();
Symbol 8 MovieClip [texteffect] Frame 101
_global.numLeaved++;
stop();
Symbol 1 MovieClip [canvas] Frame 1
wholeText = param["Movie.Text"].split("`");
attachMovie("letter", "letter", 0);
this.letter._visible = false;
textFormat = letter.char_txt.getTextFormat();
charWidth = ((((this.letter.char_txt._width * param["Movie.TextSize"]) / 10) * 0.65) * param["Movie.TextCharWidth"]) / 100;
lineHeight = ((((this.letter.char_txt._height * param["Movie.TextSize"]) / 10) * 0.65) * param["Movie.TextCharHeight"]) / 100;
charSpace = ((param["Movie.TextCharSpace"] - 100) * charWidth) / 100;
lineSpace = ((param["Movie.TextLineSpace"] - 100) * lineHeight) / 100;
_global.playMode = 0;
attachMovie("texteffect", "texteffect", 1);
this.texteffect._visible = false;
Symbol 1 MovieClip [canvas] Frame 2
removeMovieClip("letter");
removeMovieClip("texteffect");
Symbol 1 MovieClip [canvas] Frame 3
if (param["Movie.Loop"] == 0) {
stop();
if (param["Movie.EndLinkUrl"] != null) {
getURL (param["Movie.EndLinkUrl"], param["Movie.EndLinkTarget"]);
}
if (param["Movie.ClosePlayer"]) {
fscommand ("quit");
}
} else {
if (param["Movie.Loop"] != -1) {
param["Movie.Loop"]--;
}
curPara = 0;
}
Symbol 1 MovieClip [canvas] Frame 4
if (curPara == wholeText.Length) {
gotoAndPlay (3);
} else {
paraText = wholeText[curPara].split("\r\n");
curPara++;
}
Symbol 1 MovieClip [canvas] Frame 5
function GetWidthRatio(char) {
index = 0;
while (index < ratiotable.length) {
if (ratiotable[index] == char) {
return(parseFloat(ratiotable[index + 1]));
}
index = index + 2;
}
size1 = textFormat.getTextExtent("W");
size2 = textFormat.getTextExtent(char);
return(size2.width / size1.width);
}
_global.numEffect = 0;
_global.numStarted = 0;
_global.numLeaved = 0;
enterDelay = new Array();
leaveDelay = new Array();
xEffect = new Array();
yEffect = new Array();
textEffect = new Array();
curLine = 0;
curChar = 0;
curEnterDelay = 0;
curLeaveDelay = 0;
sumEnterDelay = 0;
sumLeaveDelay = 0;
while (curLine < paraText.Length) {
if ((curChar == 0) && (curLine == 0)) {
textHeight = (paraText.Length * lineHeight) + ((paraText.Length - 1) * lineSpace);
switch (param["Movie.TextVAlign"]) {
case "top" :
textTop = 0;
break;
case "middle" :
textTop = (param["Movie.Height"] - textHeight) / 2;
break;
case "bottom" :
textTop = param["Movie.Height"] - textHeight;
}
lineTop = (textTop + param["Movie.TextVOffset"]) + (lineHeight / 2);
}
if (curChar == 0) {
switch (_global.playMode) {
case 0 :
lineWidth = (paraText[curLine].Length - 1) * charSpace;
i = 0;
while (i < paraText[curLine].Length) {
lineWidth = lineWidth + (GetWidthRatio(paraText[curLine].substr(i, 1)) * charWidth);
i++;
}
break;
case 1 :
lineWidth = charWidth;
}
switch (param["Movie.TextHAlign"]) {
case "left" :
lineLeft = 0;
break;
case "center" :
lineLeft = (param["Movie.Width"] - lineWidth) / 2;
break;
case "right" :
lineLeft = param["Movie.Width"] - lineWidth;
}
charLeft = (lineLeft + param["Movie.TextHOffset"]) + (charWidth / 2);
if (param["Movie.ReverseLetter"]) {
sumEnterDelay = (2 * curEnterDelay) + ((paraText[curLine].Length - 1) * param["Text.EnterDelay"]);
sumLeaveDelay = (2 * curLeaveDelay) + ((paraText[curLine].Length - 1) * param["Text.LeaveDelay"]);
}
}
if (curChar < paraText[curLine].Length) {
if (param["Movie.ReverseLetter"]) {
cLetter = paraText[curLine].substr((paraText[curLine].Length - curChar) - 1, 1);
} else {
cLetter = paraText[curLine].substr(curChar, 1);
}
widthRatio = GetWidthRatio(cLetter);
if (cLetter != " ") {
_global.numEffect++;
if (param["Movie.ReverseLetter"]) {
enterDelay[_global.numEffect] = sumEnterDelay - curEnterDelay;
leaveDelay[_global.numEffect] = sumLeaveDelay - curLeaveDelay;
} else {
enterDelay[_global.numEffect] = curEnterDelay;
leaveDelay[_global.numEffect] = curLeaveDelay;
}
xEffect[_global.numEffect] = charLeft - (((1 - widthRatio) * charWidth) / 2);
yEffect[_global.numEffect] = lineTop;
textEffect[_global.numEffect] = cLetter;
}
switch (_global.playMode) {
case 0 :
charLeft = charLeft + ((charWidth * widthRatio) + charSpace);
break;
case 1 :
}
curChar++;
curEnterDelay = curEnterDelay + param["Text.EnterDelay"];
curLeaveDelay = curLeaveDelay + param["Text.LeaveDelay"];
}
if (curChar == paraText[curLine].Length) {
if (param["Movie.SyncLine"]) {
curEnterDelay = 0;
curLeaveDelay = 0;
} else {
curEnterDelay = curEnterDelay + param["Text.EnterDelay"];
curLeaveDelay = curLeaveDelay + param["Text.LeaveDelay"];
}
curChar = 0;
curLine++;
lineTop = lineTop + (lineHeight + lineSpace);
}
}
Symbol 1 MovieClip [canvas] Frame 6
i = 1;
while (i <= _global.numEffect) {
if (enterDelay[i] == 0) {
attachMovie("texteffect", "char" + i, i);
this["char" + i]._x = xEffect[i];
this["char" + i]._y = yEffect[i];
this["char" + i]._width = (((this["char" + i]._width * param["Movie.TextSize"]) / 10) * param["Movie.TextCharWidth"]) / 100;
this["char" + i]._height = (((this["char" + i]._height * param["Movie.TextSize"]) / 10) * param["Movie.TextCharHeight"]) / 100;
this["char" + i].char = textEffect[i];
enterDelay[i] = -1;
} else if (enterDelay[i] > 0) {
enterDelay[i]--;
}
i++;
}
if (_global.numStarted == _global.numEffect) {
timePlay = param["Movie.LetterDelay"];
gotoAndPlay(_currentframe + 2);
}
Symbol 1 MovieClip [canvas] Frame 7
gotoAndPlay(_currentframe - 1);
Symbol 1 MovieClip [canvas] Frame 8
if ((timePlay--) == 0) {
gotoAndPlay(_currentframe + 2);
}
Symbol 1 MovieClip [canvas] Frame 9
gotoAndPlay(_currentframe - 1);
Symbol 1 MovieClip [canvas] Frame 10
if ((param["Movie.EndNoLeave"] && (param["Movie.Loop"] == 0)) && (curPara == wholeText.Length)) {
gotoAndPlay (3);
} else {
i = 1;
while (i <= _global.numEffect) {
if (leaveDelay[i] == 0) {
this["char" + i].gotoAndPlay(100);
leaveDelay[i] = -1;
} else if (leaveDelay[i] > 0) {
leaveDelay[i]--;
}
i++;
}
if (_global.numLeaved == _global.numEffect) {
i = 1;
while (i <= _global.numEffect) {
removeMovieClip("char" + i);
i++;
}
timePlay = param["Movie.PageDelay"];
gotoAndPlay(_currentframe + 2);
}
}
Symbol 1 MovieClip [canvas] Frame 11
gotoAndPlay(_currentframe - 1);
Symbol 1 MovieClip [canvas] Frame 12
if ((timePlay--) == 0) {
gotoAndPlay (4);
}
Symbol 1 MovieClip [canvas] Frame 13
gotoAndPlay(_currentframe - 1);