To clarify, since after reading what I wrote it sounded a bit insane and mixed up:
Directions implements IDirections event.directions is typed as an IDirections this does not conclude that event.directions is Directions even though Directions is one possible implementing class of IDirections (and the only one that I'm aware of, but "programming to an interface" means that they can switch out the Directions object for any other object that also implements the interface IDirections, it allows the API to be more flexible in the long run) your code should only assume that the object coming back implements IDirections, and is not necessarily a Directions object (even though it probably is in all cases right now). In the future if another concrete object that implements that interface is used your usage of the IDirections implementing object will still work. what I was saying you could do to get around the error alternative to typing your variable as IDirections is to cast the returning object, like: var dir:Directions = event.directions as Directions; this will get the compiler to stop complaining because you're basically saying whatever comes back I'm going to assume it is a Directions object, if you're wrong then dir will be null and any calls to methods or property accessing on it will result in a Null pointer exception. Hope that makes that one clear, Shaun -- You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-api-for-flash/-/uSLTTzxz9OcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en.
