flmObject = function (nombre) { this.nombre = (nombre == null) ? 'application' : nombre; }; flmObject.prototype.init = function () { var v1 = this; v1.root = v1.parent.root; v1.index = (v1.index == null) ? v1.parent.getIndex() : v1.index; v1.fondoClip = (v1.fondoClip == null) ? 'blank' : v1.fondoClip; v1.parent.clip.attachMovie(v1.fondoClip, v1.index, v1.index); v1.clip = v1.parent.clip[v1.index]; v1.clip.obj = v1; v1.clip.tabEnabled = false; v1.initDefaultEffects(); v1.onInit(); }; flmObject.prototype.setPos = function (x, y) { var v1 = this; var v2 = y; var v3 = x; v1.x = v3; v1.y = v2; v1.clip._x = v3; v1.clip._y = v2; v1.onSetPos(v3, v2); }; flmObject.prototype.setSize = function (w, h) { var v1 = this; v1.w = (w != null) ? parseFloat(w) : v1.w; v1.h = (h != null) ? parseFloat(h) : v1.h; if (v1.w != null) { v1.clip._width = v1.w; } if (v1.h != null) { v1.clip._height = v1.h; } }; flmObject.prototype.setScale = function (escalaX, escalaY) { this.clip._xscale = escalaX; this.clip._yscale = (escalaY != null) ? escalaY : escalaX; }; flmObject.prototype.setRotation = function (angle) { this.clip._rotation = angle; }; flmObject.prototype.setColor = function (colorName) { var v1 = this; if (v1.colorObj == null) { v1.colorObj = new Color(v1.clip); } v1.colorAct = (colorName != null) ? colorName : v1.colorAct; v1.colorRGB = v1.getColorRGB(v1.colorAct); v1.setColorTrans(); v1.colorObj.setRGB(parseInt('0x' + v1.colorRGB)); }; flmObject.prototype.setColorTrans = function () { var v1 = this; if (v1.colorObj == null) { v1.colorObj = new Color(v1.clip); } //v1.colorObj.colorTrans({'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0}); }; flmObject.prototype.getColorRGB = function (colorName) { var v1 = _root; var v2 = this; var v3 = colorName; nColRGB = 0; while (nColRGB < v1.colors.length) { if (v1.colors[nColRGB][1].toUpperCase() == v3.toUpperCase()) { v2.colorRGB = v1.colors[nColRGB][0]; } ++nColRGB; } return v2.colorRGB; }; flmObject.prototype.setAlpha = function (alpha) { this.clip._alpha = alpha; }; flmObject.prototype.getIndex = function () { ++this.childs; return this.childs; }; flmObject.prototype.getTextStyle = function (styleName) { var v1 = _root; var v2 = this; var v3 = styleName; nStyleNma = 0; while (nStyleNma < v1.styles.length) { if (v1.styles[nStyleNma].name.toUpperCase() == v3.toUpperCase()) { v2.textStyle = v1.styles[nStyleNma]; } ++nStyleNma; } return v2.textStyle; }; flmObject.prototype.show = function (alpha) { if (alpha != null) { this.setAlpha(parseInt(alpha)); } this.clip._visible = 1; }; flmObject.prototype.hide = function (alpha) { if (alpha != null) { this.setAlpha(parseInt(alpha)); } this.clip._visible = 0; }; flmObject.prototype.destroy = function () { var v1 = this; v1.unloadMovie(); v1.clip.removeMovieClip(); for (e in v1) { tempPropDeleted = delete e; } v1 = null; }; flmObject.prototype.remove = flmObject.prototype.destroy; flmObject.prototype.alert = function (texto) { trace(texto); this.clip.getURL('javascript:alert(\'' + texto + '\')'); }; flmObject.prototype.loadMovie = function (movie) { var v1 = this; v1.url = movie; v1.setScale(100); if (v1.loader != null) { v1.loader.destroy(); } v1.loader = v1.addBlank(); v1.preloader.target = v1.loader; v1.preloader.play(); if (v1.onLoadMovie != null) { v1.preloader.onEndEffect = v1.onLoadMovie; } v1.loader.clip.loadMovie(movie); }; flmObject.prototype.unloadMovie = function () { this.url = null; this.loader.clip.unloadMovie(); }; flmObject.prototype.setMask = function (mask) { var v1 = this; v1.maskObj = mask; v1.clip.setMask(v1.maskObj.clip); }; flmObject.prototype.addBlank = function () { var v1 = new _root.flmLibrary('blank', this); return v1; }; flmObject.prototype.addFondo = function () { var v1 = new _root.flmLibrary('fondo', this); return v1; }; flmObject.prototype.addXML = function (onLoadFunction) { var v1 = this; if (v1.xmlData == null) { v1.xmlData = new Array(); } v1.nXmlData = v1.xmlData.length; v1.xmlData[v1.nXmlData] = new XML(); v1.xmlData[v1.nXmlData].parent = v1; v1.xmlData[v1.nXmlData].ignoreWhite = true; if (onLoadFunction != null) { v1.xmlData[v1.nXmlData].onLoadXML = onLoadFunction; } return v1.xmlData[v1.nXmlData]; }; flmObject.prototype.addSingleAction = function (action) { var v1 = new _root.singleAction(this, action); return v1; }; flmObject.prototype.addEffect = function (action) { var v1 = this; if (v1.effects == null) { v1.effects = new Array(); } v1.nEffect = v1.effects.length; v1.effects[v1.nEffect] = new _root.flmEffect(v1.nEffect, v1); v1.effects[v1.nEffect].onEffect = action; return v1.effects[v1.nEffect]; }; flmObject.prototype.addItem = function (node) { var v1 = node; var v2 = this; if (v2.items == null) { v2.items = new Array(); } var v3 = v2.items.length; v2.items[v3] = new _root.flmLibrary(v1.attributes.movie, v2, v1.attributes.x, v1.attributes.y, v1.attributes.w, v1.attributes.h, v1.attributes.color, v1.attributes.index); v2.items[v3].node = v1; if (v1.attributes.mask != null) { v2.items[v3].mask = new _root.flmLibrary(v1.attributes.mask, v2, v1.attributes.x + v1.attributes.maskX, v1.attributes.y + v1.attributes.maskY, v1.attributes.maskW, v1.attributes.maskH); v2.items[v3].setMask(v2.items[v3].mask); } if (v1.attributes.alpha != null) { v2.items[v3].setAlpha(v1.attributes.alpha); v2.items[v3].alphaMax = v1.attributes.alpha; } if (v1.attributes.scale != null) { v2.items[v3].setScale(v1.attributes.scale); } if (v1.attributes.rotation != null) { v2.items[v3].setRotation(v1.attributes.rotation); } return v2.items[v3]; }; flmObject.prototype.addText = function (node) { var v1 = this; var v2 = node; if (v1.texts == null) { v1.texts = new Array(); } v1.nText = v1.texts.length; v1.texts[v1.nText] = new _root.flmText(v2.attributes.style, v1, v2.attributes.x, v2.attributes.y, v2.attributes.w, v2.attributes.h, v2.attributes.align, v2.attributes.bullet); v1.texts[v1.nText].node = v2; if (v2.getNodeByName('scrollBar') != null) { v1.texts[v1.nText].addScrollBar(v2.getNodeByName('scrollBar')); } if (v2.getNodeByName('content') != null) { v1.texts[v1.nText].setText((v2.getNodeByName('content')).toString()); } else { if (v2.firstChild != null) { v1.texts[v1.nText].setText(v2.firstChild.toString()); } else { if (v2.attributes.text != null) { v1.texts[v1.nText].setText(v2.attributes.text.toString()); } } } if (v2.attributes.color != null) { v1.texts[v1.nText].setColor(v2.attributes.color); } return v1.texts[v1.nText]; }; flmObject.prototype.addButton = function (node) { var v1 = node; var v2 = this; if (v2.buttons == null) { v2.buttons = new Array(); } v2.nButton = v2.buttons.length; v2.buttons[v2.nButton] = new _root.flmButton(v1.attributes.movie, v2, v1.attributes.x, v1.attributes.y, v1.attributes.w, v1.attributes.h, v1.attributes.align, v1.attributes.autoSize); v2.buttons[v2.nButton].node = v1; if (v1.attributes.alpha != null) { v2.buttons[v2.nButton].setAlpha(v1.attributes.alpha); } if (v1.attributes.text != null) { v2.buttons[v2.nButton].addText(v1.attributes.style, v1.attributes.text, v1.attributes.textX, v1.attributes.textY, v1.attributes.align, v1.attributes.colorizeText); } else { if (v1.getNodeByName('content') != null) { v2.buttons[v2.nButton].addText(v1.attributes.style, v1.getNodeByName('content'), v1.attributes.textX, v1.attributes.textY, v1.attributes.align, v1.attributes.colorizeText); } } if (v1.attributes.item != null) { v2.resizeItem = (v1.attributes.resizeItem != null) ? true : false; v2.centerItem = (v1.attributes.centerItem != null) ? true : false; v2.buttons[v2.nButton].addItem(v1.attributes.item, v2.resizeItem, v2.centerItem, v1.attributes.itemOver, v1.attributes.itemX, v1.attributes.itemY); v2.buttons[v2.nButton].item.setRotation(v1.attributes.itemRotation); } v2.buttons[v2.nButton].setColors(v1.attributes.colorOver, v1.attributes.colorOut, v1.attributes.colorPress, v1.attributes.colorVisited, v1.attributes.colorSelected, v1.attributes.alphaVisited); return v2.buttons[v2.nButton]; }; Math.prototype.radToGra = function (radianes) { return radianes * 360 / 6.283185307179586; }; Math.prototype.graToRad = function (grados) { return grados * 6.283185307179586 / 360; }; String.prototype.substringBefore = function (vstrFind) { return this.substring(0, this.indexOf(vstrFind)); }; String.prototype.substringAfter = function (vstrFind) { var v1 = vstrFind; var v2 = this; if (v2.indexOf(v1) == -1) { return ''; } return v2.substring(v2.indexOf(v1) + v1.length); }; Array.prototype.deleteAt = function (i) { var v1 = this; var v2 = i; if (v2 == v1.length - 1) { v1.pop(); } else { if (v2 == 0) { v1.shift(); } else { var tmpAry1 = v1.slice(0, v2); var v3 = v1.slice(v2 + 1, v1.length); var tmpAry3 = tmpAry1.concat(v3); v1.splice(0, v1.length, tmpAry3); } } }; Array.prototype.reset = function () { var v1 = this; while (v1.length > 0) { v1.itemAct = v1.pop(); v1.itemAct.destroy(); } }; Array.prototype.createList = function (parent, nodeList, itemList) { var v1 = this; v1.parent = parent; v1.nodeList = nodeList; v1.itemList = itemList; nList = 0; while (nList < v1.nodeList.childNodes.length) { v1[nList] = new v1.itemList(v1.parent, v1.nodeList.childNodes[nList]); ++nList; } }; Array.prototype.play = function () { this.setChildsIndex(); this[0].play(); }; Array.prototype.setChildsIndex = function () { var v1 = this; z = 0; while (z < v1.length) { v1[z].arrayIndex = z; v1[z].arrayRef = v1; ++z; } }; XML.prototype.old_Load = XML.prototype.load; XML.prototype.load = function (urltoload, loadingCursor) { var v1 = this; var v2 = _root; if (loadingCursor != null) { if (v1.parent.changeCursor == null) { v1.parent.changeCursor = new v2.flmEffect('loadingCursor', v1.parent); v1.parent.changeCursor.onEffect = v1.onChangeCursor; } v2.attachMovie('waitMouse', 'cursor', 100); v2.cursor._x = v2._xmouse; v2.cursor._y = v2._ymouse; } if (loadingCursor != null) { v1.parent.changeCursor.play(); } v1.old_Load(urltoload); }; XML.prototype.onChangeCursor = function () { var v1 = _root; v1.cursor._x = v1._xmouse; v1.cursor._y = v1._ymouse; }; XML.prototype.onLoad = function (success) { var v1 = this; v1.parent.changeCursor.stop(); _root.cursor.removeMovieClip(); if (success) { v1.getFirst(); v1.onLoadXML.call(v1.parent); } else { trace('error cargando XML'); ++v1.nError; if (v1.nError > 3) { } else { v1.onError.call(v1.parent); } } }; XML.prototype.getFirst = function () { var v1 = this; node = v1.firstChild; v1.firstNode = node; return v1.firstNode; }; XML.prototype.getNodeByName = function (name, parent) { var v1 = this; var v2 = name; if (parent == null) { v1.node = v1.firstNode; } else { v1.node = parent; } v1.node = v1.node.firstChild; while (v1.node.nodeName != v2) { if (v1.node.nextSibling) { v1.node = v1.node.nextSibling; } } return v1.node; }; XML.prototype.getNodeById = function (id, parent) { var v1 = this; var v2 = id; while (v1.node.attributes.id != v2) { if (v1.node.nextSibling) { v1.node = v1.node.nextSibling; } else { goto 13188; } } return v1.node; label 13188: }; XMLNode.prototype.getNodeById = function (id) { var v1 = this; v1.node = v1.firstChild; v1.id = id; while (parseInt(v1.node.attributes.id) != parseInt(v1.id)) { if (v1.node.nextSibling) { v1.node = v1.node.nextSibling; } else { return null; } } return v1.node; }; XMLNode.prototype.getNodeByName = function (name) { var v1 = this; v1.node = v1.firstChild; v1.name = name; while (v1.node.nodeName != v1.name) { if (v1.node.nextSibling) { v1.node = v1.node.nextSibling; } else { return null; } } return v1.node; }; XMLNode.prototype.getNodeByAtt = function (attribute, value) { var v1 = this; v1.node = v1.firstChild; v1.attribute = attribute; v1.value = value; while (v1.node.attributes[v1.attribute] != v1.value) { if (v1.node.nextSibling) { v1.node = v1.node.nextSibling; } else { return null; } } return v1.node; }; XMLNode.prototype.getIndex = function () { var v1 = this; n = 0; while (n < v1.parentNode.childNodes.length + 1) { if (v1.parentNode.childNodes[n] == v1) { return n; } ++n; } return undefined; }; Color.prototype.colorTrans = function (params) { var v1 = this; var v2 = params; if (v2.ra != null) { v1.ra = v2.ra; } if (v2.ga != null) { v1.ga = v2.ga; } if (v2.ba != null) { v1.ba = v2.ba; } if (v2.aa != null) { v1.aa = v2.aa; } if (v2.rb != null) { v1.rb = v2.rb; } if (v2.gb != null) { v1.gb = v2.gb; } if (v2.bb != null) { v1.bb = v2.bb; } if (v2.ab != null) { v1.ab = v2.ab; } v1.axfTrans = {'ra': v1.ra, 'rb': v1.rb, 'ga': v1.ga, 'gb': v1.gb, 'ba': v1.ba, 'bb': v1.bb, 'aa': v1.aa, 'ab': v1.ab}; v1.setTransform(v1.axfTrans); }; Color.prototype.setTint = function (r, g, b, amount) { var v1 = this; v1.ba = 100 - amount; v1.ga = v1.ba; v1.ra = v1.ba; var v2 = amount / 100; v1.rb = r * v2; v1.gb = g * v2; v1.bb = b * v2; v1.colorTrans(); }; Color.prototype.setBrightness = function (bright) { var v1 = this; var v3 = bright; var v2 = 0; if (v3 > 0) { v2 = 256 * (v3 / 100); } v1.ba = 100 - Math.abs(v3); v1.ga = v1.ba; v1.ra = v1.ba; v1.bb = v2; v1.gb = v1.bb; v1.rb = v1.bb; v1.colorTrans(); }; Color.prototype.setTintOffset = function (r, g, b) { var v1 = this; v1.rb = r; v1.gb = g; v1.bb = b; v1.colorTrans(); }; Color.prototype.setBrightOffset = function (offset) { var v1 = this; v1.bb = offset; v1.gb = v1.bb; v1.rb = v1.bb; v1.colorTrans(); }; Color.prototype.reset = function () { var v1 = this; v1.ra = 100; v1.ga = 100; v1.ba = 100; v1.rb = 0; v1.gb = 0; v1.bb = 0; v1.colorTrans(); }; Color.prototype.negative = function () { var v1 = this; v1.ra = -100; v1.ga = -100; v1.ba = -100; v1.rb = 255; v1.gb = 255; v1.bb = 255; v1.colorTrans(); }; Color.prototype.setRGB2 = function (r, g, b) { this.setRGB(r << 16 | g << 8 | b); }; rootObj = function (nombre, clip) { var v1 = _root; var v2 = this; v2.nombre = (nombre == null) ? 'root' : nombre; v2.clip = (clip == null) ? v1 : clip; v2.root = v2; if (v1.colors == null) { v1.colors = new Array(); } if (v1.styles == null) { v1.styles = new Array(); } }; rootObj.prototype = new _root.flmObject('rootObj'); rootObj.prototype.init = function () { this.initDefaultEffects(); this.onInit(); }; rootObj.prototype.createColors = function (colorsNode) { var v1 = this; if (colorsNode != null) { v1.colorsNode = colorsNode; } n = 0; while (n < v1.colorsNode.childNodes.length) { v1.addColor(v1.colorsNode.childNodes[n]); ++n; } }; rootObj.prototype.addColor = function (colorNode) { var v1 = colorNode.attributes; var v2 = _root.colors.length; var v3 = v1.rgb; var colorName = v1.name; _root.colors[v2] = [v3, colorName]; }; rootObj.prototype.createStyles = function (stylesNode) { var v1 = this; var v2 = _root; if (stylesNode != null) { v1.stylesNode = stylesNode; } n = 0; while (n < v1.stylesNode.childNodes.length) { v2.root.addStyle(v1.stylesNode.childNodes[n]); ++n; } }; rootObj.prototype.addStyle = function (styleNode) { var v3 = _root; var v2 = styleNode.attributes; var v1 = v3.styles.length; v3.styles[v1] = new Object(); v3.styles[v1].name = v2.name; v3.styles[v1].font = v2.type; v3.styles[v1].fontSize = v2.Size; v3.styles[v1].fontColor = v2.Color; v3.styles[v1].caps = (v2.caps == null) ? false : true; v3.styles[v1].align = v2.align; v3.styles[v1].embedFonts = (v2.embed == 'true') ? true : false; v3.styles[v1].leading = v2.Leading; v3.styles[v1].italic = (v2.Italic != null) ? true : null; v3.styles[v1].bold = (v2.Bold != null) ? true : null; }; rootObj.prototype.setMovieUp = function (obj) { var v1 = this; if (v1.movieUp == null || v1.movieUp == obj) { v1.movieUp = v1.clip[v1.childs]; } v1.movieActUp = v1.movieUp; v1.movieUp = obj.clip; v1.movieUp.swapDepths(v1.movieActUp); }; flmLibrary = function (nombre, obj, x, y, w, h, colorName, index) { var v1 = this; v1.fondoClip = (nombre == null) ? 'blank' : nombre; v1.parent = (obj == null) ? root : obj; v1.root = v1.parent.root; v1.colorName = (colorName == null) ? null : colorName; v1.index = (index == null) ? v1.parent.getIndex() : index; v1.init(); v1.w = (w == null) ? v1.clip._width : parseFloat(w); v1.h = (h == null) ? v1.clip._height : parseFloat(h); v1.setSize(v1.w, v1.h); v1.x = (x == null) ? 0 : parseFloat(x); v1.y = (y == null) ? 0 : parseFloat(y); v1.setPos(v1.x, v1.y); if (v1.colorName != null) { v1.setColor(v1.colorName); } }; flmLibrary.prototype = new _root.flmObject('flmLibrary'); flmLibrary.prototype.changeItem = function (newItem) { var v1 = this; v1.fondoClip = newItem; v1.init(); v1.setPos(v1.x, v1.y); }; flmLibrary.prototype.changeNode = function (newNode) { var v1 = this; v1.node = newNode; v1.fondoClip = v1.node.attributes.clip + v1.node.attributes.movie; v1.init(); v1.setPos(v1.node.attributes.x, v1.node.attributes.y); }; flmText = function (styleName, obj, x, y, w, h, align, bullet) { var v1 = this; v1.styleName = (styleName == null) ? root.defaultStyle : styleName; v1.parent = (obj == null) ? _root.root : obj; v1.root = v1.parent.root; v1.x = (x == null) ? 0 : x; v1.y = (y == null) ? 0 : y; v1.w = (w == null) ? 100 : w; v1.h = (h == null) ? 20 : h; v1.align = align; v1.bullet = (bullet != null) ? true : false; v1.xFin = v1.x; v1.init(); }; flmText.prototype = new _root.flmObject('flmText'); flmText.prototype.onInit = function () { var v1 = this; v1.autoEscritura = v1.addEffect(v1.onAutoEscritura); v1.autoEscritura.onInitEffect = v1.onInitAutoEscritura; v1.setPos(v1.xFin, v1.y); v1.scrollUp = v1.addEffect(v1.onScrollUp); v1.scrollDown = v1.addEffect(v1.onScrollDown); v1.scrollDrag = v1.addEffect(v1.onScrollDrag); v1.clip.createTextField('text', 1000, 0, 0, v1.w, v1.h); if (v1.styleName != 'unformat') { v1.setFormat(v1.styleName); } }; flmText.prototype.setColor = function (colorName) { var v1 = this; v1.textFormat.color = '0x' + v1.getColorRGB(colorName); v1.setText(v1.texto); }; flmText.prototype.setSize = function (w, h) { var v1 = this; v1.w = parseFloat(w); v1.h = parseFloat(h); var v2 = v1.texto; v1.setText(''); v1.clip.text._width = v1.w; v1.clip.text._height = v1.h; v1.setText(v2); }; flmText.prototype.setNoHtmlText = function (textoNo) { var v1 = this; v1.texto = textoNo; v1.clip.text = v1.texto; }; flmText.prototype.setText = function (texto) { var v1 = this; v1.clip.text.htmlText = ''; if (v1.clip.text.html != true) { v1.clip.text.html = true; } v1.texto = texto.toString(); if (v1.caps == true) { v1.texto = v1.texto.toUpperCase(); } v1.clip.text._width += 20; v1.clip.text.htmlText = v1.texto; v1.clip.text._width -= 20; if (v1.styleName != 'unformat') { v1.clip.text.setTextFormat(v1.textFormat); } v1.botonUp.hide(); v1.botonDown.hide(); if (v1.botonDrag != null) { v1.botonDrag.setPos(null, v1.minYDrag); v1.botonDrag.hide(); } v1.setScrollBar(); }; flmText.prototype.setFormat = function (styleName) { var v1 = this; if (styleName != null) { v1.textStyle = v1.getTextStyle(styleName); } if (v1.textStyle.font != null) { v1.fontName = v1.textStyle.font; } if (v1.textStyle.fontSize != null) { v1.fontSize = v1.textStyle.fontSize; } if (v1.textStyle.fontColor != null) { v1.fontColor = '0x' + v1.getColorRGB(v1.textStyle.fontColor); } if (v1.align == null && v1.textStyle.align != null) { v1.align = v1.textStyle.align; } if (v1.bullet == null && v1.textStyle.bullet != null) { v1.bullet = v1.textStyle.bullet; } v1.caps = v1.textStyle.caps; v1.clip.text.selectable = (v1.textStyle.selectable != true) ? false : true; v1.clip.text.embedFonts = (v1.textStyle.embedFonts != false) ? true : false; v1.clip.text.wordWrap = (v1.textStyle.wordWrap != false) ? true : false; if (v1.textFormat == null) { v1.textFormat = new TextFormat(); } v1.textFormat.font = v1.fontName; v1.textFormat.size = v1.fontSize; v1.textFormat.color = v1.fontColor; v1.textFormat.align = v1.align; v1.textFormat.bullet = v1.bullet; v1.textFormat.target = v1.target; v1.textFormat.url = v1.url; v1.textFormat.leading = v1.textStyle.leading; v1.textFormat.italic = v1.textStyle.italic; v1.textFormat.bold = v1.textStyle.bold; }; flmText.prototype.clear = function () { this.clip.text.htmlText = ''; }; flmText.prototype.setLink = function (url, target, popUpW, popUpH) { var v1 = this; v1.url = (popUpW == null) ? url : 'javascript:popUp(\'' + popUpW + '\',\'' + popUpH + '\')'; v1.target = (target != null) ? target : '_blank'; if (v1.styleName != 'unformat') { v1.setFormat(v1.styleName); } }; flmText.prototype.unLink = function () { var v1 = this; v1.url = null; v1.target = null; if (v1.styleName != 'unformat') { v1.setFormat(v1.styleName); } }; flmText.prototype.onInitAutoEscritura = function () { var v1 = this; v1.textoFinal = v1.texto; v1.clear(); v1.actTempCarN = 1; v1.actTempText = ''; }; flmText.prototype.onAutoEscritura = function () { var v1 = this; if (v1.actTempText != v1.textoFinal) { v1.actTempText = v1.textoFinal.substring(0, v1.actTempCarN++); v1.clear(); v1.setText(v1.actTempText); } else { v1.setText(v1.textoFinal); } }; flmText.prototype.addScrollBar = function (node) { var v1 = this; v1.clip.text.scroll = 0; v1.nodeScrollBar = node; v1.pasoScroll = (v1.nodeScrollBar.attributes.paso != null) ? v1.nodeScrollBar.attributes.paso : 1; v1.botonUp = v1.addButton(v1.nodeScrollBar.getNodeByName('botonUp')); v1.botonUp.onPress = v1.initScrollDown; v1.botonUp.onReleaseOutside = v1.endScroll; v1.botonUp.onRelease = v1.botonUp.onReleaseOutside; v1.botonUp.hide(); v1.botonDown = v1.addButton(v1.nodeScrollBar.getNodeByName('botonDown')); v1.botonDown.onPress = v1.initScrollUp; v1.botonDown.onReleaseOutside = v1.endScroll; v1.botonDown.onRelease = v1.botonDown.onReleaseOutside; v1.botonDown.hide(); if (v1.nodeScrollBar.getNodeByName('botonDrag') != null) { v1.botonDrag = v1.addButton(v1.nodeScrollBar.getNodeByName('botonDrag')); v1.botonDrag.onPress = v1.initScrollDrag; v1.botonDrag.onReleaseOutside = v1.endScroll; v1.botonDrag.onRelease = v1.botonDrag.onReleaseOutside; v1.botonDrag.setPos(null, v1.botonUp.clip._y + v1.botonUp.clip._height + 3); v1.botonDrag.hide(); } }; flmText.prototype.setScrollBar = function () { var v1 = this; v1.clip.text.scroll = 0; if (v1.clip.text.textHeight > v1.clip.text._height) { v1.botonUp.show(); v1.botonDown.show(); if (v1.botonDrag != null) { v1.botonDrag.show(); } } v1.maxScroll = parseInt(v1.clip.text.maxscroll) + 2; v1.minYDrag = v1.botonUp.clip._y + v1.botonUp.clip._height + 1; v1.maxYDrag = v1.botonDown.clip._y - v1.botonDrag.clip._height - 1; }; flmText.prototype.initScrollUp = function () { this.scrollUp.play(); }; flmText.prototype.onScrollUp = function () { var v1 = this; if (v1.clip.text.scroll < v1.maxScroll) { v1.clip.text.avScroll = Math.min(v1.clip.text.avScroll + v1.pasoScroll, v1.maxScroll); v1.clip.text.scroll = Math.round(v1.clip.text.avScroll); } if (v1.botonDrag != null) { v1.setBotonDragPos(); } updateAfterEvent(); }; flmText.prototype.initScrollDown = function () { this.scrollDown.play(); }; flmText.prototype.onScrollDown = function () { var v1 = this; if (v1.clip.text.scroll > 0) { v1.clip.text.avScroll = Math.max(v1.clip.text.avScroll - v1.pasoScroll, 0); v1.clip.text.scroll = Math.round(v1.clip.text.avScroll); } if (v1.botonDrag != null) { v1.setBotonDragPos(); } updateAfterEvent(); }; flmText.prototype.initScrollDrag = function () { var v1 = this; v1.initYDrag = v1.botonDrag.clip._y; v1.scrollDrag.play(); }; flmText.prototype.onScrollDrag = function () { var v1 = this; if (v1.clip._ymouse > v1.minYDrag && v1.clip._ymouse < v1.maxYDrag) { v1.botonDrag.setPos(null, v1.clip._ymouse); } else { if (v1.clip._ymouse < v1.minYDrag) { v1.botonDrag.setPos(null, v1.minYDrag); } else { if (v1.clip._ymouse > v1.maxYDrag) { v1.botonDrag.setPos(null, v1.maxYDrag); } } } v1.clip.text.avScroll = v1.maxScroll * (v1.botonDrag.clip._y - v1.minYDrag) / (v1.maxYDrag - v1.minYDrag); v1.clip.text.scroll = v1.clip.text.avScroll; updateAfterEvent(); }; flmText.prototype.setBotonDragPos = function () { var v1 = this; v1.botonDrag.setPos(null, v1.clip.text.avScroll * (v1.maxYDrag - v1.minYDrag) / v1.maxScroll + v1.minYDrag); updateAfterEvent(); }; flmText.prototype.endScroll = function () { var v1 = this; v1.scrollUp.stop(); v1.scrollDown.stop(); v1.scrollDrag.stop(); }; flmButton = function (nombre, obj, x, y, w, h) { var v1 = this; v1.fondoClip = (nombre == null) ? 'blank' : nombre; v1.parent = (obj == null) ? root : obj; v1.root = v1.parent.root; v1.x = (x == null) ? 0 : parseFloat(x); v1.y = (y == null) ? 0 : parseFloat(y); v1.w = (w == null) ? null : parseFloat(w); v1.h = (h == null) ? null : parseFloat(h); v1.init(); v1.setPos(v1.x, v1.y); v1.setSize(v1.w, v1.h); v1.initEvents(); }; flmButton.prototype = new _root.flmObject('flmButton'); flmButton.prototype.onSetPos = function () { var v1 = this; if (v1.text != null) { v1.text.setPos(v1.clip._x + v1.textX, v1.clip._y + v1.textY); } if (v1.item != null) { v1.setItemPos(); } }; flmButton.prototype.setItemPos = function () { var v1 = this; v1.itemX = v1.clip._x + v1.itemSepX; v1.itemY = v1.clip._y + v1.itemSepY; if (v1.centerItem == true) { v1.itemX += v1.clip._width / 2 - parseFloat(v1.w - v1.item.clip._width) / 2; v1.itemY += v1.clip._height / 2 - parseFloat(v1.h - v1.item.clip._height) / 2; } v1.item.setPos(v1.itemX, v1.itemY); }; flmButton.prototype.setAlpha = function (alpha) { var v1 = this; var v2 = alpha; v1.clip._alpha = v2; if (v1.text != null) { v1.text.setAlpha(v2); } if (v1.item != null) { v1.item.setAlpha(v2); } }; flmButton.prototype.setColor = function (colorName) { var v1 = this; var v2 = colorName; if (v1.text != null && v1.colorizeText == true) { v1.text.setColor(v2); } else { if (v1.colorObj == null) { v1.colorObj = new Color(v1.clip); } v1.colorAct = (v2 != null) ? v2 : v1.colorAct; v1.colorRGB = v1.getColorRGB(v1.colorAct); v1.colorObj.setRGB(parseInt('0x' + v1.colorRGB)); } }; flmButton.prototype.rotateItem = function (angle) { this.clip.item._rotation = angle; }; flmButton.prototype.setMouseItem = function (movieClip) { var v1 = this; v1.movieMouse = movieClip; if (v1.movieMouse == null) { v1.clip.useHandCursor = false; } }; flmButton.prototype.setColors = function (over, out, press, visited, selected, alphaVisited) { var v1 = this; v1.colorOver = over; v1.colorOut = out; v1.colorPress = press; v1.colorVisited = visited; v1.colorSelected = selected; v1.alphaVisited = alphaVisited; if (v1.colorOut != null) { v1.setColor(v1.colorOut); } }; flmButton.prototype.addItemFromNode = flmObject.prototype.addItem; flmButton.prototype.addItem = function (item, resize, centerItem, itemOver, itemX, itemY) { var v1 = this; v1.itemOverClip = itemOver; v1.itemClip = item; v1.item = new _root.flmLibrary(v1.itemClip, v1.parent); if (resize == true) { v1.item.setSize(v1.w, v1.h); } v1.itemSepX = (itemX != null) ? parseFloat(itemX) : 0; v1.itemSepY = (itemY != null) ? parseFloat(itemY) : 0; v1.centerItem = centerItem; v1.setItemPos(); }; flmButton.prototype.addText = function (style, texto, textX, textY, align, colorize) { var v1 = this; v1.colorizeText = (colorize != null) ? true : false; v1.TextX = (textX != null) ? parseFloat(textX) : 0; v1.TextY = (textY != null) ? parseFloat(textY) : 0; if (v1.text != null) { v1.text.destroy(); } v1.text = new _root.flmText(style, v1.parent, v1.x + v1.TextX, v1.y + v1.TextY, v1.w, v1.h, align); v1.text.setText(texto); }; flmButton.prototype.remove = function () { var v1 = this; if (v1.text != null) { v1.text.destroy(); } if (v1.item != null) { v1.item.destroy(); } v1.clip.removeMovieClip(); v1 = null; }; flmButton.prototype.destroy = flmButton.prototype.remove; flmButton.prototype.hide = function () { var v1 = this; v1.clip._visible = 0; if (v1.text != null) { v1.text.hide(); } if (v1.item != null) { v1.item.hide(); } v1.clip.enabled = false; }; flmButton.prototype.show = function () { var v1 = this; v1.clip._visible = 1; if (v1.text != null) { v1.text.show(); } if (v1.item != null) { v1.item.show(); } v1.clip.enabled = true; }; flmButton.prototype.click = function () { var v1 = this; v1.clip.onRollOver(); v1.clip.onPress(); v1.clip.onRelease(); v1.clip.onRollOut(); }; flmButton.prototype.initEvents = function (type) { var v1 = this; v1.clip.onPress = function () { var v1 = this; if (v1.obj.colorPress != null) { v1.obj.setColor(v1.obj.colorPress); } if (v1.obj.colorSelected != null) { v1.objAntSelected = v1.obj.parent.parent.lastButtonPressed; v1.objAntSelected.clip._alpha = v1.objAntSelected.clip.alphaNormal; } if (v1.obj.onPress != null) { v1.obj.onPress.call(v1.obj.parent); } else { v1.obj.parent.onPress(v1.obj); } v1.visited = true; }; v1.clip.onRelease = function () { var v1 = this; if (v1.obj.colorVisited != null) { v1.obj.setColor(v1.obj.colorVisited); } else { if (v1.obj.colorOver != null) { v1.obj.setColor(v1.obj.colorOver); } else { if (v1.obj.colorOut != null) { v1.obj.setColor(v1.obj.colorOut); } } } if (v1.obj.colorSelected != null) { v1.obj.parent.parent.lastButtonPressed = v1.obj; v1.objAntSelected.clip.onRollOut(); v1.obj.setColor(v1.obj.colorSelected); } if (v1.obj.onRelease != null) { v1.obj.onRelease.call(v1.obj.parent); } else { v1.obj.parent.onRelease(v1.obj); } }; v1.clip.onReleaseOutside = function () { var v1 = this; if (v1.obj.item != null && v1.obj.itemOverClip != null) { v1.obj.item.changeItem(v1.obj.itemClip); } if (v1.obj.colorVisited != null) { v1.obj.setColor(v1.obj.colorVisited); } else { if (v1.obj.colorOut != null) { v1.obj.setColor(v1.obj.colorOut); } else { if (v1.obj.colorOver != null) { v1.obj.setColor(v1.obj.colorOver); } } } if (v1.obj.colorSelected != null) { v1.obj.parent.parent.lastButtonPressed = v1.obj; v1.objAntSelected.clip.onRollOut(); v1.obj.setColor(v1.obj.colorSelected); } if (v1.obj.onReleaseOutside != null) { v1.obj.onReleaseOutside.call(v1.obj.parent); } else { v1.obj.parent.onReleaseOutside(v1.obj); } }; v1.clip.onRollOver = function () { var v1 = this; if (v1.obj.colorOver != null && (v1.obj.colorSelected == null || v1.obj.parent.parent.lastButtonPressed != v1.obj)) { if (v1.obj.colorizeText != true) { v1.obj.clip._alpha = 100; } v1.obj.setColor(v1.obj.colorOver); } if (v1.obj.item != null && v1.obj.itemOverClip != null) { v1.obj.item.changeItem(v1.obj.itemOverClip); } if (v1.obj.onRollOver != null) { v1.obj.onRollOver.call(v1.obj.parent); } else { v1.obj.parent.onRollOver(v1.obj); } }; v1.clip.onRollOut = function () { var v1 = this; if (v1.obj.item != null && v1.obj.itemOverClip != null) { v1.obj.item.changeItem(v1.obj.itemClip); } if (v1.visited == true && v1.obj.colorVisited != null) { v1.obj.clip._alpha = v1.obj.alphaVisited; v1.obj.setColor(v1.obj.colorVisited); } else { if (v1.obj.colorOut != null && (v1.obj.colorSelected == null || v1.obj.parent.parent.lastButtonPressed != v1.obj)) { v1.obj.setColor(v1.obj.colorOut); } } if (v1.obj.onRollOut != null) { v1.obj.onRollOut.call(v1.obj.parent); } else { v1.obj.parent.onRollOut(v1.obj); } }; }; flmEffect = function (nombre, parent) { var v1 = this; v1.nombre = (nombre == null) ? 'efecto' : nombre; v1.parent = (parent == null) ? _root.root : parent; v1.index = v1.parent.getIndex(); v1.init(); }; flmEffect.prototype.init = function () { this.index = this.parent.getIndex(); }; flmEffect.prototype.getT = function () { return getTimer() / 1000 - this.initT - this.tPauseTotal; }; flmEffect.prototype.play = function () { var v1 = this; if (v1.playing == true) { } else { v1.initT = getTimer() / 1000; if (v1.initEffect != null) { v1.initEffect(); } else { if (v1.onInitEffect != null) { v1.onInitEffect.call(v1.parent); } } if (v1.parent.clip[v1.index] == null) { v1.parent.clip.createEmptyMovieClip(v1.index, v1.index); v1.clip = v1.parent.clip[v1.index]; v1.clip.obj = v1; } v1.clip.onEnterFrame = v1.onEnterFrame; v1.playing = true; } }; flmEffect.prototype.stop = function () { var v1 = this; if (v1.playing == false) { } else { v1.playing = false; v1.clip.removeMovieClip(); v1.nextAction(); } }; flmEffect.prototype.pause = function (tPause) { var v1 = this; v1.tPauseTotal += tPause; v1.tEndPause = v1.getT() + tPause; v1.clip.onEnterFrame = v1.onPause; }; flmEffect.prototype.onPause = function () { var v1 = this; if (v1.obj.getT() < v1.obj.tEndPause) { } else { v1.obj.clip.onEnterFrame = v1.obj.onEnterFrame; } }; flmEffect.prototype.nextAction = function () { var v1 = this; if (v1.onEndEffect != null) { v1.onEndEffect.play(); } else { if (v1.arrayIndex != null) { v1.indexAct = v1.arrayIndex + 1; v1.nextPlay = v1.arrayRef[v1.indexAct].play(); } } if (v1.nextPlay == 'single') { ++v1.arrayIndex; v1.nextAction(); } }; flmEffect.prototype.onEnterFrame = function () { var v1 = this; if (v1.obj.parent.root.stoped == true) { v1.obj.stop(); } v1.obj.t = v1.obj.getT(); v1.obj.onEffect.call(v1.obj.parent); }; singleAction = function (parent, action) { this.parent = parent; this.action = action; }; singleAction.prototype.play = function () { this.action.call(this.parent); return 'single'; }; fadeIn = function (parent, vel) { this.parent = parent; this.vel = vel; }; fadeIn.prototype = new _root.flmEffect('fadeIn'); fadeIn.prototype.initEffect = function () { var v1 = this; if (v1.parent.fadeOut.playing == true) { v1.parent.fadeOut.stop(); } v1.alphaMax = (v1.parent.alphaMax != null) ? v1.parent.alphaMax : 100; if (v1.clip._visible != 1) { v1.show(); } }; fadeIn.prototype.onEffect = function () { var v1 = this; ++v1.fadeIn.nPaso; if (v1.clip._alpha + v1.fadeIn.vel <= v1.fadeIn.alphaMax) { v1.setAlpha(v1.clip._alpha + v1.fadeIn.vel); } else { v1.clip._alpha = v1.fadeIn.alphaMax; v1.fadeIn.stop(); } }; fadeOut = function (parent, vel) { this.parent = parent; this.vel = vel; }; fadeOut.prototype = new _root.flmEffect('fadeOut'); fadeOut.prototype.initEffect = function () { if (this.parent.fadeIn.playing == true) { this.parent.fadeIn.stop(); } }; fadeOut.prototype.onEffect = function () { var v1 = this; if (v1.clip._alpha - v1.fadeOut.vel >= 0) { v1.setAlpha(v1.clip._alpha - v1.fadeOut.vel); } else { if (v1.fadeOut.endVisible != true) { v1.hide(); } else { v1.clip._alpha = 0; } v1.fadeOut.stop(); } }; preloader = function (parent, target) { var v1 = this; v1.parent = parent; v1.target = (target == null) ? v1.parent : target; }; preloader.prototype = new _root.flmEffect('preloader'); preloader.prototype.onEffect = function () { var v1 = this; v1.target = v1.preloader.target.clip; v1.bytesLoaded = v1.target.getBytesLoaded(); v1.bytesTotal = v1.target.getBytesTotal(); if (v1.bytesTotal < 3) { } else { if (v1.bytesLoaded == v1.bytesTotal) { ++v1.tPause; if (v1.tPause < 10) { } else { v1.preloader.stop(); } } } }; Math.easeInOutQuint = function (t, b, c, d) { var v1 = t; v1 /= d / 2; if (v1 < 1) { return Math.ceil(((c / 2) * v1 * v1 * v1 * v1 * v1 + b) * 100) / 100; } v1 -= 2; return Math.ceil(((c / 2) * (v1 * v1 * v1 * v1 * v1 + 2) + b) * 100) / 100; }; Math.easeOutQuint = function (t, b, c, d) { var v1 = t; v1 = v1 / d - 1; return Math.ceil((c * (v1 * v1 * v1 * v1 * v1 + 1) + b) * 100) / 100; }; Math.easeInQuad = function (t, b, c, d) { t /= d; return Math.ceil((c * t * t + b) * 100) / 100; }; Math.easeInOutQuart = function (t, b, c, d) { var v1 = t; v1 /= d / 2; if (v1 < 1) { return Math.ceil(((c / 2) * v1 * v1 * v1 * v1 + b) * 100) / 100; } v1 -= 2; return Math.ceil(((-c / 2) * (v1 * v1 * v1 * v1 - 2) + b) * 100) / 100; }; Math.easeInOutSine = function (t, b, c, d) { return Math.ceil(((c / 2) * (1 - Math.cos((t / d) * Math.PI)) + b) * 100) / 100; }; Math.easeOutSine = function (t, b, c, d) { return Math.ceil((c * Math.sin((t / d) * 1.570796326794897) + b) * 100) / 100; }; Math.easeInSine = function (t, b, c, d) { return Math.ceil((c * (1 - Math.cos((t / d) * 1.570796326794897)) + b) * 100) / 100; }; Math.easeInCirc = function (t, b, c, d) { t /= d; return -c * (Math.sqrt(1 - t * t) - 1) + b; }; Math.easeOutCirc = function (t, b, c, d) { var v1 = t; v1 = v1 / d - 1; return c * Math.sqrt(1 - v1 * v1) + b; }; Math.easeInOutCirc = function (t, b, c, d) { var v1 = t; v1 /= d / 2; if (v1 < 1) { return (-c / 2) * (Math.sqrt(1 - v1 * v1) - 1) + b; } v1 -= 2; return (c / 2) * (Math.sqrt(1 - v1 * v1) + 1) + b; }; Math.easeInExpo = function (t, b, c, d) { return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b; }; Math.easeInElastic = function (t, b, c, d, a, p) { var v1 = p; var v2 = t; var v3 = c; if (v2 == 0) { return b; } v2 /= d; if (v2 == 1) { return b + v3; } if (!v1) { v1 = d * 0.3; } if (a < Math.abs(v3)) { a = v3; var s = v1 / 4; } else { var s = (v1 / 6.283185307179586) * Math.asin(v3 / a); } v2 -= 1; return -(a * Math.pow(2, 10 * v2) * Math.sin((v2 * d - s) * 6.283185307179586 / v1)) + b; }; Math.easeOutElastic = function (t, b, c, d, a, p) { var v1 = c; var v2 = p; var v3 = t; if (v3 == 0) { return b; } v3 /= d; if (v3 == 1) { return b + v1; } if (!v2) { v2 = d * 0.3; } if (a < Math.abs(v1)) { a = v1; var s = v2 / 4; } else { var s = (v2 / 6.283185307179586) * Math.asin(v1 / a); } return a * Math.pow(2, -10 * v3) * Math.sin((v3 * d - s) * 6.283185307179586 / v2) + v1 + b; }; Math.easeInOutElastic = function (t, b, c, d, a, p) { var v1 = t; var v2 = p; var v3 = c; if (v1 == 0) { return b; } v1 /= d / 2; if (v1 == 2) { return b + v3; } if (!v2) { v2 = d * 0.45; } if (a < Math.abs(v3)) { a = v3; var s = v2 / 4; } else { var s = (v2 / 6.283185307179586) * Math.asin(v3 / a); } if (v1 < 1) { v1 -= 1; return -0.5 * (a * Math.pow(2, 10 * v1) * Math.sin((v1 * d - s) * 6.283185307179586 / v2)) + b; } v1 -= 1; return a * Math.pow(2, -10 * v1) * Math.sin((v1 * d - s) * 6.283185307179586 / v2) * 0.5 + v3 + b; }; flmObject.prototype.initDefaultEffects = function () { var v1 = this; var v2 = _root; v1.fadeIn = new v2.fadeIn(v1, 10); v1.fadeOut = new v2.fadeOut(v1, 10); v1.preloader = new v2.preloader(v1); }; ASSetPropFlags(flmObject.prototype, null, 1); _root.imagenVisual = function (parent, node) { var v1 = this; v1.parent = parent; v1.node = node; v1.init(); }; _root.imagenVisual.prototype = new _root.flmObject('imagenVisual'); _root.imagenVisual.prototype.onInit = function () { var v1 = this; v1.buttonsW = 20; v1.pauseToLoadNext = v1.addEffect(v1.onPauseToLoadNext); v1.createMatrix = v1.addEffect(v1.onCreateMatrix); v1.createMatrix.onInitEffect = v1.onInitCreateMatrix; v1.maskedTrans = v1.addEffect(v1.onMaskedTrans); v1.maskedTrans.onInitEffect = v1.onInitMaskedTrans; v1.transitions = new Array(); v1.transitions.push('matrix'); v1.transitions.push('fade'); v1.transitions.push('maskedTrans'); v1.imageName = _root.imagesPath + v1.node.attributes.url; v1.columnsMatrix = parseInt(((v1.node.attributes.matrix.toString()).split('x', 1))[0]); v1.linesMatrix = parseInt(((v1.node.attributes.matrix.toString()).split('x', 2))[1]); v1.sepMatrix = parseInt(v1.node.attributes.sepMatrix); v1.x = v1.node.attributes.x; v1.y = v1.node.attributes.y; v1.w = v1.node.attributes.w; v1.h = v1.node.attributes.h; v1.setPos(v1.x, v1.y); v1.image1 = new _root.flmLibrary('blank', v1); v1.image2 = new _root.flmLibrary('blank', v1); v1.imageAct = v1.image2; v1.mask = new _root.flmLibrary('blank', v1); v1.nImage = 1; if (v1.node.attributes.imageButtons != null) { v1.butArray = new Array(); v1.buttons = new _root.flmLibrary('blank', v1, v1.node.attributes.imageButtonsX, v1.node.attributes.imageButtonsY); v1.buttons.onPress = v1.onPressButton; var v2 = 0; while (v2 < parseInt(v1.node.attributes.nImages)) { v1.butArray[v1.butArray.length] = new _root.flmButton('fondo', v1.buttons, v2 * v1.buttonsW, 0, 20, 20); var v3 = v1.butArray[v1.butArray.length]; v3.addText('parrafoBold', '0' + (v2 + 1), 0, 0, 'left', true); v3.setColors('grisMasOscuro', 'grisOscuro', 'grisOscuro', null, 'blanco'); v3.setAlpha(0); ++v2; } v1.firstTime = true; v1.butArray[0].click(); } else { if (v1.node.attributes.url != null) { v1.imageURL = v1.imageName; if (v1.node.attributes.nImages != null) { v1.imageURL += '1'; } if (v1.node.attributes.ext != null) { v1.imageURL += v1.node.attributes.ext; } v1.imageAct.hide(0); v1.imageAct.preloader.onEndEffect = new _root.singleAction(v1, v1.initTransition); v1.imageAct.loadMovie(v1.imageURL); } } }; _root.imagenVisual.prototype.initTransition = function () { var v1 = this; var v2 = v1.node.attributes.transition; if (v2 == 'random') { var v3 = Math.floor(Math.random() * v1.transitions.length); v2 = v1.transitions[v3]; } if (v2 != null) { switch (v2) { case 'matrix': v1.actEffectPlay = v1.createMatrix; break; case 'fade': v1.imageAct.clip.swapDepths(v1.lastImage.clip); v1.imageAct.show(0); v1.actEffectPlay = v1.imageAct.fadeIn; break; case 'maskedTrans': v1.actEffectPlay = v1.maskedTrans; } } else { if (_root.actSite == 'Leds') { v1.actEffectPlay = v1.maskedTrans; } else { v1.actEffectPlay = v1.createMatrix; } } if (v1.node.attributes.auto != null) { v1.actEffectPlay.onEndEffect = v1.pauseToLoadNext; } else { v1.actEffectPlay.onEndEffect = null; } v1.actEffectPlay.play(); }; _root.imagenVisual.prototype.onPressButton = function (button) { var v1 = this; var v2 = button; if (v1.lastButPress != v2) { v1.parent.lastImage = v1.parent.imageAct; v1.parent.imageAct = (v1.parent.imageAct == v1.parent.image1) ? v1.parent.image2 : v1.parent.image1; v1.parent.imageAct.setMask(v1.parent.mask); v1.parent.imageURL = v1.parent.imageName + (parseInt(v2.text.texto)).toString(); v1.parent.imageURL += v1.parent.node.attributes.ext; v1.lastButPress = v2; v1.parent.imageAct.preloader.onEndEffect = v1.parent.createMatrix; v1.parent.imageAct.loadMovie(v1.parent.imageURL); } if (v1.parent.node.attributes.toContent == 'true') { if (v1.parent.firstTime == true) { v1.parent.firstTime = false; } else { v1.parent.parent.parent.parent.initContent(v1.parent.parent.dataNode, (parseInt(v2.text.texto)).toString()); } } }; _root.imagenVisual.prototype.onPauseToLoadNext = function () { var v1 = this; if (v1.actEffectPlay.getT() > parseFloat(v1.node.attributes.pause)) { v1.pauseToLoadNext.stop(); v1.loadNextImage(); } }; _root.imagenVisual.prototype.loadNextImage = function () { var v1 = this; if (v1.stoped == true) { } else { if (v1.nImage++ >= v1.node.attributes.nImages) { v1.nImage = 1; } v1.lastImage = v1.imageAct; v1.imageAct = (v1.imageAct == v1.image1) ? v1.image2 : v1.image1; v1.imageURL = v1.imageName + v1.nImage + v1.node.attributes.ext; v1.imageAct.preloader.onEndEffect = new _root.singleAction(v1, v1.initTransition); v1.imageAct.loadMovie(v1.imageURL); } }; _root.imagenVisual.prototype.stopAnimation = function () { this.stoped = true; }; _root.imagenVisual.prototype.makeMatrix = function (maskMovie) { var v1 = this; v1.maskCuadW = Math.floor(v1.w - Math.ceil(v1.columnsMatrix / 2) * v1.sepMatrix) / v1.columnsMatrix; v1.maskCuadH = Math.floor(v1.h - Math.ceil(v1.linesMatrix / 2) * v1.sepMatrix) / v1.linesMatrix; if (v1.maskCuads != null) { v1.maskCuads.reset(); } else { v1.maskCuads = new Array(); } var nLin = 0; while (nLin < v1.linesMatrix) { var v3 = 0; while (v3 < v1.columnsMatrix) { var tempX = v3 * (v1.maskCuadW + v1.sepMatrix); var tempY = nLin * (v1.maskCuadH + v1.sepMatrix); var v2 = v1.maskCuads.length; v1.maskCuads[v2] = new _root.flmLibrary(maskMovie, v1.mask, tempX, tempY, 0, 0); v1.maskCuads[v2].fader = new _root.flmLibrary(maskMovie, v1, tempX, tempY, v1.maskCuadW, v1.maskCuadH, 'blanco'); v1.maskCuads[v2].fader.hide(); ++v3; } ++nLin; } }; _root.imagenVisual.prototype.onInitCreateMatrix = function () { var v2 = this; v2.nVez = 0; v2.nCuadsShow = 0; v2.makeMatrix('fondo'); var v1 = 0; while (v1 < v2.maskCuads.length) { v2.maskCuads[v1].setSize(0, 0); v2.maskCuads[v1].created = false; ++v1; } v2.imageAct.setMask(v2.mask); v2.imageAct.show(100); v2.imageAct.clip.swapDepths(v2.lastImage.clip); }; _root.imagenVisual.prototype.onCreateMatrix = function () { var v1 = this; if (v1.parent.showItem == null || v1.parent.showItem != null && v1.parent.showItem.playing != true) { if (v1.nCuadsShow == v1.maskCuads.length) { v1.createMatrix.stop(); } if (v1.nVez++ > 2) { v1.nCuad = Math.floor(Math.random() * v1.maskCuads.length); v1.actCuad = v1.maskCuads[v1.nCuad]; while (v1.actCuad.created == true) { v1.nCuad = Math.floor(Math.random() * v1.maskCuads.length); v1.actCuad = v1.maskCuads[v1.nCuad]; } v1.actCuad.created = true; ++v1.nCuadsShow; v1.actCuad.setSize(v1.maskCuadW, v1.maskCuadH); v1.actCuad.fader.show(100); v1.actCuad.fader.fadeOut.play(); v1.nVez = 0; } } }; _root.imagenVisual.prototype.onInitMaskedTrans = function () { var v2 = this; v2.nVez = 0; v2.nCuadsShow = 0; var v3 = (v2.node.attributes.maskMovie != null) ? v2.node.attributes.maskMovie : 'circleMaskAnim'; v2.makeMatrix(v3); var v1 = 0; while (v1 < v2.maskCuads.length) { v2.maskCuads[v1].fader.setSize(0, 0); v2.maskCuads[v1].created = false; ++v1; } v2.imageAct.setMask(v2.mask); v2.imageAct.show(100); v2.imageAct.clip.swapDepths(v2.lastImage.clip); }; _root.imagenVisual.prototype.onMaskedTrans = function () { var v1 = this; if (v1.parent.showItem == null || v1.parent.showItem != null && v1.parent.showItem.playing != true) { if (v1.nCuadsShow == v1.maskCuads.length) { v1.maskedTrans.stop(); } if (v1.nVez++ > 2) { v1.nCuad = Math.floor(Math.random() * v1.maskCuads.length); v1.actCuad = v1.maskCuads[v1.nCuad]; while (v1.actCuad.created == true) { v1.nCuad = Math.floor(Math.random() * v1.maskCuads.length); v1.actCuad = v1.maskCuads[v1.nCuad]; } v1.actCuad.created = true; v1.actCuad.clip._x += v1.maskCuadW / 2; v1.actCuad.clip._y += v1.maskCuadH / 2; v1.actCuad.setSize(10, 10); v1.actCuad.clip.gotoAndPlay(1); ++v1.nCuadsShow; v1.nVez = 0; } } }; root = new _root.rootObj('Visualizacion'); root.onInit = function () { var v1 = _root; var v2 = this; if (v1.mode != 'web') { v1.rootPath = '../'; } v1.xmlPath = v1.rootPath + 'xml/'; v1.flashPath = v1.rootPath + 'flash/'; v1.imagesPath = v1.rootPath + 'content/images/'; v2.stylesXML = new XML(); v2.stylesXML.onLoadXML = v2.initCreateStyles; v2.stylesXML.parent = v2; v2.stylesXML.ignoreWhite = true; if (v1.lang == null) { v2.loadIntro(); } else { v2.loadStyles(); } }; root.initCreateStyles = function () { var v1 = this; v1.colorsNode = v1.stylesXML.getNodeByName('colors'); v1.createColors(); v1.stylesNode = v1.stylesXML.getNodeByName('styles'); v1.createStyles(); v1.loadHome(); }; root.loadIntro = function () { var v1 = this; v1.intro = new _root.flmLibrary('blank', v1); v1.intro.loadMovie(_root.flashPath + 'introForm.swf'); }; root.loadStyles = function () { var v1 = _root; v1.xmlPath += v1.actSite + '/'; v1.imagesPath += v1.actSite + '/'; this.stylesXML.load(v1.xmlPath + 'root.xml'); }; root.loadHome = function () { var v1 = this; v1.home.remove(); v1.home = new _root.flmLibrary('blank', v1); v1.home.loadMovie(_root.flashPath + 'home.swf'); };