Ciao a tutti,
vorrei sottoporvi questo problema che nella mia immaginazione potrebbe essere risolto, spero anche nella realtà :master:

Ho un filmato con 4 movieclips, che si chiamano container001_mc, container002_mc, container003_mc, container004_mc.

Ciascuno di questi contiene altri movieclips e tutti fanno esattamente le stesse cose, cioè caricare un'immagine, aprire una popup con un ingrandimento, aprire un link ad un pdf.

Il problema è che ogni volta mi sembra di scrivere codice ripetitivo, deve esserci un'altro metodo!
Mi aiutate?

Il codice che ho utilizzato io (funzionante) è questo:

codice:
//CONTAINER001
this.container001_mc.loadmovie("001-p.jpg");
this.container001_mc.light_btn.onRelease = function() {
      getURL("001.jpg", "_blank");
}
this.container001_mc.download_btn.onRelease = function() {
      getURL("001.pdf", "_blank");
}
//CONTAINER002
this.container002_mc.loadmovie("002-p.jpg");
this.container002_mc.light_btn.onRelease = function() {
      getURL("002.jpg", "_blank");
}
this.container002_mc.download_btn.onRelease = function() {
      getURL("002.pdf", "_blank");
}
//CONTAINER003
this.container003_mc.loadmovie("003-p.jpg");
this.container003_mc.light_btn.onRelease = function() {
      getURL("003.jpg", "_blank");
}
this.container003_mc.download_btn.onRelease = function() {
      getURL("003.pdf", "_blank");
}
//CONTAINER004
this.container004_mc.loadmovie("004-p.jpg");
this.container004_mc.light_btn.onRelease = function() {
      getURL("004.jpg", "_blank");
}
this.container004_mc.download_btn.onRelease = function() {
      getURL("004.pdf", "_blank");
}
Grazie,
Cecco