I have a an SWF that loads another SWF. In the external swf, I'm trying to instantiate an object of a class that is defined in the first SWF.
I'm using flash builder, and each SWF is a different project. The external swf has a build path configured linking to the main swf, so the external swf has access to all the classes of the main swf.
The problem is that when I try to instantiate one of the classes that are defined in the main swf, it gives me a ReferenceError:
ReferenceError: Error #1065: Variable GraphicRadioButton is not defined.
When the main swf loads the second swf, it loads fine, and I can interact with the buttons and stuff from the external swf. But when I click a button that leads to an instantiation of this GraphicRadioButton class, it gives me this run-time error. Here is the exact line of code that throws the error (don't mind the params, I believe they have nothing to do with this issue):
maleGenderButton = new GraphicRadioButton(genderButtonGroup, nameInputRightBorder.x + nameInputRightBorder.width + 50,nameInputRightBorder.y, LoginAssets.MALE_GENDER, LoginAssets.MALE_GENDER_OVER, LoginAssets.MALE_GENDER_DOWN);
And this error happens after some other classes are instantiaded, and these other classes are also linked from the project of the main swf, so the problem is specifically with this GraphicRadioButton class.
And one last important info. When I run the exernal swf by itself, the error isn't thrown, it runs fine all the way. The error only happens when the swf is run as an external swf that is loaded from another swf, using Loader, URLRequest and these stuff.