# Platform Hittest

**URL:** <https://forum.kirupa.com/t/platform-hittest/45586>\
**Category:** programming\
**Created:** [March 16, 2004, 4:19am UTC](https://forum.kirupa.com/t/platform-hittest/45586 "2004-03-16T04:19:48Z")\
**Posts on this page:** 1\
**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:** [March 16, 2004, 4:19am UTC](https://forum.kirupa.com/t/platform-hittest/45586/1 "2004-03-16T04:19:48Z")

</div>

Ok im making a platform game first time since I ever started Flash programming…

Anyways I want the Character to not fall through the platform or jump form below a platform and go through it.

The Code

```auto
onClipEvent (enterFrame) {
	if (hitTest(_root.hero)) {
		_root.hero._y = this._y-68;
		_root.hero.platform = "on";
	}
}

```

Thats the code that im using came from a tut that im doing but found that the tut wasent all that great so started folli around with the code.

Also with that code if i make the platform bigger it doesent work and it takes a long time in order to get the platform wokring.

I was thikin of adding alot of diffrent platform but dont want to keep changin the code.

Anyone Got Some Help?
