Sono 2 ore che smanetto su DURATION e POSITION ma non riesco a farlo monitorare bene. In effetti mi serve che inizia a sfumare 2 secondi prima della fine del suono..
Se avessi avuto abbastanza frame per tutto il sound avrei messo un actionscript sulla timeline principale all'altezza della fine del suono ma è molto lungo e non mi conviene sprecare così tanti frame...
Mi affido alla tua idea che poi è anche la mia...
Io ho messo un MC con 2 frame. Nel primo frame ho messo questo:
Nel secondo frame ho messo un semplice:codice:if (_root.mySound.position >= (_root.mySound.duration - 10000)) { maxvolume = maxvolume - 3; if (maxvolume > 100){ maxvolume = 100; } // end if if (maxvolume < 0){ maxvolume = 0; } // end if _root.mySound.setVolume(maxvolume); }
Non fungecodice:gotoAndPlay(1);