# Referencing a movie itself

**URL:** <https://forum.kirupa.com/t/referencing-a-movie-itself/247976>\
**Category:** flash\
**Created:** [January 2, 2008, 12:09pm UTC](https://forum.kirupa.com/t/referencing-a-movie-itself/247976 "2008-01-02T12:09:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon4341189](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@anon4341189](https://forum.kirupa.com/u/anon4341189)\
**Post date:** [January 2, 2008, 12:09pm UTC](https://forum.kirupa.com/t/referencing-a-movie-itself/247976/1 "2008-01-02T12:09:25Z")

</div>

Hi guys,

I am currently trying to build a preloader that will preload my movie. The code for the preloader resides in the class.

Basicly, i need to pass a reference of my movie to my class. I am currently using:

```auto

var myloader:mySiteLoader = new mySiteLoader(this);

```

in my class i have the following relevant code:

```auto

private var movieToLoad:*;
public function mySiteLoader(movieLoad:*){
   movieToLoad = movieLoad;
   movieToLoad.addEventListener(ProgressEvent.PROGRESS, progressHandler);
   movieToLoad.addEventListener(Event.COMPLETE, onComplete);
}

```

This however, chucks an TypeError: Error #1010: A term is undefined and has no properties. at me.

Any ideas appreciated 🙂
