Panning in UCSB Map

Panning in UCSB Map

posted 11-26-2001 04:55 PM
Panning in the UCSB map interface is done with the following code. This example is for panning left on the interface (moving the map right).
——————–
code:

on (release) {

//don’t edges be moved past the center
mapBounds = new object();
mapBounds = map.getBounds(_root);
if (mapBounds.xMin > 400) {
//don’t move
p = new sound();
p.attachSound(“mapEdge”);
p.start();
}else{
setProperty (“/map”, _x, Number(getproperty(“/map”, _x))+25);
x_value = getproperty(“/map”, _x);
y_value = getproperty(“/map”, _y);
}
}
on (rollOver) {
p = new sound();
p.attachSound(“panleft”);
p.start();
fscommand ( “startEffect”, “TextureSoft” );
}
on (rollOut) {
fscommand (“stopEffect”, “TextureSoft”);
}

_____________

David Jones
unregistered

Leave a Reply