este es el codigo completo
Código ActionScript :
linkColores.linkColoresText.html = true;
if (idIdioma == 1)
{
colorViniloText.text = "Color del vinilo:";
linkColores.linkColoresText.htmlText = "<u>ver colores</u>";
colorFondoText.text = "Color del fondo:";
masColoresText.text = "más colores";
orientacionText.text = "Orientación:";
tipoViniloText.text = "Tipo de vinilo:";
medidasText.text = "Medidas:";
tamText.text = "Tamaño / precio:";
unidadesText.text = "Unidades:";
precioText.text = "Precio:";
ivaText.text = "IVA incluido";
carritoText.text = "AÑADIR AL CARRITO";
var unitats = new Array();
unitats = ["centímetros", "pulgadas"];
var tip1Txt = "Los colores pueden variar<br />según la configuración de su monitor.<br />Por eso dispone de<br />códigos RAL y Pantone.";
var tip2Txt = "Solo para la vista previa.<br />El fondo no forma parte<br />de la pegatina";
var tip3Txt = "La posición Volteado sirve para<br />colocar adhesivos por la parte<br />trasera de un cristal o para dar<br />la vuelta a un modelo como<br />si se mirara en un espejo.";
var tip4Txt = "El color seleccionado no está disponible en mate";
var tip5Txt = "Este vinilo no es volteable";
noElegibleTxt.text = "Este modelo no admite selección de color";
noElegibleTxt2.text = "Este modelo no admite selección de color";
orient_bt1.normal.normalText.text = "NORMAL";
orient_bt2.volteado.volteadoText.text = "VOLTEADO";
brillo_bt.brillo.brilloText.text = "BRILLO";
mate_bt.mate.mateText.text = "MATE";
}
else if (idIdioma == 2)
{
colorViniloText.text = "Vinyl color:";
linkColores.linkColoresText.htmlText = "<u>see colors</u>";
colorFondoText.text = "Background color:";
masColoresText.text = "other colors";
orientacionText.text = "Position:";
tipoViniloText.text = "Vinyl type:";
medidasText.text = "Sizes:";
tamText.text = "Size / price:";
unidadesText.text = "Units:";
precioText.text = "Price:";
ivaText.text = "VAT included";
carritoText.text = "ADD TO CART";
var unitats = new Array();
unitats = ["centimeters", "inches"];
var tip1Txt = "The colors may differ<br />depending of the adjust of your monitor<br />That is why you can check<br />The RAL and PANTONE codes.";
var tip2Txt = "Only for the preview.<br />Background doesn’t belong<br />to the sticker";
var tip3Txt = "The inverted position<br />serves to put the sticker <br />Behind a window or to<br />turn a model as if you<br />looked it in a mirror.";
var tip4Txt = "The chosen color is not available in Matt";
var tip5Txt = "This vinyl cannot be inverted";
noElegibleTxt.text = "This design doesn\'t admit color selection. ";
noElegibleTxt2.text = "This design doesn\'t admit color selection. ";
orient_bt1.normal.normalText.text = "NORMAL";
orient_bt2.volteado.volteadoText.text = "INVERTED";
brillo_bt.brillo.brilloText.text = "GLOSSY";
mate_bt.mate.mateText.text = "MATT";
}
else if (idIdioma == 3)
{
colorViniloText.text = "Couleur du vinyle:";
linkColores.linkColoresText.htmlText = "<u>voir couleurs</u>";
colorFondoText.text = "Couleur du fond:";
masColoresText.text = "autres couleurs";
orientacionText.text = "Orientation:";
tipoViniloText.text = "Type de vinyle:";
medidasText.text = "Mesures:";
tamText.text = "Mesure / prix:";
unidadesText.text = "Unités:";
precioText.text = "Prix:";
ivaText.text = "TVA incluse";
carritoText.text = "AJOUTER AU PANIER";
var unitats = new Array();
unitats = ["centimètres", "pouces"];
var tip1Txt = "Les couleurs peuvent varier<br />selon les réglages de votre écran.<br />Vous disposez donc de<br />codes RAL et Pantone.";
var tip2Txt = "Seulement pour l\'aperçu.<br />Le fond n\'appartient pas<br />à l\'autocolant";
var tip3Txt = "La position retournée sert à<br />positionner les autocolants<br />derrière un verre ou pour<br />tourer un dessin comment<br /> si vour regardez dans un miroir.";
var tip4Txt = "La couleur sélectionnée n\'est pas disponible en mat.";
var tip5Txt = "Ce vinyle no peut être retourné ";
noElegibleTxt.text = "Le dessin n\'admet pas selection de coleur.";
noElegibleTxt2.text = "Le dessin n\'admet pas selection de coleur.";
orient_bt1.normal.normalText.text = "NORMAL";
orient_bt2.volteado.volteadoText.text = "INVERSÉ ";
brillo_bt.brillo.brilloText.text = "BRILLANT";
mate_bt.mate.mateText.text = "MAT";
}
else if (idIdioma == 4)
{
colorViniloText.text = "Vinyl farbe:";
linkColores.linkColoresText.htmlText = "<u>Siehe Farben</u>";
colorFondoText.text = "Hintergrundfarbe:";
masColoresText.text = "Andere Farben";
orientacionText.text = "Standpunkt:";
tipoViniloText.text = "Vinyl-typ:";
medidasText.text = "Größe:";
tamText.text = " Größe / Preise:";
unidadesText.text = "Einheiten:";
precioText.text = "Preise:";
ivaText.text = "Inklusive MwSt.";
carritoText.text = "IN DEN WARENKORB";
var unitats = new Array();
unitats = ["Zentimeter", "Zoll"];
var tip1Txt = "Die Farben können sich je nach<br />der Anpassung des Monitors.<br /> Das ist der Grund, warum können<br /> Sie die RAL und PANTONE-Codes.";
var tip2Txt = "Nur für die Vorschau<br />Hintergrund gehört nicht <br />zu den Aufkleber";
var tip3Txt = "Der Umgedreht Position<br />top ut dem Aufkleber<br />hinter einem Fenster oder,<br /> um ein Modell, als ob man <br />sie in einem Spiegel.";
var tip4Txt = "Die gewählte Farbe ist nicht verfügbar, in Matt";
var tip5Txt = "Diese Vinyl kann nicht invertiert";
noElegibleTxt.text = "Dieses Design nicht zugeben, Farbauswahl.";
noElegibleTxt2.text = "Dieses Design nicht zugeben, Farbauswahl.";
orient_bt1.normal.normalText.text = "NORMAL";
orient_bt2.volteado.volteadoText.text = "UMGEDREHT";
brillo_bt.brillo.brilloText.text = "BRILLANT";
mate_bt.mate.mateText.text = "MAT";
}
else
{
colorViniloText.text = "Colore del vinile:";
linkColores.linkColoresText.htmlText = "<u>vedi colori</u>";
colorFondoText.text = "Colore del fondo:";
masColoresText.text = "altri colori";
orientacionText.text = "Orientamento:";
tipoViniloText.text = "Tipo di vinile:";
medidasText.text = "Misure:";
tamText.text = "Misure / prezzi:";
unidadesText.text = "Unità:";
precioText.text = "Prezzo:";
ivaText.text = "IVA inclusa";
carritoText.text = "ACQUISTA ORA";
var unitats = new Array();
unitats = ["centimetri", "pollice"];
var tip1Txt = "I colori possono variare in fuzione<br /> della configurazione del suo monitor<br />Per questa ragione, Lei può verificare<br />i codici RAL e PANTONE";
var tip2Txt = "Solo per l’anteprima.<br />Il fondo non appartiene<br />all’adesivo";
var tip3Txt = "La posizione Girato serve a<br />collocare l’adesivo dietro<br />un vetro oppure per girare <br />l’articulo come se Lei<br />guardi in uno specchio.";
var tip4Txt = "Il colore scelto non è disponibile in mat";
var tip5Txt = "Questo vinilo non si può girare";
noElegibleTxt.text = "Questo modello non ammette selezione di colore.";
noElegibleTxt2.text = "Questo modello non ammette selezione di colore.";
orient_bt1.normal.normalText.text = "NORMALE";
orient_bt2.volteado.volteadoText.text = "GIRATO";
brillo_bt.brillo.brilloText.text = "LUCIDO";
mate_bt.mate.mateText.text = "MAT";
} // end else if
function setMoneda()
{
if (moneda == "GB")
{
monedaText = "£ ";
changeState = cambio[2];
}
else if (moneda == "US$")
{
monedaText = "$";
changeState = cambio[1];
}
else
{
monedaText = "€";
changeState = cambio[0];
} // end else if
totalPriceSymbol.text = monedaText;
} // End of the function
function setMesura()
{
for (i = 0; i < unitats.length; i++)
{
duplicateMovieClip(comboMedidas.selector, "selector" + i, i);
selectors = comboMedidas["selector" + i];
selectors.id = i;
selectors._visible = false;
selectors.selectorText.text = unitats[i];
if (i != 0)
{
selectors._y = comboMedidas["selector" + (i - 1)]._y + selectors._height - 1;
} // end if
selectors.onRollOver = function ()
{
this.gotoAndStop(2);
};
selectors.onRollOut = selectors.onReleaseOutside = function ()
{
this.gotoAndStop(1);
};
selectors.onRelease = function ()
{
comboMedidas.selectedText.text = this.selectorText.text;
mesuraState = canviUnitats[this.id];
mesuraShortState = unitatsShort[this.id];
showHideOptions();
setSizes();
};
} // end of for
comboMedidas.selectedText.text = unitats[idMedida - 1];
mesuraState = canviUnitats[idMedida - 1];
mesuraShortState = unitatsShort[idMedida - 1];
} // End of the function
function setSizes()
{
if (medidaIdArray[0])
{
}
else
{
medidaIdArray = medidasIds.split("#");
medidaHArray = medidasHs.split("#");
medidaWArray = medidasWs.split("#");
precioArray = medidasPrecios.split("#");
totalMides = medidaIdArray.length;
if (totalMides > 5)
{
comboTam.selector._y = comboTam.selector._y - (comboTam.selector._height * totalMides + comboTam.selector._height / 2 + 3);
} // end if
} // end else if
for (i = 0; i < totalMides; i++)
{
duplicateMovieClip(comboTam.selector, "selector" + i, i);
selectors = comboTam["selector" + i];
selectors.id = i;
selectors._visible = false;
var _loc3 = Number(medidaWArray[i]);
var _loc2 = Number(medidaHArray[i]);
selectors.selectorText.text = substring(_loc3 * mesuraState, 0, 3) + " x " + substring(_loc2 * mesuraState, 0, 3) + "" + mesuraShortState + " |";
valor = Number(precioArray[i] * changeState);
selectors.selectorPrice.text = formatDecimals(Number(Math.round(valor * 100) / 100), 2) + "" + monedaText;
if (i != 0)
{
selectors._y = comboTam["selector" + (i - 1)]._y + selectors._height - 1;
} // end if
selectors.onRollOver = function ()
{
this.gotoAndStop(2);
};
selectors.onRollOut = selectors.onReleaseOutside = function ()
{
this.gotoAndStop(1);
};
selectors.onRelease = function ()
{
comboTam.selectedText.text = this.selectorText.text;
comboTam.selectedTextPrice.text = this.selectorPrice.text;
tamState = Number(medidaWArray[this.id]);
tamStateId = this.id;
selectedPrice = Number(precioArray[this.id]);
showHideOptionsTam();
setPrice();
};
} // end of for
tamState = Number(medidaWArray[0]);
tamStateId = 0;
tamStateText = tamState.toString();
var _loc5 = Number(medidaWArray[0]);
var _loc4 = Number(medidaHArray[0]);
comboTam.selectedText.text = substring(_loc5 * mesuraState, 0, 3) + " x " + substring(_loc4 * mesuraState, 0, 3) + " " + mesuraShortState + " |";
valor = Number(precioArray[0]) * changeState;
comboTam.selectedTextPrice.text = Number(Math.round(valor * 100) / 100) + "" + monedaText;
selectedPrice = Number(precioArray[0]);
setPrice();
} // End of the function
function setPrice()
{
var _loc1 = Number(selectedPrice * units.text * colorSelected.valor / 100);
var _loc3 = Number(selectedPrice * units.text + _loc1) * changeState;
var _loc2 = formatDecimals(Number(Math.round(_loc3 * 100) / 100), 2);
price.text = _loc2;
imatgesSwf.loadMides();
} // End of the function
function setColors()
{
for (i = 0; i < availableColors.length; i++)
{
duplicateMovieClip(col, "col" + i, i);
cols = _root["col" + i];
var _loc3 = new Color("cols.colorBase");
cols.suColor = availableColors[i];
cols.suNombre = availableColorsNames[i];
cols.id = realIds[i];
cols.valor = 0;
cols.brillo._visible = false;
cols.mate = true;
cols.brillante = true;
cols.seleccionado._visible = false;
if (realIds[i] == "33")
{
cols.carbono._alpha = 100;
} // end if
for (a = 0; a < specialColors.length; a++)
{
if (specialColors[a] == cols.id)
{
cols.brillo._visible = true;
cols.valor = specialColorsValues[a];
cols.suNombre = cols.suNombre + (" (+" + cols.valor + "%)");
cols.gotoAndStop(2);
} // end if
} // end of for
for (m = 0; m < noMateColors.length; m++)
{
if (noMateColors[m] == cols.id)
{
cols.mate = false;
cols.brillant = true;
} // end if
} // end of for
for (r = 0; r < noBrilloColors.length; r++)
{
if (noBrilloColors[r] == cols.id)
{
cols.mate = true;
cols.brillante = false;
} // end if
} // end of for
for (b = 0; b < brillanteColors.length; b++)
{
if (brillanteColors[b] == i)
{
cols.brillo._visible = true;
} // end if
} // end of for
_loc3.setRGB(cols.suColor);
cols.onRollOver = function ()
{
titolColorSelected.text = this.suNombre;
};
cols.onRollOut = cols.onReleaseOutside = function ()
{
titolColorSelected.text = colorSelected.suNombre;
};
cols.onRelease = function ()
{
colorSelected.seleccionado._visible = false;
if (_root.vec == "1")
{
colorSet = new Color("vectorLoader");
colorSet.setRGB(this.suColor);
} // end if
colorSelected = this;
colorSelected.seleccionado._visible = true;
if (colorSelected.id == 1 && bgColorSelected == colBg0)
{
bgColorSelected.seleccionado._visible = false;
colorSetBg = new Color("vectorBackground");
colorSetBg.setRGB(colBg4.suColor);
bgColorSelected = colBg4;
bgColorSelected.seleccionado._visible = true;
} // end if
if (colorSelected.id == 36 && bgColorSelected == colBg4)
{
bgColorSelected.seleccionado._visible = false;
colorSetBg = new Color("vectorBackground");
colorSetBg.setRGB(colBg0.suColor);
bgColorSelected = colBg0;
bgColorSelected.seleccionado._visible = true;
} // end if
if (this.mate == false && this.brillante == true)
{
tracer.text = "si, aqui estoy";
infoTip4._visible = true;
mate = false;
mate_bt.enabled = false;
mate_bt._alpha = 30;
brillo_bt._alpha = 100;
brillo_bt.enabled = false;
brillo_bt.gotoAndStop(2);
mate_bt.gotoAndStop(1);
}
else if (this.mate == true && this.brillante == false)
{
anteriorSoloMate = true;
infoTip4._visible = false;
mate = true;
mate_bt.enabled = false;
brillo_bt.enabled = false;
brillo_bt._alpha = 30;
mate_bt._alpha = 100;
brillo_bt.gotoAndStop(1);
mate_bt.gotoAndStop(2);
}
else
{
infoTip4._visible = false;
mate_bt.enabled = true;
brillo_bt.enabled = true;
mate_bt._alpha = 100;
brillo_bt._alpha = 100;
if (countSelectBrillo == true)
{
brillo_bt.gotoAndStop(2);
mate_bt.gotoAndStop(1);
mate = false;
}
else if (countSelectMate == true)
{
brillo_bt.gotoAndStop(1);
mate_bt.gotoAndStop(2);
mate = true;
}
else if (mate == true)
{
tracer.text = "mate si";
brillo_bt.gotoAndStop(1);
mate_bt.gotoAndStop(2);
}
else
{
tracer.text = "mate no";
brillo_bt.gotoAndStop(2);
mate_bt.gotoAndStop(1);
} // end else if
} // end else if
setPrice();
};
if (i != 0)
{
if (i > 15 && i < 32)
{
col16._x = col0._x;
cols._y = cols._y + 20;
}
else if (i > 31)
{
col32._x = col16._x;
cols._y = cols._y + 40;
} // end else if
cols._x = _root["col" + (i - 1)]._x + 20;
} // end if
if (colorSelected == undefined)
{
colorSelected = col1;
colorSelected.seleccionado._visible = true;
titolColorSelected.text = colorSelected.suNombre;
} // end if
} // end of for
setPrice();
} // End of the function
function setBgColors()
{
for (b = 0; b < backgroundColors.length; b++)
{
duplicateMovieClip(colBg, "colBg" + b, 500 + b);
colsBg = _root["colBg" + b];
var _loc3 = new Color("colsBg.colorBase");
colsBg.suColor = backgroundColors[b];
colsBg.brillo._visible = false;
colsBg.seleccionado._visible = false;
colsBg.onRelease = function ()
{
bgColorSelected.seleccionado._visible = false;
colorSetBg = new Color("vectorBackground");
colorSetBg.setRGB(this.suColor);
bgColorSelected = this;
bgColorSelected.seleccionado._visible = true;
};
_loc3.setRGB(colsBg.suColor);
if (b != 0)
{
if (b > 9 && b < 20)
{
colBg10._x = colBg0._x;
colsBg._y = colsBg._y + 20;
}
else if (b > 19)
{
colBg20._x = colBg0._x;
colsBg._y = colsBg._y + 40;
} // end else if
colsBg._x = _root["colBg" + (b - 1)]._x + 20;
} // end if
if (bgColorSelected == undefined)
{
bgColorSelected = colBg0;
bgColorSelected.seleccionado._visible = true;
} // end if
} // end of for
} // End of the function
function loadVector()
{
mclL.onLoadError = function ()
{
loadingError._visible = true;
loadingError.swapDepths(_root.getNextHighestDepth());
};
mclL.onLoadProgress = function (target, loaded, total)
{
totalLoaded = Math.round(loaded / total * 100);
};
mclL.onLoadComplete = function (target)
{
target.setMask(vectorMask);
};
mclL.onLoadInit = function (target)
{
if (vectorLoader._width > vectorLoader._height)
{
vectorLoader._width = vectorMask._width;
vectorLoader._yscale = vectorLoader._xscale;
vectorLoader._y = vectorMask._y + vectorMask._height / 2 - vectorLoader._height / 2;
vectorLoader._x = vectorLoader._x + 8.500000E+000;
}
else
{
vectorLoader._height = vectorMask._height;
vectorLoader._xscale = vectorLoader._yscale;
vectorLoader._x = vectorMask._x + vectorMask._width / 2 - vectorLoader._width / 2 + 17;
vectorLoader._y = vectorLoader._y + 10;
} // end else if
vectorLoader.initX = vectorLoader._x;
vectorLoader.initY = vectorLoader._y;
vectorLoader.initWidth = vectorLoader._width;
vectorLoader.initHeight = vectorLoader._height;
vectorMask.onPress = function ()
{
if (zoom != 1)
{
puntX = _xmouse;
puntY = _ymouse;
vectorMask.onEnterFrame = function ()
{
if (_xmouse < vectorMask._x || _xmouse < vectorMask._y || _xmouse > vectorMask._x + vectorMask._width || _ymouse > vectorMask._y + vectorMask._height)
{
vectorMask.onEnterFrame;
} // end if
distX = _xmouse - puntX;
distY = _ymouse - puntY;
posX = vectorLoader._x + distX * 2;
posY = vectorLoader._y + distY * 2;
gs.TweenLite.to(vectorLoader, 6.500000E-001, {_x: posX, _y: posY, ease: gs.easing.Quart.easeOut});
puntX = _xmouse;
puntY = _ymouse;
};
} // end if
};
vectorMask.onRelease = vectorMask.onReleaseOutside = vectorLoader.onReleaseOutside = vectorLoader.onRollOut = function ()
{
delete vectorMask.onEnterFrame;
};
};
mcl.loadClip(vector, vectorLoader);
} // End of the function
function loadImatge()
{
mclL.onLoadError = function ()
{
loadingError._visible = true;
};
mclL.onLoadProgress = function (target, loaded, total)
{
totalLoaded = Math.round(loaded / total * 100);
};
mclL.onLoadComplete = function (target)
{
target.setMask(vectorMask);
};
mclL.onLoadInit = function (target)
{
if (vectorLoader._width > vectorLoader._height)
{
vectorLoader._width = vectorMask._width;
vectorLoader._yscale = vectorLoader._xscale;
vectorLoader._y = vectorMask._y + vectorMask._height / 2 - vectorLoader._height / 2;
}
else
{
vectorLoader._height = vectorMask._height;
vectorLoader._xscale = vectorLoader._yscale;
vectorLoader._x = vectorMask._x + vectorMask._width / 2 - vectorLoader._width / 2;
} // end else if
vectorLoader.initX = vectorLoader._x;
vectorLoader.initY = vectorLoader._y;
vectorLoader.initWidth = vectorLoader._width;
vectorLoader.initHeight = vectorLoader._height;
vectorMask.onPress = function ()
{
if (zoom != 1)
{
puntX = _xmouse;
puntY = _ymouse;
_root.onEnterFrame = function ()
{
if (_xmouse < vectorMask._x || _xmouse < vectorMask._y || _xmouse > vectorMask._x + vectorMask._width || _ymouse > vectorMask._y + vectorMask._height)
{
delete _root.onEnterFrame;
} // end if
distX = _xmouse - puntX;
distY = _ymouse - puntY;
posX = vectorLoader._x + distX * 2;
posY = vectorLoader._y + distY * 2;
gs.TweenLite.to(vectorLoader, 6.500000E-001, {_x: posX, _y: posY, ease: gs.easing.Quart.easeOut});
puntX = _xmouse;
puntY = _ymouse;
};
} // end if
};
vectorMask.onRelease = vectorLoader.onReleaseOutside = vectorLoader.onRollOut = function ()
{
delete _root.onEnterFrame;
};
};
mcl.loadClip(imagen, vectorLoader);
} // End of the function
function zoomInVector()
{
vectorLoader.cacheAsBitmap = true;
if (zoom == 1)
{
zoom = 2;
finalWidth = vectorLoader.initWidth * zoom;
finalHeight = vectorLoader.initHeight * zoom;
escala = vectorLoader._xscale;
if (volteado == false)
{
finalX = vectorLoader.initX - (vectorLoader.initWidth * zoom - vectorLoader.initWidth) / 2 + 17;
finalY = vectorLoader.initY - (vectorLoader.initHeight * zoom - vectorLoader.initHeight) / 2 + 17;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: finalWidth, _height: finalHeight, _x: finalX, _y: finalY, _xscale: -vectorLoader._xscale, ease: gs.easing.Quart.easeOut});
}
else
{
finalX = vectorLoader.initX + (vectorLoader.initWidth + 17);
finalY = vectorLoader.initY - (vectorLoader.initHeight * zoom - vectorLoader.initHeight) / 2 + 17;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: finalWidth, _height: finalHeight, _x: finalX, _y: finalY, _xscale: -vectorLoader._xscale, ease: gs.easing.Quart.easeOut, onUpdate: negative});
} // end else if
}
else if (zoom == 2)
{
zoom = 3;
finalWidth = vectorLoader.initWidth * zoom;
finalHeight = vectorLoader.initHeight * zoom;
if (volteado == false)
{
finalX = vectorLoader._x - (vectorLoader.initWidth * zoom - vectorLoader.initWidth * 2) / 2 + 17;
finalY = vectorLoader._y - (vectorLoader.initHeight * zoom - vectorLoader.initHeight * 2) / 2 + 17;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: finalWidth, _xscale: escala, _height: finalHeight, _x: finalX, _y: finalY, ease: gs.easing.Quart.easeOut});
}
else
{
finalX = vectorLoader.initX + (vectorLoader.initWidth + 51);
finalY = vectorLoader.initY - (vectorLoader.initHeight * zoom - vectorLoader.initHeight) / 2 + 17;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: finalWidth, _height: finalHeight, _x: finalX, _y: finalY, _xscale: -vectorLoader._xscale, ease: gs.easing.Quart.easeOut, onUpdate: negative});
} // end else if
} // end else if
} // End of the function
function zoomOutVector()
{
vectorLoader.cacheAsBitmap = true;
if (zoom == 3)
{
zoom = 2;
if (volteado == false)
{
finalX = vectorLoader.initX - (vectorLoader.initWidth * zoom - vectorLoader.initWidth) / 2 + 17;
finalY = vectorLoader.initY - (vectorLoader.initHeight * zoom - vectorLoader.initHeight) / 2 + 17;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: vectorLoader.initWidth * zoom, _height: vectorLoader.initHeight * zoom, _x: finalX, _y: finalY, ease: gs.easing.Quart.easeOut});
}
else
{
finalX = vectorLoader.initX + (vectorLoader.initWidth + 34);
finalY = vectorLoader.initY - (vectorLoader.initHeight * zoom - vectorLoader.initHeight) / 2 + 17;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: vectorLoader.initWidth * zoom, _height: vectorLoader.initHeight * zoom, _x: finalX, _y: finalY, ease: gs.easing.Quart.easeOut, onUpdate: negative});
} // end else if
}
else if (zoom == 2)
{
if (volteado == false)
{
finalX = vectorLoader.initX;
finalY = vectorLoader.initY;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: vectorLoader.initWidth, _height: vectorLoader.initHeight, _x: finalX, _y: finalY, ease: gs.easing.Quart.easeOut});
}
else
{
finalX = vectorLoader.initX + vectorLoader.initWidth - 17 * zoom;
finalY = vectorLoader.initY;
gs.TweenLite.to(vectorLoader, 5.000000E-001, {_width: vectorLoader.initWidth, _height: vectorLoader.initHeight, _x: finalX, _y: finalY, ease: gs.easing.Quart.easeOut, onUpdate: negative});
} // end else if
zoom = 1;
} // end else if
} // End of the function
function negative()
{
vectorLoader._xscale = -vectorLoader._xscale;
} // End of the function
function showHideOptions()
{
for (a = 0; a < unitats.length; a++)
{
selectores = _root.comboMedidas["selector" + a];
if (selectores._visible == false)
{
selectores._visible = true;
continue;
} // end if
selectores._visible = false;
} // end of for
} // End of the function
function showHideOptionsTam()
{
for (a = 0; a < totalMides; a++)
{
selectores = _root.comboTam["selector" + a];
if (selectores._visible == false)
{
selectores._visible = true;
continue;
} // end if
selectores._visible = false;
} // end of for
} // End of the function
function changeColor(clip, theColor)
{
var _loc1 = new Color(clip);
_loc1.setRGB(theColor);
} // End of the function
setProperty("", _quality, "BEST");
Stage.scaleMode = "noScale";
Stage.align = "TL";
getURL("javascript:swffit.fit (\'swfDiv\',825,762,825,762,false,false)");
var availableColorsNames = new Array();
availableColorsNames = colorNames.split("#");
var availableColors = new Array();
availableColors = colorHex.split("#");
var realIds = new Array();
realIds = colorId.split("#");
var specialColors = new Array();
specialColors = colorSpecial.split("#");
var specialColorsValues = new Array();
specialColorsValues = increment.split("#");
var noMateColors = new Array();
noMateColors = noMateColor.split("#");
var noBrilloColors = new Array();
noBrilloColors = noBrilloColor.split("#");
var brillanteColors = new Array();
brillanteColors = [29, 30];
var backgroundColors = new Array();
var backgroundColors = [16777215, 13421772, 10066329, 6710886, 0, 16776605, 16776192, 16766976, 15505664, 16480033, 16711680, 13382400, 10040064, 10040166, 10040268, 13382604, 13408767, 16764159, 13434879, 65535, 52428, 39321, 52479, 39423, 26367, 13260, 3368499, 3381555, 3394611, 6749952];
var medidaIdArray = new Array();
var medidaHArray = new Array();
var medidaWArray = new Array();
var precioArray = new Array();
var monedaText = new String();
var changeState = new Number();
var cambio = new Array();
cambio = [1, Number(cambio1), Number(cambio2)];
var mesuraText = new String();
var mesuraState = new Number();
var unitatsShort = new Array();
unitatsShort = ["cm.", "in."];
var canviUnitats = new Array();
canviUnitats = [1, 3.937008E-001];
var colorSelected;
var bgColorSelected;
var volteado = false;
if (defaultMate == "true")
{
var mate = true;
mate_bt.enabled = false;
mate_bt.gotoAndStop(2);
}
else
{
var mate = false;
brillo_bt.enabled = false;
brillo_bt.gotoAndStop(2);
} // end else if
var zoom = 1;
var tamState;
var tamStateId;
var selectedPrice;
var selectedMesure;
units.restrict = "0-9";
units.maxChars = 5;
var tt = new Tooltip(16777215, 0);
orient_bt1.enabled = false;
orient_bt1.gotoAndStop(2);
infoTip4._visible = false;
var totalMides = 0;
comboMedidas.selector._visible = false;
comboTam.selector._visible = false;
var mcl = new MovieClipLoader();
var mclL = new Object();
var totalLoaded = new Number();
var swf = new MovieClipLoader();
var swfL = new Object();
mcl.addListener(mclL);
swf.addListener(swfL);
var uniListener = new Object();
units.addEventListener("change", uniListener);
noElegibleTxt._visible = false;
noElegibleTxt2._visible = false;
loadingError._visible = false;
var vector = "products2/" + referencia + ".swf";
var countSelectBrillo = false;
var countSelectMate = false;
formatDecimals = function (num, digits)
{
if (digits <= 0)
{
return (Math.round(num));
} // end if
var _loc4 = Math.pow(10, digits);
var _loc2 = String(Math.round(num * _loc4) / _loc4);
if (_loc2.indexOf(".") == -1)
{
_loc2 = _loc2 + ".0";
} // end if
var _loc6 = _loc2.split(".");
var _loc3 = digits - _loc6[1].length;
for (var _loc1 = 1; _loc1 <= _loc3; ++_loc1)
{
_loc2 = _loc2 + "0";
} // end of for
return (_loc2);
};
mc_colorPicker._visible = false;
mc_colorPicker.enabled = false;
mc_colorPicker.pickerCursor._visible = false;
mc_colorPicker.colores.onRollOver = function ()
{
mc_colorPicker.pickerCursor._visible = true;
mc_colorPicker._visible = true;
mc_colorPicker.enabled = true;
_root.mc_colorPicker.onEnterFrame = function ()
{
this.pickerCursor._x = _xmouse;
this.pickerCursor._y = _ymouse;
srcMC = mc_colorPicker.colores;
var _loc2 = new flash.display.BitmapData(srcMC._width, srcMC._height, true, 0);
_loc2.draw(srcMC);
colorValue = "0x" + _loc2.getPixel(srcMC._xmouse, srcMC._ymouse).toString(16);
changeColor(mc_colorPicker.mc_color, colorValue);
};
};
mc_colorPicker.colores.onRollOut = mc_colorPicker.colores.onReleaseOutside = function ()
{
Mouse.show();
mc_colorPicker.pickerCursor._visible = false;
btPicker.enabled = true;
gs.TweenLite.to(mc_colorPicker, 5.000000E-001, {_xscale: 20, _yscale: 20, _alpha: 0, ease: gs.easing.Quart.easeOut});
};
mc_colorPicker.colores.onPress = function ()
{
delete _root.mc_colorPicker.onEnterFrame;
srcMC = mc_colorPicker.colores;
var _loc2 = new flash.display.BitmapData(srcMC._width, srcMC._height, true, 0);
_loc2.draw(srcMC);
colorValue = "0x" + _loc2.getPixel(srcMC._xmouse, srcMC._ymouse).toString(16);
changeColor(btPicker.mc_color, colorValue);
changeColor(vectorBackground, colorValue);
Mouse.show();
mc_colorPicker._visible = false;
mc_colorPicker.pickerCursor._visible = false;
mc_colorPicker.enabled = false;
bgColorSelected.seleccionado._visible = false;
bgColorSelected = undefined;
btPicker.enabled = true;
};
btPicker.onPress = function ()
{
this.enabled = false;
mc_colorPicker._xscale = mc_colorPicker._yscale = 20;
mc_colorPicker._alpha = 20;
gs.TweenLite.to(mc_colorPicker, 5.000000E-001, {_xscale: 100, _yscale: 100, _alpha: 100, ease: gs.easing.Quart.easeOut});
mc_colorPicker._visible = true;
mc_colorPicker.enabled = true;
mc_colorPicker.swapDepths(_root.getNextHighestDepth());
};
comboListener.change = function (event_obj)
{
setPrice();
};
moneyListener.change = function (event_obj)
{
setMoneda();
setPrice();
setSizes();
};
mesureListener.change = function (event_obj)
{
setMesura();
setSizes();
};
uniListener.change = function (event_obj)
{
if (units.text == "")
{
}
else if (units.text == "0")
{
units.text = 1;
setPrice();
}
else
{
setPrice();
} // end else if
};
linkColores.onRelease = function ()
{
getURL("http://teleadhesivo.com/colores.asp", "_self");
};
orient_bt1.gotoAndStop(2);
orient_bt1.onRelease = function ()
{
this.gotoAndStop(2);
orient_bt2.gotoAndStop(1);
if (vec == 1)
{
vectorLoader._x = vectorLoader._x - (vectorLoader._width - 34 * zoom);
}
else
{
vectorLoader._x = vectorLoader._x - vectorLoader._width;
} // end else if
vectorLoader._xscale = -vectorLoader._xscale;
this.enabled = false;
orient_bt2.enabled = true;
volteado = false;
};
orient_bt2.onRelease = function ()
{
this.gotoAndStop(2);
orient_bt1.gotoAndStop(1);
if (vec == 1)
{
vectorLoader._x = vectorLoader._x + (vectorLoader._width - 34 * zoom);
}
else
{
vectorLoader._x = vectorLoader._x + vectorLoader._width;
} // end else if
vectorLoader._xscale = -vectorLoader._xscale;
this.enabled = false;
orient_bt1.enabled = true;
volteado = true;
};
brillo_bt.onRelease = function ()
{
countSelectBrillo = true;
countSelectMate = false;
this.gotoAndStop(2);
mate_bt.gotoAndStop(1);
this.enabled = false;
mate_bt.enabled = true;
mate = false;
};
mate_bt.onRelease = function ()
{
countSelectMate = true;
countSelectBrillo = false;
this.gotoAndStop(2);
brillo_bt.gotoAndStop(1);
this.enabled = false;
brillo_bt.enabled = true;
mate = true;
};
zoomIn.onRelease = function ()
{
zoomInVector();
};
zoomOut.onRelease = function ()
{
zoomOutVector();
};
comboMedidas.clickZone.onRollOver = function ()
{
this._parent.gotoAndStop(2);
};
comboMedidas.clickZone.onRollOut = comboMedidas.clickZone.onReleaseOutside = function ()
{
this._parent.gotoAndStop(1);
};
comboMedidas.clickZone.onRelease = function ()
{
if (comboTam.selector0._visible == true)
{
showHideOptionsTam();
} // end if
this._parent.swapDepths(_root.getNextHighestDepth());
showHideOptions();
};
comboTam.clickZone.onRollOver = function ()
{
this._parent.gotoAndStop(2);
};
comboTam.clickZone.onRollOut = comboMedidas.clickZone.onReleaseOutside = function ()
{
this._parent.gotoAndStop(1);
};
comboTam.clickZone.onRelease = function ()
{
if (comboMedidas.selector0._visible == true)
{
showHideOptions();
} // end if
this._parent.swapDepths(_root.getNextHighestDepth());
showHideOptionsTam();
};
infoTip1.onRollOver = function ()
{
tt.showTip(tip1Txt);
};
infoTip1.onRollOut = function ()
{
tt.removeTip();
};
infoTip2.onRollOver = function ()
{
tt.showTip(tip2Txt);
};
infoTip2.onRollOut = function ()
{
tt.removeTip();
};
infoTip3.onRollOver = function ()
{
tt.showTip(tip3Txt);
};
infoTip3.onRollOut = function ()
{
tt.removeTip();
};
infoTip4.onRollOver = function ()
{
tt.showTip(tip4Txt);
};
infoTip4.onRollOut = function ()
{
tt.removeTip();
};
if (colorElegible == "true" && vec == "1")
{
setMoneda();
setMesura();
setSizes();
setPrice();
setColors();
setBgColors();
loadVector();
}
else if (colorElegible == "false" && vec == "1")
{
var colorSelected = new Object();
colorSelected.valor = Number(0);
noElegibleTxt._visible = true;
noElegibleTxt2._visible = true;
col._visible = false;
colBg._visible = false;
btPicker._visible = false;
masColoresText._visible = false;
linkColores._visible = false;
titolColorSelected._visible = false;
infoTip1._visible = false;
infoTip2._visible = false;
setMoneda();
setMesura();
setSizes();
setPrice();
loadVector();
}
else if (colorElegible == "true" && vec == "2")
{
noElegibleTxt._visible = false;
noElegibleTxt2._visible = true;
col._visible = true;
colBg._visible = false;
btPicker._visible = false;
masColoresText._visible = false;
linkColores._visible = true;
titolColorSelected._visible = true;
infoTip1._visible = true;
infoTip2._visible = false;
zoomIn._visible = false;
zoomOut._visible = false;
setMoneda();
setMesura();
setSizes();
setPrice();
setColors();
loadImatge();
}
else
{
var colorSelected = new Object();
colorSelected.valor = Number(0);
noElegibleTxt._visible = true;
noElegibleTxt2._visible = true;
col._visible = false;
colBg._visible = false;
titolColorSelected._visible = false;
btPicker._visible = false;
zoomIn._visible = false;
zoomOut._visible = false;
masColoresText._visible = false;
linkColores._visible = false;
infoTip1._visible = false;
infoTip2._visible = false;
setMoneda();
setMesura();
setSizes();
setPrice();
loadImatge();
} // end else if
if (volteadoElegible == "false")
{
orient_bt2.onRollOver = function ()
{
tt.showTip(tip5Txt);
};
orient_bt2.onPress = orient_bt2.onRollOut = orient_bt2.onRelease = orient_bt2.onReleaseOutside = function ()
{
tt.removeTip();
};
orient_bt2._alpha = 30;
} // end if
if (medidasIds.length < 1)
{
comboTam._visible = false;
addCart._visible = false;
carritoText._visible = false;
} // end if
addCart.onRelease = function ()
{
var _loc2 = new LoadVars();
_loc2.onLoad = function (success)
{
if (success)
{
tracer.text = "correcte... carregant shopcart.asp";
getURL("shopcart.asp", "_self", "POST");
}
else
{
tracer.text = "error enviant les dades";
} // end else if
};
if (subreference == undefined)
{
subreference = "";
} // end if
if (mate == false)
{
mateFinal = 0;
}
else
{
mateFinal = 1;
} // end else if
if (volteado == true)
{
posFinal = "volteado";
}
else
{
posFinal = "normal";
} // end else if
if (colorSelected.id == undefined)
{
colorSelected.id = 1;
} // end if
_loc2.itemno = _root.idproducto;
_loc2.medida = medidaIdArray[tamStateId];
_loc2.referencias = subreference;
_loc2.color = colorSelected.id;
_loc2.mate = mateFinal;
_loc2.posicion = posFinal;
_loc2.unidades = Number(units.text);
_loc2.mode = "add";
_loc2.send("shopcart.asp", "_self", "POST");
};
aspVars.onLoadError = function ()
{
};
swfL.onLoadInit = function (target)
{
setPrice();
};
swf.loadClip("Imatges_preus_top.swf", imatgesSwf);
stop ();