Hi everyboy.

I'm trying to create a rollover effect on a Polygon, but when I try to
setOptions I got this erro:

TypeError: Error #1034: Type Coercion failed: cannot convert
com.google.maps.overlays::[EMAIL PROTECTED] to
com.google.maps.overlays.PolygonOptions.
        at Mapa/mouseOverOverlay()
        at MethodInfo-585()
        at flash.events::EventDispatcher/
flash.events:EventDispatcher::dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at com.google.maps.overlays::Overlay/
com.google.maps.overlays:Overlay::onOverlayMouseOver()


My code:

public function createPolygon(numCor:Number, arrLatLng:Array):Polygon
{
                        var polOptions:PolygonOptions = new PolygonOptions();
                        polOptions.fillStyle = new FillStyle( {
                                alpha:.5,
                                color:numCor
                        } );

                        polOptions.strokeStyle = new StrokeStyle( {
                                alpha:.7,
                                color:numCor,
                                thickness:5
                        } );


                        var overlay:Polygon = new Polygon(arrLatLng, 
polOptions);

                        overlay.addEventListener(MapMouseEvent.ROLL_OVER,
mouseOverOverlay);
                //      overlay.addEventListener(MapMouseEvent.ROLL_OUT,
mouseOverOverlay);

                        return overlay;
                }


public function mouseOverOverlay(e:Event):void {

                        var polOptions:PolygonOptions = new PolygonOptions( { 
fillStyle:
{ alpha: .8 }} )
                        e.currentTarget.setOptions(polOptions);
                }


Can anybody help me on this?


Hugs from Brazil!
--~--~---------~--~----~------------~-------~--~----~
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