Flash ActionScript 3.0 Google Map API Tutorial 2 of 2 by tunevison

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,233
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 16, 2010

http://tunevision.tv/downloads/tvMap.zip

How to put a Google Map in your Flash application using ActionScript Part 2 .

Download the source files by clicking onto the link above.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (tunevision)

  • Hi John,

    Thanks for the tutorials.

    I'm wanting my map to be a bit more like a static map but want to be able to control and change the map type.

    I have disabled the control bar //gomap.addControl(myNavPos); and also the zoom //gomap.enableScrollWheelZoom(­); but need to disable the pan.

    Can you pleae help me out and tell me what the code should be and also where to put in?

    Thanks, Craig

  • @Panoviz ,

    Thanks.

    You would disable the scroll as you mentioned as well as this section: // or position the navigation control to coordinates. //var nav_position:ControlPosition = new ControlPosition(ControlPositio­n.ANCHOR_TOP_LEFT, -60,40); //var myNavPos:NavigationControl = new NavigationControl(); //myNavPos.setControlPosition(­nav_position); //gomap.addControl(myNavPos);

    Click/drag can be defeated by a transparent movieclip on a layer or frame above.

    Hope this helps.

    -John

  • Pls help. how can i close the map when exiting a frame in my adobe flash CS5 project?

  • @ArnoldSwacheneger

    You need to nest it in a movieclip.

    Make a movieclip on the frame. Put the map code inside the movieclip.

    Now when you navigate away from that frame the map will not be visible.

  • hi again, i try to add some maps in with differnet latling different frame. but it says duplicate. what should i add in the script. thanx

  • @TheJulwow Give every variable and function on the other frame a unique name like : var gomapB:Map = new Map() gomapB.key = "your api key"; gomapB.setSize(new Point(500,500)) gomapB.x = 390 gomapB.y = 80 gomapB.addEventListener(MapEve­nt.MAP_READY, onMapReadyB); this.addChild(gomapB); function onMapReadyB(e:Event):void { ...........and so on... More people can answer your questions faster on the forum at DevelopPHP! Thanks Julwow.
see all

All Comments (25)

Sign In or Sign Up now to post a comment!
  • Helped to do my project! Thank you very much! it was very exciting :)

  • Really helpful thanks dude.

  • John, after inserting the api into my flash file, when I run it, the map window remains on my other screens when I click to bring up other pages. The Google Map window appears over anything else. How can I make the map hidden after I click out of it?

    Thanks

    Tom

  • @tunevision:is this correct john?

    var view_position:ControlPosition = new ControlPosition(ControlPositio­n.ANCHOR_TOP_LEFT, 110,

    var myViewPos:MapTypeControl = new MapTypeControl();

    myViewPos.setControlPosition(v­iew_position);

    gomap.addControl(myViewPos);

    *error:1084: Syntax error: expecting rightparen before var.

  • @tunevision:is this correct john?

    var view_position:ControlPosition = new ControlPosition(ControlPositio­n.ANCHOR_TOP_LEFT, 110,

    var myViewPos:MapTypeControl = new MapTypeControl();

    myViewPos.setControlPosition(v­iew_position);

    gomap.addControl(myViewPos);

    *error:1084: Syntax error: expecting rightparen before var.

    Regards,

    Oebay

  • @tunevision:is this correct john?

    var view_position:ControlPosition = new ControlPosition(ControlPositio­n.ANCHOR_TOP_LEFT, 110,

    var myViewPos:MapTypeControl = new MapTypeControl();

    myViewPos.setControlPosition(v­iew_position);

    gomap.addControl(myViewPos);

    *error:1084: Syntax error: expecting rightparen before var.

    Regards,

    Oebay (Indonesia)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more