thanks At 2011-08-05 21:41:27,"Thiago Cordeiro" <[email protected]> wrote: 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<[email protected]> 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/srcline 179Flex 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/srcline 180Flex 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 visithttps://groups.google.com/d/msg/google-maps-api-for-flash/-/AUpu31DmThUJ. To post to this group, send email [email protected]. To unsubscribe from this group, send email [email protected]. For more options, visit this group athttp://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 [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. -- 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.
