sera a tutti,
Ho un difetto su questo lavoretto per la gestione di mp3 esterni..
cosa succede..
l'MP3 invece di entrare con fadeIN come dovrebbe.. :master:
entra per un breve istante a volume alto, poi si abbassa di colpo e rientra in FadeIN come nulla fosse...![]()
grazie a tutticodice:var mySound = new Sound(); mySound.loadSound("loop2.mp3", true); var bytesTotal = mySound.getBytesTotal(); this.onEnterFrame = function() { bytesLoaded = mySound.getBytesLoaded(); if (((bytesLoaded/bytesLoaded)*100) == 30) { mySound.start(); } }; mySound.stop(); fadeIn = true; var mySound = new Sound(); mySound.loadSound("loop2.mp3"); mySound.start(0, 300); this.onEnterFrame = function() { if (fadeIn) { mySound.setVolume(volume); volume += 2; if (volume>99) { fadeIn = false; } } if (fadeOut) { mySound.setVolume(volume); volume -= 2; if (volume<1) { mySound.loadSound("loop2.mp3", false); fadeOut = false; } } }; Bin.onRelease = function() { fadeIn = true; mySound.start(0, 300); mySound.setVolume(0); }; Bout.onRelease = function() { fadeOut = true; };![]()

Rispondi quotando