I'm making a flash game and want to update the lap number using a line at the start of each lap, i have a dynamic text box which is set at run time to say lap '0 of 3' - That works fine.
var p1:String = "0 of 3";
lapPlayer1.text = p1;
Each time the car hits a line with the instance name LapChange I want it to update, i have put a hit test on the car. Text Box is Dynamic Classic and it called lapPlayer1
onClipEvent(enterFrame){
if(this.hitTest(_root.LapChange)){
if (lapPlayer1.text == "0 of 3") {
var p1:String = "1 of 3";
lapPlayer1.text = p1;
}
if (lapPlayer1.text == "1 of 3") {
var p1:String = "1 of 3";
lapPlayer1.text = p1;
}
if (lapPlayer1.text == "2 of 3") {
var p1:String = "3 of 3";
lapPlayer1.text = p1;
}
}
}
However it isn't updating the text, any help would be appreciated
Carl