# Reference Sprite or Movieclip in document class

**URL:** <https://forum.kirupa.com/t/reference-sprite-or-movieclip-in-document-class/301426>\
**Category:** flash\
**Created:** [December 9, 2009, 6:07am UTC](https://forum.kirupa.com/t/reference-sprite-or-movieclip-in-document-class/301426 "2009-12-09T06:07:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vxd](https://avatars.discourse-cdn.com/v4/letter/v/848f3c/32.png) [@vxd](https://forum.kirupa.com/u/vxd)\
**Post date:** [December 9, 2009, 6:07am UTC](https://forum.kirupa.com/t/reference-sprite-or-movieclip-in-document-class/301426/1 "2009-12-09T06:07:12Z")

</div>

How do I reference MovieClips or Sprites created in the Document class from a custom class?

I know I can do this

```auto

//Sprite I want to reference
var orange:Sprite = new Sprite()

//Custom class
var customClass:CustomClass = new CustomClass(orange);

```

But I have a lot objects I want to reference so using the above method would take to long.

I know I can do this to reference a MovieClip on the main stage from a custom class

```auto

MovieClip(parent).orange;

```

Would referencing the sprite created in the document class be similar?

Thanks  
vxd
