1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| chanson = new Sound();
chanson.loadSound(musique,true);
p = 0;
this.createEmptyMovieClip("clipvide",0);
function tester() {
if (chanson.position == chanson.duration) {
chanson.start(0);
}
}
btnLecture.onPress = function() {
if (chanson.position == chanson.duration) {
p = 0;
}
chanson.start(p/1000);
this.enabled = false;
btnPause.enabled = true;
clipvide.onEnterFrame = tester;
};
btnPause.onPress = function() {
chanson.stop();
p = chanson.position;
this.enabled = false;
btnLecture.enabled = true;
}; |
Partager