I have a class that holds an object from another class. When I want to call some function from this class, I get the above error... See code to get a better idea!
MainMenu.as
package portfolioSource {
public class MainMenu extends MovieClip {
private var movieContainer:MoviePlayerContainer;
public function MainMenu() {
movieContainer = new MoviePlayerContainer();
this.addChild(movieContainer);
}
function ef_btnTheme1CLICK(event:Event){
movieContainer.playContent(1);//It breaks here
}
}
}
and MoviePlayerContainer.as
package portfolioSource {
public class MoviePlayerContainer extends MovieClip {
public function playContent(_parameter:Number){
trace("I do not work");
}
}
}
Any ideas on what I'm doing wrong? Not one of the functions in the movieContainer object works. I get the same error every time. The constructor (omitted here) does not get executed, but it generates no error...
When I remove the package part and leave it default like :
package {
public class someClass{
}
}
Then it works. So I am really confused now.
Thanks!