To add an ActionScript script to the 'Hide Marker' button, select the button with the ActionScript panel open. In the ActionScript panel, type the following text:
on (release) {
myMap.removeAllMarkers();
}
Save your file and test it by clicking the 'Show Marker' button and then the 'Hide Marker' button.
Change the address of a marker
Next, you will change the address of the marker to be your own address. Select the 'Show Markers' button and in the ActionScript panel locate the following line in the script:
var address = "9500 Gilman Drive, La Jolla , CA";
Change this address to your own address. Change any of the other text in the script where the gMyMarker variable is defined.
Change the starting location of the map
Next, click the region on the Stage where the map is located (even though you can't see the map, it's there and you can click it). Select the Parameters panel at the bottom next to the Properties panel. Locate the Address parameter and enter your address in place of the existing UCSD address. By changing this address, the map should open with its center located on your house. Save and test your file.
The Final Challenge: Add a Second Marker
Finally, add a second marker close to the first marker so that they both appear when the "Show Markers" button is clicked.
For Future Exploration
Visit the following sites for more examples and reference material: