Google Maps API, Custom Zoom Class

Hi

I have successfully loaded and implemented a google map to my fla project.

I am trying to use a custom zoom control and have found a class in google, unfortunately I cant seem to get it going and keep getting an error:

1180: Call to a possibly undefined method addFrameScript.

To be honest I have been guessing how to attach the class as I am still getting to grips with AS3.

My fla has this in frame 1:

import com.google.maps.*;
import com.google.maps.overlays.*;
import com.google.maps.controls.*;

import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

stage.align=StageAlign.TOP_LEFT;
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandler);

var my_map:Map = new Map();
my_map.key="ABQIAAAAB9qH5pOGdsij7Zkl9FQTaRSOq-ypG9Ui0aNUyMNBZ5DXOscZDRQqQXYVBB9Fv9qH5x0sH7JjPaWhPQ";
my_map.setSize(new Point(stage.stageWidth, stage.stageHeight));
my_map.addEventListener(MapEvent.MAP_READY,onMapReady);
addChild(my_map);

function onMapReady(e:Event):void {
	
	my_map.setCenter(new LatLng(51.589,-2.990),13,MapType.SATELLITE_MAP_TYPE); 
}


function resizeHandler(e:Event):void {
	my_map.setSize(new Point(stage.stageWidth, stage.stageHeight));
}


This works fine alone.

The question is…how do I then use the zoom class???

package {
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.display.Shape;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import com.google.maps.MapEvent;
import com.google.maps.Map;
import com.google.maps.MapType;
import com.google.maps.LatLng;
import com.google.maps.LatLngBounds;
import com.google.maps.ProjectionBase;
import com.google.maps.controls.MapTypeControl;
import com.google.maps.controls.ZoomControl;
import com.google.maps.controls.PositionControl;
import com.google.maps.controls.ControlPosition;
import com.google.maps.controls.ControlBase;
import com.google.maps.interfaces.IMap;

public class customZoom extends ControlBase {
	 
  /**
   * Constructor of custom control.
   * @constructor.
   * @param controlColour  Colour transform applied to control's black buttons.
   */
  public function customZoom() {
    // Control will be placed at the top left corner of the map,
    // 10 pixels from the edges.
    super(new ControlPosition(ControlPosition.ANCHOR_TOP_LEFT, 15, 15));
  }


  public override function initControlWithMap(map:IMap):void {
    createButton("Zoom in", 0, 0, 
                 function(event:Event):void
                 { map.zoomIn(); });
    createButton("Zoom out", 0, 20, 
                 function(event:Event):void
                 { map.zoomOut(); });
  }
	
  private function createButton(text:String,
				x:Number, 
                                y:Number,
                                callback:Function):void {
    var button:Sprite = new Sprite();
    button.x = x;
    button.y = y;
		
    var label:TextField = new TextField();
    label.text = text;
    label.x = 2;
    label.selectable = false;
    label.autoSize = TextFieldAutoSize.CENTER;
    var format:TextFormat = new TextFormat("Verdana");
    label.setTextFormat(format);
        
    var buttonWidth:Number = 100;
    var background:Shape = new Shape();
    background.graphics.beginFill(0xFFFFFF);
    background.graphics.lineStyle(1, 0x000000);
    background.graphics.drawRoundRect(0, 0, buttonWidth, 18, 4);

    button.addChild(background);
    button.addChild(label);
    button.addEventListener(MouseEvent.CLICK, callback);
		
    addChild(button);
  }
}
}

I have tried to combine both in a class and failed and used the customZoom class as the document class and failed at that too.

Please help…I’m tired!!!
Phil