Tema: boton flash
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/03/2009, 09:21
Avatar de kalvinman
kalvinman
 
Fecha de Ingreso: octubre-2006
Ubicación: Bogota Colombia
Mensajes: 849
Antigüedad: 17 años, 6 meses
Puntos: 22
Respuesta: boton flash

Este seria el codigo Action script

Cita:
function btnOver()
{
this.gotoAndPlay("one");
} // End of the function
function btnOut()
{
this.gotoAndPlay("three");
} // End of the function
function btnRelease()
{
var _loc3 = this._name;
var _loc2 = _loc3.substring(3, 5);
getURL(links[_loc2], "_blank");
textfield1_txt.text = links[_loc2];
} // End of the function
var xPosition = 50;
var yPosition = 120;
var myXML = new XML();
myXML.ignoreWhite = true;
var links = new Array();
var names = new Array();
myXML.onLoad = function ()
{
var _loc3 = this.firstChild.childNodes;
for (i = 0; i < _loc3.length; i++)
{
names.push(_loc3[i].attributes.NAME);
links.push(_loc3[i].attributes.LINK);
_root.attachMovie("button", "btn" + i, _root.getNextHighestDepth());
_root["btn" + i]._x = xPosition;
_root["btn" + i]._y = yPosition;
xPosition = xPosition + 120;
_root["btn" + i].blackTxt.Txt.text = names[i];
_root["btn" + i].whiteTxt.Txt.text = names[i];
_root["btn" + i].onRollOver = btnOver;
_root["btn" + i].onRollOut = btnOut;
_root["btn" + i].onRelease = btnRelease;
} // end of for
};
myXML.load("links.xml");