I am using an ActionScript 2.0 for my project. I have a timer and a movie clip that is moving along the x-axis. If that movie clip reaches the given boundary, it will disappear and add the speed of the timer. My problem is i can't add the speed of the timer. Here is the code for my timer :
stop();
var hour:Number = 0;
var minute:Number = 0;
var second:Number = 0;
hours.text = "0" + hour;
minutes.text = "0" + minute;
seconds.text = "0" + second;
timerClip.onEnterFrame = function(){
if(this._currentframe == 30){
second += 1;
if (second > 59){
second = 0;
seconds.text = "0" + second;
minute += 1;
minutes.text = "0" + minute;
} else {
if (second >= 10) {
seconds.text = second;
} else {
seconds.text = "0" + second;
}
if (minute == 1){
gotoandstop(2);
}
}
}
}
and here is my code for my movie clip:
onClipEvent (load) {
speed = 1;
boundary = 280;
}
onClipEvent (enterFrame) {
if (this._x > boundary) {
this._x -= speed;
}
else {
this._x = boundary;
this._visible = false;
}
}