# Superclasses, Subclasses and Stage Declarations

**URL:** <https://forum.kirupa.com/t/superclasses-subclasses-and-stage-declarations/265065>\
**Category:** flash\
**Created:** [July 3, 2008, 3:06pm UTC](https://forum.kirupa.com/t/superclasses-subclasses-and-stage-declarations/265065 "2008-07-03T15:06:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dewey](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dewey](https://forum.kirupa.com/u/dewey)\
**Post date:** [July 3, 2008, 3:06pm UTC](https://forum.kirupa.com/t/superclasses-subclasses-and-stage-declarations/265065/1 "2008-07-03T15:06:08Z")

</div>

Hey Everyone,

I can’t for the life of me figure this problem out that I have been having…

I have a SuperClass called “BaseClass” for the sake of this post (can’t post code because of copyright things :|)

I then have 5 SubClasses, we’ll call them “A” “B” “C” “D” and “E”. These each have their own associated movie clips.

In clips “A” and “E” I have a simple button in the top right corner (looks like an X) to close/hide the movie clip.

For some reason though, when I have them both named “close\_btn” I get an error saying

1152: A conflict exists with inherited definition package.name:BaseClass.close\_btn in namespace public.

I don’t ANYWHERE have close\_btn in my BaseClass…

I can’t figure this out at all and I don’t even know what question to ask.

The other point I should make is that I have set the “Automatically Declare Stage Instances” in Publish Settings to true… when I don’t there’s a bunch of other errors that I would like to avoid…

Any help is appreciated,

Thanks,

–d

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [July 3, 2008, 3:45pm UTC](https://forum.kirupa.com/t/superclasses-subclasses-and-stage-declarations/265065/2 "2008-07-03T15:45:06Z")

</div>

Its likely your error is from automatically declare stage instances. Because you declare it in BaseClass (?) when Flash tries to “auto” declare it, you get the duplication. However, if you don’t auto declare, you’ll have to do it manually for every instance that is ever generated by the timeline which can be impractical sometimes.

---

<div class="post-metadata">

**Author:** ![dewey](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dewey](https://forum.kirupa.com/u/dewey)\
**Post date:** [July 3, 2008, 6:36pm UTC](https://forum.kirupa.com/t/superclasses-subclasses-and-stage-declarations/265065/3 "2008-07-03T18:36:21Z")

</div>

> [@senocular;2353137](#):
>
> Its likely your error is from automatically declare stage instances. Because you declare it in BaseClass (?) when Flash tries to “auto” declare it, you get the duplication. However, if you don’t auto declare, you’ll have to do it manually for every instance that is ever generated by the timeline which can be impractical sometimes.

The workaround is just changing the close\_btn in the second clip to exit\_btn and it works absolutely fine, it’s just a pain that it wouldn’t work…

Thanks for the response though!
