FusionMaps and Flash > Handling Additional Events |
FusionMaps also allows you to handle the following event types in your parent movie:
|
Handling rendering event of map |
All the maps in FusionMaps suite expose an event rendered once they've finished rendering. You can create your listener objects to listen to this event, using the following code: |
//Create a listener object to listen to the rendered event of the map //Register the object with the chart |
When you run this code with your map, you'll get notified when the map rendering process is completed. |
Handling roll over/roll out event for entities |
FusionMaps allows you to capture roll over/out events in your code whenever an entity in map has been hovered upon. This feature can be particularly useful if you want to show additional information for each entity on roll over. To enable this, the first step is to add exposeHoverEvent='1' attribute to <map> element, as shown under: <map ... exposeHoverEvent='1' ...> After this, you can listen to the events using the code below: |
//Create a listener object to listen to events |
As you can see above, we've defined the rollOver and rollOut events for the map. Whenever the entities are now hovered upon, the listener object is called and the methods invoked. The target object passed to the method contains following parameters: id, sName (short name), lName (long name) and value. In the above example, we've just traced out the entity name received as parameter. In your code, you could pass indexes of data and then deal with it the way you want to. |