Hi everybody,
I have three classes:
- MainComponent //core things, setting sounds, etc
- Control //ads behavior to all buttons neccessary to control the movie
- Design //takes care only about the layout, Stage.onResize, placing the elements, etc
In the MainComponent I initialized both classes, Control and Design as well. Now I have a problem. I would like to add a behavior to a button (that happens in Control class) that would call a public function in Design class. At the moment it is not possible because Control class has no reference to Design class. Is there any way how I can do it without a reference? I hope somebody gets what I mean and I do hope I explained it well. 
With other words - is there any possibility to call a public class from Design in Control class without this?
function MainComponent(){
var D = new Design();
var C = new Control(D); // <- passing the parameter = reference to Design
}
Thanks in advance for any comments or ideas!