# AS3 Help!!

**URL:** https://forum.kirupa.com/t/as3-help/636616
**Category:** flash
**Created:** [May 15, 2017, 9:55am UTC](https://forum.kirupa.com/t/as3-help/636616 "2017-05-15T09:55:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lewismills](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@lewismills](https://forum.kirupa.com/u/lewismills)
#### Post date: [May 15, 2017, 9:55am UTC](https://forum.kirupa.com/t/as3-help/636616/1 "2017-05-15T09:55:13Z")

</div>

i have a promblem with my code im new to flash and it has be really confussed i dont no alot about flash but the problem is  
TypeError: Error #1006: checkCollisionWithPlayer is not a function.  
at Platform/onEnterFrame()  
and in main it is a function as you see below:

public function checkCollisionWithPlayer(wall:MovieClip)  
{  
if (player!= null)  
{  
Collision.block(player, wall);  
trace(“boo”);  
}  
}

---

<div class="post-metadata">

### Author: ![linusj](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@linusj](https://forum.kirupa.com/u/linusj)
#### Post date: [May 16, 2017, 12:56pm UTC](https://forum.kirupa.com/t/as3-help/636616/2 "2017-05-16T12:56:09Z")

</div>

Did you place that code in the timeline? or is it in main class? ‘public’ only works within a package(class) and not on the timeline.
