Right, so I have a main Document class called Bundl where I’m loading all my other classes (navigation, portfolio, …). What I’m trying to accomplish is to call a function inside my main Bundl class from a click from the navigation class.
The situation in code:
The Bundl Class (located in the root folder)
package {
import be.bundl.Navigation;
public class Bundl extends Sprite {
//vars called here
public function Bundl() {
nav=new Navigation("xml/navigation.xml");
addChild(nav);
}
//some more irrelevant functions here
//the function I need to call from the Navigation Class
public function portfolioXML(newXML:String):void {
portfolio=new Portfolio(newXML);
contentContainer.addChild(portfolio);
}
}
}
The code from Navigation class (located in /be/bundl)
//inside the btnClick function
var test:Bundl = new Bundl();
test.portfolioXML(_someVar)
Which results in an :
Error: Error #2136: The SWF file file:///Macintosh%20HD/Users/cerbellum/Projects/Bundl/site/FINAL/FULL.swf contains invalid data. at be.bundl::Navigation/btnClick()
I’m guessing this is due to the fact that I’m calling the parent class in a child or something like that, but how do I get this done otherwise? I must totally be overlooking something here.
Thanks in advance,
Kevin