I am switching from Flash to Flex and encountering some problems. I have a few classes defining my site structure:
location
index
main
concept
etc…
The document class is Main.as it calls location, index, etc. Location pops up first, when a location is chosen, it tells Index what to display based on the location. Then I try to
dispatchEvent(“locationEvent”, true));
to alert Main from Index to move to that page.
In main I have
this.addEventListener(“locationEvent”, loadPages);
but nothing is called. What am I missing? Is this even a good practice for site structure? Does the placement of the eventListener matter? Where else could I put it or call it from the index class?
Thanks in advance