background preloader


Facebook Twitter

Maps API ActionScript Reference - Google Maps API for Flash - Go. Class Alpha Alpha (opacity) constants.

Maps API ActionScript Reference - Google Maps API for Flash - Go

The main role of these constants is to improve code readability, using names that immediately suggest the effect that the chosen opacity value has. Fields Summary Constants Back to top class Color Color stores a color and provides methods for conversion between different textual and numeric representations of color. Constructors Summary Color Methods Summary Properties Constructors Color(clr:Number) Constructs a Color from a Number. var col:Color = new Color(0x0000ff); // blue Static Methods toHtml(color:Number): String Returns a color in HTML format, for example '#321fba'. Var col:Color = new Color(0xff8020);trace(col.toHtml()); // outputs "#ff8020" Instance Methods incRGB(deltaR:Number, deltaG:Number, deltaB:Number): void Increments this color's R, G and B components by individual delta values.

Var col:Color = new Color(0xff0000); // color is redcol.incRGB(0, 255, 0); // color is now yellow setRGB(compR:Number, compG:Number, compB:Number): void toString(): String. Source of MarkerCategoriesDemo. H. Using Google Maps in a Flex project. The following example shows how you can embed a Google map into a Flex/ActionScript 3.0 project.

Using Google Maps in a Flex project

Full code after the jump. Before getting started, you need to first get an API key from Google and then download the mapping component and put it in your /libs/ folder in your Flex Builder 3 project: View MXML View source is enabled in the following example. For more information and examples, see the “Google Maps API for Flash homepage”. Maps API for Flash - Google Code. Maps API for Flash Events - Google Maps API for Flash - Google C. Map Events Overview ActionScript within SWF files is event driven, meaning that ActionScript responds to interactions by generating events, and expects a program to listen to interesting events.

Maps API for Flash Events - Google Maps API for Flash - Google C

For example, within a Flash file, user mouse and keyboard interactions create events that propagate throughout the Flash UI. Events may also be generated internally by the system when a state change occurs. Programs interested in certain events will register ActionScript event listeners for those events and execute code when those events are received. Generally, UI events within Flash bubble up from leaf "targets" up to the container objects, triggering events throughout the chain of objects. The Google Maps API for Flash adds to this event model by defining custom events for objects within the API. Event Listeners Events in the Google Maps API for Flash are defined within specific classes (such as MapEvent) that contain an enumeration of all events specific to the Maps API for Flash.

Create your first Google Maps Flex application. Custom Search Matthew Casperson's Hubfolio Has Moved Matt's hubfolio articles moved to his personal website at You can also follow Matt on Twitter!

Create your first Google Maps Flex application

@mcasperson Recommended by About Bright Hub.