1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| var avance = 0;
var avance2 = 0;
this.createEmptyMovieClip("segment", 1);
segment.lineStyle(20, 0xC5BDB9, 100);
segment.moveTo(0, Stage.height/2);
this.onEnterFrame = function() {
if (avance<Stage.width) {
avance += 50;
segment.lineTo(avance, Stage.height/2);
trace("avance = "+avance);
} else if (avance2<Stage.width) {
segment.lineStyle(20, 0xFFFFFF, 100);
avance2 += 20;
trace("avance2 = "+avance2);
segment.lineTo(Stage.width-avance2, Stage.height/2);
} else {
trace("fini");
delete this.onEnterFrame;
}
}; |
Partager