# 1119: Access of possibly undefined property myLoader

**URL:** <https://forum.kirupa.com/t/1119-access-of-possibly-undefined-property-myloader/252487>\
**Category:** Uncategorized\
**Created:** [February 20, 2008, 4:44pm UTC](https://forum.kirupa.com/t/1119-access-of-possibly-undefined-property-myloader/252487 "2008-02-20T16:44:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigmaxsstudio](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bigmaxsstudio](https://forum.kirupa.com/u/bigmaxsstudio)\
**Post date:** [February 20, 2008, 4:44pm UTC](https://forum.kirupa.com/t/1119-access-of-possibly-undefined-property-myloader/252487/1 "2008-02-20T16:44:28Z")

</div>

Here’s the code where I keep getting the error. This is being written with the mc that handles button function. It worked before I added this.parent myLoader… - Thanks

stop();  
function buttonClick(event:MouseEvent):void  
{  
gotoAndStop(event.target.name);

```
home.enabled = true;
services.enabled = true;
projects.enabled = true;
links.enabled = true;
contact.enabled = true;

event.target.enabled = false;
this.parent.myLoader.load(new URLRequest(event.target.name + ".swf"));

```

}  
home.addEventListener(MouseEvent.CLICK, buttonClick);  
services.addEventListener(MouseEvent.CLICK, buttonClick);  
projects.addEventListener(MouseEvent.CLICK, buttonClick);  
links.addEventListener(MouseEvent.CLICK, buttonClick);  
contact.addEventListener(MouseEvent.CLICK, buttonClick);
