Hi Martin, when you extend a class.. you'll have all functionality from de
original class and you can implement new functionalities to work with old
and new functionalities...

now that you have a CustomPolygon class, your block is not more a Polygon
and it's CustomPolygon
so if you change var block:Polygon = e.currentTarget as Polygon;  to var
block:CustomPolygon = e.currentTarget as CustomPolygon; probably it'll work

You are getting error on alert becouse probably you didn't imported the
Alert class.
include import mx.controls.Alert; on your project and it'll work

to include automatically you can press after "Alert." ctrl+space on windows
or control+space on Mac and it'll include this class

Thiago


2011/8/5 Martin Roberts <creativelyinteract...@gmail.com>

> ok here is what I have done.
>
> I have created the class CustomPolygon :) no problems there
>
> but I get 2 other error messages. in the clickBlock function
>
> var block:Polygon = e.currentTarget;
>
> 1118: Implicit coercion of a value with static type Object to a possibly
> unrelated type com.google.maps.overlays:Polygon. FugroG.mxml /FugroG2/src line
> 179 Flex Problem
>
> I have changed the
> "var block:Polygon = e.currentTarget;" to
> " var block:Polygon = e.currentTarget as Polygon;"
> Not sure if that is right but it resolved the error.
>
> and
>
> Alert.show(block.obj.id.toString());
>
> 1119: Access of possibly undefined property obj through a reference with
> static type com.google.maps.overlays:Polygon. FugroG.mxml /FugroG2/src line
> 180 Flex Problem
>
> Not sure but think obj and id is not pulling from CustomPolygon.
>
> Thank you so mush for your patience
>
>
>
>
>  --
> 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/-/AUpu31DmThUJ.
>
> To post to this group, send email to
> google-maps-api-for-flash@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-api-for-flash+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api-for-flash?hl=en.
>

-- 
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 google-maps-api-for-flash@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-api-for-flash+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en.

Reply via email to