Voilà g un script d'un clip qui réagit avec le son du micro mais j'aimerai qu'il réagisse avec le son d'un mp3 en boucle, si kelkun voulait m'aider ça serait cool, voilà la portion du code qui intéresse:
// list of bubble entities
bubList = new Array();
numBubbles = 10;
for (b=0; b<numBubbles; b++) {
neo = "bub"+String(depth++);
attachMovie("bubble", neo, depth);
bubList.push(neo);
this[neo].setDepth(depth);
this[neo].setScale(40+random(400));
this[neo].setPosition(300, 169);
this[neo].setDestination(300, 169);
this[neo].make();
}
// set up microphone object
_root.createEmptyMovieClip("myAudio", 1001);
_root.myAudio.attachAudio(Microphone.get());
_root.myMic = Microphone.get();
// set up Interval to listen for microphone levels
micInterval = setInterval(function () { _root.micLevel.bar._xscale = _root.myMic.activityLevel;var f = Math.ceil(_root.myMic.activityLevel/10);for (b=0; b<_root.bubList.length; b++) {neo = _root.bubList[b];if (!(random(3))) {_root[neo].applyForce(random(f)-f/2, random(f)-f/2);}}}, 30);
stop();