1 person found this helpful
The only other option I know of without using a framework is a Singleton. Say, do you like spaghetti ?
I asked when things started to look like an Italian Soup
Can you send a value object in an event rather than a list of variables?
More like spagetti O's I guess
Sure, you simply make a custom event and specify properties on it. Of course that leads us into issues of dispatchers and bubbling but custom events are seen all throughout the Flex/AS3 framework from custom view components to presenters, managers and services.
public class CustomEvent extends Event
public static const GET_CUSTOMERS:String = "getCustomerList";
// The store for whom we are requesting the customer list
public var store:Store;
public function CustomEvent (type:String, bubbles:Boolean=true, cancelable:Boolean=false)
super(type, bubbles, cancelable);
Once component holds a reference to another. Or you set it on a global var shared by both components.