# Laps

**URL:** <https://forum.kirupa.com/t/laps/9931>\
**Category:** flash\
**Created:** [December 20, 2002, 11:58pm UTC](https://forum.kirupa.com/t/laps/9931 "2002-12-20T23:58:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![BullDog\_Flash](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@BullDog\_Flash](https://forum.kirupa.com/u/BullDog_Flash)\
**Post date:** [December 20, 2002, 11:58pm UTC](https://forum.kirupa.com/t/laps/9931/1 "2002-12-20T23:58:14Z")

</div>

I ave no idea how to do laps…

This is my code for the laps.  
But i need it so when it hits it it only goes up once not 1 while stying on it.

Here is the code

```auto
onClipEvent (enterFrame) {
    if (this.hitTest(_root.car)) {
        _root.lap += 1;
    }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 4:28am UTC](https://forum.kirupa.com/t/laps/9931/2 "2002-12-21T04:28:38Z")

</div>

No one at all.

::The man in blue goes on his knees and crys for mercy::  
:\*(

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 4:50am UTC](https://forum.kirupa.com/t/laps/9931/3 "2002-12-21T04:50:28Z")

</div>

Laps, huh, explain more precise, dan is confused (likes talking in third person)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 4:52am UTC](https://forum.kirupa.com/t/laps/9931/4 "2002-12-21T04:52:59Z")

</div>

```php
onClipEvent (enterFrame) {
	if (this.hitTest(_root.car)) {
		if (!laps) {
			_root.lap += 1
			laps ++
		} else {
			_root.lap = _root.lap
		}
	} else {
		delete laps
	}
}

```

thank ilyas!!  
[http://www.kirupaforum.com/showthread.php?s=&threadid=11093](http://www.kirupaforum.com/showthread.php?s=&threadid=11093)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:13am UTC](https://forum.kirupa.com/t/laps/9931/5 "2002-12-21T05:13:21Z")

</div>

Kax my old friend.  
How does this work  
Do i put it on the finish line.  
I did that dont work.  
Did you undertand what i said if not  
**Exaplined better**  
I am making a car game so far one level one car and one finish line.  
When my car hits the Finish line i want it so the lpas(Dynamic text)  
Goes up only one.  
Then when it hits the checkpiont and all the checkpoints.  
It will make it so when i hit the finishline again it will o up.  
See what i mean.  
Maybe an example will help me.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:36am UTC](https://forum.kirupa.com/t/laps/9931/6 "2002-12-21T05:36:23Z")

</div>

paste the script in the finish line actions and your dynamic text should have “\_root.lap” [size=1]**[no quotes]**[/size] as variable

that’s all

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:03pm UTC](https://forum.kirupa.com/t/laps/9931/7 "2002-12-21T17:03:05Z")

</div>

That works good  
But i dont have to go in a the track  
I only have to go up and down and get filled up on the laps.  
Maybe checkPints can help ill try that.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:21pm UTC](https://forum.kirupa.com/t/laps/9931/8 "2002-12-21T17:21:21Z")

</div>

You’re welcome, Kax, but that line looks strange, doesn’t it?

```auto
_root.lap = _root.lap

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:25pm UTC](https://forum.kirupa.com/t/laps/9931/9 "2002-12-21T17:25:02Z")

</div>

lol … I wrote the code when I was replying

didn’t notice that 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:35pm UTC](https://forum.kirupa.com/t/laps/9931/10 "2002-12-21T17:35:46Z")

</div>

Can someOne please help please.  
I want checkPints i guess i almost had it but it messed up.  
Maybe an example  
Do you want my FLA  
::He crys a river and will die the next day::

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 5:58pm UTC](https://forum.kirupa.com/t/laps/9931/11 "2002-12-21T17:58:00Z")

</div>

just an idea

car actions

```php
onClipEvent (load) {
	_root.checkpoint1._visible = true
	_root.checkpoint2._visible = false
	_root.checkpoint3._visible = false
	// and so on
}

onClipEvent (enterFrame) {
	if (this.hitTest(_checkpoint1)) {
		_root.checkpoint2._visible = true
	}
	if (this.hitTest(_root.checkpoint2)) {
		_root.checkpoint3._visible = true
	}
	// and so on
}

```

or something like that should work

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 21, 2002, 6:36pm UTC](https://forum.kirupa.com/t/laps/9931/12 "2002-12-21T18:36:53Z")

</div>

NeverMind forget it i wont make this then…
