Agregue un arreglo donde estan los link y dentro del while se asigna la funcion onPress para cada boton.
Este es el codigo corregido de la capa Action Layer del sprite 32
Código actionscript:
Ver original_global.slidingMenu = this;
small_height_over = 10;
time_for_animation = 25;
time_for_animation2 = 25;
box1.id = 1;
box2.id = 2;
box3.id = 3;
box4.id = 4;
box5.id = 5;
//LISTA DE PAGINAS
var listaLinks:Array=new Array("0","pagina1.html","pagina2.html","pagina3.html","pagina4.html","pagina5.html","pagina6.html")
var i = 1;
while (i <= 6)
{
this["box" + i].title_main.area.onRelease = function ()
{
};
this["box" + i].title_main.area.onRollOver = function ()
{
slidingMenu.RollOverBoxes(this._parent._parent.id);
};
this["box" + i].title_main.area.onRollOut = this["box" + i].title_main.area.onReleaseOutside = function ()
{
slidingMenu.RollOutBoxes(this._parent._parent.id);
};
///////////ON PRESS
this["box" + i].title_main.area.onPress = function ()
{
getURL(listaLinks[i], "_self");
};
++i;
} // end while
slidingMenu.RollOverBoxes = function (boxNumber)
{
if (_root.link != boxNumber)
{
var cBox = eval("box" + boxNumber);
cBox.title_main.gotoAndPlay("s1");
var i = 1;
while (i <= 6)
{
var cBox = eval("box" + i);
ykoord = cBox.my_y;
if (i != boxNumber)
{
if (i < boxNumber)
{
new mx.transitions.Tween(cBox, "_y", mx.transitions.easing.Back.easeOut, cBox._y, ykoord - small_height_over, time_for_animation2, false);
cBox.my_y = ykoord - small_height_over;
}
else
{
new mx.transitions.Tween(cBox, "_y", mx.transitions.easing.Back.easeOut, cBox._y, ykoord + small_height_over, time_for_animation2, false);
cBox.my_y = ykoord + small_height_over;
} // end if
} // end else if
++i;
} // end while
} // end if
};
slidingMenu.RollOutBoxes = function (boxNumber)
{
if (_root.link != boxNumber)
{
var cBox = eval("box" + boxNumber);
cBox.title_main.gotoAndPlay("s2");
var i = 1;
while (i <= 6)
{
var cBox = eval("box" + i);
ykoord = cBox.my_y;
if (i != boxNumber)
{
if (i < boxNumber)
{
new mx.transitions.Tween(cBox, "_y", mx.transitions.easing.Back.easeOut, cBox._y, ykoord + small_height_over, time_for_animation2, false);
cBox.my_y = ykoord + small_height_over;
}
else
{
new mx.transitions.Tween(cBox, "_y", mx.transitions.easing.Back.easeOut, cBox._y, ykoord - small_height_over, time_for_animation2, false);
cBox.my_y = ykoord - small_height_over;
} // end if
} // end else if
++i;
} // end while
} // end if
};
slidingMenu.moveBoxes = function (boxNumber)
{
if (_root.link != boxNumber)
{
k = 1;
var i = 1;
while (i <= 6)
{
var cBox = eval("box" + i);
if (i == boxNumber)
{
_root.link_prev = _root.link;
_root.link = boxNumber;
cBox.pages.gotoAndPlay("s1");
cBox.title_main.gotoAndPlay("s2");
var cBox2 = eval("box" + _root.link_prev);
cBox2.pages.gotoAndPlay(cBox2.pages._totalframes - cBox2.pages._currentframe);
_root.scroller.gotoAndStop(2);
} // end if
if (i <= boxNumber)
{
} // end if
++k;
++i;
} // end while
} // end if
};
slidingMenu.movePages = function (my_koord)
{
cBox = _root.pages;
new mx.transitions.Tween(cBox, "_y", mx.transitions.easing.Back.easeOut, cBox._y, my_koord, 25, false);
};
slidingMenu.resetPages = function ()
{
slidingMenu.moveBoxes(4);
slidingMenu.movePages(341);
};