I've seen an example in Javascript that replaces the Google Maps
standard right-click menu with a custom one.  Is there a way to do
this in ActionScript?

The way the javascript version works is by capturing the
"singlerightclick" event, something which I don't think is available
through the Flash version of the API.

If there was a way to simply disable the standard Google Maps menu,
perhaps that would be enough to get me started.

I appreciate any comments folks may have.

Here is the Javascript I'm referring to, taken from
http://www.ajaxlines.com/ajax/stuff/article/context_menu_in_google_maps_api.php
:

/Event listeners that will interact with our context menu
    GEvent.addListener(oMap,"singlerightclick",function(pixel,tile) {
        that.clickedPixel = pixel;
        var x=pixel.x;
        var y=pixel.y;
//Prevents the menu to go out of the map margins, in this case the
expected menu size is 150x110
        if (x > that.map.getSize().width - 160) { x = that.map.getSize
().width - 160 }
        if (y >that.map.getSize().height - 120) { y = that.map.getSize
().height - 120 }
        var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize
(x,y));
        pos.apply(that.contextmenu);
        that.contextmenu.style.display = "";
    });
    GEvent.addListener(oMap, "move", function() {
        that.contextmenu.style.display="none";
    });
    GEvent.addListener(oMap, "click", function(overlay,point) {
        that.contextmenu.style.display="none";
    });
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to