Buona Sera ragazzi sono alle prime armi con l'ActionScipt
Sto cercando di creare un menu prodotti.
Inizialmente ho creato una movie clip Maschera
che dovrebbe essere richiamata quando schiaccio il bottone
del prodotto.
E' una clip contenente una forma che fa da transizione tra un prodotto e l'altro!

Al primo frame ho dato uno

stop();

al10'

parent.gotoAndStop(parent.Sezione);


Nella linea temporale ho creato sei livelli
• 2 dedicati alla maschera
• uno dedicato alle movieclip che sono i miei prodotti e devono comparire
nello stage.

A ogni BTN corrispondete ai prodotti ho dato un numero da (1 a 19).
Premetto che questo codice l'avevo utilizzato per richiamare testi dinamici e (FUNZIONAVA) ora il mio intento è riutilizzarlo per richiamare le singole movie clip nominate contenenti i prodotti.

Nel livello azioni sulla root ho scritto così:


stop();
//* questo stop non funziona perchè appena faccio command+invio le clip vanno ininterrottamente

var Sezione:Number

function Change_Prodotto1 (evt:MouseEvent):void{
Sezione = 1;
Maschera.play();

//gotoAndStop(1);
}

BTN1.addEventListener(MouseEvent.CLICK, Change_Prodotto1);

function Change_Prodotto1(evt:MouseEvent):void{
Sezione = 1;
Maschera.play();
//gotoAndStop(1);
}

BTN2.addEventListener(MouseEvent.CLICK, Change_Prodotto2);

function Change_Prodotto3(evt:MouseEvent):void{
Sezione = 2;
Maschera.play();
//gotoAndStop(2);

}

BTN3.addEventListener(MouseEvent.CLICK, Change_Prodotto3);

function Change_Prodotto4(evt:MouseEvent):void{
Sezione = 3;
Maschera.play();
//gotoAndStop(3);

}

BTN4.addEventListener(MouseEvent.CLICK, Change_Prodotto4);

function Change_Prodotto5(evt:MouseEvent):void{
Sezione = 4;
Maschera.play();
//gotoAndStop(4);

}

BTN5.addEventListener(MouseEvent.CLICK, Change_Prodotto5);

function Change_Prodotto6(evt:MouseEvent):void{
Sezione = 5;
Maschera.play();
//gotoAndStop(5);

}

BTN6.addEventListener(MouseEvent.CLICK, Change_Prodotto6);

function Change_Prodotto7(evt:MouseEvent):void{
Sezione = 6;
Maschera.play();
//gotoAndStop(6);

}

BTN7.addEventListener(MouseEvent.CLICK, Change_Prodotto7);

function Change_Prodotto8(evt:MouseEvent):void{
Sezione = 7;
Maschera.play();
//gotoAndStop(7);

}

BTN8.addEventListener(MouseEvent.CLICK, Change_Prodotto8);

function Change_Prodotto9(evt:MouseEvent):void{
Sezione = 8;
Maschera.play();
//gotoAndStop(8);

}

BTN9.addEventListener(MouseEvent.CLICK, Change_Prodotto9);

function Change_Prodotto10(evt:MouseEvent):void{
Sezione = 9;
Maschera.play();
//gotoAndStop(9);

}

BTN7.addEventListener(MouseEvent.CLICK, Change_Prodotto10);

function Change_Prodotto11(evt:MouseEvent):void{
Sezione = 10;
Maschera.play();
//gotoAndStop(10);

}

BTN10.addEventListener(MouseEvent.CLICK, Change_Prodotto11);

function Change_Prodotto12(evt:MouseEvent):void{
Sezione = 11;
Maschera.play();
//gotoAndStop(11);

}

BTN11.addEventListener(MouseEvent.CLICK, Change_Prodotto12);

function Change_Prodotto13(evt:MouseEvent):void{
Sezione = 12;
Maschera.play();
//gotoAndStop(12);

}

BTN12.addEventListener(MouseEvent.CLICK, Change_Prodotto13);

function Change_Prodotto14(evt:MouseEvent):void{
Sezione = 13;
Maschera.play();
//gotoAndStop(13);

}

BTN13.addEventListener(MouseEvent.CLICK, Change_Prodotto14);

function Change_Prodotto15(evt:MouseEvent):void{
Sezione = 14;
Maschera.play();
//gotoAndStop(14);

}

BTN14.addEventListener(MouseEvent.CLICK, Change_Prodotto15);

function Change_Prodotto16(evt:MouseEvent):void{
Sezione = 15;
Maschera.play();
//gotoAndStop(15);

}

BTN15.addEventListener(MouseEvent.CLICK, Change_Prodotto16);

function Change_Prodotto17(evt:MouseEvent):void{
Sezione = 16;
Maschera.play();
//gotoAndStop(16);

}

BTN16.addEventListener(MouseEvent.CLICK, Change_Prodotto17);

function Change_Prodotto18(evt:MouseEvent):void{
Sezione = 17;
Maschera.play();
//gotoAndStop(17);

}

BTN17.addEventListener(MouseEvent.CLICK, Change_Prodotto18);

function Change_Prodotto19(evt:MouseEvent):void{
Sezione = 18;
Maschera.play();
//gotoAndStop(18);

}

BTN18.addEventListener(MouseEvent.CLICK, Change_Prodotto19);

function Change_Prodotto20(evt:MouseEvent):void{
Sezione = 19;
Maschera.play();
//gotoAndStop(19);

}

BTN19.addEventListener(MouseEvent.CLICK, Change_Prodotto20);

function Change_Prodotto21(evt:MouseEvent):void{
Sezione = 20;
Maschera.play();
//gotoAndStop(20);

}


Se mi potete aiutare Vi ringrazio anticipatamente!
CIAO!!!