I have a swf, lets call it toImport.swf, it has an external as file, it loads images from xml. toImport.swf also has movieclips that have their own classes inside other external as files. I have another swf called portfolio.swf. Portfolio.swf is located in a higher directory. both swfs work perfectly on their own, but when I try to import toImport.swf into portfolio.swf it throws a 1009 “Cannot access a property or method of a null object reference” stemming from toImport().
I change the path to the xml inside the toImprot.as file, and i change all the paths to the images in the xml file to be relative to portfolio.swf and i still get a 1009 error! So I tried just moving all the actionscript from toImport.as to toImport.fla, and it will work inside portfolio.swf(including all the movieclips with their external as files), but then it will throw a 1069 error stating that it cannot find a property. This property turns out to be a text box, inside of a button, that is dynamically added to the stage of toImport.swf.
toImport.swf works PERFECTLY on its own. So I don’t understand why the external as does not load properly. I do not understand why, when there is no external as file the toImport.swf works inside of portfolio.swf but an item nested in a movieclip inside toImport.swf cannot be found. I am using the loader class and the swf is suppose to load when i click a button in portfolio.swf. The loader class finds the path to toImport.swf from an xml node, and that part is obviously working, its just that the imported swf does not work properly.
I have been seaching the internet for 3 days! Please help.