# Extending Main class

**URL:** <https://forum.kirupa.com/t/extending-main-class/328406>\
**Category:** flash\
**Created:** [May 15, 2012, 7:29am UTC](https://forum.kirupa.com/t/extending-main-class/328406 "2012-05-15T07:29:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [May 15, 2012, 7:29am UTC](https://forum.kirupa.com/t/extending-main-class/328406/1 "2012-05-15T07:29:42Z")

</div>

[CENTER][LEFT]Hi,  
I am blocked by a very nasty problem: I developed a videogame, and the project was a Flash IDE one (I use FlashDevelop), that means I had a FLA with class “Main”: inside class Main I used the instance names that were in the scene of the FLA.

Now I am making a parallel videogame, an extension of the first one, keeping the same FLA and extending the Main class by MainLive, so I replaced the FLA class Main with MainLive (I am using a copy of the original FLA, but I have to keep all the same contents and the same scene): the problem now is that if I compile the new project I can’t access scene instances anymore, because the FLA class is MainLive, but the instances are called/used by the superClass Main, so I obtain an infinite list of “1120: Access of undefined property xxx”.  
I should keep the class Main in the FLA, and extend it by MainLive in FlashDevelop, right? But how? If I compile it the Flash IDE compiles Main as the document class, ignoring MainLive even if I set it as Document class in FlashDevelop! I am stuck! :ko:[/LEFT]  
[/CENTER]
