Facile:
Crea un movieclip grande quanto il canvas (o comunque quanto l'area in cui vuoi che si muova la mappa) e mettilo sotto la mappa (o sopra con trasparenza);nel mio esempio lo chiamerò refer.
Crea poi la mappa, che sarà un movieclip con il tuo vettoriale dentro e un pulsante grande quanto tutta la mappa.
Sul primo fotogramma della mappa scrivi:
codice:
RefBounds = _root.refer.getBounds(_root);
bounds = this.getBounds(_root);
x = this._x;
y = this._y;
Sul pulsante invece scrivi:
codice:
on(press){
left = x-(bounds.xMax-RefBounds.xMax);
top = y-(bounds.yMax-RefBounds.yMax);
right = x-(bounds.xMin-RefBounds.xMin);
bottom = y-(bounds.yMin-RefBounds.yMin);
this.startDrag(false,left,top,right,bottom);
}
on(release){
this.stopDrag();
}
L'ho appena testato e funziona.
Ciauz