This content has been marked as final. Show 4 replies
You create an instance of each class and then simply call the methods from the instance (just like any other OO language).
I guess what I"m saying is I have a structure like this:
I can access the moveMap class fine from mapTools. I can't access mapTools from moveMap.
I can work down, but not back up. moveMap needs to call a method from the mapTools class.
What am I missing?
Just use the fully qualified directory path from the top level down. Since Flash will always look in the same library locations (relative to the main fla/swf file), using
from inside your moveMap file will give it access to functions inside the mapTools class once you have instantiated the mapTools class. I have used this numerous times for my AS3 projects and as of yet, I haven't run into any snags.
Well here is my deal. I'm loading the tools class with a movie clip export in the library. It loads fine. The movie clip is called "mapSection". I wish to use all the buttons in the mapSection in a separte class. There are move buttons in the mapSection to move the map. If I place the listeners in the main class loaded (mapTools) then the listeners work fine. However I will have tons of these for the various tools. So I want to separate the move button listeners to a separte class called moveMap. The mapTools loads the move map but the functions don't work unless they are in the main class...
Thanks for your help,