Buon giorno a tutti.
Sto cercando di fare un menu dropdown.
Ogni voce di menù è un mc che contiene l'animazione delle sottovoci che appaiono al rollover e scompaiono al rollout. Questo è il codice per gestirli:
MovieClip.prototype.rollScratch = function() {
this.onRollOver = function() {
this.onEnterFrame = function() {
if (this._currentframe<this._totalframes) {
this.gotoAndStop(++this._currentframe);
} else {
delete this.onEnterFrame;
}
};
};
this.onRollOut = this.onReleaseOutside=function () {
this.onEnterFrame = function() {
if (this._currentframe>20) {
this.gotoAndStop(--this._currentframe);
} else {
delete this.onEnterFrame;
}
};
};
};
_root.Menu_Atelier.rollScratch();
ogni mc ha un animazione di entrata lunga 20 frames e poi da 20 a 30 ha l'animazione per mostrare le sue sub-voci.
La domanda è: come mai i mc sub-voci non sono sensibili agli eventi tipo on release
sia inclusi nell'mc con "no (release)"
sia nel frame sullo stage con _root.Menu_Atelier.SubMenu1.onRelease = function() ecc ecc...
Ho provato anche a convertire le sub-voci in pulsanti...
Insomma ho provato numerosi combinazioni ma i pulsanti una volta che spuntano sono come inesistenti.
Sto impazzendo da giorni. Cosa sbaglio?
Grazie a tutti.



Rispondi quotando