Non è complicato, solo che chiaramente quando assegni una funzione al clip tramite eventi dovrai tenere conto che dentro alla funzione non potrai usare "this", al posto del quale puoi utilizzare la proprietà target dell'oggetto passato alla funzione dall'evento.
Per farla breve, ho un clip che si chiama "pippo" e lo voglio far spostare di frame come nel tuo caso al rollover e rollout
Codice PHP:
pippo.addEventListener(MouseEvent.ROLL_OVER, roll);
pippo.addEventListener(MouseEvent.ROLL_OUT, roll);
function roll (e:MouseEvent) {
if (e.type == MouseEvent.ROLL_OVER) {
e.target.gotoAndStop("on");
} else {
e.target.gotoAndStop("off");
}
}
Ne consegue che puoi trasformare il tuo codice da AS2 ad AS3 in questo modo:
Codice PHP:
function activeSecLink() {
for (var i:uint=0; i<3; i++) {
var link = MovieClip(root)['secLink'+i];
link.n = _root.links02Htm[i];
link.addEventListener(MouseEvent.ROLL_OVER, roll);
link.addEventListener(MouseEvent.ROLL_OUT, roll);
link.addEventListener(MouseEvent.CLICK, click);
}
}
function roll (e:MouseEvent) {
if (e.type == MouseEvent.ROLL_OVER) {
e.target.gotoAndPlay("on");
} else {
e.target.gotoAndPlay("off");
}
efx_sound("soft_beep1");
}
function click (e:MouseEvent) {
navigateToURL(new URLRequest(e.target.n), "_blank");
efx_sound("metallic");
}