# Trouble loading swf's in AS3.0

**URL:** <https://forum.kirupa.com/t/trouble-loading-swfs-in-as3-0/275784>\
**Category:** flash\
**Created:** [November 18, 2008, 5:12pm UTC](https://forum.kirupa.com/t/trouble-loading-swfs-in-as3-0/275784 "2008-11-18T17:12:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nadezjda](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nadezjda](https://forum.kirupa.com/u/Nadezjda)\
**Post date:** [November 18, 2008, 5:12pm UTC](https://forum.kirupa.com/t/trouble-loading-swfs-in-as3-0/275784/1 "2008-11-18T17:12:54Z")

</div>

Hi people!

The last time I used Actionscript, the current standard was 2.0, and I realize things have changed. I encounter my problem when trying to load a swf into a movieclip-container on the “main page”.

**homeBTN.addEventListener(MouseEvent.CLICK, myButtonFunction);  
function myButtonFunction(event: MouseEvent) {  
\_root.contents.loadMovie(“commercial.swf”);  
}**

Flash responds with:  
1119: Access of possibly undefined property contents through a reference with static type flash.display:DisplayObject.

The coding in line three used to work in AS2.0, and I’ve been searching the web forward and back for many hours now without a final solution.  
Could anyone please give me some pointers?

Thanks in advance 🙂
