Hi Bernattorras-

That probably means your variables are in a different scope. I believe
that if you declared your map variables in the main timeline, you
could then access them via _root or _level0. (e.g. _root.map). It
sounds like you also have to re-import the classes. Perhaps it'd be
easier if you could just call a globally defined function in that
MovieClip that would then do everything for you?

- pamela

On Thu, Jan 15, 2009 at 8:56 PM, bernattorras <[email protected]> wrote:
>
> Thks Pamela!
>
> I've done it and it works perfectly. I have this code in the first
> frame:
>
> btn2.addEventListener(MouseEvent.CLICK,b2);
> function b2(event:MouseEvent){
>         map.setCenter(new LatLng(45.23509, 1.80991), 16,
> MapType.NORMAL_MAP_TYPE);
> }
>
> Now I'm trying to change the same map by pressing a button wich is in
> the second frame of a MovieClip placed in the stage. I try to paste
> the same code in the second frame of the MovieClip:
>
> btn3.addEventListener(MouseEvent.CLICK,b3);
> function b3(event:MouseEvent){
>         map.setCenter(new LatLng(45.23509, 1.80991), 16,
> MapType.NORMAL_MAP_TYPE);
> }
>
> When I test the movie flash tells me that the "map", "LatLng" and
> "MapType" properties arent defined... How can I get acess to this
> properties?
>
> Thanks a lot! :)
> >
>

--~--~---------~--~----~------------~-------~--~----~
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