# Zooming into Vector

**URL:** <https://forum.kirupa.com/t/zooming-into-vector/283204>\
**Category:** flash\
**Created:** [March 3, 2009, 4:57pm UTC](https://forum.kirupa.com/t/zooming-into-vector/283204 "2009-03-03T16:57:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesprucegoose](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@thesprucegoose](https://forum.kirupa.com/u/thesprucegoose)\
**Post date:** [March 3, 2009, 4:57pm UTC](https://forum.kirupa.com/t/zooming-into-vector/283204/1 "2009-03-03T16:57:29Z")

</div>

All,

I’m attempting to make a flash file that zooms into a vector image of a map. For example, having a whole map of the United States then clicking New Jersey and having the stage zoom to fit only New Jersey.

I started to achieve this with tweening (which didn’t work, which is why I’m posting my code), but I feel like there has to be a better way. I’ve been looking at fl.transitions.\* any good tutorials out there on how to use this?

–Thesprucegoose

```auto
import flash.events.MouseEvent;
import fl.transitions.*;
import fl.transitions.easing.*;

btn_zoom.addEventListener(MouseEvent.CLICK, zoomIn);
btn_back.addEventListener(MouseEvent.CLICK, zoomOut);

function zoomIn (e:MouseEvent):void{
gotoAndPlay(2);

}

function zoomOut (e:MouseEvent):void{
gotoAndStop(1);
}

```
