# Class definition conflicts

**URL:** <https://forum.kirupa.com/t/class-definition-conflicts/308484>\
**Category:** flash\
**Created:** [April 23, 2010, 5:44pm UTC](https://forum.kirupa.com/t/class-definition-conflicts/308484 "2010-04-23T17:44:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddmosphere](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@eddmosphere](https://forum.kirupa.com/u/eddmosphere)\
**Post date:** [April 23, 2010, 5:44pm UTC](https://forum.kirupa.com/t/class-definition-conflicts/308484/1 "2010-04-23T17:44:40Z")

</div>

Hi there!

I came across the following issue:

- I am loading a particular FLA (let’s call it Module1.fla) which contains a Symbol with an associtated class “FakeImage1”; the class file DOES NOT exist, só Flash creates it when compiling the FLA. This FLA has a Document Class (Module1.as), in which I instantiante FakeImage1 (which is a different asset/graphic) by calling …new FakeImage1()

- then, I am using a custom ModuleManager to unload Module1 and load another SWF (Module2.swf/Module2.as). This one also has a FakeImage1 Symbol in it’s Library and also instantiates it in the Document Class.

- now, assuming that I am correctly unloading Module1 (in my ModuleManager) before I load Module2, why is it that FakeImage1 in Module2 is instantiating the same asset that was instantiated in Module1 ?

It seems that the automatically-created FakeImage1 class is still in memory (or wherever Flash puts it) when I load Module2 and therefore, my _new_ asset isn’t being loaded - instead, the first one is.

Dos this make sense, anyone?

Note1: I DON’T want to use class/as files for my Library symbols;  
Note2: of course, I could just use different class names in my modules/flas, but le’ts assume that I don’t want to do that 🙂

Thanks! 🐇
