I have recently started using Actionscript 3.0 and have made a point of using classes exclusively as opposed to putting code all over the timeline. I have encountered one problem though.
Let's say I'm making a flash website and I have a document class with two public vars: an instance of a Navigation class and an instance of a Page class (both of which I created). When a user clicks a button inside the instance of the Navigation class, that instance needs to tell the instance of the Page class to load some page.
I'm very used to Actionscript 2.0 and I've been assuming that since these two instances are children of the document class that the two would be able to tell each other to do something or alter some variables inside the other by use of "parent" or "root." But I keep getting an error like this: "Access of undefined property..."
So am I approaching this entirely correctly? Can someone offer some help on this topic?
All help is appreciated, if it would help better for me to show some code, I'll gladly do so. Thanks!
Let's say I'm making a flash website and I have a document class with two public vars: an instance of a Navigation class and an instance of a Page class (both of which I created). When a user clicks a button inside the instance of the Navigation class, that instance needs to tell the instance of the Page class to load some page.
I'm very used to Actionscript 2.0 and I've been assuming that since these two instances are children of the document class that the two would be able to tell each other to do something or alter some variables inside the other by use of "parent" or "root." But I keep getting an error like this: "Access of undefined property..."
So am I approaching this entirely correctly? Can someone offer some help on this topic?
All help is appreciated, if it would help better for me to show some code, I'll gladly do so. Thanks!