stormaster
21.01.2003, 17:15
Почему этот код работает:
onClipEvent (load) {
var x = 0;
this.onEnterFrame = count;
function count() {
x++;
if(x > 77) {
x = 0;
this.onEnterFrame = null;
} else {
counter.text = x;
}
}
setInterval(count, 7000);
}
---------------------------
а этот нет:
onClipEvent (load) {
x = 0;
function count() {
this.onEnterFrame = function(){
x++;
if(x > 77) {
x = 0;
this.onEnterFrame = null;
} else {
counter.text = x;
}
}
}
setInterval(count, 7000);
}
???????????????????????? :confused: :confused: :confused:
onClipEvent (load) {
var x = 0;
this.onEnterFrame = count;
function count() {
x++;
if(x > 77) {
x = 0;
this.onEnterFrame = null;
} else {
counter.text = x;
}
}
setInterval(count, 7000);
}
---------------------------
а этот нет:
onClipEvent (load) {
x = 0;
function count() {
this.onEnterFrame = function(){
x++;
if(x > 77) {
x = 0;
this.onEnterFrame = null;
} else {
counter.text = x;
}
}
}
setInterval(count, 7000);
}
???????????????????????? :confused: :confused: :confused: