//Frame 0 // Action tag #0 function Tweener(_mc) { _mc.toTarget = toTarget; } function toTarget(x, y) { this.i_targetX = x; this.i_targetY = y; clipRef.f_toCall = func; this.onEnterFrame = function () { this._x = this._x + (this.i_targetX - this._x) * i_friction; this._y = this._y + (this.i_targetY - this._y) * i_friction; if (Math.abs(this._x - this.i_targetX) < 0.5 && Math.abs(this._y - this.i_targetY) < 0.5) { this._x = this.i_targetX; this._y = this.i_targetY; if (this.f_toCall != undefined && this.f_toCall != null) { this.f_toCall(); delete this.f_toCall; } delete this.onEnterFrame; } } ; } function DropDownAboutMe(clipRef, _options, _displayVar, _StyleTextColor, _StyleBtnColor, _StyleBgColor, i_defIValue) { clipRef.currentI = i_defIValue == undefined ? 0 : i_defIValue; clipRef.options = _options; clipRef.displayVar = _displayVar; clipRef.StyleTextColor = _StyleTextColor; new Tweener(clipRef.boxCon); changeColor(_StyleTextColor, _StyleBtnColor, _StyleBgColor, clipRef); clipRef.id = _options[clipRef.currentI].id; clipRef.currentItem.text = _displayVar == undefined ? _options[clipRef.currentI].stripIntities() : _options[clipRef.currentI][_displayVar].stripIntities(); clipRef.currentItem.textColor = _StyleTextColor; makeList(clipRef); clipRef.f_changeColor = changeColor; clipRef.f_getID = function () { return this.a_entry[0].id; } ; clipRef.bg.onRelease = function () { toggleDropDown(this); } ; clipRef.boxCon.bg.onRelease = function () { } ; clipRef.boxCon.bg.useHandCursor = false; dropDownClose(clipRef); } function toggleDropDown(clipRef) { if (m_lastExpanded != clipRef && m_lastExpanded.expanded) { toggleDropDown(m_lastExpanded); } if (clipRef.expanded == true) { clipRef._parent.boxCon.toTarget(null, -122); } else { m_lastExpanded = clipRef; clipRef._parent.boxCon.toTarget(null, 27); } clipRef._parent.btnDown._visible = clipRef.expanded; clipRef.expanded = !clipRef.expanded; } function dropDownClose(clipRef) { clipRef.boxCon.toTarget(null, -122); clipRef.bg.expanded = false; clipRef.btnDown._visible = true; } function selectOption(i, clipRef, s_id) { var __reg2 = clipRef.boxCon.m_contentHolder.con; __reg2["item" + clipRef.currentI].selected._visible = false; clipRef.currentI = i; clipRef.id = s_id; __reg2["item" + clipRef.currentI].selected._visible = true; clipRef.currentItem.text = clipRef.displayVar == undefined ? clipRef.options[clipRef.currentI].stripIntities() : clipRef.options[clipRef.currentI][clipRef.displayVar].stripIntities(); clipRef.currentItem.textColor = clipRef.StyleTextColor; f_qSelected(clipRef); } function makeList(clipRef) { var __reg5 = clipRef.boxCon; var __reg4 = __reg5.m_contentHolder.createEmptyMovieClip("con", 0); var i = 0; while (i < clipRef.options.length) { __reg4.attachMovie("dropDown_item", "item" + i, i); var __reg2 = __reg4["item" + i]; var __reg3 = clipRef.options[i]; __reg2._y = i * 28; __reg2.i = i; __reg2.title.text = clipRef.displayVar == undefined ? __reg3.stripIntities() : __reg3[clipRef.displayVar].stripIntities(); trace(__reg2.title.text.stripIntities()); __reg2.id = __reg3.id; __reg2.title.textColor = clipRef.StyleTextColor; __reg2.onRelease = function () { selectOption(this.i, clipRef, this.id); dropDownClose(clipRef); } ; if (clipRef.currentI == i) { __reg2.selected._visible = true; } else { __reg2.selected._visible = false; } ++i; } f_contentLoaded(__reg5.m_contentHolder); } function changeColor(_StyleTextColor, _StyleBtnColor, _StyleBgColor, clipRef) { clipRef.StyleTextColor = _StyleTextColor; clipRef.StyleBtnColor = _StyleBtnColor; clipRef.StyleBgColor = _StyleBgColor; setColor(clipRef.btnDown.bg, clipRef.StyleBtnColor); setColor(clipRef.btnUp.bg, clipRef.StyleBtnColor); setColor(clipRef.bg, clipRef.StyleBgColor); setColor(clipRef.boxCon.bg, clipRef.StyleBgColor); setColor(clipRef.boxCon.scrollbarBg, clipRef.StyleBtnColor); } function setColor(target, hex) { if (hex.indexOf("#") == 0) { hex = hex.split("#").join("0x"); } else if (hex.indexOf("0x") != 0) { hex = "0x" + hex; } var __reg2 = new Color(target); __reg2.setRGB(hex); } String.prototype.stripIntities = function () { var __reg2 = this; __reg2 = __reg2.split("<").join("<"); __reg2 = __reg2.split(">").join(">"); __reg2 = __reg2.split("'").join("\""); __reg2 = __reg2.split(""").join("\""); __reg2 = __reg2.split("\r").join(""); __reg2 = __reg2.split("/n").join("\n"); __reg2 = __reg2.split("\\n").join("\n"); __reg2 = __reg2.split("™").join("™"); return __reg2; } ; f_contentLoaded = function (m_clipRef) { delete m_clipRef.m_path; m_clipRef.setMask(m_clipRef._parent.m_mask); if (m_clipRef._parent.m_borderBounds._height < m_clipRef._height) { var __reg2 = undefined; m_clipRef._parent.m_scrollBar.i_targetAlpha = 100; m_clipRef._parent.m_scrollBar.onEnterFrame = f_alphaToTarget; __reg2 = m_clipRef._parent.m_borderBounds._height / m_clipRef._height * 100; m_clipRef._parent.m_scrollBar._yscale = __reg2; m_clipRef._parent.m_scrollBar.m_scrollBarTop._yscale = 100 / (__reg2 / 100); m_clipRef._parent.m_scrollBar.m_scrollBarBottom._yscale = 100 / (__reg2 / 100); m_clipRef._parent.m_scrollBar.m_scrollBarMiddle._y = m_clipRef._parent.m_scrollBar.m_scrollBarTop._y + m_clipRef._parent.m_scrollBar.m_scrollBarTop._height; m_clipRef._parent.m_scrollBar.m_scrollBarMiddle._height = m_clipRef._parent.m_scrollBar.m_scrollBarBottom._y - m_clipRef._parent.m_scrollBar.m_scrollBarTop._y - m_clipRef._parent.m_scrollBar.m_scrollBarTop._height * 2; m_clipRef._parent.m_scrollBar.onPress = f_scrollBarPress; m_clipRef._parent.m_scrollBar.onRelease = m_clipRef._parent.m_scrollBar.onReleaseOutside = f_scrollBarRelease; if (m_clipRef._parent.m_scrollBar.i_defY == undefined) { m_clipRef._parent.m_scrollBar.i_defY = m_clipRef._parent.m_scrollBar._y; } if (m_clipRef._parent.m_scrollBar._y + m_clipRef._parent.m_scrollBar._height > m_clipRef._parent.m_borderBounds._height) { m_clipRef._parent.m_scrollBar._y = m_clipRef._parent.m_borderBounds._height - m_clipRef._parent.m_scrollBar._height; m_clipRef._parent.m_scrollBar.f_scroll = f_scroll; m_clipRef._parent.m_scrollBar.f_scroll(); } m_clipRef._parent.m_scrollBar.enabled = true; return; } m_clipRef._parent.m_scrollBar.enabled = false; m_clipRef._parent.m_scrollBar.i_targetAlpha = 0; m_clipRef._parent.m_scrollBar.f_toCall = f_moveScrollBarToStart; m_clipRef._parent.m_scrollBar.onEnterFrame = f_alphaToTarget; m_clipRef.i_targetX = 0; m_clipRef.i_targetY = 0; m_clipRef.onEnterFrame = f_slideToTargets; } ; f_moveScrollBarToStart = function () { this._y = this.i_defY; } ; f_scrollBarPress = function () { this.onEnterFrame = f_scroll; this.startDrag(0, this._x, this.i_defY, this._x, this._parent.m_borderBounds._height - this._height); } ; f_scrollBarRelease = function () { delete (this.onEnterFrame); stopDrag(); } ; f_scroll = function () { var __reg2 = undefined; __reg2 = (this._y - this.i_defY) / (this._parent.m_borderBounds._height - this.i_defY - this._height) * 100; this._parent.m_contentHolder.i_targetX = 0; this._parent.m_contentHolder.i_targetY = 0 - (this._parent.m_contentHolder._height - this._parent.m_borderBounds._height) / 100 * __reg2; this._parent.m_contentHolder.onEnterFrame = f_slideToTargets; } ; f_slideToTargets = function () { this._x = this._x + (this.i_targetX - this._x) * i_friction; this._y = this._y + (this.i_targetY - this._y) * i_friction; if (Math.abs(this._x - this.i_targetX) < 0.5 && Math.abs(this._y - this.i_targetY) < 0.5) { this._x = this.i_targetX; this._y = this.i_targetY; if (this.f_toCall != undefined) { this.f_toCall(); delete (this.f_toCall); } delete (this.onEnterFrame); } } ; f_alphaToTarget = function () { this._alpha = this._alpha + (this.i_targetAlpha - this._alpha) * i_friction; if (Math.abs(this._alpha - this.i_targetAlpha) < 2) { this._alpha = this.i_targetAlpha; if (this.f_toCall != undefined) { this.f_toCall(); delete (this.f_toCall); } delete (this.onEnterFrame); } } ; f_stripAdminQuestions = function () { var __reg1 = undefined; var __reg2 = undefined; m_globalPath.a_adminQuestions = new Array(); __reg1 = 0; while (__reg1 < m_globalPath.o_editorial.editorial.questions.question.length) { if (m_globalPath.o_editorial.editorial.questions.question[__reg1].mandatory == "True") { m_globalPath.a_adminQuestions.push(m_globalPath.o_editorial.editorial.questions.question[__reg1]); } ++__reg1; } __reg1 = m_globalPath.o_editorial.editorial.questions.question.length - 1; for (;;) { if (__reg1 < 0) { return; } if (m_globalPath.o_editorial.editorial.questions.question[__reg1].mandatory == "True") { m_globalPath.o_editorial.editorial.questions.question.splice(__reg1, 1); } --__reg1; } } ; f_fillAdminDropDowns = function () { var __reg1 = undefined; t_q_4.text = m_globalPath.o_text.text.question._value + " 5"; t_a_4.text = m_globalPath.o_text.text.answer._value; t_q_5.text = m_globalPath.o_text.text.question._value + " 6"; t_a_5.text = m_globalPath.o_text.text.answer._value; new DropDownAboutMe(m_q_4, m_globalPath.a_adminQuestions, "text", s_txtColor, s_btnColor, s_bgAdminColor); new DropDownAboutMe(m_q_5, m_globalPath.a_adminQuestions, "text", s_txtColor, s_btnColor, s_bgAdminColor); if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[0].question) { __reg1 = 0; while (__reg1 < m_globalPath.a_adminQuestions[0].answer.length) { if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[4].answer == m_globalPath.a_adminQuestions[0].answer[__reg1].id) { new DropDownAboutMe(m_a_4, m_globalPath.a_adminQuestions[0].answer, "text", s_txtColor, s_btnColor, s_bgColor, __reg1); break; } ++__reg1; } __reg1 = 0; while (__reg1 < m_globalPath.a_adminQuestions[0].answer.length) { if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[5].answer == m_globalPath.a_adminQuestions[1].answer[__reg1].id) { new DropDownAboutMe(m_a_5, m_globalPath.a_adminQuestions[1].answer, "text", s_txtColor, s_btnColor, s_bgColor, __reg1); break; } ++__reg1; } } else { new DropDownAboutMe(m_a_4, m_globalPath.a_adminQuestions[0].answer, "text", s_txtColor, s_btnColor, s_bgColor); new DropDownAboutMe(m_a_5, m_globalPath.a_adminQuestions[1].answer, "text", s_txtColor, s_btnColor, s_bgColor); } m_q_5.boxCon.m_contentHolder.con.item1.onRelease(); m_q_4.btnDown._visible = false; m_q_4.btnUp._visible = false; m_q_5.btnDown._visible = false; m_q_5.btnUp._visible = false; m_q_4.bg.enabled = false; m_q_5.bg.enabled = false; } ; f_fillDropDowns = function () { var __reg5 = undefined; var __reg2 = undefined; var __reg3 = undefined; var __reg4 = undefined; __reg5 = new Array(); if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[0].question) { __reg2 = 0; while (__reg2 < 4) { this["t_q_" + __reg2].text = m_globalPath.o_text.text.question._value + " " + (__reg2 + 1); this["t_a_" + __reg2].text = m_globalPath.o_text.text.answer._value; __reg3 = 0; while (__reg3 < m_globalPath.o_editorial.editorial.questions.question.length) { if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question == m_globalPath.o_editorial.editorial.questions.question[__reg3].id) { __reg5.push([__reg2, __reg3]); break; } ++__reg3; } __reg4 = 0; while (__reg4 < m_globalPath.o_editorial.editorial.questions.question[__reg3].answer.length) { if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].answer == m_globalPath.o_editorial.editorial.questions.question[__reg3].answer[__reg4].id) { break; } ++__reg4; } new DropDownAboutMe(this["m_q_" + __reg2], m_globalPath.o_editorial.editorial.questions.question, "text", s_txtColor, s_btnColor, s_bgColor, __reg3); new DropDownAboutMe(this["m_a_" + __reg2], m_globalPath.o_editorial.editorial.questions.question[__reg3].answer, "text", s_txtColor, s_btnColor, s_bgColor, __reg4); ++__reg2; } __reg5.sort(f_sort, Array.DESCENDING); __reg2 = 0; while (__reg2 < 4) { trace("Removing " + __reg5[__reg2][1]); this["m_q_" + __reg5[__reg2][0]].a_entry = m_globalPath.o_editorial.editorial.questions.question.splice(__reg5[__reg2][1], 1); ++__reg2; } } else { __reg2 = 0; while (__reg2 < 4) { this["t_q_" + __reg2].text = m_globalPath.o_text.text.question._value + " " + (__reg2 + 1); this["t_a_" + __reg2].text = m_globalPath.o_text.text.answer._value; new DropDownAboutMe(this["m_q_" + __reg2], m_globalPath.o_editorial.editorial.questions.question, "text", s_txtColor, s_btnColor, s_bgColor, __reg2); new DropDownAboutMe(this["m_a_" + __reg2], m_globalPath.o_editorial.editorial.questions.question[__reg2].answer, "text", s_txtColor, s_btnColor, s_bgColor); ++__reg2; } __reg2 = 0; while (__reg2 < 4) { this["m_q_" + __reg2].a_entry = m_globalPath.o_editorial.editorial.questions.question.splice(0, 1); ++__reg2; } } f_remakeLists(); } ; f_sort = function (a, b) { if (a[1] < b[1]) { return -1; } if (a[1] > b[1]) { return 1; } return 0; } ; f_remakeLists = function () { var __reg2 = undefined; __reg2 = 0; for (;;) { if (__reg2 >= 4) { return; } makeList(this["m_q_" + __reg2]); ++__reg2; } } ; f_qSelected = function (m_clipRef) { var __reg1 = undefined; if (m_clipRef.a_entry != undefined) { m_globalPath.o_editorial.editorial.questions.question.push(m_clipRef.a_entry[0]); } __reg1 = 0; while (__reg1 < m_globalPath.o_editorial.editorial.questions.question.length) { if (m_clipRef.id == m_globalPath.o_editorial.editorial.questions.question[__reg1].id) { new DropDownAboutMe(m_clipRef._parent["m_a_" + m_clipRef._name.charAt(4)], m_globalPath.o_editorial.editorial.questions.question[__reg1].answer, "text", s_txtColor, s_btnColor, s_bgColor); m_clipRef.a_entry = m_globalPath.o_editorial.editorial.questions.question.splice(__reg1, 1); break; } ++__reg1; } f_remakeLists(); } ; f_setTileColors = function (m_clipRef) { m_clipRef.item_0.color_bg.setRGB(a_colors[i_onColor % a_colors.length]); m_clipRef.item_1.color_bg.setRGB(a_colors[(i_onColor + 1) % a_colors.length]); m_clipRef.item_2.color_bg.setRGB(a_colors[(i_onColor + 2) % a_colors.length]); } ; f_cycleColorsLeft = function () { if (i_scrollDir == 1) { f_copyColors(m_tilesRight, m_tilesLeft); } m_tilesLeft._visible = true; m_tilesRight._visible = false; --i_onColor; if (i_onColor < 0) { i_onColor = a_colors.length - 1; } m_tilesLeft.play(); i_scrollDir = -1; } ; f_cycleColorsRight = function () { if (i_scrollDir == -1) { f_copyColors(m_tilesLeft, m_tilesRight); } m_tilesLeft._visible = false; m_tilesRight._visible = true; ++i_onColor; m_tilesRight.play(); i_scrollDir = 1; } ; f_copyColors = function (m_master, m_copy) { m_copy.item_0.color_bg.setRGB(m_master.item_0.color_bg.getRGB()); m_copy.item_1.color_bg.setRGB(m_master.item_1.color_bg.getRGB()); m_copy.item_2.color_bg.setRGB(m_master.item_2.color_bg.getRGB()); } ; f_createSaveXML = function () { var __reg2 = undefined; var __reg3 = undefined; var __reg5 = undefined; var __reg6 = undefined; var __reg4 = undefined; __reg4 = new XML(); __reg6 = __reg4.createElement("request"); __reg6.attributes.type = "UserSaveMyStatements"; __reg6.attributes.clientTimestamp = m_globalPath.f_currentTimeStamp(); __reg4.appendChild(__reg6); __reg5 = __reg4.createElement("statements"); __reg6.appendChild(__reg5); __reg2 = 0; while (__reg2 < 6) { __reg3 = __reg4.createElement("statement"); __reg3.attributes.enabled = "True"; __reg3.attributes.answer = this["m_a_" + __reg2].id; __reg3.attributes.question = this["m_q_" + __reg2].id; __reg3.attributes.order = __reg2; __reg5.appendChild(__reg3); ++__reg2; } return __reg4; } ; f_saveUserStatements = function () { var __reg2 = undefined; m_globalPath.f_disableButtons(); __reg2 = 0; while (__reg2 < 6) { if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement == undefined) { m_globalPath.o_userProfile.response.result.userProfile.statements.statement = new Object(); } if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2] == undefined) { m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2] = new Object(); } m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].enabled = "True"; m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].answer = this._parent._parent["m_a_" + __reg2].id; m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question = this._parent._parent["m_q_" + __reg2].id; m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].order = __reg2; ++__reg2; } f_setQA(); m_globalPath.f_sendData(f_createSaveXML(), XML_save); } ; f_parseSave = function (b_success) { m_globalPath.f_enableButtons(); if (b_success) { return; } m_globalPath.f_showPopup("Save failed! User sent data:\n\n" + f_createSaveXML()); } ; f_setQA = function () { var __reg2 = undefined; var __reg3 = undefined; __reg2 = 0; for (;;) { if (__reg2 >= 6) { return; } if (m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question) { this["m_qa_" + __reg2].t_question.text = m_globalPath.o_questions[m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question].text.stripIntities(); __reg3 = 0; while (__reg3 < m_globalPath.o_questions[m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question].answer.length) { if (m_globalPath.o_questions[m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question].answer[__reg3].id == m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].answer) { this["m_qa_" + __reg2].t_answer.text = m_globalPath.o_questions[m_globalPath.o_userProfile.response.result.userProfile.statements.statement[__reg2].question].answer[__reg3].text.stripIntities(); } ++__reg3; } } ++__reg2; } } ; f_closeAboutMe = function () { _parent._parent._visible = false; } ; // Action tag #1 s_txtColor = "0xffffff"; s_btnColor = "0x424E58"; s_bgColor = "0x8A9EAB"; s_bgAdminColor = "0x946BAB"; a_colors = [16711680, 65280, 255, 16776960, 65535, 16711935]; i_onColor = 0; i_friction = 0.2; f_stripAdminQuestions(); f_fillAdminDropDowns(); f_fillDropDowns(); m_tilesLeft._visible = false; button_left.onRelease = f_cycleColorsLeft; button_right.onRelease = f_cycleColorsRight; t_addToFriends = m_globalPath.o_text.text.addToFriends._value; t_aboutMe.text = m_globalPath.o_text.text.aboutMe._value; XML_save = new XML(); XML_save.ignoreWhite = true; XML_save.onLoad = f_parseSave; button_hider.useHandCursor = false; m_save.t_label.text = m_globalPath.o_text.text.save._value; m_cancel.t_label.text = m_globalPath.o_text.text.cancel._value; m_save.button_bg.onRelease = f_saveUserStatements; m_cancel.button_bg.onRelease = f_closeAboutMe; f_setQA(); //Sprite 75 // Frame 0 // Action tag #0 stop(); item_0.color_bg = new Color(item_0.m_color); item_1.color_bg = new Color(item_1.m_color); item_2.color_bg = new Color(item_2.m_color); _parent.f_setTileColors(this); _parent.button_left.enabled = true; _parent.button_right.enabled = true; // Frame 1 // Action tag #0 _parent.button_left.enabled = false; _parent.button_right.enabled = false; // Frame 12 // Action tag #0 item_4.color_bg = new Color(item_4.m_color); item_4.color_bg.setRGB(_parent.a_colors[(_parent.i_onColor + 2) % _parent.a_colors.length]); //Sprite 80 // Frame 0 // Action tag #0 stop(); item_0.color_bg = new Color(item_0.m_color); item_1.color_bg = new Color(item_1.m_color); item_2.color_bg = new Color(item_2.m_color); _parent.f_setTileColors(this); _parent.button_left.enabled = true; _parent.button_right.enabled = true; // Frame 1 // Action tag #0 item_4.color_bg = new Color(item_4.m_color); item_4.color_bg.setRGB(_parent.a_colors[_parent.i_onColor % _parent.a_colors.length]); _parent.button_left.enabled = false; _parent.button_right.enabled = false;