clan-kill3r
%Europe/Berlin %585 %2007, 14:03
i = 1;
z = 2;
function timer() {
trace("timer"+i);
this.onEnterFrame = function() {
i++;
trace("i is"+i);
if (i == 24) {
volgende();
}
};
}
//
attachMovie("b1h_p1", "p1", 1);
attachMovie("b1h_p2", "p2", 2);
p2._x = -550;
//
function volgende() {
z++;
this.onEnterFrame = function() {
p1._x += 27.5;
p2._x += 27.5;
if (p1._x == 550) {
p1._name = "p_temp";
p2._name = "p1";
p_temp._name = "p2";
p1.swapDepths(p2);
attachMovie("b1h_p"+z, "p2", 2);
p2._x = -550;
trace("i voor"+i);
i = 1;
timer();
trace("i na"+i);
delete this.onEnterFrame;
}
};
}
//
//volgende();
timer();
De eerste x werkt de timer wel, de 2e keer komt hij bij de eerste trace maar doet hij het on enterframe effent niet meer. Hoe kan dat of hoe los ik dit op?
dit is de trace:
timer1
i is2
i is3
i is4
i is5
i is6
i is7
i is8
i is9
i is10
i is11
i is12
i is13
i is14
i is15
i is16
i is17
i is18
i is19
i is20
i is21
i is22
i is23
i is24
i voor24
timer1
i na1
z = 2;
function timer() {
trace("timer"+i);
this.onEnterFrame = function() {
i++;
trace("i is"+i);
if (i == 24) {
volgende();
}
};
}
//
attachMovie("b1h_p1", "p1", 1);
attachMovie("b1h_p2", "p2", 2);
p2._x = -550;
//
function volgende() {
z++;
this.onEnterFrame = function() {
p1._x += 27.5;
p2._x += 27.5;
if (p1._x == 550) {
p1._name = "p_temp";
p2._name = "p1";
p_temp._name = "p2";
p1.swapDepths(p2);
attachMovie("b1h_p"+z, "p2", 2);
p2._x = -550;
trace("i voor"+i);
i = 1;
timer();
trace("i na"+i);
delete this.onEnterFrame;
}
};
}
//
//volgende();
timer();
De eerste x werkt de timer wel, de 2e keer komt hij bij de eerste trace maar doet hij het on enterframe effent niet meer. Hoe kan dat of hoe los ik dit op?
dit is de trace:
timer1
i is2
i is3
i is4
i is5
i is6
i is7
i is8
i is9
i is10
i is11
i is12
i is13
i is14
i is15
i is16
i is17
i is18
i is19
i is20
i is21
i is22
i is23
i is24
i voor24
timer1
i na1