Hi
Somebody help me because I feel like I’m playing with fire here, lol
I have a class Map which extends MovieClip. I also have a document class SmallMap which extends Map. In SmallMap.fla’s library there’s a mc that belongs to the class FirstMap.
In my main .fla:
var myMap:MovieClip;
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,done);
loader.load(new URLRequest("SmallMap.swf"));
function done(e:Event):void {
myMap=loader.content as MovieClip;
myMap.addMap()
}
addMap is a method in Map, which creates a new FirstMap. Of course, there’s no FirstMap in Map, only in SmallMap.
the code works fine as long as I don’t mention “Map” anywhere in my code. However, if I do mention it, then this will generate the compiler error “Call to a possibly undefined method FirstMap”
here’s the file (it’s like 25 lines max, please take a look at it)
Thanks