# Extending a class that is a document class of a swf/fla

**URL:** <https://forum.kirupa.com/t/extending-a-class-that-is-a-document-class-of-a-swf-fla/253988>\
**Category:** Uncategorized\
**Created:** [March 7, 2008, 1:14am UTC](https://forum.kirupa.com/t/extending-a-class-that-is-a-document-class-of-a-swf-fla/253988 "2008-03-07T01:14:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mechamecha](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mechamecha](https://forum.kirupa.com/u/mechamecha)\
**Post date:** [March 7, 2008, 1:14am UTC](https://forum.kirupa.com/t/extending-a-class-that-is-a-document-class-of-a-swf-fla/253988/1 "2008-03-07T01:14:48Z")

</div>

Hey  
I have a question about extending or subclassing classes in as3 and flash.  
I have a fla project that has its Document Class set to an as3 class called Portrait. B/c the portrait class is a document class of my fla project, it directly accesses all movieclip objects in the scene.

I want to create a new project that extends this project. By that, I mean I would like to extend the functionality by adding more movieclip objects to the scene and more script, but keep the original source code. Is this even possible?

I tried writting a new class called PortraitExt which extends the Portrait class. And I duplicated the original project, added some new objects, and set its document class to PortraitExt. However, when I tried compiling, it complained about the orignal Portrait class not being able to find the movieclip objects that are contained in the scene.

Thanks!
