My Document Class is called “Main”. I have another class called LittleImage inside LittleImage.as. Inside of the Main class, I have “import LittleImage” defined and I can create a new instance of the LittleImage class and everything is working fine.
The instances of the LittleClass images are essentially thumbnails of larger images inside of a movieclip on the stage. I’ve created an event listener for the MouseUp on these instances of LittleImage. When the event listener fires, I want it to call a public function called doTween() that is defined in the Main class.
I am having trouble getting this to work. In LittleImage.as I have “import Main”. This throws no errors. Inside LittleImage, I’ve tried:
This gives a compiler error: Call to a possibly undefined method doTween.
This gives a compiler error: Call to a possibly undefined method doTween through a reference with static type Class.
var m = new Main();
I get the following error when I click on the thumbnail which fires these two lines of code:
Error: Error #2136: The SWF file file:///D|/2Archive/Work/WebDevelopment/c2008/src/2008.swf contains invalid data.
What do I have to do to get this to work?