Purtroppo sembra non funzionare. Grazie per l'aiuto!!!!
Il codice completo è
Codice PHP:
/***** ARRAY *****/
var ArrayLabelMenu1:Array = new Array(); //ITA
ArrayLabelMenu1[0] = new Array("PROFILO",2,"ID","FEELING")
ArrayLabelMenu1[1] = new Array("COLLEZIONE",2,"GALLERY","THUMBNAIL VIEW")
ArrayLabelMenu1[2] = new Array("I MALLONI",0)
ArrayLabelMenu1[3] = new Array("CAMPAIGN",0)
ArrayLabelMenu1[4] = new Array("NEWS/EVENTS",0)
ArrayLabelMenu1[5] = new Array("STORE LOCATION",0)
ArrayLabelMenu1[6] = new Array("DOWNLOAD",0)
ArrayLabelMenu1[7] = new Array("SHOP ONLINE",0)
ArrayLabelMenu1[8] = new Array("CONTATTI",0)
function creaMenu()
{
var ArrayLabelMenuSel = _level0["ArrayLabelMenu"+_level0.lingua];
var interspazio = 2;
var ingrandimento = 2;
//var overSottomenu = "NO"
for(i=0; i < ArrayLabelMenuSel.length ; i++)
{
var pathContainer = _level0.mcMenuPrincipale.containerMenu;
var button = pathContainer.attachMovie("mcBtn","mcBtn" + i, i);
button.cicloi = i;
button.etichetta.BtnLabel.text = ArrayLabelMenuSel[i][0];
button.etichetta.BtnLabel.autoSize = true;
button.larghezza = button.etichetta.BtnLabel._width + 20;
button.altezza = 24;
button.ratio = button.larghezza/button.altezza;
//button.altezzaMax = 24 + ArrayLabelMenuSel[i][1]*5
button._y = Math.round((24 + interspazio)*i);
button._visible = false;
button.mcLine._visible = false;
button.blackBase.onRollOver = function()
{
//overSottomenu = "NO";
if(ArrayLabelMenuSel[this._parent.cicloi][1] != 0)
{
clearTimeout(this._parent.timer);
if (!this._parent.mcSottomenu)
{
this._parent.mcLine._visible = true;
this._parent.mcLine.chg_line(1,this._parent.larghezza - 20,10);
var incremento = 21*ArrayLabelMenuSel[this._parent.cicloi][1];//incremento per ospitare i sottomenu
subMenu = this._parent.attachMovie("mcSottomenu","mcSottomenu",0);
subMenu._x = 11;
subMenu._y = 30;
var interspazioSubmenu = 4
for( k = 0 ; k < ArrayLabelMenuSel[this._parent.cicloi][1] ; k++ )
{
voc = subMenu.attachMovie("mcBtn_sottomenu" , "mcBtn_sottomenu" + k , k );
voc._y = Math.round((12 + interspazioSubmenu)*k);
voc.SubLabel.text = ArrayLabelMenuSel[this._parent.cicloi][2 + k];
voc.SubLabel.autoSize = true;
voc.onRollOver = function()
{
clearTimeout(this._parent._parent.timer);
}
voc.onRollOut = voc.onReleaseOutside = function()
{
this._parent._parent.blackBase.onRollOut();
}
voc.onPress = function()
{
trace("voce sottomenu")
}
}
}
var interspazioSuppl = 5;
this.chg_alt( 24 + incremento , 10 );
}else
{
incremento = interspazioSuppl = 0
}
this._parent.ingrandisci( this._parent.ratio * this._parent.altezza * ingrandimento , (this._parent.altezza + incremento) * ingrandimento , 10 )
for(k=0 ; k < ArrayLabelMenuSel.length ; k++)
{
if(k>this._parent.cicloi)
{
pathContainer["mcBtn" + k].cambia_Y(Math.round(((incremento*ingrandimento) + (24*ingrandimento) - (24 + interspazio*ingrandimento) - interspazio) + interspazioSuppl + ((24 + interspazio)*k)),10)
}
}
}
button.blackBase.onRollOut = voc.onReleaseOutside = function()
{
if(ArrayLabelMenuSel[this._parent.cicloi][1] != 0)
{
var sub = this._parent.mcSottomenu;
this._parent.timer = setTimeout(function (){removeMovieClip(sub);}, 50);
this._parent.mcLine._visible = false;
this._parent.mcLine._width = 1;
this._parent.blackBase.chg_alt( 24 , 10 )
//removeMovieClip(this._parent.mcSottomenu)
}
this._parent.rimpicciolisci( Math.round(this._parent.larghezza), 28 , 10 )
for(k=0 ; k < ArrayLabelMenuSel.length ; k++)
{
if(k>this._parent.cicloi)
{
pathContainer["mcBtn" + k].cambia_Y(Math.round((24 + interspazio)*k),10)
}
}
}
button.blackBase.onPress = function()
{
trace("voce principale")
}
if(i == ArrayLabelMenuSel.length - 1)
{
_level0.visualizzaMenu()
}
}
}
L'unico effetto che sembra sortire è il ritardo del removeMovieClip del sottomenu.
Continuo comunque nel frattempo a fare test su test....
Grazie a tutti coloro che vorranno aiutarmi!